Skip to content

Commit

Permalink
Global Styles on Personal: Add feature check and sticker to eligible …
Browse files Browse the repository at this point in the history
…blogs (#39986)

* Added a GS check that is enabled for sites when the fGS on Personal plan feature is active

* changelog

* Updated the feature check condition and availability check

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11705073546

Upstream-Ref: Automattic/jetpack@a312859
  • Loading branch information
rcrdortiz authored and matticbot committed Nov 6, 2024
1 parent d157232 commit cc38bde
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 85 deletions.
58 changes: 29 additions & 29 deletions composer.lock

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

1 change: 1 addition & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is an alpha version! The changes listed here are not final.
- Help Center: add new rest route for support interactions

### Changed
- Added feature check for the Global Styles on Personal plan changes.
- Updated package dependencies.

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,16 @@ function wpcom_site_has_global_styles_feature( $blog_id = 0 ) {
}
}

// If the GLOBAL_STYLES_ON_PERSONAL_PLAN feature is enabled, we need to check if the site has a Personal plan and add the sticker.
if ( class_exists( 'WPCOM_Feature_Flags' ) && WPCOM_Feature_Flags::is_enabled( 'GLOBAL_STYLES_ON_PERSONAL_PLAN' ) ) {
if ( wpcom_site_has_personal_plan( $blog_id ) ) {
$note = 'Automated sticker. See paYJgx-5w2-p2';
$user = 'a8c'; // A non-empty string avoids storing the current user as author of the sticker change.
add_blog_sticker( 'wpcom-global-styles-personal-plan', $note, $user, $blog_id );
return true;
}
}

return false;
}

Expand Down
Loading

0 comments on commit cc38bde

Please sign in to comment.