WC_Admin_Webhooks::delete()privateWC 1.0

Delete webhook.

{} It's a method of the class: WC_Admin_Webhooks{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->delete();

Code of WC_Admin_Webhooks::delete() WC 6.7.0

private function delete() {
	check_admin_referer( 'delete-webhook' );

	if ( isset( $_GET['delete'] ) ) { // WPCS: input var okay, CSRF ok.
		$webhook_id = absint( $_GET['delete'] ); // WPCS: input var okay, CSRF ok.

		if ( $webhook_id ) {
			$this->bulk_delete( array( $webhook_id ) );
		}
	}
}