PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / trunk
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar vtrunk
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
← All changes | includes/Admin/Admin.php +14 -1 3.2.9trunk View file →
@@ -15,8 +15,10 @@
15 15 use NotificationX\Core\Dashboard;
16 16 use NotificationX\Core\Database;
17 17 use NotificationX\Core\PostType;
18 18 use NotificationX\Core\SetupWizard;
19 +use NotificationX\Core\UsageTracker;
20 +use NotificationX\Core\Maintenance;
19 21 use NotificationX\Core\Upgrader;
20 22 use NotificationX\GetInstance;
21 23 use NotificationX\Extensions\ExtensionFactory;
22 24
@@ -63,8 +65,10 @@
63 65 RatingEmail::get_instance();
64 66 ImportExport::get_instance();
65 67 XSS::get_instance();
66 68 InfoTooltipManager::get_instance();
69 + UsageTracker::get_instance();
70 + Maintenance::get_instance();
67 71 add_action('init', [$this, 'init'], 5);
68 72 add_filter('nx_rest_miscellaneous', [$this, 'handle_miscellaneous_actions'], 10, 2);
69 73 add_filter('nx_builder_configs', [$this, 'add_popup_status_to_context'], 10, 1);
70 74 }
@@ -75,10 +79,14 @@
75 79 *
76 80 * @return void
77 81 */
78 82 public function init(){
83 + // Usage insights/tracking must initialize regardless of Pro being
84 + // active: Pro ships no insights of its own, so gating this behind
85 + // !is_pro() left the put_do_weekly_action cron with no listener and
86 + // disabled tracking (incl. the UsageTracker payload) on every Pro site.
87 + $this->plugin_usage_insights();
79 88 if( ! NotificationX::is_pro() ){
80 - $this->plugin_usage_insights();
81 89 $this->admin_notices();
82 90 $is_embedpress_milestone_showing = get_option('is_embedpress_milestone_showing', false);
83 91 if (!$is_embedpress_milestone_showing) {
84 92 MilestoneNotification::get_instance();
@@ -411,8 +419,11 @@
411 419 self::$cache_bank->calculate_deposits( $notices );
412 420 }
413 421
414 422 public function plugin_usage_insights(){
423 + if ( null !== $this->insights ) {
424 + return $this->insights;
425 + }
415 426 $this->insights = PluginInsights::get_instance( NOTIFICATIONX_FILE, [
416 427 'opt_in' => true,
417 428 'goodbye_form' => true,
418 429 'item_id' => '6ba8d30bc0beaddb2540'
@@ -424,8 +435,10 @@
424 435 discount coupon. This data lets us make sure this plugin always stays compatible with the most
425 436 popular plugins and themes. No spam, I promise.', 'notificationx' ),
426 437 ));
427 438 $this->insights->init();
439 +
440 + return $this->insights;
428 441 }
429 442
430 443 /**
431 444 * Handle miscellaneous REST API actions