Automattic\WooCommerce\Internal\Admin\Agentic
AgenticWebhookManager::register
Initialize hooks for webhook integration.
@internal
Method of the class: AgenticWebhookManager{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AgenticWebhookManager = new AgenticWebhookManager(); $AgenticWebhookManager->register();
AgenticWebhookManager::register() AgenticWebhookManager::register code WC 10.5.0
public function register() {
add_filter( 'woocommerce_webhook_topics', array( $this, 'register_webhook_topic_names' ) );
// Hook into order lifecycle events to fire our custom actions.
add_action( 'woocommerce_new_order', array( $this, 'handle_order_created' ), 999, 2 ); // Hook late to give a chance for other plugins to modify.
add_action( 'woocommerce_order_status_changed', array( $this, 'handle_order_status_changed' ), 10, 4 );
add_action( 'woocommerce_order_refunded', array( $this, 'handle_order_refunded' ), 10, 1 );
// Customize webhook payload for our topics.
add_filter( 'woocommerce_webhook_payload', array( $this, 'customize_webhook_payload' ), 10, 4 );
// Customize webhook HTTP arguments for our topics.
add_filter( 'woocommerce_webhook_http_args', array( $this, 'customize_webhook_http_args' ), 10, 3 );
// When the webhook is delivered (or not), mark the first event as delivered.
add_action( 'woocommerce_webhook_delivery', array( $this, 'mark_first_event_delivered' ), 10, 5 );
}