mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix psalm
This commit is contained in:
parent
a211553e4b
commit
ad95688277
1 changed files with 2 additions and 1 deletions
|
@ -19,6 +19,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentTokenActionLinksFactory;
|
|||
use WooCommerce\PayPalCommerce\ApiClient\Factory\PaymentTokenFactory;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Repository\CustomerRepository;
|
||||
use WP_Error;
|
||||
|
||||
/**
|
||||
* Class PaymentTokenEndpoint
|
||||
|
@ -176,7 +177,7 @@ class PaymentTokenEndpoint {
|
|||
);
|
||||
|
||||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
if ( $response instanceof WP_Error ) {
|
||||
$error = new RuntimeException(
|
||||
__( 'Could not fetch payment token for guest customer id.', 'woocommerce-paypal-payments' )
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue