diff --git a/changelog.txt b/changelog.txt index 089810461..87510a692 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,6 +13,8 @@ * Enhancement - Sync shipping options with Venmo when skipping final confirmation on Checkout #2108 * Enhancement - Card Fields: Add a filter for the CVC field and update the placeholder to match the label #2089 * Enhancement - Product Title: Sanitize before sending to PayPal #2090 +* Enhancement - Add filter for disabling permit_multiple_payment_tokens vault attribute #2136 +* Enhancement - Filter to hide PayPal email address not working on order detail #2137 = 2.6.0 - 2024-03-20 = * Fix - invoice_id not included in API call when creating payment with saved card #2086 diff --git a/modules/ppcp-save-payment-methods/src/SavePaymentMethodsModule.php b/modules/ppcp-save-payment-methods/src/SavePaymentMethodsModule.php index c8240c2c7..a345d0e84 100644 --- a/modules/ppcp-save-payment-methods/src/SavePaymentMethodsModule.php +++ b/modules/ppcp-save-payment-methods/src/SavePaymentMethodsModule.php @@ -141,7 +141,7 @@ class SavePaymentMethodsModule implements ModuleInterface { 'vault' => array( 'store_in_vault' => 'ON_SUCCESS', 'usage_type' => 'MERCHANT', - 'permit_multiple_payment_tokens' => true, + 'permit_multiple_payment_tokens' => apply_filters( 'woocommerce_paypal_payments_permit_multiple_payment_tokens', true ), ), ), ), @@ -167,7 +167,7 @@ class SavePaymentMethodsModule implements ModuleInterface { 'vault' => array( 'store_in_vault' => 'ON_SUCCESS', 'usage_type' => 'MERCHANT', - 'permit_multiple_payment_tokens' => true, + 'permit_multiple_payment_tokens' => apply_filters( 'woocommerce_paypal_payments_permit_multiple_payment_tokens', true ), ), ), ), 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; } diff --git a/readme.txt b/readme.txt index 5c1181a21..30b7db50b 100644 --- a/readme.txt +++ b/readme.txt @@ -192,6 +192,8 @@ If you encounter issues with the PayPal buttons not appearing after an update, p * Enhancement - Sync shipping options with Venmo when skipping final confirmation on Checkout #2108 * Enhancement - Card Fields: Add a filter for the CVC field and update the placeholder to match the label #2089 * Enhancement - Product Title: Sanitize before sending to PayPal #2090 +* Enhancement - Add filter for disabling permit_multiple_payment_tokens vault attribute #2136 +* Enhancement - Filter to hide PayPal email address not working on order detail #2137 = 2.6.0 - 2024-03-20 = * Fix - invoice_id not included in API call when creating payment with saved card #2086