Filter
rpress_cart_item
On this page
Filters the rendered HTML of a cart item.
Runs at the end of rpress_get_cart_item_template(), after the cart/item template part has been rendered and its placeholders (title, price, add-ons, remove URL and so on) have been replaced.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$item | string | Rendered cart item HTML. |
$id | int | Menu item (fooditem) post ID of the cart line. |
Return value#
string. The cart item HTML.
Example#
function my_cart_item_html( $item, $id ) {
return str_replace( 'rpress-cart-item', 'rpress-cart-item my-cart-item', $item );
}
add_filter( 'rpress_cart_item', 'my_cart_item_html', 10, 2 );
Source#
Applied in:
includes/cart/template.php(line 155), inrpress_get_cart_item_template()
Was this page helpful?
