Skip to content
Docs
Get RestroPress

Filter

rpress_cart_remove

Updated
On this page

Filters the Remove label on sidebar cart items.

Runs in the sidebar cart item template when the Remove link text is printed. The default is the translated string "Remove". The value is printed with esc_html().

Parameters#

ParameterTypeDescription
$labelstringThe link label.

Return value#

string. The link label.

Example#

function my_cart_remove_label( $label ) {
	return __( 'Delete', 'my-textdomain' );
}
add_filter( 'rpress_cart_remove', 'my_cart_remove_label' );

Notes#

Used by both the default cart item template and the modern template pack item template.

Source#

Applied in:

  • templates/cart/item.php (line 52)
  • templates/packs/modern/cart/item.php (line 56)

See also#

Was this page helpful?