Extract error message

This commit is contained in:
Alex P 2022-07-12 21:19:21 +03:00
parent 81c786150d
commit 0ce3af03c3
3 changed files with 30 additions and 3 deletions

View file

@ -232,8 +232,7 @@ trait ProcessPaymentTrait {
return $this->handle_payment_failure(
$wc_order,
new Exception(
__( 'Failed to process the payment. Please try again or contact the shop admin.', 'woocommerce-paypal-payments' )
. ' ' . $error->getMessage(),
Messages::generic_payment_error_message() . ' ' . $error->getMessage(),
$error->getCode(),
$error
)