From 8fbffbced03cd735850922559c5d17dc1ab42fdb Mon Sep 17 00:00:00 2001 From: David Remer Date: Wed, 21 Oct 2020 08:58:02 +0300 Subject: [PATCH] make sure the country code has only two characters, prevents 'default' as value --- modules/ppcp-button/src/Assets/class-smartbutton.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ppcp-button/src/Assets/class-smartbutton.php b/modules/ppcp-button/src/Assets/class-smartbutton.php index f686cb636..eed68e66b 100644 --- a/modules/ppcp-button/src/Assets/class-smartbutton.php +++ b/modules/ppcp-button/src/Assets/class-smartbutton.php @@ -704,6 +704,7 @@ class SmartButton implements SmartButtonInterface { if ( defined( 'WP_DEBUG' ) && \WP_DEBUG && is_user_logged_in() && WC()->customer && WC()->customer->get_billing_country() + && 2 === strlen( WC()->customer->get_billing_country() ) ) { $params['buyer-country'] = WC()->customer->get_billing_country(); }