scheduler = $scheduler; $this->options_helper = $options_helper; } /** * Registers the scheduling of the cron to the activation action. * * @return void */ public function register_hooks() { \add_action( 'wpseo_activate', [ $this, 'schedule_llms_txt_population' ] ); } /** * Schedules the cron if the option is turned on. * * @return void */ public function schedule_llms_txt_population() { if ( $this->options_helper->get( 'enable_llms_txt', false ) === true ) { $this->scheduler->schedule_quick_llms_txt_population(); } } }