api = $api; $this->registry = $registry; $this->wordPress = $wordPress; } public function initialize(): void { // register Action Scheduler (when behind feature flag, do it only on initialization) require_once __DIR__ . '/../../../vendor/woocommerce/action-scheduler/action-scheduler.php'; $this->api->initialize(); $this->wordPress->doAction(Hooks::INITIALIZE, [$this->registry]); } }