mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Merge pull request #2892 from woocommerce/PCP-4000-hide-the-price-notice-when-no-badges-are-visible
Hide the price notice when no badges are visible (4000)
This commit is contained in:
commit
eaac7c0da1
3 changed files with 32 additions and 31 deletions
|
@ -1,7 +1,8 @@
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import AcdcFlow from './AcdcFlow';
|
import AcdcFlow from './AcdcFlow';
|
||||||
import BcdcFlow from './BcdcFlow';
|
import BcdcFlow from './BcdcFlow';
|
||||||
import { Button } from '@wordpress/components';
|
import { countryPriceInfo } from '../../../utils/countryPriceInfo';
|
||||||
|
import { pricesBasedDescription } from './pricesBasedDescription';
|
||||||
|
|
||||||
const WelcomeDocs = ( {
|
const WelcomeDocs = ( {
|
||||||
useAcdc,
|
useAcdc,
|
||||||
|
@ -10,15 +11,6 @@ const WelcomeDocs = ( {
|
||||||
storeCountry,
|
storeCountry,
|
||||||
storeCurrency,
|
storeCurrency,
|
||||||
} ) => {
|
} ) => {
|
||||||
const pricesBasedDescription = sprintf(
|
|
||||||
// translators: %s: Link to PayPal REST application guide
|
|
||||||
__(
|
|
||||||
'<sup>1</sup>Prices based on domestic transactions as of October 25th, 2024. <a target="_blank" href="%s">Click here</a> for full pricing details.',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ppcp-r-welcome-docs">
|
<div className="ppcp-r-welcome-docs">
|
||||||
<h2 className="ppcp-r-welcome-docs__title">
|
<h2 className="ppcp-r-welcome-docs__title">
|
||||||
|
@ -41,10 +33,14 @@ const WelcomeDocs = ( {
|
||||||
storeCurrency={ storeCurrency }
|
storeCurrency={ storeCurrency }
|
||||||
/>
|
/>
|
||||||
) }
|
) }
|
||||||
<p
|
{ storeCountry in countryPriceInfo && (
|
||||||
className="ppcp-r-optional-payment-methods__description"
|
<p
|
||||||
dangerouslySetInnerHTML={ { __html: pricesBasedDescription } }
|
className="ppcp-r-optional-payment-methods__description"
|
||||||
></p>
|
dangerouslySetInnerHTML={ {
|
||||||
|
__html: pricesBasedDescription,
|
||||||
|
} }
|
||||||
|
></p>
|
||||||
|
) }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
|
|
||||||
|
export const pricesBasedDescription = sprintf(
|
||||||
|
// translators: %s: Link to PayPal REST application guide
|
||||||
|
__(
|
||||||
|
'<sup>1</sup>Prices based on domestic transactions as of October 25th, 2024. <a target="_blank" href="%s">Click here</a> for full pricing details.',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
|
||||||
|
);
|
|
@ -1,10 +1,12 @@
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
|
|
||||||
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
|
import OnboardingHeader from '../../ReusableComponents/OnboardingHeader';
|
||||||
import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper';
|
import SelectBoxWrapper from '../../ReusableComponents/SelectBoxWrapper';
|
||||||
import SelectBox from '../../ReusableComponents/SelectBox';
|
import SelectBox from '../../ReusableComponents/SelectBox';
|
||||||
import { CommonHooks, OnboardingHooks } from '../../../data';
|
import { CommonHooks, OnboardingHooks } from '../../../data';
|
||||||
import OptionalPaymentMethods from '../../ReusableComponents/OptionalPaymentMethods/OptionalPaymentMethods';
|
import OptionalPaymentMethods from '../../ReusableComponents/OptionalPaymentMethods/OptionalPaymentMethods';
|
||||||
|
import { pricesBasedDescription } from '../../ReusableComponents/WelcomeDocs/pricesBasedDescription';
|
||||||
|
import { countryPriceInfo } from '../../../utils/countryPriceInfo';
|
||||||
|
|
||||||
const OPM_RADIO_GROUP_NAME = 'optional-payment-methods';
|
const OPM_RADIO_GROUP_NAME = 'optional-payment-methods';
|
||||||
|
|
||||||
|
@ -16,15 +18,6 @@ const StepPaymentMethods = ( {} ) => {
|
||||||
|
|
||||||
const { storeCountry, storeCurrency } = CommonHooks.useWooSettings();
|
const { storeCountry, storeCurrency } = CommonHooks.useWooSettings();
|
||||||
|
|
||||||
const pricesBasedDescription = sprintf(
|
|
||||||
// translators: %s: Link to PayPal REST application guide
|
|
||||||
__(
|
|
||||||
'<sup>1</sup>Prices based on domestic transactions as of October 25th, 2024. <a target="_blank" href="%s">Click here</a> for full pricing details.',
|
|
||||||
'woocommerce-paypal-payments'
|
|
||||||
),
|
|
||||||
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ppcp-r-page-optional-payment-methods">
|
<div className="ppcp-r-page-optional-payment-methods">
|
||||||
<OnboardingHeader
|
<OnboardingHeader
|
||||||
|
@ -67,12 +60,14 @@ const StepPaymentMethods = ( {} ) => {
|
||||||
type="radio"
|
type="radio"
|
||||||
></SelectBox>
|
></SelectBox>
|
||||||
</SelectBoxWrapper>
|
</SelectBoxWrapper>
|
||||||
<p
|
{ storeCountry in countryPriceInfo && (
|
||||||
className="ppcp-r-optional-payment-methods__description"
|
<p
|
||||||
dangerouslySetInnerHTML={ {
|
className="ppcp-r-optional-payment-methods__description"
|
||||||
__html: pricesBasedDescription,
|
dangerouslySetInnerHTML={ {
|
||||||
} }
|
__html: pricesBasedDescription,
|
||||||
></p>
|
} }
|
||||||
|
></p>
|
||||||
|
) }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue