WC_API_Webhooks::get_webhook_deliveries()
Deprecated from version 3.3.0. It is no longer supported and can be removed in future releases. Use
s logging system
instead.Get deliveries for a webhook
Method of the class: WC_API_Webhooks{}
No Hooks.
Return
Array|WP_Error
.
Usage
$WC_API_Webhooks = new WC_API_Webhooks(); $WC_API_Webhooks->get_webhook_deliveries( $webhook_id, $fields );
- $webhook_id(string) (required)
- webhook ID
- $fields(string|null)
- fields to include in response
Default: null
Changelog
Since 2.2 | Introduced. |
Deprecated since 3.3.0 | Webhooks deliveries logs now uses logging system. |
WC_API_Webhooks::get_webhook_deliveries() WC API Webhooks::get webhook deliveries code WC 7.7.0
public function get_webhook_deliveries( $webhook_id, $fields = null ) { // Ensure ID is valid webhook ID $webhook_id = $this->validate_request( $webhook_id, 'shop_webhook', 'read' ); if ( is_wp_error( $webhook_id ) ) { return $webhook_id; } return array( 'webhook_deliveries' => array() ); }