| @@ -419,8 +419,11 @@ | ||
| 419 | 419 | self::$cache_bank->calculate_deposits( $notices ); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | public function plugin_usage_insights(){ |
| 423 | + if ( null !== $this->insights ) { | |
| 424 | + return $this->insights; | |
| 425 | + } | |
| 423 | 426 | $this->insights = PluginInsights::get_instance( NOTIFICATIONX_FILE, [ |
| 424 | 427 | 'opt_in' => true, |
| 425 | 428 | 'goodbye_form' => true, |
| 426 | 429 | 'item_id' => '6ba8d30bc0beaddb2540' |
| @@ -432,8 +435,10 @@ | ||
| 432 | 435 | discount coupon. This data lets us make sure this plugin always stays compatible with the most |
| 433 | 436 | popular plugins and themes. No spam, I promise.', 'notificationx' ), |
| 434 | 437 | )); |
| 435 | 438 | $this->insights->init(); |
| 439 | + | |
| 440 | + return $this->insights; | |
| 436 | 441 | } |
| 437 | 442 | |
| 438 | 443 | /** |
| 439 | 444 | * Handle miscellaneous REST API actions |