Handle payment errors in blocks

This commit is contained in:
Alex P 2023-05-22 10:38:31 +03:00
parent fe08c2d4f4
commit 2df970a74a
No known key found for this signature in database
GPG key ID: 54487A734A204D71
2 changed files with 21 additions and 3 deletions

View file

@ -81,8 +81,9 @@ trait ProcessPaymentTrait {
wc_add_notice( $error->getMessage(), 'error' );
return array(
'result' => 'failure',
'redirect' => wc_get_checkout_url(),
'result' => 'failure',
'redirect' => wc_get_checkout_url(),
'errorMessage' => $error->getMessage(),
);
}