File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ public function get_usage_data( $data ) {
86
86
$ categories = count ( $ terms );
87
87
}
88
88
// imports.
89
- $ imports = array ();
90
89
$ license = 'free ' ;
91
90
92
91
$ imports = array (
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class Feedzy_Rss_Feeds_Usage {
36
36
* @var array<string, string|int>
37
37
*/
38
38
private $ default_data = array (
39
- 'first_import_run_datetime ' => null ,
39
+ 'first_import_run_datetime ' => '' ,
40
40
'imports_runs ' => 0 ,
41
41
'first_import_created_datetime ' => '' ,
42
42
'can_track_first_usage ' => false ,
Original file line number Diff line number Diff line change @@ -30,6 +30,20 @@ class Feedzy_Rss_Feeds_Deactivator {
30
30
* @access public
31
31
*/
32
32
public static function deactivate () {
33
+ self ::try_send_logs ();
33
34
delete_option ( 'feedzy-activated ' );
34
35
}
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
+ }
35
49
}
You can’t perform that action at this time.
0 commit comments