Filter
rp_quantity_updated_in_cart
On this page
Filters the notice text shown when an item's quantity is updated in the cart.
Runs in RP_Frontend_Scripts::load_scripts() and is localised as the quantity_updated_in_cart string of the rp_scripts object. The script shows it instead of the added notice when the server response reports that the add request was merged into an existing cart line.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$text | string | Notice suffix, quantity updated in your cart by default (with a leading space). |
Return value#
string. The notice text, normally starting with a space.
Example#
function my_quantity_updated_text( $text ) {
return __( ' quantity changed', 'my-textdomain' );
}
add_filter( 'rp_quantity_updated_in_cart', 'my_quantity_updated_text' );
Source#
Applied in:
includes/class-rpress-frontend-scripts.php(line 339), inRP_Frontend_Scripts::load_scripts()
See also#
Was this page helpful?
