Skip to content
Docs
Get RestroPress

Action

rpress_cart_actions

Updated
On this page

Fires before the Remove link in a checkout cart row.

Runs for every cart item row inside the actions wrapper, before the remove button. Use it to add extra action links for the item.

Parameters#

ParameterTypeDescription
$itemarrayThe cart item, with keys such as id (the menu item ID), options, price_id and instruction.
$keyintThe cart item key.

Example#

function my_cart_actions( $item, $key ) {
	echo '<a class="my-view-item" href="' . esc_url( get_permalink( $item['id'] ) ) . '">' . esc_html__( 'View', 'my-textdomain' ) . '</a>';
}
add_action( 'rpress_cart_actions', 'my_cart_actions', 10, 2 );

Source#

Fired from:

  • templates/checkout_cart.php (line 105)

See also#

Was this page helpful?