wc_webhook_process_delivery()
Process webhook delivery.
No Hooks.
Returns
null. Nothing (null).
Usage
wc_webhook_process_delivery( $webhook, $arg );
- $webhook(WC_Webhook) (required)
- Webhook instance.
- $arg(array) (required)
- Delivery arguments.
Changelog
| Since 3.3.0 | Introduced. |
wc_webhook_process_delivery() wc webhook process delivery code WC 10.5.0
function wc_webhook_process_delivery( $webhook, $arg ) {
// We need to queue the webhook so that it can be ran after the request has finished processing.
global $wc_queued_webhooks;
if ( ! isset( $wc_queued_webhooks ) ) {
$wc_queued_webhooks = array();
}
$wc_queued_webhooks[] = array(
'webhook' => $webhook,
'arg' => $arg,
);
}