webhook filter
-
Hi,
I’m trying to use this filter to add an array to webhook output:
https://vikwp.com/support/knowledge-base/vik-appointments/hooks/web-hooks/before-dispatch
but it seems I’m wrong to code.
If I use the code below, it works, adding [somekey] => true:
add_filter('vikappointments_before_dispatch_webhook', function($status, &$payload, &$headers, $hook, $job) { $payload = array( "somekey" => true ); return $status; }, 10, 5);but it replaces completely the output payload.
If I use the code below instead:
add_filter('vikappointments_before_dispatch_webhook', function($status, &$payload, &$headers, $hook, $job) { $payload['somekey'] = 'true' ); return $status; }, 10, 5);no webhook output comes from plugin.
Have you an idea where I’m wrong?
Many thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘webhook filter’ is closed to new replies.