orphaned_product_variants_cleaner = $orphaned_product_variants_cleaner; } /** * @inheritdoc * @since 0.9.22 */ public function activate($network_wide = false) { $this->add_scheduled_action('aff_product_cleaner_orphaned_product_variants_clean_up_daily', 'daily', $network_wide); } /** * @inheritdoc * @since 0.9.22 */ public function deactivate($network_wide = false) { $this->remove_scheduled_action('aff_product_cleaner_orphaned_product_variants_clean_up_daily', $network_wide); } /** * Run the orphaned product variants cleaner daily as cron jobs. * * @hook aff_product_cleaner_orphaned_product_variants_clean_up_daily * @since 0.9.22 */ public function clean_up_daily() { $this->orphaned_product_variants_cleaner->clean_up(); } }