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