WC_Webhook::get_topic
Get the webhook topic, e.g. order.created.
Method of the class: WC_Webhook{}
Hooks from the method
Returns
String.
Usage
$WC_Webhook = new WC_Webhook(); $WC_Webhook->get_topic( $context );
- $context(string)
- What the value is for. Valid values are
'view'and'edit'.
Default:'view'
Changelog
| Since 2.2.0 | Introduced. |
WC_Webhook::get_topic() WC Webhook::get topic code WC 10.5.0
public function get_topic( $context = 'view' ) {
return apply_filters( 'woocommerce_webhook_topic', $this->get_prop( 'topic', $context ), $this->get_id() );
}