mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
♻️ Move country check into PricingDescription
This commit is contained in:
parent
fe978a5ea0
commit
b89164e1ea
3 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ const WelcomeDocs = ( {
|
|||
storeCurrency={ storeCurrency }
|
||||
/>
|
||||
) }
|
||||
<PricingDescription country={ storeCountry } />
|
||||
<PricingDescription />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -59,7 +59,7 @@ const StepPaymentMethods = ( {} ) => {
|
|||
type="radio"
|
||||
></SelectBox>
|
||||
</SelectBoxWrapper>
|
||||
<PricingDescription country={ storeCountry } />
|
||||
<PricingDescription />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue