Fix phpcs

This commit is contained in:
Emili Castells Guasch 2025-07-18 11:29:12 +02:00
parent 06c000b42b
commit fbe13cb7dd
No known key found for this signature in database
5 changed files with 13 additions and 10 deletions

View file

@ -293,7 +293,7 @@ return array(
return new AxoScriptAttributes(
$container->get( 'button.request-data' ),
$container->get( 'woocommerce.logger.woocommerce' ),
$container->get('api.sdk-client-token')
$container->get( 'api.sdk-client-token' )
);
},

View file

@ -8,6 +8,9 @@ use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
use WooCommerce\PayPalCommerce\Button\Endpoint\EndpointInterface;
use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
/**
* Handles the request for the PayPal Axo script attributes.
*/
class AxoScriptAttributes implements EndpointInterface {
const ENDPOINT = 'ppc-axo-script-attributes';
@ -35,9 +38,9 @@ class AxoScriptAttributes implements EndpointInterface {
try {
$token = $this->sdk_client_token->sdk_client_token();
} catch (PayPalApiException $exception) {
$this->logger->error($exception->getMessage());
wp_send_json_error($exception->getMessage());
} catch ( PayPalApiException $exception ) {
$this->logger->error( $exception->getMessage() );
wp_send_json_error( $exception->getMessage() );
return false;
}