• Resolved speed1gr

    (@speed1gr)


    Hello. We use your plugin to start accept google pay payments. The settings in PayPal is correct and we have enabled the google pay there. We sell only in one country and the settings in WooCommerce is like this, only to sell and ship to one country. So we have disable in checkout the country selector. the problem is that when we try to use google pay it said that country selection is necessary. Do you have any solution for this, something to add in functions to solve it?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @speed1gr

    Thank you for contacting Payment Plugins.

    So we have disable in checkout the country selector.

    Can you provide details on how you went about disabling the country selector?

    when we try to use google pay it said that country selection is necessary.

    Are you referring to the validations that take place when you click the Google Pay button?

    Kind Regards

    Thread Starter speed1gr

    (@speed1gr)

    hello, we use checkout field manager and disabled the country selector. the status is off so the client dont need to choose the country. we use woodmart and latest version of woocomerce

    Plugin Author Clayton R

    (@mrclayton)

    Hi @speed1gr

    This sounds like a Checkout Field Manager issue because the Google Pay validations use the core WooCommerce checkout field validation code. Your Checkout Field Manager plugin should be using the filter provided by WooCommerce to make the billing country and shipping country fields not required.

    In core WooCommerce, when you set a single value for Sell to specific countries it appears like this on the checkout page:

    Notice how the Country / Region field is pre-populated with a single value. The validation passes without any issues in this scenario.

    Can you either share a link to your website or a screenshot of the checkout page? If your country field is completely hidden, then the Checkout Field Manager plugin should be marking it as unrequired.

    Kind Regards

    Thread Starter speed1gr

    (@speed1gr)

    Hello, the country field is completely hiden but in the checkout field manager is also not required. Check the images.

    https://postimg.cc/SXqg3Hpw

    https://postimg.cc/w3BG6KRC

    Do you have in mind any solution for this?

    Plugin Author Clayton R

    (@mrclayton)

    Hi @speed1gr

    This still looks like an issue with your Checkout Field Manager plugin. If the billing country is truly not required, then it wouldn’t be flagging the field as missing and required during the Google Pay validation. This plugin uses the core WooCommerce validation code.

    The following code snippet should work:

    add_filter('woocommerce_checkout_fields', function($fields){
    if(isset(($fields['billing']['billing_country']))){
    $fields['billing']['billing_country']['required'] = false;
    }
    return $fields;
    });

    Kind Regards

    Thread Starter speed1gr

    (@speed1gr)

    thank you very much for the solution. everything work fine. thank you!

    • This reply was modified 6 months ago by speed1gr.
    Plugin Author Clayton R

    (@mrclayton)

    Hi @speed1gr

    Thank you for confirming. We always appreciate a good review of the plugin. https://ww.wp.xz.cn/support/plugin/pymntpl-paypal-woocommerce/reviews/

    Kind Regards

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.