mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not display pui gateway if customer service instructions field is empty
This commit is contained in:
parent
bb7c314aba
commit
58a53af41e
1 changed files with 5 additions and 0 deletions
|
@ -76,6 +76,11 @@ class PayUponInvoiceHelper {
|
|||
* @return bool
|
||||
*/
|
||||
public function is_checkout_ready_for_pui(): bool {
|
||||
$gateway_settings = get_option( 'woocommerce_ppcp-pay-upon-invoice-gateway_settings' );
|
||||
if ( $gateway_settings && '' === $gateway_settings['customer_service_instructions'] ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$billing_country = filter_input( INPUT_POST, 'country', FILTER_SANITIZE_STRING ) ?? null;
|
||||
if ( $billing_country && 'DE' !== $billing_country ) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue