LLMS_Product::has_restrictions()
Determine if any restrictions exist on the product.
Description Description
See also See also
Return Return
(boolean) true
if there is at least one restriction on the product, false
otherwise.
Source Source
File: includes/models/model.llms.product.php
public function has_restrictions() { $restrictions = $this->get_restrictions(); $has_restrictions = count( $restrictions ) > 0; /** * Filter whether the product has any purchase restrictions. * * @since 3.38.0 * * @param bool $has_restrictions Whether the product `$product` has restrictions. * @param string[] $restrictions Array of restrictions placed on the product. * @param LLMS_Product $product The LLMS_Product object. */ return apply_filters( 'llms_product_has_restrictions', $has_restrictions, $restrictions, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.38.0 | Introduced. |