File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ public function get_usage_data( $data ) {
8686 $ categories = count ( $ terms );
8787 }
8888 // imports.
89- $ imports = array ();
9089 $ license = 'free ' ;
9190
9291 $ imports = array (
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class Feedzy_Rss_Feeds_Usage {
3636 * @var array<string, string|int>
3737 */
3838 private $ default_data = array (
39- 'first_import_run_datetime ' => null ,
39+ 'first_import_run_datetime ' => '' ,
4040 'imports_runs ' => 0 ,
4141 'first_import_created_datetime ' => '' ,
4242 'can_track_first_usage ' => false ,
Original file line number Diff line number Diff line change @@ -30,6 +30,20 @@ class Feedzy_Rss_Feeds_Deactivator {
3030 * @access public
3131 */
3232 public static function deactivate () {
33+ self ::try_send_logs ();
3334 delete_option ( 'feedzy-activated ' );
3435 }
36+
37+ /**
38+ * Send the logs with the plugin usage if telemetry is active.
39+ *
40+ * @return void
41+ */
42+ public static function try_send_logs () {
43+ if ( 'yes ' !== get_option ( 'feedzy_rss_feeds_logger_flag ' ) ) {
44+ return ;
45+ }
46+
47+ do_action ( 'feedzy_rss_feeds_log_activity ' );
48+ }
3549}
You can’t perform that action at this time.
0 commit comments