English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  SMS  >  Send Admin Notification

apply_filters( 'vikappointments_before_send_admin_sms_notification', bool $send, mixed $order )

Fires before sending a SMS notification to the administrator.


Description

Choose at runtime whether the administrator should receive SMS notifications or not.

It is possible to return true to send the notification, false to deny the notification or null to rely on the default setting.


Parameters

$send

(bool)  Whether the SMS should be sent.

$order

(VAPOrderAppointment)  An object holding the details of the order.


Example

/**
 * Choose at runtime whether the admin should receive SMS notifications.
 *
 * @param  boolean  $send   Whether the SMS should be sent.
 * @param  mixed    $order  The object holding the details of the order.
 */
add_filter('vikappointments_before_send_admin_sms_notification', function($send, $order)
{
    /**
     * @todo do stuff here
     */

    return $send;
}, 10, 2);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-08-06
Helpful?

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.