notifications_send.before
Triggered before sending of all order notifications set up for each event, allows to modify the contents of notifications being sent.
Shop-Script
Input (passed by reference)
$params array Parameters.
$params['event'] string Event name.
$params['notifications'] array Properties of notifications set up for specified event.
$params['data'] array Order parameters.
$params['data']['order'] array Order data.
$params['data']['customer'] shopCustomer Customer handling class instance.
$params['data']['status'] string Order status name.
$params['data']['action_data'] array Order action data related to the event for which notifications being sent.
$params['data']['source'] string Name of order source—storefront address or 'backend' string.
$params['data']['order_url'] string Orer status viewing page URL.
$params['event'] string Event name.
$params['notifications'] array Properties of notifications set up for specified event.
$params['data'] array Order parameters.
$params['data']['order'] array Order data.
$params['data']['customer'] shopCustomer Customer handling class instance.
$params['data']['status'] string Order status name.
$params['data']['action_data'] array Order action data related to the event for which notifications being sent.
$params['data']['source'] string Name of order source—storefront address or 'backend' string.
$params['data']['order_url'] string Orer status viewing page URL.
… your plugin code …
Output
Shop-Script
Plugin code example
PHP
public function notificationsSendBefore($params)
{
waLog::dump($params, 'shop/plugins/' . $this->id . '/notifications-send-before.log');
}









