woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/WelcomeDocs.js

53 lines
1.3 KiB
JavaScript
Raw Normal View History

2024-11-12 19:23:30 +04:00
import { __, sprintf } from '@wordpress/i18n';
2024-11-26 15:01:21 +04:00
import AcdcFlow from './AcdcFlow';
import BcdcFlow from './BcdcFlow';
import { Button } from '@wordpress/components';
2024-11-12 19:23:30 +04:00
2024-11-26 15:01:21 +04:00
const WelcomeDocs = ( {
useAcdc,
isFastlane,
isPayLater,
storeCountry,
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 '
);
2024-11-12 19:23:30 +04:00
2024-11-26 15:01:21 +04:00
return (
<div className="ppcp-r-welcome-docs">
<h2 className="ppcp-r-welcome-docs__title">
{ __(
`Want to know more about PayPal Payments?`,
'woocommerce-paypal-payments'
) }
</h2>
{ useAcdc ? (
<AcdcFlow
isFastlane={ isFastlane }
isPayLater={ isPayLater }
storeCountry={ storeCountry }
storeCurrency={ storeCurrency }
/>
) : (
<BcdcFlow
isPayLater={ isPayLater }
storeCountry={ storeCountry }
storeCurrency={ storeCurrency }
/>
) }
<p
2024-11-26 16:10:35 +04:00
className="ppcp-r-optional-payment-methods__description"
2024-11-26 15:01:21 +04:00
dangerouslySetInnerHTML={ { __html: pricesBasedDescription } }
></p>
</div>
);
2024-11-12 19:23:30 +04:00
};
export default WelcomeDocs;