mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add status code in unknown PayPalApiException message
This commit is contained in:
parent
c09c1efc9c
commit
a1f3cb4a49
1 changed files with 7 additions and 3 deletions
|
@ -39,9 +39,13 @@ class PayPalApiException extends RuntimeException {
|
|||
$response = new \stdClass();
|
||||
}
|
||||
if ( ! isset( $response->message ) ) {
|
||||
$response->message = __(
|
||||
'Unknown error while connecting to PayPal.',
|
||||
'woocommerce-paypal-payments'
|
||||
$response->message = sprintf(
|
||||
/* translators: %1$d - HTTP status code number (404, 500, ...) */
|
||||
__(
|
||||
'Unknown error while connecting to PayPal. Status code: %1$d.',
|
||||
'woocommerce-paypal-payments'
|
||||
),
|
||||
$this->status_code
|
||||
);
|
||||
}
|
||||
if ( ! isset( $response->name ) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue