public function onLoadDeliveryAreaTypes( array &$types ) : void

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.

Return Value

None.


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.
 *
 * @return  void
 */
public function onLoadDeliveryAreaTypes(&$types)
{
    $types['custom'] = 'Custom';
}

Changelog

Version Description
1.9 Introduced.
Last Update: 2023-12-29 14:15
Helpful?
See Also: