diff --git a/projects/plugins/jetpack/changelog/test-stats_widget_check_connection b/projects/plugins/jetpack/changelog/test-stats_widget_check_connection new file mode 100644 index 0000000000000..83481fb3773d4 --- /dev/null +++ b/projects/plugins/jetpack/changelog/test-stats_widget_check_connection @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Temporarily show the widget to administrators for Simple sites diff --git a/projects/plugins/jetpack/class-jetpack-stats-dashboard-widget.php b/projects/plugins/jetpack/class-jetpack-stats-dashboard-widget.php index ad030aa4d77b0..91a28e4626ed9 100644 --- a/projects/plugins/jetpack/class-jetpack-stats-dashboard-widget.php +++ b/projects/plugins/jetpack/class-jetpack-stats-dashboard-widget.php @@ -51,7 +51,10 @@ public static function wp_dashboard_setup() { * * @param bool Whether to show the widget to the current user. */ - if ( ! apply_filters( 'jetpack_stats_dashboard_widget_show_to_user', current_user_can( 'view_stats' ) ) ) { + // Temporarily show the widget to administrators for Simple sites as the view_stats capability is not available. + // TODO: Grant the view_stats capability to corresponding users for Simple sites. + $can_user_view_stats = current_user_can( 'manage_options' ) || current_user_can( 'view_stats' ); + if ( ! apply_filters( 'jetpack_stats_dashboard_widget_show_to_user', $can_user_view_stats ) ) { return; }