Action
rpress_product_details_widget_before_purchase_button
On this page
Fires before the purchase button in the menu item details widget.
Runs after the menu item title and before the purchase button is printed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$instance | array | The widget instance settings. |
$fooditem_id | int | ID of the menu item shown in the widget. |
Example#
function my_details_widget_before_button( $instance, $fooditem_id ) {
echo '<p class="my-prep-time">' . esc_html( get_post_meta( $fooditem_id, 'my_prep_time', true ) ) . '</p>';
}
add_action( 'rpress_product_details_widget_before_purchase_button', 'my_details_widget_before_button', 10, 2 );
Source#
Fired from:
includes/widgets.php(line 249), inRPRESS_Product_Details_Widget::widget()
See also#
Was this page helpful?
