Action
rpress_checkout_cart_item_title_after
On this page
Fires after the item details in a checkout cart row.
Runs for every cart item row after the title, quantity, price and any special instruction are printed. Use it to add extra details under the item.
Available since RestroPress 1.0.0.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$item | array | The cart item, with keys such as id (the menu item ID), options, price_id and instruction. |
$key | int | The cart item key. |
Example#
function my_cart_item_title_after( $item, $key ) {
$note = get_post_meta( $item['id'], 'my_item_note', true );
if ( $note ) {
echo '<div class="my-item-note">' . esc_html( $note ) . '</div>';
}
}
add_action( 'rpress_checkout_cart_item_title_after', 'my_cart_item_title_after', 10, 2 );
Source#
Fired from:
templates/checkout_cart.php(line 101)
See also#
Was this page helpful?
