mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Revert logging default behavior
This commit is contained in:
parent
e8166247db
commit
6fab64e658
2 changed files with 10 additions and 1 deletions
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue