refactor: `*_checkout_process_payment_error` to return 400 error code (#45979)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
97d71b25a2
commit
57b8fe8a84
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
refactor: `woocommerce_rest_checkout_process_payment_error` returns a `400` response code, instead of `402`.
|
|
@ -85,7 +85,7 @@ trait CheckoutTrait {
|
|||
throw new RouteException( 'woocommerce_rest_checkout_invalid_payment_result', __( 'Invalid payment result received from payment method.', 'woocommerce' ), 500 );
|
||||
}
|
||||
} catch ( \Exception $e ) {
|
||||
throw new RouteException( 'woocommerce_rest_checkout_process_payment_error', $e->getMessage(), 402 );
|
||||
throw new RouteException( 'woocommerce_rest_checkout_process_payment_error', esc_html( $e->getMessage() ), 400 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue