Filter
rpress_add_to_cart_text
On this page
Filters the label of the add-to-cart button.
Runs when the AJAX add-to-cart link is rendered, that is when AJAX is not disabled. The default label is the translated string 'Add'.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$add_to_cart_label | string | Button label. |
Return value#
string. Button label.
Example#
function my_add_to_cart_text( $add_to_cart_label ) {
return __( 'Add to order', 'my-plugin' );
}
add_filter( 'rpress_add_to_cart_text', 'my_add_to_cart_text' );
Notes#
Fires from both the list and grid purchase link builders.
Source#
Applied in:
includes/template-functions.php(line 188), inrpress_get_purchase_link()includes/template-functions.php(line 328), inrpress_get_purchase_link_grid()
See also#
Was this page helpful?
