mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Hide PUI gateway if shipping address is not Germany
This commit is contained in:
parent
3926ae2d96
commit
90cd342a10
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@ class PayUponInvoiceHelper {
|
|||
return false;
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
$shipping_country = wc_clean( wp_unslash( $_POST['s_country'] ?? '' ) );
|
||||
if ( $shipping_country && 'DE' !== $shipping_country ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $this->is_valid_currency() ) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue