RestroPress

⌘K
  1. Home
  2. Docs
  3. RestroPress
  4. Developer Docs
  5. Filters
  6. rpress_cart_item

rpress_cart_item

The HTML for each item in the shopping cart (except on the checkout page) is passed through this filter. The filter includes one parameter, $item, which is a string containing the HTML code for the cart item. 

The sample below shows an example of how you could modify it:

function rpress_cart_data_callback' ( $item, $id ) {
$item = str_replace( '{special_instruction}', $instruction, $item );
return $item;
}
add_filter( ' rpress_cart_data', 'rpress_cart_data_callback', 10, 2 );

How can we help?