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( return new AxoScriptAttributes(
$container->get( 'button.request-data' ), $container->get( 'button.request-data' ),
$container->get( 'woocommerce.logger.woocommerce' ), $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\EndpointInterface;
use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData; use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
/**
* Handles the request for the PayPal Axo script attributes.
*/
class AxoScriptAttributes implements EndpointInterface { class AxoScriptAttributes implements EndpointInterface {
const ENDPOINT = 'ppc-axo-script-attributes'; const ENDPOINT = 'ppc-axo-script-attributes';
@ -35,9 +38,9 @@ class AxoScriptAttributes implements EndpointInterface {
try { try {
$token = $this->sdk_client_token->sdk_client_token(); $token = $this->sdk_client_token->sdk_client_token();
} catch (PayPalApiException $exception) { } catch ( PayPalApiException $exception ) {
$this->logger->error($exception->getMessage()); $this->logger->error( $exception->getMessage() );
wp_send_json_error($exception->getMessage()); wp_send_json_error( $exception->getMessage() );
return false; return false;
} }