This topic has 2 replies, 2 voices, and was last updated 1 years, 1 months ago ago by Tony Rodriguez
There is an autofill on the checkout form for the State and it says – California and it is causing some issues. I want to leave the State field blank for the customer to fill.
Some customers are receiving order confirmations that have the wrong state, California.
“California” is auto defaulted in the State field on the checkout page. How can i make it blank?
Hello, @yuvi,
Thank you for using our theme and for contacting us.
If you desire to disable the autofill feature on the checkout form for the ‘State’ field, kindly follow the steps below:
1. Navigate to XStore on your dashboard.
2. Click on ‘Theme Options’.
3. Proceed to ‘Woocommerce’.
4. Select ‘Cart/checkout layout’.
5. Turn off the ‘Advanced Cart/Checkout Layout’ option.
6. Click ‘Publish’ to save the changes.
After that, Please follow the steps below:
1. Navigate to your WordPress Dashboard.
2. Click on ‘Appearance’.
3. Select ‘Themes’.
4. Choose ‘Xstore Child Theme’.
5. Open the ‘Function.php’ file.
6. Copy and paste the provided code into the ‘Function.php’ file.
7. Update the file to save the changes.
add_filter('default_checkout_billing_state', 'remove_default_billing_state');
add_filter('default_checkout_shipping_state', 'remove_default_shipping_state');
function remove_default_billing_state() {
return '';
}
function remove_default_shipping_state() {
return '';
}
Kindly add the new product to your cart once again. Please ensure to clear your browser cache before revisiting your site.
Please refer to the attached images for your reference.
https://imgur.com/J1fqz8X
Note: Please note that you should take a complete backup of your site before proceeding.
We trust that this solution will effectively address your concern.
Should you have any further questions or concerns, please do not hesitate to contact us.
Best Regards,
8Theme’s Team.
You must be logged in to reply to this topic.Log in/Sign up