Agentic
6 months ago
EmailImprovements
1 year ago
EmailPreview
1 month ago
Emails
2 weeks ago
ImportExport
1 year ago
Logging
2 weeks ago
Marketing
2 years ago
Notes
2 weeks ago
Onboarding
2 weeks ago
Orders
1 month ago
ProductForm
2 years ago
ProductReviews
2 months ago
RemoteFreeExtensions
2 months ago
Reports
2 weeks ago
Schedulers
2 weeks ago
Settings
2 weeks ago
Suggestions
2 weeks ago
WCPayPromotion
1 year ago
ActivityPanels.php
4 years ago
Analytics.php
2 weeks ago
CategoryLookup.php
4 years ago
Coupons.php
2 weeks ago
CouponsMovedTrait.php
7 months ago
CustomerEffortScoreTracks.php
9 months ago
Events.php
2 weeks ago
FeaturePlugin.php
2 weeks ago
Homescreen.php
2 weeks ago
Loader.php
1 month ago
Marketing.php
1 year ago
Marketplace.php
7 months ago
MobileAppBanner.php
4 years ago
OrderMilestoneEasterEgg.php
2 months ago
RemoteInboxNotifications.php
2 weeks ago
Settings.php
2 weeks ago
ShippingLabelBanner.php
1 year ago
ShippingLabelBannerDisplayRules.php
1 year ago
SiteHealth.php
2 weeks ago
Survey.php
4 years ago
SystemStatusReport.php
2 weeks ago
TaxSettingsRecommendations.php
1 month ago
Translations.php
1 year ago
WCAdminAssets.php
1 week ago
WCAdminSharedSettings.php
1 year ago
WCAdminUser.php
10 months ago
WcPayWelcomePage.php
1 year ago
RemoteInboxNotifications.php
45 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Remote Inbox Notifications feature. |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Internal\Admin; |
| 7 | |
| 8 | use Automattic\WooCommerce\Admin\RemoteInboxNotifications\RemoteInboxNotificationsEngine; |
| 9 | |
| 10 | /** |
| 11 | * Remote Inbox Notifications feature logic. |
| 12 | */ |
| 13 | class RemoteInboxNotifications { |
| 14 | /** |
| 15 | * Option name used to toggle this feature. |
| 16 | */ |
| 17 | const TOGGLE_OPTION_NAME = 'woocommerce_show_marketplace_suggestions'; |
| 18 | |
| 19 | /** |
| 20 | * Class instance. |
| 21 | * |
| 22 | * @var RemoteInboxNotifications instance |
| 23 | */ |
| 24 | protected static $instance = null; |
| 25 | |
| 26 | /** |
| 27 | * Get class instance. |
| 28 | */ |
| 29 | public static function get_instance() { |
| 30 | if ( ! self::$instance ) { |
| 31 | self::$instance = new self(); |
| 32 | } |
| 33 | return self::$instance; |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Hook into WooCommerce. |
| 38 | */ |
| 39 | public function __construct() { |
| 40 | if ( 'yes' === get_option( self::TOGGLE_OPTION_NAME, 'yes' ) ) { |
| 41 | RemoteInboxNotificationsEngine::init(); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 |