Thanks, sir. Your snippets saves me quite sometimes to do this small change. It even handles the validation for the fields that is hidden. Again thanks.
@wpsimplehacks3 жыл бұрын
Glad it helped 😊
@gusicbcn2 жыл бұрын
Thank you! The best solution for one of my heaviest trouble in my website.
@wpsimplehacks2 жыл бұрын
Glad to hear 🙂
@Iammikelovin3 жыл бұрын
Thanks for this, it helped me a lot! If its not too much trouble, how could I add to this code a simple message just below Billing Details something like "Your product will be available for pick up after 48hrs" ? Thanks again!
@wpsimplehacks3 жыл бұрын
See whether this helps you out. Not exactly below billing details, but if you choose Local pickup then your custom message is shown just below Local pickup shipping method. wpsimplehacks.com/how-to-display-woocommerce-store-address/
@ErickHernandez-gw8xv11 ай бұрын
WORKED LIKE A CHARM, thanks!
@wpsimplehacks11 ай бұрын
Great 🙂
@CarlosRodriguez-nr6tm3 жыл бұрын
Thank you so much, I was looking for the solution everywhere and yours was the best!!!!
@wpsimplehacks3 жыл бұрын
I’m glad it helped :)
@devyadav14963 жыл бұрын
Thank you for this video! It's really helpful. I have two shipping methods on the checkout page. If one goes inactive then the other becomes active by itself depending on where it is a pickup or delivery. I have used your code snippet and it worked fine to hide and unhide the checkout fields. But the problem is I have to refresh the page every time, if I click on the Pickup button that triggers the pickup shipping or if I click on the delivery button for the delivery section. If you help me with that would be great!
@wpsimplehacks3 жыл бұрын
Just tested on two different sites and it seems to be working well. Therefore, unofrtunately I am unable to help you with this issue.
@jean-philippeghyoot37303 жыл бұрын
Thank you, your videos are great and so well explained and easy to follow. I am using a multi vendor plugin from WCFM. Would your code snippet still work if two or more vendors appear on checkout page and customer chooses local pick-up option for only one of the vendors? or local pickup for each vendor? or even worse what happens if there are three vendors on the cart?. I also have some information I want to hid on the cart page. Do you have a code snippet for that?
@wpsimplehacks3 жыл бұрын
Unfortunately I haven't used WCFM and therefore I am not sure whetherit works over there. But you can make a function for every local pickup method separately and test it out. Just be sure that function names are not copy-paste, they should be different.
@miribreueredelstein35172 жыл бұрын
Thanks it works like a charm. Just one question if you don't mind. I am using a plugin for local pickup dates and time slots. but this snippet is hiding that part as well when local pickuo is selected. is there a way to hide the address fields but still be able to choose a pickup date? thanks
@wpsimplehacks2 жыл бұрын
It would be wise to ask this directly from the plugin support team.
@mohammadalkhaled3 жыл бұрын
Thank you for your video, it is very helpful. I have a question: how can I do the same to another ( local_pickup:8) I mean that I want to add another snippet for (local_pickup:7) I tried to clone the snippet but it did not work and I tried to copy and paste the function in the first snippet and change the name of the function and unfortunately did not work. Please help! Thank you again.
@wpsimplehacks3 жыл бұрын
Hi, Unfortunately this would require a bit custom coding.
@mohammadalkhaled3 жыл бұрын
@@wpsimplehacks thank you for your reply. any advice or help? because it is annoying that it hides just for one local_pickup thank you.
@lexstanley79823 жыл бұрын
This was super helpful thank you! I would also love to hide the "Ship to a different address" checkbox and heading when local pickup is selected. I tried adding the field 'ship_to_different_address' but it didn't work. Any ideas how I could also hide the checkbox and heading when local pickup is selected?
@wpsimplehacks3 жыл бұрын
See whether this helps you out wpsimplehacks.com/how-to-hide-woocommerce-checkout-fields-when-local-pickup-is-selected/#how-to-hide-woocommerce-shipping-address-section-if-local-pickup-is-selected
@AntGeezer3 жыл бұрын
Very nice. Thank you for taking the time
@wpsimplehacks3 жыл бұрын
Glad you enjoyed it!
@geraynenaidoo88633 жыл бұрын
This is so great ! I want to rename the "local pickup" to "Click & Collect", I have tried playing around with your snipper to accommodate the name change however I am not having any luck. Do you have any suggestions ?
@wpsimplehacks3 жыл бұрын
You can rename it by gping to your shipping settings :)
@simon-maddox4 жыл бұрын
Very helpful - thanks! Any thoughts on hiding the "Deliver to a different address?" checkbox & heading?
@wpsimplehacks4 жыл бұрын
If you want permanently to remove "Deliver to different address" checkbox and heading then use this code snippet here blow. Add it to your functions.php or better yet, use Code Snippets plugin add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');
@simon-maddox4 жыл бұрын
@@wpsimplehacks Thanks. You can turn it off permanently in Woo settings (force delivery address to invoice address), but it's having it hidden for local collection only that makes more sense
@wpsimplehacks4 жыл бұрын
If you want to hide the Ship to different address only if Local pickup is chosen then this solution here works well: www.businessbloomer.com/woocommerce-hide-shipping-local-pickup-selected/
@ziadhaji39243 жыл бұрын
Thank you for this video! It's really helpful.
@wpsimplehacks3 жыл бұрын
You're very welcome!
@annn77792 жыл бұрын
Thanks!!!! that works perfect 😄 . In firts time code snippets plugins showed me an error message, but I tried again and works fine.
@wpsimplehacks2 жыл бұрын
Great 🙂
@cyntiabratan3 жыл бұрын
This is incredible! Thank you so much!!!
@wpsimplehacks3 жыл бұрын
@Cyntia Brătan You're so welcome! And thank you for the beer :)
@dhirajkhadka73943 жыл бұрын
Thank you for this video! It's really helpful. Can we get video .How to edit the code of WordPress about not the css the whole code . Thank you for your video .
@wpsimplehacks3 жыл бұрын
Nope, I have no plans on making a video about this.
@HappySingh-ny4ld3 жыл бұрын
Thanks sir for this wonderful video. I have to option on checkout page Delivery and Pickup. Delivery is available only if the order total is greater then $50 and client not to place order for delivery if the amount is less then $50. How will i solved this condition? any spinnet code for this.
@wpsimplehacks3 жыл бұрын
See this video here kzbin.info/www/bejne/pmWtg3mMotitfbs At 6min 47sec mark there is "a Set minimum order amount" chapter
@yousefalenezi60692 жыл бұрын
Thanks for the video, I have 6 local pickup options is there any way to use it on all 6 ? Because it’s only can be used for one
@wpsimplehacks2 жыл бұрын
Did you try this method? wpsimplehacks.com/how-to-hide-woocommerce-checkout-fields-when-local-pickup-is-selected/#how-to-hide-woocommerce-checkout-fields-based-on-shipping-methods-1
@katraonline12043 жыл бұрын
This works great for me!! However, for some reason it does not work on mobile devices.. the fields are all shown. Do you know what cold be the problem? Also on desktop, if you make the browser width under 700px, the fields show as well … thank you in advanced!
@wpsimplehacks3 жыл бұрын
I just retested on four on my sites on it works well on every one of them. So, unfortunately I don’t know what causes your issue. You can try to deactivate all plugin except Woocommerce and code snippets and see whether it works. If it does then some other plugin causes this issue. Also, you can try to switch to default WP theme (Storefront for example) and see whether ir works with it. If it does then maybe your theme causes issues. AND: If you are using caching and minifying plugins then clear all the caches and deactivate them. Maybe this causes the issue.
@Piedicosta2 жыл бұрын
Thank you for this trick, it works perfectly! Do you also have a tutorial about how to display the store address (local pickup) in order email? Thanks!
@wpsimplehacks2 жыл бұрын
Not yet
@Piedicosta2 жыл бұрын
Thank you for your reply. Last question, I have a different shipping method per each Shipping Zone, How can I do to hide fields for different shipping method? Example: I have flexible_shipping_single:12, flexible_shipping_single:18, flexible_shipping_single:13 I have to add these three here: if ( 0 === strpos( $chosen_shipping, 'flexible_shipping_single:12' ) ) { But I am not good in php... maybe you can help me and could be useful for other users. Thanks a lot in advance!
@inamelayan4 жыл бұрын
Thank you very much for the tutorial. Could you please tell me how can I deactivate or no to apply the minimum amount order to the local pick option? Many thanks
@wpsimplehacks4 жыл бұрын
Hi, By default Local pickup does not have a minimum amount and it is shown for all the orders.
@inamelayan4 жыл бұрын
In my case it applies, because I have set a minimum order in all orders and now I'm struggling taking away this minimum order from the local pick up.
@wpsimplehacks4 жыл бұрын
@@inamelayan Sorry, butt unfortunately I am unable to help you with that.
@maximojenkins65283 жыл бұрын
Very good video, i was wondering if it was possible to show the adress of where the client needs to go and pick it up from So when they click on collect, the clients house adress and everything disappears as in youre video, but i would like to have the adress of the store appear so the client knows where to pick it up. THANK YOU
@wpsimplehacks3 жыл бұрын
See whether this helps you out wpsimplehacks.com/how-to-display-woocommerce-store-address/
@gbchk3 жыл бұрын
If address fields are filled out, then the shipping method is changed to local pickup, and the order is placed, the address data still gets passed through in the order. Is it possible to prevent this from happening? The fields get hidden, but their values remain.
@wpsimplehacks3 жыл бұрын
Sorry, I don’t know that in the moment.
@AlessandroRitondale2 жыл бұрын
Hi. Tnks for your video. How to remove, in cart, "Shipping to ..." when local pickup is avaible ? Tkns
@wpsimplehacks2 жыл бұрын
Sorry, can't help with this. Although, you can disable cart Shipping calclulator in Woocommerce shipping settings.
@SewSimpleBags4 жыл бұрын
Your videos are so useful, thank you. Can I add a request? In woocommerce, I would like a customer to only need to add an address when checking out if there are physical items in their cart. Most of my sales are of digital items and I only need name, email and country for those. Then for an order for physical goods or where there are physical and digital in the same cart, we need the full address. Any tips on how to achieve this please?
@wpsimplehacks4 жыл бұрын
@Sew Simple Bags Set your digital products as Virtual products and then take a look at this tutorial here www.businessbloomer.com/woocommerce-hide-checkout-billing-fields-if-virtual-product-cart/
@SewSimpleBags4 жыл бұрын
@@wpsimplehacks That is perfect! Thank you so much for the help. I'm a new and HUGE fan!
@shahzebjafar44874 жыл бұрын
Thank You So Much !! How can I show shipping Methods in drop down? local pickup and delivery?
@wpsimplehacks4 жыл бұрын
@Shahzeb Jafar Take a look at this plugin. Maybe it does what you need wordpress.org/plugins/woo-shipping-display-mode/
@shahzebjafar44874 жыл бұрын
@WP Simple Hacks - Wordpress tips and tricks Thank a lot . but I tried this plugin and it's not working for me . Also I have one more question " How I can hide checkout fields for two or more local pickup methods i.e. local pickup1 & local pickup2..."?
@shahzebjafar44874 жыл бұрын
@@wpsimplehacks Or how I can remove checkout fields for every local pickup option?
@wpsimplehacks4 жыл бұрын
@Shahzeb Jafar Unfortunately I am unable to help you with the dropdown issue. Regarding the hiding fields for multiple shipping methods: just copy all the code and paste it below and rename functions. Also, chage the shipping methods accordingly
@shahzebjafar44874 жыл бұрын
@@wpsimplehacks 'just copy all the code and paste it below and rename functions. Also, chage the shipping methods accordingly" I did this exactly same, but it's working for only one local pickup field can you please guide more?
@yasser.dev73 жыл бұрын
very helpful !! thank you so much.
@wpsimplehacks3 жыл бұрын
You're welcome 😊
@zamilahamed Жыл бұрын
You are great :) Thanks so much for the video was really helpful
@wpsimplehacks Жыл бұрын
You're welcome!😉
@PaRkCyDeQuEeN3 жыл бұрын
Hello sorry another question! I followed the video but I get a notification saying there’s an error with a certain line, it’s says cannot redeclare hide_local_pickup_method. Would you be able to help me with this?
@wpsimplehacks3 жыл бұрын
I just tested this snippet and works on all my sites. Did you use the same function more than once? If yes then it’s not working with multiple Local picku selections.
@oriolduarri40683 жыл бұрын
Hi! I've got two different local pickup methods, and when I switch from one to the other one the snippet doesn't works, may you can help me? Thank you so much
@wpsimplehacks3 жыл бұрын
Sorry, this snippet is working with only one Local pickup selection
@doogsignis2 жыл бұрын
The method works fine to hide the fields, but I cant click continue. as I think the hidden fields are still required to be filled? how to make it work?
@wpsimplehacks2 жыл бұрын
See this video here kzbin.info/www/bejne/pmWtg3mMotitfbs and pay attention to the mark 30:16. In it I’ll show you how to make checkout fields optional.
@shoaibhussain26813 жыл бұрын
Can you tell me, if I want to write a small note on invoice when local pick up is selected how to draw that.. example if local pick up is selected by user, they will have note on wordpress stating that they can collect order after 4 hours..
@wpsimplehacks3 жыл бұрын
Sorry, I don’t know the answer
@FAV201206303 жыл бұрын
Thank you for the tip !
@wpsimplehacks3 жыл бұрын
Happy to help!
@GrofdesignVideography2 жыл бұрын
Hi, thanks for your code. It works but everything stays hidden if Delivery is re-selected.. Any ideas that I could try?
@wpsimplehacks2 жыл бұрын
Sorry, can't help. I just tested on two of my sites and it works as showed in the video. Try to disable caching plugins etc that may mess with it.
@GrofdesignVideography2 жыл бұрын
@@wpsimplehacks I have no idea what I'm doing but I made it kinda work somehow with another plugin. I might have missed that your code doesn't work with delivery options that are restricted to zip codes and such. Now I still need to show the country and zip code fields for local pickup, but at least the adress and city fields are gone. Thank you for checking though!
@minli83943 жыл бұрын
How to do it for two of the delivery methods? I did two snippets, but then got error when two of them enabled. Works separately though. Fatal error: Cannot redeclare hide_local_pickup_method() (previously declared in /var/www...
@wpsimplehacks3 жыл бұрын
It does not work for multiple local pickup methods.
@kmpersonal3 жыл бұрын
Thanks! Very helpful video :) Where are you from?
@wpsimplehacks3 жыл бұрын
Based on your name it seems that we are neighbors :) That is I'm from Estonia.
@DevenderSingh-jo2lf Жыл бұрын
Thanks so much for the video was really helpful, you save my 60$ only for this work.
@wpsimplehacks Жыл бұрын
Great 😊
@PaRkCyDeQuEeN3 жыл бұрын
Hello I have followed your video up until pasting the code into the description box, but how do I find the code to paste?
@wpsimplehacks3 жыл бұрын
As I mentioned in the video the link to the code snippet is in the description of the video. That is here wpsimplehacks.com/how-to-hide-woocommerce-checkout-fields-when-local-pickup-is-selected/
@PaRkCyDeQuEeN3 жыл бұрын
@@wpsimplehacks thank you!
@muhammadaamir23313 жыл бұрын
Hye Your video is awesome that's what i was wishing for. THANKS AGAIN. Can you please help me with a small thing please, i have 2 shipping options, one is with local_pickup:14 and the other is local_pickup:17 can you help me how can i do that, as if i copy the whole code for local_pickup:14 and then create new code snippet and paste whole code for local_pickup:17 , it creates an error on front end
@wpsimplehacks3 жыл бұрын
Hi, This would need a vustom codeing and therefore I cannot solve it with the couple of lines of code. Sorry :(
@xyzmetalwerx98972 жыл бұрын
seems simple except where did you get the code to copy and past into the code snipet plugin?
@wpsimplehacks2 жыл бұрын
How about the link in the video description? :)
@xyzmetalwerx98972 жыл бұрын
@@wpsimplehacks Does not seem like it will work for me.. In my shipping in woocommerce. I have 1-8 zones set up, then in each zone I have the states for each as they move away from me. I'm in so cal. USA. so zone 8 would include florida, georgia etc. then a created shipping classes of a small items, small-medium, medium , medium - large and calculated the costs and have them set in each one. I bit complicated. but seems pretty accurate. Not sure how I can apply your hack to my set up?
@dunerenor2 жыл бұрын
Hello, this method works fine, but only if you are a registered user and you have already entered a shipping address in your shopping cart. But if you go directly to the checkout for the first time, then only the pickup point is available to you, and it is not possible to enter the delivery address, and because of this, other delivery methods do not appear. Can you tell me how to solve this problem?
@wpsimplehacks2 жыл бұрын
Set some other shioping method (Flat rate, for example) to be the default. You cand change this in Woocommerce shipping settings.
@dunerenor2 жыл бұрын
@@wpsimplehacks How to set some default shipping method? I don't see such an item. You can only change the order there.
@dunerenor2 жыл бұрын
@@wpsimplehacks It's just that the problem is that the rest of the delivery methods are displayed only when I fill in the address. They are made using plugins and automatically calculate shipping costs. I just wanted to know if you can somehow make them appear without entering the address.
@mariusenergyfit23634 жыл бұрын
Hello, if i want to hide two or three delivery options. For example pick up and courier? How i can do it ?
@wpsimplehacks4 жыл бұрын
Copy all the code, rename the function and replace shipping method. Find the courier etc shipping method name the same way I showed in the video
@mariusenergyfit23634 жыл бұрын
@@wpsimplehacks Can i write to you from email? i can't change..if I change the error throws
@wpsimplehacks4 жыл бұрын
There is afunction in the code. Something like function hide_local_pickup_method. Rename it to something like function hide_courier_method. You may send me an email to info@wpsimplehacks.com
@mariusenergyfit23634 жыл бұрын
@@wpsimplehacks I wrote you an e-mail. Thank you
@frankiesika46522 жыл бұрын
Hello I did the exact same thing and it did not work for me! Has something in WordPress changed?
@wpsimplehacks2 жыл бұрын
I just tested on my site and everything is workingas showed in the video.
@MAly-qn9xp2 жыл бұрын
HI the snippets plugin is removed , what is the replacement please?
@wpsimplehacks2 жыл бұрын
WpCodebox is awesome. See my review here "WPCodeBox Review - Turbocharged Wordpress Code Snippets manager" kzbin.info/www/bejne/oXO3ZKGHfM6HhJY
@ak47marx162 жыл бұрын
Thanks. How to make it work with 2 local shipping options? local_pickup:2 and local_pickup:3
@wpsimplehacks2 жыл бұрын
See this wpsimplehacks.com/how-to-hide-woocommerce-checkout-fields-when-local-pickup-is-selected/#how-to-hide-woocommerce-checkout-fields-based-on-shipping-methods-1
@Ben-kx9cp4 ай бұрын
@@wpsimplehacks wow really need to to add tons of code to remove the fields for 2 shipping methods??
@Ayman-jq6nh Жыл бұрын
This is not working for me, I am not using pickup from WooCommerce instead I have pickup and delivery from a food ordering plugin. Could you please help?
@wpsimplehacks Жыл бұрын
Sorry, can’t help you with the 3rd party plugin. It would be wise to ask about it from the plugin support team.
@TateSpirit2 жыл бұрын
can we offer the user the local pickup time and date? May be we want him to come at a specific timing only.
@wpsimplehacks2 жыл бұрын
See whether this helps you out wordpress.org/plugins/woo-delivery/
@bearprintlabsmanila92883 жыл бұрын
I tried it but it's not working. What should I look into? Thanks
@wpsimplehacks3 жыл бұрын
Sorry, I don’t know how to help you because I have not enough information about yous situation. Just tested this snippet on my site and it is working as promised.
@bitc0intech7603 жыл бұрын
Hi I came across your script it works but the only problem is I am using a customer them and it works on the delivery side as well I tried modifying the $Fields but it didn't work can you help me with that, please.
@wpsimplehacks3 жыл бұрын
Sorry, I did not understand the question.
@bitc0intech7603 жыл бұрын
@@wpsimplehacks Sorry I might not been clear, I took your script and it works but when I click on Deleivery it doesn't show me the address and when click on in store it hides the address but when refreshed it shows shipping again. It might be the theme. any help will be appreciated. Thank You
@wpsimplehacks3 жыл бұрын
Unfortunatley I am unable to help you with this matter.
@lhurtadov_ Жыл бұрын
It works for me Thanks!
@wpsimplehacks Жыл бұрын
You're welcome!
@cola80583 жыл бұрын
THANK YOU SO MUCH!
@wpsimplehacks3 жыл бұрын
You're welcome ☺️
@kristiaansk Жыл бұрын
Thank you very much!! 🤩
@wpsimplehacks Жыл бұрын
Any time!
@jaymarketing2 жыл бұрын
Thanks for the video, i would like to know how to handle this situation: I have a perishable product in my store. I want to sell this product only in particular zipcodes only. For all other products, I want to sell to any zipcode. So, I want to restrict the particular product to be available to particular zipcodes only. If customer add the particular product in the cart, then their zipcode should be checked. If it matches with the specified shippable zipcodes, then system should allow to checkout. Otherwise, it should say msg "This product is not available in your zipcode". Thanks in advance.
@wpsimplehacks2 жыл бұрын
Try with shipping zones. Over there you can set up ZIP codes for these zones.
@jaymarketing2 жыл бұрын
@@wpsimplehacks Thanks for ur reply. I tried with it and it does not stop customers from placing order.I used pincode verification plugins. But, it shows only it is not available in your area and not stopping the customer from buying... I want customer zipcode +product combination blocking in checkout... plz help
@josephonyedikachi22222 жыл бұрын
When I add the code to the snippet I get an error message, that critical error has occur
@wpsimplehacks2 жыл бұрын
Did you add all the code? Maybe you added two similar snippets or left some parts out?
@lucasbarallobre23822 жыл бұрын
How can I hide the "Ship to a different adress" checkbox? It's not working for me
@wpsimplehacks2 жыл бұрын
What theme you're using? Most likely it uses some other CSS class than the one I use.
@lucasbarallobre23822 жыл бұрын
@@wpsimplehacks Hi! I'm using flatsome, but it seems that they uses they same classes. On the other hand, I'm working in a Spanish webpage and I called the Local Pick up checkbox "Retiro en el Local", may be is this?
@techstudio38792 жыл бұрын
bro the code isnt working ,, i have renamed the value that is uded in my site , but still this isnt working
@wpsimplehacks2 жыл бұрын
I just tested on my site and everything worksas promised. See, whether my alternative method helps you out wpsimplehacks.com/how-to-hide-woocommerce-shipping-methods-conditionally/#how-to-hide-woocommerce-checkout-fields-based-on-shipping-methods
@drmanojkishorenayak8013 Жыл бұрын
How can we do that without code snippet plugin
@wpsimplehacks Жыл бұрын
Then use a child theme and add the code to your functions.php file. Pay attention that if you add the code to the parent theme's functions.php then you'll lose the code after the theme update.
@fadihasan883 жыл бұрын
aWesome bro, Thanks a lot
@wpsimplehacks3 жыл бұрын
Always welcome
@fadihasan883 жыл бұрын
@@wpsimplehacks From last two days I've been facing an issue and that is the value of local pickup changes from 2-4 and then the snippet won't work. Do you've any suggestion to that what could be happening? Thanks in Advance
@webdev95112 жыл бұрын
I have requiered attribute how can i have it back ?
@wpsimplehacks2 жыл бұрын
What? :)
@webdev95112 жыл бұрын
@@wpsimplehacks Sorry, let me ask again. How can i keep my required fields when i hide it? exemple, I have shipping adress hide which was required but when i show it, it's not required anymore.
@lynnwynn26352 жыл бұрын
Is there anyone who knows the code that will work for each local pickp in different shipping zones?
@wpsimplehacks2 жыл бұрын
Sorry, can’t help with that.
@NaturalRehan7 күн бұрын
Not working code...
@wpsimplehacks4 күн бұрын
I just tested it on my own site and it works as shown in the video.
@chenlevi2619 Жыл бұрын
where is the code?
@wpsimplehacks Жыл бұрын
Did you look at the link in the video description?