-
Notifications
You must be signed in to change notification settings - Fork 50
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
New Settings UI: Disable settings in send-only countries (4027) #2937
Conversation
@stracker-phil I wasn’t sure if there is a specific style we need to use for notices, so I haven’t added any styling for the notice yet, just plain text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should translate this message via __()
or inject the string from server-side using wp_localize_script()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @stracker-phil, I added localization to the message in my latest commit 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localization is missing 😉
f92c868
to
58863ff
Compare
58863ff
to
9278edf
Compare
@@ -68,8 +69,9 @@ static function () use ( $c ) { | |||
$current_page_id = $c->get( 'wcgateway.current-ppcp-settings-page-id' ); | |||
$is_wc_settings_page = $c->get( 'wcgateway.is-wc-settings-page' ); | |||
$messaging_locations = $c->get( 'paylater-configurator.messaging-locations' ); | |||
$onboarding_state = $c->get( 'onboarding.state' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses the legacy onboarding status.
To check if the onboarding in the new UI is completed, you can use this logic:
$onboarding_profile = $c->get( 'settings.data.onboarding' );
$onboarding_profile->get_completed(); // true = onboarding is done, false = still in the onboarding wizard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @stracker-phil, I've switched to the new onboarding profile class on my latest commit 👍🏻
# Conflicts: # modules/ppcp-settings/src/Data/CommonSettings.php # modules/ppcp-settings/src/Endpoint/CommonRestEndpoint.php
Before this change, the settings screen was briefly visible, before the merchant details were loaded from the REST endpoint
Description
This PR updates the settings screen to hide all settings if the store's current country is classified as a send-only country. Instead, a message explaining this limitation will be displayed.
Steps to Test
Screenshots