♻️ Move country check into PricingDescription

This commit is contained in:
Philipp Stracker 2024-12-12 17:48:09 +01:00
parent fe978a5ea0
commit b89164e1ea
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View file

@ -1,9 +1,12 @@
import { __, sprintf } from '@wordpress/i18n';
import { countryPriceInfo } from '../../utils/countryPriceInfo';
import { CommonHooks } from '../../data';
const PricingDescription = ( { country } ) => {
if ( ! countryPriceInfo[ country ] ) {
const PricingDescription = () => {
const { storeCountry } = CommonHooks.useWooSettings();
if ( ! countryPriceInfo[ storeCountry ] ) {
return null;
}

View file

@ -33,7 +33,7 @@ const WelcomeDocs = ( {
storeCurrency={ storeCurrency }
/>
) }
<PricingDescription country={ storeCountry } />
<PricingDescription />
</div>
);
};

View file

@ -59,7 +59,7 @@ const StepPaymentMethods = ( {} ) => {
type="radio"
></SelectBox>
</SelectBoxWrapper>
<PricingDescription country={ storeCountry } />
<PricingDescription />
</div>
</div>
);