Revert logging default behavior

This commit is contained in:
dinamiko 2022-06-27 14:25:02 +02:00
parent e8166247db
commit 6fab64e658
2 changed files with 10 additions and 1 deletions

View file

@ -90,6 +90,7 @@ trait RequestTrait {
if ( if (
isset( $response['body'] ) isset( $response['body'] )
&& isset( $response['response']['code'] ) && isset( $response['response']['code'] )
&& ! in_array( $response['response']['code'], array( 200, 201, 202, 204 ), true )
) { ) {
$output .= 'Response Body: ' . wc_print_r( $response['body'], true ) . "\n"; $output .= 'Response Body: ' . wc_print_r( $response['body'], true ) . "\n";
} }

View file

@ -2218,7 +2218,15 @@ return array(
); );
}, },
'wcgateway.logging.is-enabled' => function ( ContainerInterface $container ) : bool { 'wcgateway.logging.is-enabled' => function ( ContainerInterface $container ) : bool {
return true; $settings = $container->get( 'wcgateway.settings' );
/**
* Whether the logging of the plugin errors/events is enabled.
*/
return apply_filters(
'woocommerce_paypal_payments_is_logging_enabled',
$settings->has( 'logging_enabled' ) && $settings->get( 'logging_enabled' )
);
}, },
'wcgateway.helper.vaulting-scope' => static function ( ContainerInterface $container ): bool { 'wcgateway.helper.vaulting-scope' => static function ( ContainerInterface $container ): bool {