Skip to content
Docs
Get RestroPress

Action

rpress_product_details_widget_before_title

Updated
On this page

Fires after the title and before the item name in the menu item details widget.

Runs in the menu item details widget output after the widget title and before the menu item title is printed.

Parameters#

ParameterTypeDescription
$instancearrayThe widget instance settings.
$fooditem_idintID of the menu item shown in the widget.

Example#

function my_details_widget_before_title( $instance, $fooditem_id ) {
	echo '<span class="my-badge">' . esc_html__( 'Popular', 'my-textdomain' ) . '</span>';
}
add_action( 'rpress_product_details_widget_before_title', 'my_details_widget_before_title', 10, 2 );

Source#

Fired from:

  • includes/widgets.php (line 246), in RPRESS_Product_Details_Widget::widget()

See also#

Was this page helpful?