mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Display PayPal exception issues (WIP)
This commit is contained in:
parent
74490c40c9
commit
f454c60292
2 changed files with 10 additions and 0 deletions
|
@ -298,6 +298,12 @@ trait ProcessPaymentTrait {
|
|||
);
|
||||
}
|
||||
|
||||
$error_message = $error->getMessage();
|
||||
if($error->issues()) {
|
||||
$error_message = $error->issues()[0]->issue . ' ' . $error->issues()[0]->description;
|
||||
}
|
||||
wc_add_notice($error_message, 'error');
|
||||
|
||||
$this->session_handler->destroy_session_data();
|
||||
} catch ( RuntimeException $error ) {
|
||||
$this->handle_failure( $wc_order, $error );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue