Woocheckout how to disable default shipping setting

hi again . .my site nailcrazy.com is using x ( not child theme ) because in child theme my briantree VISA payments does not work.

So on checkout page. . by default, the shipping section shows - and there is a box that says ‘SHIP to a different address’ and by defaul its ticked - red . . so its showing the shipping boxes to fill in.

most of my customers have the same shipping address and i would simply like to ‘un-tick’ this box - by default - so they will only tick it - if they have a different address of course . . .

but as it is. . . it makes the checkout page look loonger and not nice… cause they have to figure it out.

i spent lots of time testing woo checkout . .but noting i can see or try fixes the issue

on google search i found that you can solve this problem by adding a line of code to the functions.php file of the theme itself in the custom functions area.

add_filter( ‘woocommerce_ship_to_different_address_checked’, ‘__return_false’ );
( i think this is the line to untick) …

but im worried to just try to edit this file myself - because i managed to view on the x theme folder but there is not custom functions section and as this is not on the child theme . .i dont know if i can change it or not.

can you please let me know if and what i can do for this fix - thanks
andrew

Hi Andrew,

The code above should be added under functions.php file locates in your child theme NOT in your parent theme.

  • Could you please try removing all the custom codes from your child theme then check again?

  • Also try testing a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  • Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.

Let us know how it goes!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.