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 (
@@ -163,8 +162,10 @@ public function get_usage_data( $data ) {
163162 'license ' => $ license ,
164163 );
165164
166- $ settings = apply_filters ( 'feedzy_get_settings ' , null );
167- $ config = array ();
165+ $ settings = apply_filters ( 'feedzy_get_settings ' , null );
166+ $ general_settings = array ();
167+ $ config = array ();
168+
168169 if ( $ settings ) {
169170 $ proxy = isset ( $ settings ['proxy ' ] ) && is_array ( $ settings ['proxy ' ] ) && ! empty ( $ settings ['proxy ' ] ) ? array_filter ( $ settings ['proxy ' ] ) : array ();
170171 if ( ! empty ( $ proxy ) ) {
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ class Feedzy_Rss_Feeds_Usage {
3636 * @var array
3737 */
3838 private $ default_data = array (
39- 'first_import_run_datetime ' => null ,
39+ 'first_import_run_datetime ' => '' ,
4040 'imports_runs ' => 0 ,
41- 'first_import_created_datetime ' => null ,
41+ 'first_import_created_datetime ' => '' ,
4242 );
4343
4444 /**
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