Simplify log call

This commit is contained in:
Alex P. 2024-11-06 09:14:21 +02:00
parent 27472d3136
commit e813816e06
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -83,7 +83,7 @@ class PayPalBearer implements Bearer {
string $key, string $key,
string $secret, string $secret,
LoggerInterface $logger, LoggerInterface $logger,
Settings $settings ContainerInterface $settings
) { ) {
$this->cache = $cache; $this->cache = $cache;
@ -136,8 +136,7 @@ class PayPalBearer implements Bearer {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not create token.', 'woocommerce-paypal-payments' ) __( 'Could not create token.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->warning(
'warning',
$error->getMessage(), $error->getMessage(),
array( array(
'args' => $args, 'args' => $args,