WC_API_Webhooks::get_webhook_deliveries() public WC 2.2
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
{} It's a 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
Changelog
Since 2.2 | Introduced. | |
Deprecated Since 3.3.0 | Webhooks deliveries logs now uses logging system. |
Code of WC_API_Webhooks::get_webhook_deliveries() WC API Webhooks::get webhook deliveries WC 5.0.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() );
}