English (United Kingdom)
Knowledge Base  >  Vik Restaurants  >  Hooks  >  Purchase  >  Take-Away  >  Initialization

do_action_ref_array( 'vikrestaurants_init_save_order', array &$data )

Fires at the beginning of the saving process of a take-away order.


Description

Trigger hook to manipulate the search information during the food ordering process.

This is the first hook that triggers after clicking the "Confirm Order" button.


Parameters

&$data

(array)  The booking information, passed by reference. Supports all the following attributes.

  • date (string) - the check-in date string, formatted according to the plugin configuration preferences.
  • hourmin (string) - the check-in time string in 24H format.
  • service (string) - the type of selected service.
  • id_payment (int) - the ID of the selected payment method, if any.
  • gratuity (float) - the tip/gratuity left by the customer, if any.

Example

/**
 * Trigger event to manipulate the search data array.
 *
 * @param  array  &$data  The data array.
 */
add_action('vikrestaurants_init_save_order', function(&$data) {
    /**
     * @todo do stuff here
     */
});

Changelog

Version Description
1.3 Introduced.
Last Update: 2023-12-27
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information