• Resolved gnetconsulting

    (@gnetconsulting)


    Is it possible w/ your plugin to require the billing and shipping countries to be the same? If not, any suggestions?

    We have a situation where items are sold to customers in Canada and the US. We are looking to block orders if they’re billed to US and shipped to Canada or vice-versa. If they bill in Canada they should also ship to Canada and the reverse is also true.

    TIA!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Clifton Griffin

    (@clifgriffin)

    Hi there,

    Interesting problem – shocked no one has requested this before.

    I think generally you would want to set this up as a custom validation rule on your payment processor – is that something your processor allows?

    Otherwise, you could add it as custom validation during checkout submit that would require a bit of custom coding.

    Best,
    Clif

    Thread Starter gnetconsulting

    (@gnetconsulting)

    Leave it to me to find an interesting problem! LOL

    They use PayPal Payments for their CC charges. I can check, but I doubt it.

    So it sounds like I need to write some custom JS to compare the billing/shipping countries and, if different, disable the completion button? If so, any pointers?

    Thanks!

    Plugin Author Clifton Griffin

    (@clifgriffin)

    I would do it on the PHP side with this action hook:
    woocommerce_after_checkout_validation

    Here’s an example from ChatGPT:

    https://chat.openai.com/share/0efdb4d8-e037-4d74-a55b-4e0e10be1666

    Thread Starter gnetconsulting

    (@gnetconsulting)

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Require Billing and Shipping Countries To Match’ is closed to new replies.