Merge pull request #2437 from woocommerce/PCP-3395-when-there-isnt-any-shipping-option-for-the-address-the-order-is-still-created-from-classic-cart

When there isn't any shipping option for the address the order is still created from classic cart
This commit is contained in:
Emili Castells 2024-08-22 11:18:44 +02:00 committed by GitHub
commit 0115dec944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 15 deletions

View file

@ -20,10 +20,7 @@ const onApprove = ( context, errorHandler ) => {
} )
.then( ( data ) => {
if ( ! data.success ) {
errorHandler.genericError();
return actions.restart().catch( ( err ) => {
errorHandler.genericError();
} );
location.href = context.config.redirect;
}
const orderReceivedUrl = data.data?.order_received_url;