Use basic redirect gateway when checkout smart buttons disabled

This commit is contained in:
Alex P. 2024-10-18 09:03:24 +03:00
parent 53af77897f
commit d125c24dc0
No known key found for this signature in database
GPG key ID: 54487A734A204D71
4 changed files with 27 additions and 20 deletions

View file

@ -739,11 +739,11 @@ if ( cartHasSubscriptionProducts( config.scriptData ) ) {
features.push( 'subscriptions' );
}
if ( block_enabled && config.enabled ) {
if (
( config.addPlaceOrderMethod || config.usePlaceOrder ) &&
! config.scriptData.continuation
) {
if (
block_enabled &&
( config.smartButtonsEnabled || config.placeOrderEnabled )
) {
if ( config.placeOrderEnabled && ! config.scriptData.continuation ) {
let descriptionElement = (
<div
dangerouslySetInnerHTML={ { __html: config.description } }
@ -776,7 +776,7 @@ if ( block_enabled && config.enabled ) {
placeOrderButtonLabel: config.placeOrderButtonText,
ariaLabel: config.title,
canMakePayment: () => {
return config.enabled;
return true;
},
supports: {
features,
@ -798,7 +798,7 @@ if ( block_enabled && config.enabled ) {
features: [ ...features, 'ppcp_continuation' ],
},
} );
} else if ( ! config.usePlaceOrder ) {
} else if ( config.smartButtonsEnabled ) {
for ( const fundingSource of [
'paypal',
...config.enabledFundingSources,