Skip to content

Hides the Blaze badge on the Stats page when the feature is disabled #43048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Hides the Blaze badge when the feature is disabled


1 change: 1 addition & 0 deletions projects/packages/stats-admin/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"require": {
"php": ">=7.2",
"automattic/jetpack-connection": "@dev",
"automattic/jetpack-blaze": "@dev",
"automattic/jetpack-constants": "@dev",
"automattic/jetpack-plans": "@dev",
"automattic/jetpack-stats": "@dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Automattic\Jetpack\Stats_Admin;

use Automattic\Jetpack\Blaze;
use Automattic\Jetpack\Current_Plan as Jetpack_Plan;
use Automattic\Jetpack\Modules;
use Automattic\Jetpack\Status\Host;
Expand Down Expand Up @@ -40,6 +41,8 @@ public function get_data() {
$blog_id = Jetpack_Options::get_option( 'id' );
$host = new Host();

$can_blaze = class_exists( 'Automattic\Jetpack\Blaze' ) && Blaze::should_initialize()['can_init'];

return array(
'admin_page_base' => $this->get_admin_path(),
'api_root' => esc_url_raw( rest_url() ),
Expand Down Expand Up @@ -96,6 +99,7 @@ public function get_data() {
'jetpack_version' => defined( 'JETPACK__VERSION' ) ? JETPACK__VERSION : '',
'stats_admin_version' => Main::VERSION,
'software_version' => $wp_version,
'can_blaze' => $can_blaze,
),
),
),
Expand Down
5 changes: 5 additions & 0 deletions projects/plugins/jetpack/changelog/fix-blaze-badge-stats-page
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Update composer.lock.


3 changes: 2 additions & 1 deletion projects/plugins/jetpack/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Update composer.lock.


3 changes: 2 additions & 1 deletion projects/plugins/mu-wpcom-plugin/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions projects/plugins/wpcomsh/changelog/fix-blaze-badge-stats-page
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Update composer.lock.


3 changes: 2 additions & 1 deletion projects/plugins/wpcomsh/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading