Filter
rpress_get_cart_tax
On this page
Filters the total tax of the cart.
Runs at the end of RPRESS_Cart::get_tax(). The value is the sum of the per-line tax values, recalculated on the discounted subtotal for flat discounts, after passing through rpress_sanitize_amount().
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | float | Cart tax amount. |
Return value#
float. The cart tax.
Example#
function my_cart_tax( $cart_tax ) {
return max( 0, $cart_tax );
}
add_filter( 'rpress_get_cart_tax', 'my_cart_tax', 10, 1 );
Source#
Applied in:
includes/cart/class-rpress-cart.php(line 1239), inRPRESS_Cart::get_tax()
See also#
Was this page helpful?
