woocommerce_webhook_should_deliver
Let other plugins intercept deliver for some messages queue like rabbit/zeromq.
Usage
add_filter( 'woocommerce_webhook_should_deliver', 'wp_kama_woocommerce_webhook_should_deliver_filter', 10, 3 ); /** * Function for `woocommerce_webhook_should_deliver` filter-hook. * * @param bool $should_deliver True if the webhook should be sent, or false to not send it. * @param WC_Webhook $that The current webhook class. * @param mixed $arg First hook argument. * * @return bool */ function wp_kama_woocommerce_webhook_should_deliver_filter( $should_deliver, $that, $arg ){ // filter... return $should_deliver; }
- $should_deliver(true|false)
- True if the webhook should be sent, or false to not send it.
- $that(WC_Webhook)
- The current webhook class.
- $arg(mixed)
- First hook argument.
Where the hook is called
woocommerce_webhook_should_deliver
woocommerce/includes/class-wc-webhook.php 150
return apply_filters( 'woocommerce_webhook_should_deliver', $should_deliver, $this, $arg );