Skip to content

Commit 1b92419

Browse files
committed
put config global var within the confirmation Promise
1 parent 3374543 commit 1b92419

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

client/checkout/api/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ export default class WCPayAPI {
207207
} );
208208
};
209209

210-
const isChangingPayment = getConfig( 'isChangingPayment' );
211-
212210
return (
213211
confirmPaymentOrSetup()
214212
// ToDo: Switch to an async function once it works with webpack.
@@ -228,6 +226,12 @@ export default class WCPayAPI {
228226
getExpressCheckoutConfig( 'ajax_url' ) ??
229227
getConfig( 'ajaxUrl' );
230228

229+
const isChangingPayment = getConfig( 'isChangingPayment' );
230+
console.log(
231+
'Config source isChangingPayment:',
232+
isChangingPayment
233+
);
234+
231235
const ajaxCall = this.request( ajaxUrl, {
232236
action: 'update_order_status',
233237
order_id: orderId,

0 commit comments

Comments
 (0)