Automattic\WooCommerce\Internal\Admin\Agentic
AgenticController::on_init
Hook into WordPress on init.
Method of the class: AgenticController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AgenticController = new AgenticController(); $AgenticController->on_init();
AgenticController::on_init() AgenticController::on init code WC 10.5.0
public function on_init() {
// Bail if the feature is not enabled.
if ( ! FeaturesUtil::feature_is_enabled( 'agentic_checkout' ) ) {
return;
}
// Resolve webhook manager from container.
wc_get_container()->get( AgenticWebhookManager::class )->register();
// Register Agentic Commerce integration.
add_filter( 'woocommerce_integrations', array( $this, 'add_agentic_commerce_integration' ) );
}