Need State Field to be blank and not pre-filled
-
I run Woo Commerce on 3 of my websites, and for some reason, when a customer checks out, in the billing area, it shows FL as the “default” state. We are based out of FL but I never set that as a “default” since our customers are from around the world.
Some customers don’t notice this problem and they end up getting charged sales tax, when they live in a different state (because they don’t change the state field to something other than FL.)
Can this be fixed?
I did find a thread, from 18 months ago, with some code to add to the functions.php file, but it was for someone based in Romania, so I don’t know if that would work for US based Sellers? Here is the code I saw in the old thread:
//deselect checkout billing/shipping state
add_filter( ‘default_checkout_billing_state’, ‘change_default_checkout_state’ );
add_filter( ‘default_checkout_shipping_state’, ‘change_default_checkout_state’ );
function change_default_checkout_state() {
return ”; //set state code if you want to set it otherwise leave it blank.
}Could someone let me know how I can get rid of the pre-filled state field from the checkout screen.
Thanks.
-
You most likely have your Default customer location set to Shop Base address. Just change it to Geolocate. Here’s a Loom on how to do that.
Thanks for the quick reply Stef. Unfortunately, hat didn’t fix the problem. My sites are already set to “Geolocate” for the customer address.
Hi @photomj
Could you please share a copy of your site’s System Status so we can take a closer look? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.
@maykato –
Here you go. Thanks.
### WordPress Environment ### WordPress address (URL): https://luxepurses.com Site address (URL): https://luxepurses.com WC Version: 5.9.0 REST API Version: ? 5.9.0 WC Blocks Version: ? 6.1.0 Action Scheduler Version: ? 3.3.0 WC Admin Version: ? 2.8.0 Log Directory Writable: ? WP Version: 5.8.2 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.25 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.66.0 OpenSSL/1.1.1l-fips SUHOSIN Installed: – MySQL Version: 5.7.32-35-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 5.9.0 WC Database Prefix: wp_ocgl_ Total Database Size: 96.99MB Database Data Size: 73.32MB Database Index Size: 23.67MB wp_ocgl_woocommerce_sessions: Data: 2.09MB + Index: 0.05MB + Engine MyISAM wp_ocgl_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_order_items: Data: 0.48MB + Index: 0.24MB + Engine MyISAM wp_ocgl_woocommerce_order_itemmeta: Data: 2.91MB + Index: 1.97MB + Engine MyISAM wp_ocgl_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ocgl_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_actionscheduler_actions: Data: 0.30MB + Index: 0.16MB + Engine MyISAM wp_ocgl_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ocgl_actionscheduler_logs: Data: 0.22MB + Index: 0.16MB + Engine MyISAM wp_ocgl_commentmeta: Data: 0.07MB + Index: 0.05MB + Engine MyISAM wp_ocgl_comments: Data: 2.09MB + Index: 0.88MB + Engine MyISAM wp_ocgl_ewwwio_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ocgl_ewwwio_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ocgl_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_actions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_action_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_chunks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_fields: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_field_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_form_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_objects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_object_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_relationships: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_nf3_upgrades: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_ocgl_options: Data: 4.50MB + Index: 0.47MB + Engine MyISAM wp_ocgl_postmeta: Data: 27.92MB + Index: 8.93MB + Engine MyISAM wp_ocgl_posts: Data: 3.78MB + Index: 0.78MB + Engine MyISAM wp_ocgl_revslider_css: Data: 0.09MB + Index: 0.01MB + Engine MyISAM wp_ocgl_revslider_css_bkp: Data: 0.09MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_layer_animations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_navigations_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_sliders: Data: 0.17MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_sliders_bkp: Data: 0.29MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_slides: Data: 2.32MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_slides_bkp: Data: 4.12MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_revslider_static_slides_bkp: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_sbi_instagram_feeds_posts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ocgl_sbi_instagram_feed_locator: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ocgl_sbi_instagram_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_termmeta: Data: 1.84MB + Index: 0.13MB + Engine MyISAM wp_ocgl_terms: Data: 0.16MB + Index: 0.26MB + Engine MyISAM wp_ocgl_term_relationships: Data: 0.17MB + Index: 0.31MB + Engine MyISAM wp_ocgl_term_taxonomy: Data: 0.08MB + Index: 0.07MB + Engine MyISAM wp_ocgl_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_ocgl_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ocgl_usermeta: Data: 7.44MB + Index: 3.30MB + Engine MyISAM wp_ocgl_users: Data: 0.49MB + Index: 0.49MB + Engine MyISAM wp_ocgl_wcpdf_invoice_number: Data: 0.03MB + Index: 0.02MB + Engine MyISAM wp_ocgl_wc_admin_notes: Data: 0.03MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wc_customer_lookup: Data: 0.23MB + Index: 0.18MB + Engine MyISAM wp_ocgl_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wc_order_product_lookup: Data: 0.25MB + Index: 0.27MB + Engine MyISAM wp_ocgl_wc_order_stats: Data: 0.16MB + Index: 0.11MB + Engine MyISAM wp_ocgl_wc_order_tax_lookup: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_ocgl_wc_product_meta_lookup: Data: 0.07MB + Index: 0.08MB + Engine MyISAM wp_ocgl_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ocgl_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfBlockedIPLog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfBlocks7: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfConfig: Data: 0.43MB + Index: 0.02MB + Engine MyISAM wp_ocgl_wfCrawlers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfFileChanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfFileMods: Data: 1.91MB + Index: 0.40MB + Engine MyISAM wp_ocgl_wfHits: Data: 0.22MB + Index: 0.04MB + Engine MyISAM wp_ocgl_wfHoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfIssues: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_ocgl_wfKnownFileList: Data: 1.00MB + Index: 0.12MB + Engine MyISAM wp_ocgl_wfLiveTrafficHuman: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfLocs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfLogins: Data: 0.34MB + Index: 0.06MB + Engine MyISAM wp_ocgl_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ocgl_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ocgl_wfNotifications: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfPendingIssues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfReverseCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfSNIPCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_wfStatus: Data: 0.07MB + Index: 0.04MB + Engine MyISAM wp_ocgl_wfTrafficRates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ocgl_woodmart_wishlists: Data: 0.04MB + Index: 0.04MB + Engine MyISAM wp_ocgl_woodmart_wishlist_products: Data: 0.06MB + Index: 0.08MB + Engine MyISAM wp_ocgl_yith_wcwl: Data: 0.85MB + Index: 0.45MB + Engine MyISAM wp_ocgl_yith_wcwl_lists: Data: 1.30MB + Index: 1.74MB + Engine MyISAM wp_ocgl_yoast_indexable: Data: 3.63MB + Index: 0.89MB + Engine MyISAM wp_ocgl_yoast_indexable_hierarchy: Data: 0.09MB + Index: 0.23MB + Engine MyISAM wp_ocgl_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ocgl_yoast_primary_term: Data: 0.04MB + Index: 0.05MB + Engine MyISAM wp_ocgl_yoast_seo_links: Data: 0.03MB + Index: 0.01MB + Engine MyISAM wp_ocgl_yoast_seo_meta: Data: 0.33MB + Index: 0.34MB + Engine MyISAM ### Post Type Counts ### afterpay_quote: 22 amn_wpforms-lite: 1 attachment: 3115 cms_block: 24 mc4wp-form: 2 nav_menu_item: 51 nf_sub: 307 page: 94 popup: 2 popup_theme: 8 portfolio: 9 post: 637 product: 1024 product_variation: 4 revision: 135 shop_coupon: 1 shop_order: 3705 shop_order_refund: 3 woodmart_sidebar: 1 woodmart_size_guide: 1 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (21) ### Afterpay Gateway for WooCommerce: by Afterpay – 3.3.1 Classic Editor: by WordPress Contributors – 1.6.2 Classic Widgets: by WordPress Contributors – 0.2 Code Snippets: by Code Snippets Pro – 2.14.2 Contact Form 7: by Takayuki Miyoshi – 5.5.2 Facebook for WooCommerce: by Facebook – 2.6.7 Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 6.2.0 Smash Balloon Instagram Feed: by Smash Balloon – 2.9.6 WPBakery Page Builder: by Michael M - WPBakery.com – 6.7.0 Klarna On-Site Messaging for WooCommerce: by krokedil klarna – 1.5.1 Klarna Order Management for WooCommerce: by klarna krokedil – 1.6.8 Klarna Payments for WooCommerce: by krokedil klarna automattic – 2.7.0 MC4WP: Mailchimp for WordPress: by ibericode – 4.8.6 Ninja Forms: by Saturday Drive – 3.6.6 Slider Revolution: by ThemePunch – 6.5.11 SiteGround Optimizer: by SiteGround – 6.0.5 WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 2.10.3 WooCommerce: by Automattic – 5.9.0 Woodmart Core: by – 1.0.30 Yoast SEO: by Team Yoast – 17.6 YITH WooCommerce Compare: by YITH – 2.8.0 ### Inactive Plugins (1) ### Popup Maker: by Popup Maker – 1.16.2 ### Must Use Plugins (1) ### SSO: by Garth Mortensen Mike Hansen – 0.3 ### Settings ### API Enabled: ? Force SSL: ? Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #6 - /shop/ Cart: #7 - /cart/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: #1530 - /terms-conditions/ ### Theme ### Name: Woodmart Version: 6.2.3 Author URL: https://themeforest.net/user/xtemos Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: woodmart/woocommerce/archive-product.php woodmart/woocommerce/cart/cart-item-data.php woodmart/woocommerce/cart/cart.php woodmart/woocommerce/cart/cross-sells.php woodmart/woocommerce/cart/mini-cart.php woodmart/woocommerce/checkout/form-checkout.php woodmart/woocommerce/checkout/thankyou.php woodmart/woocommerce/content-product-cat.php woodmart/woocommerce/content-product.php woodmart/woocommerce/content-single-product.php woodmart/woocommerce/content-widget-product.php woodmart/woocommerce/global/breadcrumb.php woodmart/woocommerce/global/form-login.php woodmart/woocommerce/global/quantity-input.php woodmart/woocommerce/loop/add-to-cart.php woodmart/woocommerce/loop/loop-end.php woodmart/woocommerce/loop/loop-start.php woodmart/woocommerce/loop/no-products-found.php woodmart/woocommerce/loop/orderby.php woodmart/woocommerce/loop/pagination.php woodmart/woocommerce/loop/sale-flash.php woodmart/woocommerce/myaccount/form-login.php woodmart/woocommerce/product-searchform.php woodmart/woocommerce/single-product/add-to-cart/grouped.php woodmart/woocommerce/single-product/add-to-cart/variable.php woodmart/woocommerce/single-product/meta.php woodmart/woocommerce/single-product/product-image.php woodmart/woocommerce/single-product/product-thumbnails.php woodmart/woocommerce/single-product/rating.php woodmart/woocommerce/single-product/related.php woodmart/woocommerce/single-product/sale-flash.php woodmart/woocommerce/single-product/tabs/tabs.php woodmart/woocommerce/single-product/title.php woodmart/woocommerce/single-product/up-sells.php woodmart/woocommerce/single-product.php ### Klarna Payments Request Log ### 2021-11-16 03:00:33: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body> <center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-16 03:00:30: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body> <center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-16 01:38:26: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body> <center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-03 13:39:54: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-03 13:39:53: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-03 13:39:32: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-03 13:39:22: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-02 02:02:44: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-02 02:02:38: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-11-02 01:38:15: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-10-24 13:16:36: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-10-23 21:50:02: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-10-23 21:49:59: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-10-23 21:49:56: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2021-10-23 21:49:28: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html>\r\n<head><title>401 Authorization Required<\/title><\/head>\r\n<body>\r\n<center><h1>401 Authorization Required<\/h1><\/center>\r\n<hr><center>openresty<\/center>\r\n<\/body>\r\n<\/html>\r\n","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: ### Action Scheduler ### Complete: 1,202 Oldest: 2021-10-27 13:25:14 -0400 Newest: 2021-11-22 13:40:02 -0500 Failed: 3 Oldest: 2020-04-28 14:52:48 -0400 Newest: 2020-06-13 16:35:58 -0400 Pending: 2 Oldest: 2021-11-22 21:27:19 -0500 Newest: 2021-11-23 14:53:48 -0500 ### Status report information ### Generated at: 2021-11-22 14:00:24 -05:00
It’s been 5 days since anyone has responded….
Hi, sorry about that. I see you’re not using the child theme and there are a lot if not all the WooCommerce templates being overridden by Woodmart.
I know you said you went to the default theme in your OP, but is there anyway to test that again while I wait? Just switch to a default theme that doesn’t override the checkout template?
Also, after that if that doesn’t work you could always grab the child theme from the makers of Woodmart and add this to your functions.php in there and do away with any default all together.
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' ); add_filter( 'default_checkout_billing_state', 'change_default_checkout_state' ); function change_default_checkout_country() { return ''; // country code } function change_default_checkout_state() { return ''; // state code }
Tested and works.
Lastly, the only other thing I see is you are serving cache to the checkout page. You will need to contact your host if you are unable to exclude it yourself and ask them to exclude cache on the Cart and Checkout pages. You should never have that applied to those pages.
I just did a DNS search and noticed you are with SG, so you’ll be able to do that yourself. Here’s how. Loom Video
Thanks for the info and code Stef. Haven’t had time to try it out yet but will this week. Will let you know if it works!
Anytime. Let me know how it goes. I tested it and it worked on several installs. So it should be good. If it doesn’t then something is conflicting with it. A plugin or some other snippet.
Hey Stef –
We finally got around to trying your “fix” and it didn’t work. When my husband followed your directions above, it caused the Afterpay plug in to stop working and I think it wasn’t even showing anymore!
I need sales more than I need the State field changed, so we just dropped working on it, since it doesn’t seem to work without causing other problems.
Hi again, sorry to hear this didn’t work.
There are a number of reasons that it could be though. Cache for one. I see you are in SG and their Optimization plugin is enabled. I’d disable that and also turn off cache on the server and purge the cache as well.
Make sure that you are not applying any cache to cart or checkout at all. You can exclude these pages via SG’s optimization plugin once you turn it back on.
You also should be using a child theme if you haven’t started with it yet.
Woodmart should have one.
Lastly, create a staging environment whenever adding or troubleshooting anything on your site as to not affect your live site. It’s easy to create on SG by going to Site Tools, WordPress and Staging. Give it a name. Then click create. Work on that site for all your customizations.
My husband said he looked into the cache and that wasn’t the problem.
We set up child themes with Woodmart from the start, but something happened during an update and the techs at Woodmart said to move back to the regular theme!
I can’t keep track of what is going on, to tell you the truth!
Thanks for the info on the staging environment.
Mj
Well, once you get a staging environment installed you’ll want to turn debug on and see what errors are going on.
For any customization you’re always going to want to use a child theme. Unfortunately, I’m not aware of the Woodmart theme so I can’t comment.
But try debugging when you start testing in staging.
Hi @photomj,
Please follow serafinnyc’s advice and set up a staging site enabling WordPress debugging.
You can use the WP Staging plugin to quickly spin up a live replica of the site. The steps for debugging in WordPress can be found here: https://github.com/woocommerce/woocommerce/wiki/Using-WP_DEBUG_LOG-to-log-errors.
I would also consider running a conflict test on staging to see if the issue comes from a theme or plugin conflict. Here are the steps for doing a conflict test: https://docs.woocommerce.com/document/how-to-test-for-conflicts/
Let us know how it goes.
- The topic ‘Need State Field to be blank and not pre-filled’ is closed to new replies.