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();
|
$response = new \stdClass();
|
||||||
}
|
}
|
||||||
if ( ! isset( $response->message ) ) {
|
if ( ! isset( $response->message ) ) {
|
||||||
$response->message = __(
|
$response->message = sprintf(
|
||||||
'Unknown error while connecting to PayPal.',
|
/* translators: %1$d - HTTP status code number (404, 500, ...) */
|
||||||
'woocommerce-paypal-payments'
|
__(
|
||||||
|
'Unknown error while connecting to PayPal. Status code: %1$d.',
|
||||||
|
'woocommerce-paypal-payments'
|
||||||
|
),
|
||||||
|
$this->status_code
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( ! isset( $response->name ) ) {
|
if ( ! isset( $response->name ) ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue