Merge pull request #73 from woocommerce/issue-67-no-country-selected

No country selected
This commit is contained in:
Emili Castells 2020-11-02 10:45:43 +01:00 committed by GitHub
commit 13176decc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 9 deletions

View file

@ -22,7 +22,7 @@ class ErrorHandler {
} else {
this.wrapper.classList.remove('ppcp-persist');
}
this.wrapper.innerText = this.sanitize(text);
this.wrapper.innerHTML = this.sanitize(text);
jQuery.scroll_to_notices(jQuery('.woocommerce-notices-wrapper'))
}

View file

@ -716,6 +716,7 @@ class SmartButton implements SmartButtonInterface {
$this->environment->current_environment_is( Environment::SANDBOX )
&& 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();
}