Filter
rpress_get_cart_subtotal
On this page
Filters the cart subtotal.
Runs in RPRESS_Cart::get_subtotal(). The value is the sum of the item subtotals before discounts, fees and tax.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$subtotal | float | Cart subtotal. |
Return value#
float. The cart subtotal.
Example#
function my_cart_subtotal( $subtotal ) {
return round( $subtotal, 2 );
}
add_filter( 'rpress_get_cart_subtotal', 'my_cart_subtotal', 10, 1 );
Source#
Applied in:
includes/cart/class-rpress-cart.php(line 1090), inRPRESS_Cart::get_subtotal()
See also#
Was this page helpful?
