Action
rpress_cart_actions
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#
| 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_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?
