product_repository = $product_repository; } /** * Restore the complex parent products to refresh the product variant taxonomy terms. * * @since 0.8.20 */ public function migrate() { if(\Affilicious::VERSION >= '0.8.19' && get_option(self::OPTION) != 'yes') { $products = $this->product_repository->find_all(); foreach ($products as $product) { if($product instanceof Complex_Product) { $this->product_repository->store($product); } } update_option(self::OPTION, 'yes'); } } }