Your cart is empty!
Load Types
do_action_ref_array( 'vikrestaurants_load_delivery_area_types', array &$types )
Fires while fetching the list of available delivery area types.
Description
Trigger hook to allow external plugins to support custom types. New types have to be appended to the given associative array.
The delivery area types are used to instruct the system on how the validation of the addresses should be performed.
Parameters
- &$types
-
(array) An associative array containing all the supported delivery area types, where the key is the delivery area type identifier and the value is a human readable name.
Example
/**
* Trigger hook to allow external plugins to support custom types.
* New types have to be appended to the given associative array.
* The key of the array is the unique ID of the type, the value is
* a readable name of the type.
*
* @param array &$types An array of types.
*/
add_action('vikrestaurants_load_delivery_area_types', function(&$types) {
$types['custom'] = 'Custom';
});
Changelog
Version | Description |
---|---|
1.3 | Introduced. |
Last Update: 2023-12-28
Helpful?