Add addition Place Order description in block

This commit is contained in:
Alex P 2023-11-29 17:01:55 +02:00
parent 9d933b2b73
commit de1ab5b7bf
No known key found for this signature in database
GPG key ID: 54487A734A204D71
4 changed files with 57 additions and 28 deletions

View file

@ -321,11 +321,19 @@ const PayPalComponent = ({
const features = ['products'];
if ((config.addPlaceOrderMethod || config.usePlaceOrder) && !config.scriptData.continuation) {
let descriptionElement = <div dangerouslySetInnerHTML={{__html: config.description}}></div>;
if (config.placeOrderButtonDescription) {
descriptionElement = <div>
<p dangerouslySetInnerHTML={{__html: config.description}}></p>
<p style={{textAlign: 'center'}} className={'ppcp-place-order-description'} dangerouslySetInnerHTML={{__html: config.placeOrderButtonDescription}}></p>
</div>;
}
registerPaymentMethod({
name: config.id,
label: <div dangerouslySetInnerHTML={{__html: config.title}}/>,
content: <div dangerouslySetInnerHTML={{__html: config.description}}/>,
edit: <div dangerouslySetInnerHTML={{__html: config.description}}/>,
content: descriptionElement,
edit: descriptionElement,
placeOrderButtonLabel: config.placeOrderButtonText,
ariaLabel: config.title,
canMakePayment: () => config.enabled,