Skip to content
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

Hide helper text related to Storefront theme in Multi-Currency settings when Storefront is not the active theme #7336

Merged
merged 11 commits into from
Oct 5, 2023
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
4 changes: 4 additions & 0 deletions changelog/fix-6182-hide-storefront-tooltip
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Hide tooltip related to Storefront theme in Multi-Currency settings when Storefront is not the active theme
13 changes: 6 additions & 7 deletions client/multi-currency-setup/tasks/store-settings-task/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,14 @@ const StoreSettingsTask = () => {
'woocommerce-payments'
) }
/>
<br />
<div className="multi-currency-settings-task__description">
{ __(
'A currency switcher is also available in your widgets.',
'woocommerce-payments'
) }
</div>
</>
) : null }
<div className="wcpay-wizard-task__description-element is-muted-color">
{ __(
'A currency switcher is also available in your widgets.',
'woocommerce-payments'
) }
</div>
</CardBody>
</Card>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ exports[`Multi-Currency store settings store settings task renders correctly: sn
</label>
</div>
</div>
<br />
<div
class="wcpay-wizard-task__description-element is-muted-color"
class="multi-currency-settings-task__description"
>
A currency switcher is also available in your widgets.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,35 +139,43 @@ const StoreSettings = () => {
) }
</div>
{ storeSettings.site_theme === 'Storefront' ? (
<CheckboxControl
checked={ isStorefrontSwitcherEnabledValue }
onChange={
handleIsStorefrontSwitcherEnabledClick
}
data-testid={ 'enable_storefront_switcher' }
label={ __(
'Add a currency switcher to the Storefront theme on breadcrumb section.',
'woocommerce-payments'
) }
/>
) : null }
<div className="multi-currency-settings__description">
{ createInterpolateElement(
sprintf(
/* translators: %s: url to the widgets page */
__(
'A currency switcher is also available in your widgets. ' +
'<linkToWidgets>Configure now</linkToWidgets>',
<>
<CheckboxControl
checked={
isStorefrontSwitcherEnabledValue
}
onChange={
handleIsStorefrontSwitcherEnabledClick
}
data-testid={
'enable_storefront_switcher'
}
label={ __(
'Add a currency switcher to the Storefront theme on breadcrumb section.',
'woocommerce-payments'
),
'widgets.php'
),
{
// eslint-disable-next-line jsx-a11y/anchor-has-content
linkToWidgets: <a href="widgets.php" />,
}
) }
</div>
) }
/>
<div className="multi-currency-settings__description">
{ createInterpolateElement(
sprintf(
/* translators: %s: url to the widgets page */
__(
'A currency switcher is also available in your widgets. ' +
'<linkToWidgets>Configure now</linkToWidgets>',
'woocommerce-payments'
),
'widgets.php'
),
{
linkToWidgets: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a href="widgets.php" />
),
}
) }
</div>
</>
) : null }
</CardBody>
<PreviewModal
isPreviewModalOpen={ isPreviewModalOpen }
Expand Down