mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
make sure the country code has only two characters, prevents 'default' as value
This commit is contained in:
parent
9dc95c0e28
commit
8fbffbced0
1 changed files with 1 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue