Filter
rpress_get_cart_item_name
On this page
Filters the display name of a cart item.
Runs in RPRESS_Cart::get_item_name(). The title is the menu item title, with the price option name appended when the item has variable prices.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$item_title | string | Cart item title. |
$arg2 | int | Menu item (fooditem) post ID. |
$item | array | The cart line. |
Return value#
string. The item name.
Example#
function my_cart_item_name( $item_title, $fooditem_id, $item ) {
return wp_strip_all_tags( $item_title );
}
add_filter( 'rpress_get_cart_item_name', 'my_cart_item_name', 10, 3 );
Source#
Applied in:
includes/cart/class-rpress-cart.php(line 1212), inRPRESS_Cart::get_item_name()
See also#
Was this page helpful?
