Skip to content

Commit 6e24e35

Browse files
dev: update tracking
Remove the install time since it is now done by the SDK.
1 parent 9b3d96a commit 6e24e35

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,17 @@ public function get_usage_data( $data ) {
156156
$shortcodes = $wpdb->get_var( "SELECT count(*) FROM {$wpdb->prefix}posts WHERE post_status IN ('publish', 'private') AND post_content LIKE '%[feedzy-rss %'" ); //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
157157

158158
$data = array(
159-
'categories' => $categories,
160-
'imports' => $imports,
161-
'shortcodes' => $shortcodes,
162-
'license' => $license,
163-
'days_since_install' => round( ( time() - get_option( 'feedzy_rss_feeds_install', time() ) ) / DAY_IN_SECONDS ),
159+
'categories' => $categories,
160+
'imports' => $imports,
161+
'shortcodes' => $shortcodes,
162+
'license' => $license,
164163
);
165164

166165
$settings = apply_filters( 'feedzy_get_settings', null );
167166

168167
if ( ! is_array( $settings ) || empty( $settings ) ) {
169168
return $data;
170169
}
171-
172170
$general_settings = array();
173171
$config = array();
174172

@@ -197,6 +195,17 @@ public function get_usage_data( $data ) {
197195
}
198196
}
199197

198+
if ( isset( $settings['custom_schedules'] ) && is_array( $settings['custom_schedules'] ) ) {
199+
$data['custom_schedules_count'] = count( $settings['custom_schedules'] );
200+
}
201+
202+
$logger = Feedzy_Rss_Feeds_Log::get_instance();
203+
$data['logger'] = array(
204+
'can_send_email' => $logger->can_send_email(),
205+
'has_email' => ! empty( $logger->get_email_address() ),
206+
'file_size' => $logger->get_log_file_size(),
207+
);
208+
200209
return $data;
201210
}
202211

0 commit comments

Comments
 (0)