mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #943 from woocommerce/PCP-942-payment-source-cannot-be-used-error-for-pay-upon-invoice-when-ship-to-a-different-address-country-different-then-germany
`PAYMENT_SOURCE_CANNOT_BE_USED` error for pay upon invoice when ship to a different address country different then Germany (942)
This commit is contained in:
commit
902e92c685
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,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