Applicable
Indicates that a discount type needs to be verified as applicable to the cart as a whole.
Tags
Table of Contents
- is_applicable_to_cart() : bool
- Determine if the discount is applicable to the cart as a whole.
- is_applicable_to_order() : bool
- Determine if the discount is applicable to the order as a whole.
Methods
is_applicable_to_cart()
Determine if the discount is applicable to the cart as a whole.
public
is_applicable_to_cart(WC_Cart $cart) : bool
Parameters
- $cart : WC_Cart
-
The cart object.
Return values
bool —True if the discount is applicable to the cart as a whole.
is_applicable_to_order()
Determine if the discount is applicable to the order as a whole.
public
is_applicable_to_order(WC_Order $order) : bool
Parameters
- $order : WC_Order
-
The order object.
Return values
bool —True if the discount is applicable to the order as a whole.