diff --git a/modules/ppcp-wc-gateway/src/WCGatewayModule.php b/modules/ppcp-wc-gateway/src/WCGatewayModule.php index 4295b1b17..8e765a8e9 100644 --- a/modules/ppcp-wc-gateway/src/WCGatewayModule.php +++ b/modules/ppcp-wc-gateway/src/WCGatewayModule.php @@ -459,6 +459,10 @@ class WCGatewayModule implements ModuleInterface { function ( $fields ) { global $theorder; + if ( ! apply_filters( 'woocommerce_paypal_payments_order_details_show_paypal_email', true ) ) { + return $fields; + } + if ( ! is_array( $fields ) ) { return $fields; }