Skip to content
Docs
Get RestroPress

Action

rpress_before_cart_widget

Updated
On this page

Fires before the cart contents inside the cart widget.

Runs in the cart widget output after the widget title and before rpress_shopping_cart() prints the cart. It does not run when the widget is hidden on the checkout page.

Example#

function my_before_cart_widget() {
	echo '<p class="my-cart-note">' . esc_html__( 'Free delivery over 30.', 'my-textdomain' ) . '</p>';
}
add_action( 'rpress_before_cart_widget', 'my_before_cart_widget', 10, 0 );

Source#

Fired from:

  • includes/widgets.php (line 50), in rpress_cart_widget::widget()

See also#

Was this page helpful?