Distance shortcode never picks up the distance between the customer and store

Top WooCommerce & WordPress Plugins Forums Custom Shipping Methods for WooCommerce Distance shortcode never picks up the distance between the customer and store

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #94600
    Luis Ramos
    Participant

    Hi,
    I just bought this plugin and I can’t make it work with the distance shortcode. No matter what I do it never picks up the distance between the customer and store. This is supposed to happen right?
    I’m using this shortcode:

    2*[distance key="MY API KEY" default_distance="15" debug="yes" units="km"]

    This should mean that for each mile between the store and the customer the shipping should charge 2. So if I was 40 miles away from the store and I placed an order it should calculate it at 80, right? No matter what I do, it’s always calculating 2 * the default distance. It never, never picks up the distance from the customer.

    #94601
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Luis,

    First of all – is possible, please share an admin account to your site, so I could log in and check what’s going on (my email is [email protected]). Let me know if sharing an account is not an option and I will try to solve this remotely.

    Now a couple of notes:

    1. As you have added debug="yes" to the shortcode, you can check what’s going on in “WooCommerce > Status > Logs”. That should give you an idea of what’s happening with distance calculation.

    2. In your shortcode you are using kilometers, not miles. So if you need miles, you need to replace units="km" with units="mi".

    3. Just to be sure that your shop base address is retrieved correctly, you can also try adding src attribute to the shortcode, in this format: src="address, city postcode, country".

    #94602
    Luis Ramos
    Participant

    Hi Tom,

    Nevermind, my bad. I just noticed the plugin doesn’t work if you set referrers on the Google Cloud Platform. All working now!

    Thanks for your fast reply, anyway. Superb support!

    #94603
    Tom Anbinder
    Moderator
    Plugin Support

    Happy to help and glad to hear you’ve figured it out. Please let me know if you need anything else.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.