English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Web Hooks  >  After Dispatch

apply_filters( 'vikappointments_after_dispatch_webhook', bool $status, object $response, object $hook )

Fires after transmitting the payload to the web hook.


Description

Plugins can use this filter to manipulate the response received after deploying the web hook.


Parameters

$status

(bool)  True on success, false otherwise.

$response

(object)  The HTTP response holding the following properties:

  • code - the HTTP status code;
  • headers - an associative array containing the headers received by the server;
  • body - the response received by the server.
$hook

(object)  An object holding the web hook details, such as the notified URL and a secret key.


Example

/**
 * Plugins can use this event to manipulate the response received after
 * deploying the web hook.
 *
 * @param  boolean  $status    True on success, false otherwise.
 * @param  object   $response  The HTTP response object.
 * @param  object   $hook      The web hook details.
 */
add_filter('vikappointments_after_dispatch_webhook', function($status, $response, $hook)
{
    /**
     * @todo any changes applied to $response will be automatically saved into the log file
     */

    return $status;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-08-04
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.