Check for venmo and vaulting before creating wc order

This commit is contained in:
Narek Zakarian 2024-05-17 00:24:51 +04:00
parent 20ccef8b28
commit 1561272657
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -10,7 +10,7 @@ const onApprove = (context, errorHandler) => {
nonce: context.config.ajax.approve_order.nonce,
order_id:data.orderID,
funding_source: window.ppcpFundingSource,
should_create_wc_order: true
should_create_wc_order: !context.config.vaultingEnabled || data.paymentSource !== 'venmo'
})
}).then((res)=>{
return res.json();