Skip to content
Docs
Get RestroPress

Filter

rpress_cart_tax

Updated
On this page

Filters the formatted cart tax text.

Runs in RPRESS_Cart::tax(). The value is the currency-formatted cart tax. It is echoed when $echo is true and returned otherwise.

Parameters#

ParameterTypeDescription
$cart_taxstringCurrency-formatted cart tax.

Return value#

string. The formatted tax.

Example#

function my_cart_tax_label( $cart_tax ) {
	return $cart_tax;
}
add_filter( 'rpress_cart_tax', 'my_cart_tax_label', 10, 1 );

Notes#

The echoed output is escaped with esc_html().

Source#

Applied in:

  • includes/cart/class-rpress-cart.php (line 1258), in RPRESS_Cart::tax()

See also#

Was this page helpful?