mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Disable Pay Upon Invoice if billing/shipping country not set
This commit is contained in:
parent
a0d0375ec0
commit
b1bfa2940b
1 changed files with 2 additions and 2 deletions
|
@ -57,13 +57,13 @@ class PayUponInvoiceHelper {
|
|||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
$billing_country = wc_clean( wp_unslash( $_POST['country'] ?? '' ) );
|
||||
if ( $billing_country && 'DE' !== $billing_country ) {
|
||||
if ( empty( $billing_country ) || 'DE' !== $billing_country ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Missing
|
||||
$shipping_country = wc_clean( wp_unslash( $_POST['s_country'] ?? '' ) );
|
||||
if ( $shipping_country && 'DE' !== $shipping_country ) {
|
||||
if ( empty( $shipping_country ) || 'DE' !== $shipping_country ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue