mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Display multiple issues
This commit is contained in:
parent
238fa31cf7
commit
cdde60e738
1 changed files with 8 additions and 1 deletions
|
@ -300,7 +300,14 @@ trait ProcessPaymentTrait {
|
|||
|
||||
$error_message = $error->getMessage();
|
||||
if ( $error->issues() ) {
|
||||
$error_message = $error->issues()[0]->issue . ' ' . $error->issues()[0]->description;
|
||||
$error_message = implode(
|
||||
array_map(
|
||||
function( $issue ) {
|
||||
return $issue->issue . ' ' . $issue->description . '<br/>';
|
||||
},
|
||||
$error->issues()
|
||||
)
|
||||
);
|
||||
}
|
||||
wc_add_notice( $error_message, 'error' );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue