Fix product list price help label to properly reflect tax settings (#34564)
* Fix product list price tax included help label * Add changelog entry for products list price help label.
This commit is contained in:
parent
966cff5e7a
commit
beb6a6f4c7
|
@ -63,16 +63,19 @@ export const PricingSection: React.FC = () => {
|
||||||
return cleanValue;
|
return cleanValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
const taxSettingsText =
|
const taxIncludedInPriceText = __(
|
||||||
'Per your {{link}}store settings{{/link}}, tax is {{strong}}%sincluded{{/strong}} in the price.';
|
'Per your {{link}}store settings{{/link}}, tax is {{strong}}included{{/strong}} in the price.',
|
||||||
const addNot = pricesIncludeTax ? '' : 'not ';
|
'woocommerce'
|
||||||
taxSettingsText.replace( taxSettingsText, addNot );
|
);
|
||||||
|
const taxNotIncludedInPriceText = __(
|
||||||
|
'Per your {{link}}store settings{{/link}}, tax is {{strong}}not included{{/strong}} in the price.',
|
||||||
|
'woocommerce'
|
||||||
|
);
|
||||||
|
|
||||||
const taxSettingsElement = interpolateComponents( {
|
const taxSettingsElement = interpolateComponents( {
|
||||||
mixedString: __(
|
mixedString: pricesIncludeTax
|
||||||
'Per your {{link}}store settings{{/link}}, tax is {{strong}}not included{{/strong}} in the price.',
|
? taxIncludedInPriceText
|
||||||
'woocommerce'
|
: taxNotIncludedInPriceText,
|
||||||
),
|
|
||||||
components: {
|
components: {
|
||||||
link: (
|
link: (
|
||||||
<Link
|
<Link
|
||||||
|
@ -80,7 +83,9 @@ export const PricingSection: React.FC = () => {
|
||||||
target="_blank"
|
target="_blank"
|
||||||
type="external"
|
type="external"
|
||||||
onClick={ () => {
|
onClick={ () => {
|
||||||
recordEvent( 'product_pricing_list_price_help' );
|
recordEvent(
|
||||||
|
'product_pricing_list_price_help_tax_settings_click'
|
||||||
|
);
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
<></>
|
<></>
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix product list price help label to properly reflect tax settings.
|
Loading…
Reference in New Issue