container->get(SettingsController::class); $installedAt = strtotime($settings->get('installed_at', date('Y-m-d H:i:s'))); $twoWeeksAgo = strtotime('-2 weeks'); if ($installedAt < $twoWeeksAgo) { $settings->set('homepage.task_list_dismissed', true); } // Hide product discovery for users who completed all tasks $homepageDataController = $this->container->get(HomepageDataController::class); $wooCommerceHelper = $this->container->get(Helper::class); $homepageData = $homepageDataController->getPageData(); $productDiscoveryStatus = $homepageData['productDiscoveryStatus']; if ($wooCommerceHelper->isWooCommerceActive()) { $productDiscoveryIsComplete = $productDiscoveryStatus['addSubscriptionForm'] && $productDiscoveryStatus['setUpWelcomeCampaign'] && $productDiscoveryStatus['setUpAbandonedCartEmail'] && $productDiscoveryStatus['brandWooEmails']; } else { $productDiscoveryIsComplete = $productDiscoveryStatus['addSubscriptionForm'] && $productDiscoveryStatus['setUpWelcomeCampaign'] && $productDiscoveryStatus['sendFirstNewsletter']; } $settings->set('homepage.product_discovery_dismissed', $productDiscoveryIsComplete); } }