WC_Webhook::set_topic( string $topic )
Set the webhook topic and associated hooks.
Description Description
The topic resource & event are also saved separately.
Parameters Parameters
- $topic
-
(Required) Webhook topic.
Source Source
File: includes/class-wc-webhook.php
public function set_topic( $topic ) { $topic = wc_clean( $topic ); if ( ! wc_is_webhook_valid_topic( $topic ) ) { $topic = ''; } $this->set_prop( 'topic', $topic ); }
Changelog Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |