Skip to content

Commit

Permalink
Global Styles on Personal: Added feature check to marketing bar (#40068)
Browse files Browse the repository at this point in the history
* Added a feature check for the GS on Personal plan feature on the marketing bar

* changelog

* Fixed code styles

* Fixed codestyle

* Added missing variable use

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

Upstream-Ref: Automattic/jetpack@c1215ca
  • Loading branch information
rcrdortiz authored and matticbot committed Nov 7, 2024
1 parent 8e811f1 commit 274e3d1
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 87 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 @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is an alpha version! The changes listed here are not final.

### Added
- Added a feature check to the Marketing Bar that updates the text and upgrade link for Global Styles
- Enable test coverage.
- Help Center: add new rest route for support interactions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,13 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
$site_slug = wp_parse_url( $home_url, PHP_URL_HOST );
}

$upgrade_url = "https://wordpress.com/plans/$site_slug?plan=value_bundle&feature=style-customization";
// @TODO Remove this once the global styles are available for all users on the Personal Plan.
$gs_upgrade_plan = WPCOM_VALUE_BUNDLE;
$upgrade_url = "https://wordpress.com/plans/$site_slug?plan=value_bundle&feature=style-customization";
if ( class_exists( 'WPCOM_Feature_Flags' ) && WPCOM_Feature_Flags::is_enabled( WPCOM_Feature_Flags::GLOBAL_STYLES_ON_PERSONAL_PLAN ) ) {
$gs_upgrade_plan = WPCOM_PERSONAL_BUNDLE;
$upgrade_url = "https://wordpress.com/plans/$site_slug?plan=personal-bundle&feature=style-customization";
}

if ( wpcom_is_previewing_global_styles() ) {
$preview_location = add_query_arg( 'hide-global-styles', '' );
Expand Down Expand Up @@ -500,7 +506,7 @@ function wpcom_display_global_styles_launch_bar( $bar_controls ) {
'jetpack-mu-wpcom'
),
$support_url,
get_store_product( WPCOM_VALUE_BUNDLE )->product_name
get_store_product( $gs_upgrade_plan )->product_name
);
printf(
wp_kses(
Expand Down
Loading

0 comments on commit 274e3d1

Please sign in to comment.