* OBW: fix tooltip display on product types step.

* Restore physical products as default.

* Slight improvement to screen reader text.
This commit is contained in:
Jeff Stieler 2020-07-30 12:14:18 -04:00 committed by GitHub
parent ee057bcb37
commit 53031f3fae
2 changed files with 17 additions and 8 deletions

View File

@ -32,19 +32,27 @@ function getLabel( description, yearlyPrice ) {
__( '$%f per month, billed annually', 'woocommerce-admin' ),
monthlyPrice
);
/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
const toolTipText = __(
"This product type requires a paid extension.\nWe'll add this to a cart so that\nyou can purchase and install it later.",
'woocommerce-admin'
);
/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
return (
<Fragment>
<span className="woocommerce-product-wizard__product-types__label">
{ description }
</span>
<Tooltip
text={ __(
"This product type requires a paid extension. We'll add this to a cart so that you can purchase and install it later.",
'woocommerce-admin'
) }
>
<Pill>{ priceDescription }</Pill>
<Tooltip text={ toolTipText } position="bottom center">
<span>
<Pill>
<span className="screen-reader-text">
{ toolTipText }
</span>
{ priceDescription }
</Pill>
</span>
</Tooltip>
</Fragment>
);

View File

@ -340,6 +340,7 @@ class Onboarding {
array(
'physical' => array(
'label' => __( 'Physical products', 'woocommerce-admin' ),
'default' => true,
),
'downloads' => array(
'label' => __( 'Downloads', 'woocommerce-admin' ),