WC_Webhook::enqueue
Enqueue the hooks associated with the webhook.
Method of the class: WC_Webhook{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Webhook = new WC_Webhook(); $WC_Webhook->enqueue();
Changelog
| Since 2.2.0 | Introduced. |
WC_Webhook::enqueue() WC Webhook::enqueue code WC 10.5.0
public function enqueue() {
$hooks = $this->get_hooks();
$url = $this->get_delivery_url();
if ( is_array( $hooks ) && ! empty( $url ) ) {
foreach ( $hooks as $hook ) {
add_action( $hook, array( $this, 'process' ) );
}
}
}