Adding postcode on pickup change the shipping rate
-
Hi on the checkout page if I selected Pick up I should have free shipping but as soon as I set the postcode in the billing or delivery details then I get the shipping changed to the related rate. Is this a bug or is this issue solved by some specific setting on some Add-on?
-
Hi,
Could you please share some screenshots of the issue that you are talking about so that we can help you?
Thanks,
This is the page I refer to. if you select pickup without any information then the shipping is Free but as soon as you insert the postcode it changes to the rate for that postcode. I’m instead expecting that if it is a pick up then the Shipping remain Free.
Hello,
Are you getting the issue as a logged-in user or a non logged in user?
In both cases
another related issue with the delivery pickup options is that if I set Delivery and a postcode that my website doesn’t ship to like ‘00127’ itchange the shipping into Free pickup instead disable the order or show shipping not available like for standard woocommerce usage.
Could you please share any video for the above issue that you are talking about? Because we are not facing the same issue that you have mentioned.
you can try this on the checkout page I sent you above. For the first issue select pickup and then insert all the required fields you’ll see the Shipping change if you use a postcode that starts with RG24 RG22 Rg21 anything else is not cover by shipping and it comes back to the second bug I mentioned where if you put a not covered postcode then it goes back on free pickup. And that happens even if you select delivery but in case of delivery should show that the shipping address is not covered as the standard woocommerce does.
Hello,
Could you please the latest version of Food Store and check if that works for you.
Thanks,
Hi,
I’ve updated to the latest version but still having the same issue.
Hi,
Please create a video for the issue that you are talking about so that we can go through it. If possible we will release an update on this.
Thanks,
How should I send you the video?
I uploaded the video here Video for the bug
Hi as a temporary fix I changed the code in class-wfs-shipping.php in function wfs_service_based_shipping in the if pickup section
if( $service == 'pickup' ) { foreach($rates as $key=> $rate){ $shipping_methods = array_column( WC_Shipping_Zones::get_zones(), 'shipping_methods' ); foreach ($shipping_methods as $methods ) { foreach($methods as $id => $method){ if($method->id == 'local_pickup' && $method->enabled){ $rate->id = $method->get_rate_id(); $rate->method_id = $method->id; $rate->instance_id = $method->instance_id; $rate->label = $method->title; $rate->cost = 0.00; $new_rates[$key] = $rate; } } } } return ( !empty($new_rates) ? $new_rates : $rates ); }
That of course is custome to my specific pickup options like the price but maybe you can start from this code to fix the bug.
Maynly the problem is the $rates this function gets are related to the postcode I insert to even if is pickup if I use a postcode that I do cover with delivery then the rate value is going to be the delivery rate and not the local pickup.
Hope this can help.Instead to fix the other issue about delivery not going to default I just desable the order button in case is not in the list of covered delivery rates but I’m sure it can be fix in the same function I mentioned above.
Please let me know if you have any question I will help as much as I can.
Foudn another solution that you might want to mention on the setup. If you add Local pickup shipping method to all delivery zones then the plugin works fine even if you add postcode and select pickup.
Hello,
Yes in the class-wfs-shipping.php the plugin is checking for local pickup shipping method. If it’s enabled and you select pickup as service then it would make shipping cost free.
- The topic ‘Adding postcode on pickup change the shipping rate’ is closed to new replies.