File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ export async function ppcpOnLoad(payment: IExpressPayPaypalCommercePlatformButto
31
31
const paypalDivId = 'ppcp-express-payment' ;
32
32
paypalDiv . id = paypalDivId ;
33
33
paypalDiv . className = `${ paypalDivId } ` ;
34
- paypalDiv . appendChild ( paypalButtonDiv ) ;
35
- paypalDiv . appendChild ( payLaterButtonDiv ) ;
36
34
const container = document . getElementById ( 'express-payment-container' ) ;
37
35
container ?. appendChild ( paypalDiv ) ;
38
36
@@ -61,15 +59,16 @@ export async function ppcpOnLoad(payment: IExpressPayPaypalCommercePlatformButto
61
59
62
60
if ( container ) {
63
61
if ( paypalButton . isEligible ( ) ) {
62
+ paypalDiv . appendChild ( paypalButtonDiv ) ;
64
63
await paypalButton . render ( `#${ paypalButtonDivId } ` ) ;
65
64
enableSection = true ;
66
65
}
67
66
68
67
if ( payLaterButton . isEligible ( ) ) {
68
+ paypalDiv . appendChild ( payLaterButtonDiv ) ;
69
69
await payLaterButton . render ( `#${ payLaterButtonDivId } ` ) ;
70
70
enableSection = true ;
71
71
}
72
-
73
72
}
74
73
75
74
if ( enableSection ) {
You can’t perform that action at this time.
0 commit comments