WC_Product_Usage
in package
Product usagee
Table of Contents
- get_rules_for_product() : WC_Product_Usage_Rule_Set|null
- Get product usage rule if it needs to be applied to the given product id.
- load() : mixed
- Load Product Usage class.
- includes() : mixed
- Include support files.
- get_product_usage_restriction_rule() : array<string|int, mixed>|null
- Get the product usage rule for a product.
Methods
get_rules_for_product()
Get product usage rule if it needs to be applied to the given product id.
public
static get_rules_for_product(int $product_id) : WC_Product_Usage_Rule_Set|null
Parameters
- $product_id : int
-
product id to get feature restriction rules.
Tags
Return values
WC_Product_Usage_Rule_Set|null —load()
Load Product Usage class.
public
static load() : mixed
Tags
Return values
mixed —includes()
Include support files.
protected
static includes() : mixed
Tags
Return values
mixed —get_product_usage_restriction_rule()
Get the product usage rule for a product.
private
static get_product_usage_restriction_rule(int $product_id) : array<string|int, mixed>|null
Parameters
- $product_id : int
-
product id to get feature restriction rules.