Skip to content
Docs
Get RestroPress

Action

rpress_purchase_link_end

Updated
On this page

Fires at the end of a menu item purchase form.

Runs just before the closing form tag of the purchase link, after the hidden rpress_action and redirect inputs.

Parameters#

ParameterTypeDescription
$fooditem_idintMenu item ID.
$argsarrayPurchase link arguments.

Example#

function my_purchase_link_end( $fooditem_id, $args ) {
	echo '<input type="hidden" name="my_menu_item" value="' . esc_attr( $fooditem_id ) . '">';
}
add_action( 'rpress_purchase_link_end', 'my_purchase_link_end', 10, 2 );

Notes#

Fires from both the list and grid purchase link builders.

Source#

Fired from:

  • includes/template-functions.php (line 223), in rpress_get_purchase_link()
  • includes/template-functions.php (line 366), in rpress_get_purchase_link_grid()

See also#

Was this page helpful?