Add buyer-country for guests too

This commit is contained in:
Alex P 2023-06-13 12:31:59 +03:00
parent fde0aae9a0
commit 8a6437b558
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -1000,7 +1000,7 @@ class SmartButton implements SmartButtonInterface {
);
if (
$this->environment->current_environment_is( Environment::SANDBOX )
&& defined( 'WP_DEBUG' ) && \WP_DEBUG && is_user_logged_in()
&& defined( 'WP_DEBUG' ) && \WP_DEBUG
&& WC()->customer instanceof \WC_Customer && WC()->customer->get_billing_country()
&& 2 === strlen( WC()->customer->get_billing_country() )
) {