Action
rpress_purchase_link_top
On this page
Fires at the top of a menu item purchase form.
Runs inside the opening form tag of the purchase link, before the submit wrapper. A core callback on this hook prints the pricing schema microdata. Use it to output extra hidden inputs or markup.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$fooditem_id | int | Menu item ID. |
$args | array | Purchase link arguments. |
Example#
function my_purchase_link_top( $fooditem_id, $args ) {
echo '<input type="hidden" name="my_source" value="menu">';
}
add_action( 'rpress_purchase_link_top', 'my_purchase_link_top', 10, 2 );
Notes#
Fires from both the list and grid purchase link builders.
Source#
Fired from:
includes/template-functions.php(line 182), inrpress_get_purchase_link()includes/template-functions.php(line 322), inrpress_get_purchase_link_grid()
See also#
Was this page helpful?
