PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | jetpack_vendor/automattic/jetpack-stats-admin/src/class-odyssey-config-data.php +12 -0 16.2 → 16.3 View file →
@@ -159,8 +159,9 @@
159 159 'jetpack_version' => defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '',
160 160 'stats_admin_version' => Main::VERSION,
161 161 'software_version' => $wp_version,
162 162 'can_blaze' => $can_blaze,
163 + 'has_stats_settings' => ! $host->is_wpcom_simple(),
163 164 ),
164 165 ),
165 166 ),
166 167 'features' => array( "$blog_id" => array( 'data' => $this->get_plan_features() ) ),
@@ -233,10 +234,21 @@
233 234 }
234 235
235 236 /**
236 237 * Get the features of the current plan.
238 + *
239 + * The app cannot refresh what it paywalls on, so a WordPress.com-hosted site is asked
240 + * directly; a plan cached before an upgrade gates a feature the site has already paid for.
237 241 */
238 242 protected function get_plan_features() {
243 + // method_exists guard: an older plans package may win the autoloader on another plugin.
244 + if ( method_exists( Jetpack_Plan::class, 'get_wpcom_site_specific_features' ) ) {
245 + $features = Jetpack_Plan::get_wpcom_site_specific_features();
246 + if ( null !== $features ) {
247 + return $features;
248 + }
249 + }
250 +
239 251 $plan = Jetpack_Plan::get();
240 252 if ( empty( $plan['features'] ) ) {
241 253 return array();
242 254 }