mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Merge pull request #1874 from woocommerce/PCP-2380-ui-fixes
Change default "Place Order" button text, add additional "Place Order" description in block
This commit is contained in:
commit
8ab5ec93ad
4 changed files with 58 additions and 29 deletions
|
@ -326,11 +326,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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue