Filter
rpress_get_cart_discountable_subtotal
On this page
Filters the portion of the cart subtotal that discounts can apply to.
Runs in RPRESS_Cart::get_discountable_subtotal() after the subtotal of items not excluded by discount rules has been computed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$subtotal | float | Subtotal of the discountable items. |
Return value#
float. The discountable subtotal.
Example#
function my_cart_discountable_subtotal( $subtotal ) {
return $subtotal;
}
add_filter( 'rpress_get_cart_discountable_subtotal', 'my_cart_discountable_subtotal', 10, 1 );
Source#
Applied in:
includes/cart/class-rpress-cart.php(line 1036), inRPRESS_Cart::get_discountable_subtotal()
See also#
Was this page helpful?
