Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Webhook::should_deliver( mixed $arg )
Helper to check if the webhook should be delivered, as some hooks.
Description Description
(like wp_trash_post
) will fire for every post type, not just ours.
Parameters Parameters
- $arg
-
(Required) First hook argument.
Return Return
(bool) True if webhook should be delivered, false otherwise.
Source Source
File: includes/class-wc-webhook.php
private function should_deliver( $arg ) { $should_deliver = $this->is_active() && $this->is_valid_topic() && $this->is_valid_action( $arg ) && $this->is_valid_resource( $arg ) && ! $this->is_already_processed( $arg ); /** * Let other plugins intercept deliver for some messages queue like rabbit/zeromq. * * @param bool $should_deliver True if the webhook should be sent, or false to not send it. * @param WC_Webhook $this The current webhook class. * @param mixed $arg First hook argument. */ return apply_filters( 'woocommerce_webhook_should_deliver', $should_deliver, $this, $arg ); }
Changelog Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |