Webhook::delete( int $webhook_id )
Summary
Deletes a webhook from the BigCommerce database.
Parameters
- $webhook_id
-
(int) (Required) The BC ID for the webhook entry.
Source
File: src/BigCommerce/Webhooks/Webhook.php
public function delete( $webhook_id ) { // deleteWebhook returns the deleted webhook on success. $result = (array) $this->api_client->deleteWebhook( $webhook_id ); if ( empty( $result[ 'id' ] ) ) { /** * Fires after webhook delete failed. * * @param Webhook Webhook Webhook class. * @param array $result Result. */ do_action( 'bigcommerce/webhooks/delete_failed', $this, $result ); } /** * Fires when a webhook is deleted from the BigCommerce database. * * @param int Webhook ID. * @param string Webhook action name. * @param string Webhook scope. */ do_action( 'bigcommerce/webhooks/webhook_deleted', $result[ 'id' ], static::NAME, $this->scope() ); return $result[ 'id' ]; }