Catch correct exception

This commit is contained in:
Emili Castells Guasch 2023-05-24 15:17:03 +02:00
parent bb6e177ef3
commit fa049527b6

View file

@ -9,6 +9,7 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\ApiClient\Endpoint;
use Exception;
use stdClass;
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
@ -138,7 +139,7 @@ class BillingAgreementsEndpoint {
}
return true;
} catch ( PayPalApiException $exception ) {
} catch ( Exception $exception ) {
delete_transient( 'ppcp_reference_transaction_enabled' );
return false;
}