WooCommerce Code Reference

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_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.

Tags
since
9.3.0
Return values
array<string|int, mixed>|null