Skip to content
Docs
Get RestroPress

Filter

rpress_cart_title

Updated
On this page

Filters the heading shown above the cart contents.

Applied to the cart heading, which defaults to Your Order, in the sidebar cart template, the checkout cart table, and the cart_title value localised to the frontend script. Filtering it changes the text in all three. The filter receives only the title string, so it cannot tell the contexts apart.

Parameters#

ParameterTypeDescription
$titlestringCart title.

Return value#

string. The cart title.

Example#

function my_cart_title( $title ) {
	return __( 'Your basket', 'my-textdomain' );
}
add_filter( 'rpress_cart_title', 'my_cart_title' );

Notes#

Fired from the frontend scripts class, the sidebar cart template and the checkout cart template. The default text differs in case between the checkout cart (Your order) and the others (Your Order).

Source#

Applied in:

  • includes/class-rpress-frontend-scripts.php (line 397), in RP_Frontend_Scripts::load_scripts()
  • templates/cart/cart.php (line 53)
  • templates/checkout_cart.php (line 18)

See also#

Was this page helpful?