Filter
rp_update_cart
On this page
Filters the Update Cart button text used by the frontend script.
Runs in RP_Frontend_Scripts::load_scripts() and is localised as the update_cart string of the rp_scripts JavaScript object. The script writes it into the product modal's submit button when a cart item is being edited.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$text | string | Button text, Update Cart by default. |
Return value#
string. The button text.
Example#
function my_update_cart_text( $text ) {
return __( 'Update order', 'my-textdomain' );
}
add_filter( 'rp_update_cart', 'my_update_cart_text' );
Source#
Applied in:
includes/class-rpress-frontend-scripts.php(line 321), inRP_Frontend_Scripts::load_scripts()
See also#
Was this page helpful?
