Woocommerce - How to Hide Checkout Fields When Local Pickup is Selected

  Рет қаралды 11,961

WP Simple Hacks - Wordpress tips and tricks

WP Simple Hacks - Wordpress tips and tricks

Күн бұрын

Пікірлер: 154
@GabrielFermy
@GabrielFermy 3 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Glad it helped 😊
@gusicbcn
@gusicbcn 2 жыл бұрын
Thank you! The best solution for one of my heaviest trouble in my website.
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Glad to hear 🙂
@Iammikelovin
@Iammikelovin 3 жыл бұрын
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!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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-gw8xv
@ErickHernandez-gw8xv 11 ай бұрын
WORKED LIKE A CHARM, thanks!
@wpsimplehacks
@wpsimplehacks 11 ай бұрын
Great 🙂
@CarlosRodriguez-nr6tm
@CarlosRodriguez-nr6tm 3 жыл бұрын
Thank you so much, I was looking for the solution everywhere and yours was the best!!!!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
I’m glad it helped :)
@devyadav1496
@devyadav1496 3 жыл бұрын
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!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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-philippeghyoot3730
@jean-philippeghyoot3730 3 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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.
@miribreueredelstein3517
@miribreueredelstein3517 2 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
It would be wise to ask this directly from the plugin support team.
@mohammadalkhaled
@mohammadalkhaled 3 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Hi, Unfortunately this would require a bit custom coding.
@mohammadalkhaled
@mohammadalkhaled 3 жыл бұрын
@@wpsimplehacks thank you for your reply. any advice or help? because it is annoying that it hides just for one local_pickup thank you.
@lexstanley7982
@lexstanley7982 3 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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
@AntGeezer
@AntGeezer 3 жыл бұрын
Very nice. Thank you for taking the time
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Glad you enjoyed it!
@geraynenaidoo8863
@geraynenaidoo8863 3 жыл бұрын
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 ?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
You can rename it by gping to your shipping settings :)
@simon-maddox
@simon-maddox 4 жыл бұрын
Very helpful - thanks! Any thoughts on hiding the "Deliver to a different address?" checkbox & heading?
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
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-maddox
@simon-maddox 4 жыл бұрын
@@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
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
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/
@ziadhaji3924
@ziadhaji3924 3 жыл бұрын
Thank you for this video! It's really helpful.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
You're very welcome!
@annn7779
@annn7779 2 жыл бұрын
Thanks!!!! that works perfect 😄 . In firts time code snippets plugins showed me an error message, but I tried again and works fine.
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Great 🙂
@cyntiabratan
@cyntiabratan 3 жыл бұрын
This is incredible! Thank you so much!!!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
@Cyntia Brătan You're so welcome! And thank you for the beer :)
@dhirajkhadka7394
@dhirajkhadka7394 3 жыл бұрын
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 .
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Nope, I have no plans on making a video about this.
@HappySingh-ny4ld
@HappySingh-ny4ld 3 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
See this video here kzbin.info/www/bejne/pmWtg3mMotitfbs At 6min 47sec mark there is "a Set minimum order amount" chapter
@yousefalenezi6069
@yousefalenezi6069 2 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
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
@katraonline1204
@katraonline1204 3 жыл бұрын
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!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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.
@Piedicosta
@Piedicosta 2 жыл бұрын
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!
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Not yet
@Piedicosta
@Piedicosta 2 жыл бұрын
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!
@inamelayan
@inamelayan 4 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
Hi, By default Local pickup does not have a minimum amount and it is shown for all the orders.
@inamelayan
@inamelayan 4 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
@@inamelayan Sorry, butt unfortunately I am unable to help you with that.
@maximojenkins6528
@maximojenkins6528 3 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
See whether this helps you out wpsimplehacks.com/how-to-display-woocommerce-store-address/
@gbchk
@gbchk 3 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Sorry, I don’t know that in the moment.
@AlessandroRitondale
@AlessandroRitondale 2 жыл бұрын
Hi. Tnks for your video. How to remove, in cart, "Shipping to ..." when local pickup is avaible ? Tkns
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Sorry, can't help with this. Although, you can disable cart Shipping calclulator in Woocommerce shipping settings.
@SewSimpleBags
@SewSimpleBags 4 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
@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/
@SewSimpleBags
@SewSimpleBags 4 жыл бұрын
@@wpsimplehacks That is perfect! Thank you so much for the help. I'm a new and HUGE fan!
@shahzebjafar4487
@shahzebjafar4487 4 жыл бұрын
Thank You So Much !! How can I show shipping Methods in drop down? local pickup and delivery?
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
@Shahzeb Jafar Take a look at this plugin. Maybe it does what you need wordpress.org/plugins/woo-shipping-display-mode/
@shahzebjafar4487
@shahzebjafar4487 4 жыл бұрын
​ @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..."?
@shahzebjafar4487
@shahzebjafar4487 4 жыл бұрын
@@wpsimplehacks Or how I can remove checkout fields for every local pickup option?
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
@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
@shahzebjafar4487
@shahzebjafar4487 4 жыл бұрын
@@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.dev7
@yasser.dev7 3 жыл бұрын
very helpful !! thank you so much.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
You're welcome 😊
@zamilahamed
@zamilahamed Жыл бұрын
You are great :) Thanks so much for the video was really helpful
@wpsimplehacks
@wpsimplehacks Жыл бұрын
You're welcome!😉
@PaRkCyDeQuEeN
@PaRkCyDeQuEeN 3 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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.
@oriolduarri4068
@oriolduarri4068 3 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Sorry, this snippet is working with only one Local pickup selection
@doogsignis
@doogsignis 2 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
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.
@shoaibhussain2681
@shoaibhussain2681 3 жыл бұрын
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..
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Sorry, I don’t know the answer
@FAV20120630
@FAV20120630 3 жыл бұрын
Thank you for the tip !
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Happy to help!
@GrofdesignVideography
@GrofdesignVideography 2 жыл бұрын
Hi, thanks for your code. It works but everything stays hidden if Delivery is re-selected.. Any ideas that I could try?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
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.
@GrofdesignVideography
@GrofdesignVideography 2 жыл бұрын
@@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!
@minli8394
@minli8394 3 жыл бұрын
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...
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
It does not work for multiple local pickup methods.
@kmpersonal
@kmpersonal 3 жыл бұрын
Thanks! Very helpful video :) Where are you from?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Based on your name it seems that we are neighbors :) That is I'm from Estonia.
@DevenderSingh-jo2lf
@DevenderSingh-jo2lf Жыл бұрын
Thanks so much for the video was really helpful, you save my 60$ only for this work.
@wpsimplehacks
@wpsimplehacks Жыл бұрын
Great 😊
@PaRkCyDeQuEeN
@PaRkCyDeQuEeN 3 жыл бұрын
Hello I have followed your video up until pasting the code into the description box, but how do I find the code to paste?
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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/
@PaRkCyDeQuEeN
@PaRkCyDeQuEeN 3 жыл бұрын
@@wpsimplehacks thank you!
@muhammadaamir2331
@muhammadaamir2331 3 жыл бұрын
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
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Hi, This would need a vustom codeing and therefore I cannot solve it with the couple of lines of code. Sorry :(
@xyzmetalwerx9897
@xyzmetalwerx9897 2 жыл бұрын
seems simple except where did you get the code to copy and past into the code snipet plugin?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
How about the link in the video description? :)
@xyzmetalwerx9897
@xyzmetalwerx9897 2 жыл бұрын
@@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?
@dunerenor
@dunerenor 2 жыл бұрын
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?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Set some other shioping method (Flat rate, for example) to be the default. You cand change this in Woocommerce shipping settings.
@dunerenor
@dunerenor 2 жыл бұрын
@@wpsimplehacks How to set some default shipping method? I don't see such an item. You can only change the order there.
@dunerenor
@dunerenor 2 жыл бұрын
@@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.
@mariusenergyfit2363
@mariusenergyfit2363 4 жыл бұрын
Hello, if i want to hide two or three delivery options. For example pick up and courier? How i can do it ?
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
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
@mariusenergyfit2363
@mariusenergyfit2363 4 жыл бұрын
@@wpsimplehacks Can i write to you from email? i can't change..if I change the error throws
@wpsimplehacks
@wpsimplehacks 4 жыл бұрын
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
@mariusenergyfit2363
@mariusenergyfit2363 4 жыл бұрын
@@wpsimplehacks I wrote you an e-mail. Thank you
@frankiesika4652
@frankiesika4652 2 жыл бұрын
Hello I did the exact same thing and it did not work for me! Has something in WordPress changed?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
I just tested on my site and everything is workingas showed in the video.
@MAly-qn9xp
@MAly-qn9xp 2 жыл бұрын
HI the snippets plugin is removed , what is the replacement please?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
WpCodebox is awesome. See my review here "WPCodeBox Review - Turbocharged Wordpress Code Snippets manager" kzbin.info/www/bejne/oXO3ZKGHfM6HhJY
@ak47marx16
@ak47marx16 2 жыл бұрын
Thanks. How to make it work with 2 local shipping options? local_pickup:2 and local_pickup:3
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
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-kx9cp
@Ben-kx9cp 4 ай бұрын
@@wpsimplehacks wow really need to to add tons of code to remove the fields for 2 shipping methods??
@Ayman-jq6nh
@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
@wpsimplehacks Жыл бұрын
Sorry, can’t help you with the 3rd party plugin. It would be wise to ask about it from the plugin support team.
@TateSpirit
@TateSpirit 2 жыл бұрын
can we offer the user the local pickup time and date? May be we want him to come at a specific timing only.
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
See whether this helps you out wordpress.org/plugins/woo-delivery/
@bearprintlabsmanila9288
@bearprintlabsmanila9288 3 жыл бұрын
I tried it but it's not working. What should I look into? Thanks
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
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.
@bitc0intech760
@bitc0intech760 3 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Sorry, I did not understand the question.
@bitc0intech760
@bitc0intech760 3 жыл бұрын
@@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
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Unfortunatley I am unable to help you with this matter.
@lhurtadov_
@lhurtadov_ Жыл бұрын
It works for me Thanks!
@wpsimplehacks
@wpsimplehacks Жыл бұрын
You're welcome!
@cola8058
@cola8058 3 жыл бұрын
THANK YOU SO MUCH!
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
You're welcome ☺️
@kristiaansk
@kristiaansk Жыл бұрын
Thank you very much!! 🤩
@wpsimplehacks
@wpsimplehacks Жыл бұрын
Any time!
@jaymarketing
@jaymarketing 2 жыл бұрын
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.
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Try with shipping zones. Over there you can set up ZIP codes for these zones.
@jaymarketing
@jaymarketing 2 жыл бұрын
@@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
@josephonyedikachi2222
@josephonyedikachi2222 2 жыл бұрын
When I add the code to the snippet I get an error message, that critical error has occur
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Did you add all the code? Maybe you added two similar snippets or left some parts out?
@lucasbarallobre2382
@lucasbarallobre2382 2 жыл бұрын
How can I hide the "Ship to a different adress" checkbox? It's not working for me
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
What theme you're using? Most likely it uses some other CSS class than the one I use.
@lucasbarallobre2382
@lucasbarallobre2382 2 жыл бұрын
@@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?
@techstudio3879
@techstudio3879 2 жыл бұрын
bro the code isnt working ,, i have renamed the value that is uded in my site , but still this isnt working
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
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
@drmanojkishorenayak8013 Жыл бұрын
How can we do that without code snippet plugin
@wpsimplehacks
@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.
@fadihasan88
@fadihasan88 3 жыл бұрын
aWesome bro, Thanks a lot
@wpsimplehacks
@wpsimplehacks 3 жыл бұрын
Always welcome
@fadihasan88
@fadihasan88 3 жыл бұрын
@@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
@webdev9511
@webdev9511 2 жыл бұрын
I have requiered attribute how can i have it back ?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
What? :)
@webdev9511
@webdev9511 2 жыл бұрын
@@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.
@lynnwynn2635
@lynnwynn2635 2 жыл бұрын
Is there anyone who knows the code that will work for each local pickp in different shipping zones?
@wpsimplehacks
@wpsimplehacks 2 жыл бұрын
Sorry, can’t help with that.
@NaturalRehan
@NaturalRehan 7 күн бұрын
Not working code...
@wpsimplehacks
@wpsimplehacks 4 күн бұрын
I just tested it on my own site and it works as shown in the video.
@chenlevi2619
@chenlevi2619 Жыл бұрын
where is the code?
@wpsimplehacks
@wpsimplehacks Жыл бұрын
Did you look at the link in the video description?
12 Woocommerce Hidden Secrets Every User Should Know
13:45
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 6 М.
How to Hide Woocommerce Shipping Options Conditionally (15 Easy Hacks)
23:31
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 8 М.
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 8 МЛН
I thought one thing and the truth is something else 😂
00:34
عائلة ابو رعد Abo Raad family
Рет қаралды 14 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 112 МЛН
How to win a argument
9:28
ajaxkmr (ajaxkmr1986)
Рет қаралды 721 М.
Top 9 NEW Blocksy Theme Features Released This Year!
20:51
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 372
How to Customize Woocommerce Checkout Page Without a Plugin? 26 useful hacks
37:51
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 47 М.
How to Merge Learndash and Woocommerce Account Pages?
13:57
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 13 М.
How to Get Customer Locations for Order Delivery? (Woocommerce Checkout Map)
20:50
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 9 М.
WooCommerce - How to Remove Checkout Fields?
5:42
LearnWoo
Рет қаралды 3,3 М.
How to Create a Wordpress Cost Calculator for Free?
17:39
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 42 М.
I bet you can understand NgRx after watching this video
22:48
Joshua Morony
Рет қаралды 190 М.
How to Customize Woocommerce Cart Page: 21 Cart page Hacks
23:31
WP Simple Hacks - Wordpress tips and tricks
Рет қаралды 13 М.