Wild Cards for postal codes shipping zones

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 47 reply threads
  • Author
    Posts
    • #101096
      Craig
      Participant

      Hi there,
      At the bottom of this thread you indicated that WCFM would update code to fix the issue with wild cards. I don’t think this has happened yet because I can’t get them to work (after hours of testing and trying to figure out the issue)….my result is that this previous request has not yet been addressed in the code?

      https://wclovers.com/forums/topic/can-a-city-shipping-zone-used-along-with-a-general-state-shipping-zone-setting/

      Please review and advise.

      Attachments:
      You must be logged in to view attached files.
    • #101204
      Craig
      Participant

      Also I have confirmed that the following wild cards are working and not working

      V ____NOT WORKING – supposed to work of all postal codes starting with V
      V9 ____NOT WORKING – supposed to work of all postal codes starting with V9
      V9R ____WORKING – works for all postal codes starting with V9R
      V9R,V9S,V9T ____WORKING – works for all postal codes starting with V9R,V9S,and V9T
      V9R 5S5 ____WORKING – works for specific postal code V9R 5S5
      V9R-V9V ____NOT WORKING – supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V
      (in other words all postal codes starting with V9R V9S V9T V9U V9V)
      V9R…V9V ____NOT WORKING – supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V
      (in other words all postal codes starting with V9R V9S V9T V9U V9V)

      Can you please look at this and confirm what is going on. This has been an issue since Feb 2019 (When I first purchased your plugins) and I have not be able to go live because I can never get the shipping settings to work properly for Canadian postal codes.

      • #103027
        Sushobhan
        Keymaster

        You don’t need to use wildcard characters. In reference to your image, if you want to match all the postcodes starting with V9R, simply put that without ‘*’.

    • #101205
      Craig
      Participant

      ALSO I can not get the second shipping zone to work. Once the setting are set for the first zone the other zones created after it do not seem to have any effect.

      Please confirm that the cart is properly progressing to the next zone set up if the first zone settings do not match the customers address because for the life of me I can not get it to work.

      Attachments:
      You must be logged in to view attached files.
      • #103032
        Sushobhan
        Keymaster

        Hello,
        Zone doesn’t work that way. When you (admin) create multiple zones, you need to make sure that each zone is different by choosing different ‘Zone regions’. Also add them in order from specific to more generic, otherwise the first zone rules will always be implied.

        So say, there is country1 and you want to set different shipping for 2 of its states (state1, state2), and keep a different rate for rest of the states. To achieve this, you need to create 3 zones, one for state1, one for state2, and one for country1. As rules gets applied from first to last, so the last rule (country1) will gets executed only if the address is not from state 1 or 2.

        I can understand setting shipping zones are kind of tricky sometimes. Let me know if you find my explanation it helpful.

    • #101987
      Craig
      Participant

      Good day. I wanted to follow up on this to see if you were able to find the glitch of why this is happening?

      1. The postal code formats
      2. only the first shipping zone works. any zone created after zone one are not beening applied.

    • #102403
      Craig
      Participant

      In addition to this I have also tested with the “StoreFront” theme to rule out if my theme was the issue and I have confirmed it has not.

      Can you please please look into this?

      Can you confirm if the shipping methods created after the first one are taking effect with postal codes?

      I really need to get this resolved….as you know shipping is a very important piece to a eCommerce.

      Many thanks

      Attachments:
      You must be logged in to view attached files.
    • #102413
      Craig
      Participant

      and finally as another test to rule out postal codes I also enabled USA states and tested that. Same result….and shipping method after the first one will NOT take effect. see attached screenshots for
      Alaska state (the first shipping method) – worked!
      and
      Georgia state (second in line shipping method) – did not work!

      Attachments:
      You must be logged in to view attached files.
    • #102432
      Craig
      Participant

      I need to make a correction.
      Where I say “shipping method”…I mean “shipping zone” (not the shipping methods withing the zones…but the zones themselves)

    • #103057
      Craig
      Participant

      Hi Sushobhan,

      Thanks for your reply and explaining this further. I very much appreciate I will do some more testing but have some follow up questions.

      1. Regarding wild cards
      -if “V9R” works for all postal codes starting with V9R should “V” work of all postal codes starting with V and should “V9” work of all postal codes starting with V9

      -is there one for a “range” of codes? In the wooCommerce documents they indicate that V9R…V9V is supposed to work of all postal codes starting with V9R through to a range ending with postal codes starting with V9V (in other words all postal codes starting with V9R V9S V9T V9U V9V)

      2. Regarding setting up the tables as an ADMIN. See the screenshot below.
      I have created 10 zones with each region stated as “Canada” (which sounds like the problem as you described above). My intention was to allow the vendors flexibility in adding the “provinces” if they choose when they set up their shipping methods in each store.
      What is the best way to do that?
      Vendor #1 wants to have shipping rates for “just canada” (so they use Zone one as Canada” in their shop settings)
      Vendor #2 wants different rates for each province (so they use all 10 zones and have a different province listed for each in their shop settings)
      Vendor #3 want to have shipping costs for his city, rest of province, and rest of Canada (so they use 3 zones, one with postal codes, one with British Columbia, and one with Canada).

      Is there away to set this up in Admin panel to allow this flexibility between vendors and their shipping methods>?

      Attachments:
      You must be logged in to view attached files.
    • #103089
      aemr45
      Participant

      Hi Craig,

      Please let me jump in, the only way I have found is to order this zones, first the one with postal codes, then the one with province and then the country.

      I also need that vendors be able to determine specific shipping prices for local shipping and that customers can choose local pick up only if they are in the same city (postal code range) as the vendor.

      The problem here is that for this to work, the seller needs to order the postal codes of his city to the top.

      If you as admin set up zones of different cities (postal codes) and put them on top of province, the vendor would have to add shipping methods to each city…

      I’m looking to a different approach, Plugin Hive has some plugins compatible with wcfm marketplace, and with one of their plugins, table rate shipping pro, you can set different shipping rates depending on city name, but the thing here is that we need that the city in the rule table get the city name from the vendor.

    • #103109
      Craig
      Participant

      aemr45 thanks for adding your info. This is very informative and rather great sanity check as I have been pulling my hair out trying to get these shipping settings to work.
      …and then feeling defeated thinking “If I can figure this out how can I expect a vendor?”

      I did not think that the shipping requirements for my marketplace requirements were overly in that vendors need the ability to identify their own zones/shipping methods because every business is different. Some will sell right across Canada some will only sell within city limits etc.

      It sounds like an additional plugin may be needed to do this and more research is needed. The Plugin Hive is one that I will look into as well.

      Please let me know if you find something and I will certainly do the same.

      Again thanks so much for adding your information here.

    • #103111
      Craig
      Participant

      This was the marketplace plugin I had used previously and their flat rate shipping setup was pretty flexible for vendors to create their own zones/tables as many as they needed in each shop
      https://docs.wcvendors.com/knowledge-base/wc-vendors-pro-shipping-system/

      Attachments:
      You must be logged in to view attached files.
    • #103371
      Craig
      Participant

      I have still failed.

      I have tried once again with these shipping zones can can not get them to work for postal codes. This as been a frustrating many months trying to sort this out!

      “the only way I have found is to order this zones, first the one with postal codes, then the one with province and then the country”.

      I did this set up and still no luck. only the FIRST shipping table is being applied.

      WC Lovers please help and confirm if you can get these shipping setting to apply for Canada and postal codes.

      Please show me how to make the following work
      Shipping to any postal code V9R = $10 (Works as zone 1)
      Shipping to rest of British Columbia = $20 (won’t work as zone 2)
      Shipping to all of Alberta + $30.00 (Wont work as Zone 3)

      Attachments:
      You must be logged in to view attached files.
    • #103379
      Craig
      Participant

      Here is a possible bug.

      I turned on the WooCommerce -> System status -> Tools and checked “Shipping Debug Mode” Checkbox

      and the message being displayed No matter what address I enter keeps saying “Customer matched zone “Local Shipping Zone” EVEN when it SHOULD match Zone 2 or Zone 3.

      WC Lovers please help.

      Attachments:
      You must be logged in to view attached files.
    • #103381
      Craig
      Participant

      for some reason the system won’t consider the other zones.

    • #103399
      Sushobhan
      Keymaster

      Hello,
      I have tested and it is working as expected. When I recheck your snapshots, I found a conflict between the attached two. In admin screen the Local Shipping Zone shows Zone as Canada, but in vendor screen it is showing as ‘Everywhere’.

      The following is the settings I’m using-
      1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
      2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
      b. Click on Limit to specific ZIP/postcodes and enter V9R*
      3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
      4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

      Attachments:
      You must be logged in to view attached files.
    • #103402
      Sushobhan
      Keymaster

      Also attached the checkout screen to confirm the settings are applied correctly

      Attachments:
      You must be logged in to view attached files.
    • #103466
      Craig
      Participant

      Hi Sushobhan,

      Thanks for responding. I have tried with every way on the settings. I was screen shooting them all but must have attached the wrong one.

      Regarding the postal code setting in the ADMIN side would not work for a marketplace. I was expecting that each vendor can limit their postal codes from their vendor dashboard settings?

      Is that not the case?

      So what I would expect is:

      The following is the settings
      1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
      2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada (Not British Columbia)
      Then the vendor would add the Limit to specific ZIP/postcodes and enter V9R (not * as that wild card does not works from the WCMF dashboard) from their shop dashboard settings
      3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
      4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

      (and I would add a zone for each province)

      would the above work?

    • #103863
      Craig
      Participant

      Sushobhan,

      I set my shipping zones just as you described above
      T
      he following is the settings I’m using-
      1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
      2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
      b. Click on Limit to specific ZIP/postcodes and enter V9R*
      3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
      4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

      AND it works too!!!

      BUT my question is….setting the postal code in ADMIN side won’t make sense for other vendors. how do we let vendors put their own postal code limits.

      That is what I have been trying to figure out.

      When I set the admin setting this way (see below)…Zone 2 or Zone 3 are never applied. It looks like basically when I try to restrict the “local zone” (First zone) from the VENDOR settings the shipping zones don’t work correctly.

      1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
      2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada (Not British Columbia)
      Then the vendor would add the Limit to specific ZIP/postcodes and enter V9R (not * as that wild card does not works from the WCMF dashboard) from their shop dashboard settings
      3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
      4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

      Your thoughts?

      Attachments:
      You must be logged in to view attached files.
    • #104041
      Craig
      Participant

      Sushobhan – I guess what I was expecting is that the vendor would have the ability to add the postal code limitation in their zone settings rather than on the admin side.

      Adding the limitation on the admin side would apply to every vendor which is not the case on a marketplace website. Each vendor will have different postal codes to enter based on their location.

      My understanding (based on WooCommrce documentation) is that The first zone being that zone where they can enter in the postal code limits which is typically where they would enter in any kind of local shipping options.

      Can you please confirm the following:
      Is my assumption above correct?
      Will WC lovers update their code to allow this?

      This is a critical piece to my marketplace to allow vendors to define there postal code limits.

      Thanks for your attention to this.

    • #104209
      Sushobhan
      Keymaster

      Hi,
      When you setup zones in this order – Canada, British Columbia, Alberta, then there is no way your zone 2 or 3 will ever gets applied. As I mentioned before, the zones are matched from top to bottom. So for any location in Canada, the first rule is a match and thus rule 2 or 3 will never get a chance even if people put their Province as British Columbia or Alberta.
      This restriction is coming from WooCommerce. It only checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.
      I can think of another approach, see if that suits your purpose. First create different zones, one for each province. Also a last zone with Canada set as region. Now what your vendors can do, they can set shipping charges to all other province apart from their own and then they can use the last zone (Canada) along with the postcode restriction to offer Local shipping.

    • #104245
      Sushobhan
      Keymaster

      Hi,
      Sorry, my last suggestion will not work in your case. When you create zone against each province then also WooCommerce will select the first zone that matched the buyers province. And hence the last rule i.e. Canada will never gonna applied. Sorry but at this moment I don’t have a solution for your case. I’ll try few more coding tweaks and let you know if got any success. On a different note, your request for support of postcode range is accepted by our dev team, it will be added to our future release.

    • #104258
      Craig
      Participant

      Hi Sushobhan,

      I very much appreciate your attention to this.

      In my mind I’m thinking it is a marketplace coding issue because basically all I’m expecting is that the vendor shipping settings to respond the same way as the admin settings you previously demonstrated as working in your Jan 23 post above.
      (checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule)

      This was your Jan 23 zone settings:
      1. Create 3 Zones from admin side (WooCommerce >> Settings >> Shipping)
      2 a. Zone 1 – Zone name – Local Shipping Zone, Zone regions – Canada or British Columbia
      b. Click on Limit to specific ZIP/postcodes and enter V9R*
      3. Zone 2 – Zone name – BC Shipping Zone 2, Zone regions – British Columbia, Canada
      4. Zone 3 – Zone name – Alberta Shipping Zone 3, Zone regions – Alberta, Canada

      SO when the ADMIN settings are set as above the shipping settings worked exactly as I have been trying to do.
      Zone 1 (Canada) worked when a V9R postal code is used
      Zone 2 (British Columbia) worked any other British Columbia address was used
      Zone 3 (Alberta) worked any Albert address was used

      SO this also means that with the above zone structure WooCommerce is working as expected
      “checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.”

      The only thing I’m looking for (that I think the marketplace plugin needs to do) is instead of the ADMIN doing:
      b. Click on Limit to specific ZIP/postcodes and enter V9R* (in the first zone)
      that the vendor should be able to Click on Limit to specific ZIP/postcodes and enter V9R* in THEIR zone settings.

      And wooCommerce should still function the same
      “checks from top to bottom for a match and if you create multiple zones with same region, still it will only apply the first matched zone rule.”

      Again thanks you for your time and attention to to this.

    • #104648
      Craig
      Participant

      Hi Sushobhan,

      I wanted to follow up on this to confirm the issue and if WC Lovers will be able to rectify.

      My marketplace is essentially broken without this functionality to mirror the wooCommerce shipping zones (but have the vendor enter the limiting postal codes).

      Thanks.
      Craig

    • #104680
      aemr45
      Participant

      Hi Craig,

      I see Sushobhan commented:

      your request for support of postcode range is accepted by our dev team, it will be added to our future release.

      That’s really good news.

      In the mean while you can use Storepep, I get to accomplished what I needed with this plugin!! The downside is that you as admin need to add all postal code regions and rules, but at least it works. Pluginhive is a really good plugin and have a by city name solution but is not ready for multivendor yet. That’s why I chose the Storepep plugin.

      In my case, I will add all Cities (postal code ranges) of my vendors. First of all I will ask my vendors to tell me their shipping needs, for example, local shipping flat rate, local pick up available or not, and especial flat rates for cities near by. Then I will add them to specific rules. Vendors can also have their own carrier account and have realtime shipping costs of DHL, UPS, FEDEX, Canada Post and others, and again vendors need to give you the admin this information so you can configure it in the admin account, but this way you can control if they use their carrier account or yours.

      I hope this solution works for you as well as for me.

    • #104725
      Craig
      Participant

      Hi aemr45,

      Thanks for taking the time to add your suggestion. I’m definitely going to check out Storeprp! as an enhancement to shipping.
      Adding all the regions sound like a rather monumental task…but hey if that is what I need to do…
      I love the option to real time shipping costs.

      I have a couple of questions:

      1. For the multi-vendor features they indicate a prerequisite that “Dokan Multi vendor plugin is already installed on your WooCommerce Store” – is this true or are you using only the WC lovers plugins? (I don’t use that plugin currently).

      2. How may vendors do you plan on accommodating? My marketplace is designed to accommodate 1000’s of vendors (local small businesses similar to ETSY). The task you described “I will ask my vendors to tell me their shipping needs, for example, local shipping flat rate, local pick up available or not, and especial flat rates for cities near by. Then I will add them to specific rules.” sounds like the set up for each vendor will take some time and attention – When you are adding those shipping needs for each vendor has it been onerous?

      3. The Storeprp plans are based on the number of ordered full fulled. Do you know if orders of Virtual products not shipped (or pick up in store) attribute to that plan threshold?

      Again thanks for your advice (although I really hope WC lovers can update their shipping integration as well)

    • #104734
      aemr45
      Participant

      Hi Craig,

      Well, you can ask all technical questions to Storepep support, let me answer you with my very short experience with the plugin so far:

      1.- Store Pep is fully compatible with WC Lovers – WCFM Marketplace, you can read it in this link

      2.- You are right, I would like the process to be much easier, but it is what there is so far, I have not found a better solution.

      3.- That’s a really good question, I wish to believe that only automatic transactions send to carriers count, not virtual products etc. but this is worth asking directly to storepep support.

      I really hope WC lovers can update their shipping integration as well

      Me too, we need to wait and see what solution they offer us, and hope is a better approach.

      Thanks

    • #108403
      Craig
      Participant

      aemr45 – The most recent update to the plugin has added the Postal Code Range fix and it seems to be working well. I also have word back (through email support) that the shipping table structure will be fixed soon too (I’m just not sure when).

      Sushobhan – thank you so much for your attention to my initial inquiry and then for having this Postal Code Range bug fixed! It is a big relief.
      Are you able to see what the time line might be on the support ticket “Shipping zones not working with CANADA – #48647”

      Attachments:
      You must be logged in to view attached files.
    • #108744
      Sushobhan
      Keymaster

      Hello Craig,
      We are planning to add more muscle to our country based shipping module. As of now one can add different states and assign a shipping price for it.
      In our future release, we will introduce postcode (multiple) under states. So say under “British Columbia” you can create multiple postcode based rules and set up different shipping price for each postcode region. I think this will resolve what you want to achieve via “Zone based” shipping.
      Thanks!

    • #109827
      Craig
      Participant

      Hi Sushobhan,

      Do you have any timeline on when this enhancement would be released?

      I’m very excited (and relived) to see this happening…thanks so much for keeping this moving forward.

    • #109916
      Sushobhan
      Keymaster

      Hello,
      We are in final phase of implementing this feature. Hopefully within this month you can expect this update.
      Thanks!

    • #110046
      Craig
      Participant

      This is excellent news!
      Is there any sort of published road map or blog that we can keep an eye on updates as they happen?

      Craig

    • #110067
      Sushobhan
      Keymaster

      Hello,
      We have plan for something like this. But as of now, there is none 🙁
      Thanks!

    • #112343
      Craig
      Participant

      Hi Sushobhan

      Do you know if this shipping zone feature has been implemented in the update yet?

      Thanks
      Craig

    • #112809
      Sushobhan
      Keymaster

      Hi Craig,
      Not yet. Our latest release v3.3.6 added compatibility with WooCommerce 4.0
      Will keep you posted when it’s done.
      Thanks!

    • #113000
      Craig
      Participant

      Thanks for the update Sushobhan,

      WooCommerce 4 is certainly a biggie!

      Hopefully this will shipping zone issue will be resolved soon as our vendors are in need of this limitation being resolved.

      I appreciate all the efforts of you and the WC Lovers team.

      Thanks
      Craig

    • #115183
      Craig
      Participant

      Hi Sushobhan,

      I’m just check in on this shipping fix.
      With the social distancing here in Canada eCommerce has become a reality for many businesses but we are not able to offer them a shipping solution.

      Any update on this?

      Many thanks
      Craig

    • #115729
      aemr45
      Participant

      Hi Craig,

      In the meanwhile you should really try StorePep plugin, it has really worked for me. I know its really difficult to manage shipping rules for each store but my marketplace has less than 20 stores now so I can manage it for now.

      Regards

    • #115861
      Sushobhan
      Keymaster

      Hi Craig,
      I got a confirmation from our dev team that, postcode support in Country based shipping will be available in our next updated.
      Thanks for your patience.
      Regards

    • #116032
      Craig
      Participant

      oh this will be awesome! thanks for the update and thanks for all the continued development of your plugins!

    • #122994
      Craig
      Participant

      Hi Sushobhan,

      Do you have an update on this? I just updated the plugins but the shipping zones are still not working. Once the first zone is matched no others will apply even if I change the customer address.

      aemr45 thanks for your plugin suggestion as well….my problem is that I can’t manage the shipping rules for each store….we have 77 stores and growing.

    • #126630
      Craig
      Participant

      @Sushobhan

      Do you know if this update is still under development?

    • #126923
      Sushobhan
      Keymaster

      Hi Craig,
      Sorry it’s not ready yet. As you might be aware, we have launched Distance rate shipping option a few days ago.
      I’m feeling really bad for this delay. I’ll try to escalate this feature development.
      Thank You!

    • #130276
      Craig
      Participant

      Hi Sushobhan,

      Thanks for the update. Please keep the pressure on as this shipping issue has really inhibited my vendors from selling to customers outside the first zone.

      Are you able to get a new ETA?

      Many many many thanks

    • #134552
      Sushobhan
      Keymaster

      Hi Craig,
      I have tested the following code and found, it works with Zone Shipping the way you intended. This means it will overcome the limitation of always returning the first zone as per your zone set up. Could you please try the following snippet for your zone shipping-

      add_filter('woocommerce_get_zone_criteria', function( $criteria, $package, $postcode_locations ) {
          global $wpdb;
          
          if ( empty( $package['vendor_id'] ) ) return $criteria;
          
          $vendor_postcode_locations = $wpdb->get_results( "SELECT zone_id, location_code FROM {$wpdb->prefix}wcfm_marketplace_shipping_zone_locations WHERE location_type = 'postcode' AND vendor_id = " . absint( $package['vendor_id'] ) . ";" );
          if ( ! $vendor_postcode_locations ) return $criteria;
          
          $country = strtoupper( wc_clean( $package['destination']['country'] ) );
          $postcode = wc_normalize_postcode( wc_clean( $package['destination']['postcode'] ) );
          
          $zone_ids_with_postcode_rules = array_map( 'absint', wp_list_pluck( $vendor_postcode_locations, 'zone_id' ) );
          $matches = wc_postcode_location_matcher( $postcode, $vendor_postcode_locations, 'zone_id', 'location_code', $country );
          $do_not_match = array_unique( array_diff( $zone_ids_with_postcode_rules, array_keys( $matches ) ) );
      
          if ( ! empty( $do_not_match ) ) {
              foreach ($criteria as $key => $val) {
                  if(strpos($val,'AND zones.zone_id NOT IN (') !== false) {
                      $start  = strpos($val, '(');
                      $end    = strpos($val, ')', $start + 1);
                      $prev_do_not_match = explode(',', substr($val, $start + 1, $end -$start - 1));
                      $do_not_match = array_unique(array_merge($prev_do_not_match, $do_not_match));
                      $criteria[$key] = 'AND zones.zone_id NOT IN (' . implode( ',', $do_not_match ) . ')';
                      break;
                  }
              }
          }
          return $criteria;
      }, 10, 3);

      Add this code to your child theme’s functions.php
      In case you do not have a child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      Let me know how this goes.
      Thanks!

    • #143075
      mick2
      Participant

      @sushobhan
      Hi sushobhan, I have exactly the same problem as Craig with the zone shipping.

      I’ve got vendors that do free shipping in their city but not their state.
      I’ve tested your code in every way but it doesn’t work. Are you still planning to include it in a future update?

      I really need this feature to work. Without it, my company can’t get started.

      I’m willing to pay for custom code.

      thank you very much

      Mick

    • #143289
      Craig
      Participant

      @mick2 – I have not yet implemented the code snippet that @Sushobhan has provided above to know if it works for me or not. BUT I agree this code/functionality should part of the base code as it seems to be the foundation to proper eCommerce to have shipping zones that work.

    • #151636
      switch_900
      Participant

      To make a local shipping region in WooCommerce that covers just the lower mainland of Vancouver use the following

      Under shipping zones create a region called Lower Mainland

      Under Zone Regions select British Columbia

      Specify by postal codes and use the following wildcard entries

      V3*
      V4*
      V5*
      V6*
      V7*

      Those 5 wildcard entries cover most of the region unless you want to go out past Langley or to Mission

      Create a shipping method for that region (ie. Free local shipping etc.)

    • #152790

      Hi all, I’ve just came across this thread and though someone might be able to help my similar problem.

      I have set up shipping codes to give free delivery in Bristol (UK). I want to deliver to postcodes BS1-9 for free. So I set it all up fine but I’ve just realised that if someone puts in the post code BS26 for example, woocommerce recognises it as BS2 and gives that customer free shipping. So I need to EXCLUDE BS 10-49 anyone know how to do this?

      James

Viewing 47 reply threads
  • You must be logged in to reply to this topic.