File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
modules/ppcp-button/resources/js/modules/ContextBootstrap Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import SimulateCart from '../Helper/SimulateCart';
88import { strRemoveWord , strAddWord , throttle } from '../Helper/Utils' ;
99import merge from 'deepmerge' ;
1010import { debounce } from '../../../../../ppcp-blocks/resources/js/Helper/debounce' ;
11+ import ResumeFlowHelper from '../Helper/ResumeFlowHelper' ;
1112
1213class SingleProductBootstrap {
1314 constructor ( gateway , renderer , errorHandler ) {
@@ -53,7 +54,10 @@ class SingleProductBootstrap {
5354 return ;
5455 }
5556
56- this . render ( ) ;
57+ // Avoid re-rendering during the resume flow to prevent duplicate onApprove callbacks.
58+ if ( ! ResumeFlowHelper . isResumeFlow ( ) ) {
59+ this . render ( ) ;
60+ }
5761
5862 this . renderer . enableSmartButtons ( this . gateway . button . wrapper ) ;
5963 show ( this . gateway . button . wrapper ) ;
You can’t perform that action at this time.
0 commit comments