Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
enabled_subscription_with_invalid_token.php
Go to the documentation of this file.
1 <?php
7 
9 
13 $configWriter = $objectManager->get(\Magento\Framework\App\Config\Storage\WriterInterface::class);
14 
15 $configWriter->delete(SubscriptionHandler::CRON_STRING_PATH);
16 $configWriter->save('analytics/subscription/enabled', 1);
17 
21 $analyticsToken = $objectManager->get(\Magento\Analytics\Model\AnalyticsToken::class);
22 $analyticsToken->storeToken('42');
23 
27 $flagManager = $objectManager->get(\Magento\Framework\FlagManager::class);
28 
29 $flagManager->deleteFlag(SubscriptionHandler::ATTEMPTS_REVERSE_COUNTER_FLAG_CODE);