Fixing "Please enter an address to continue" in WooCommerce
WooCommerce blocks the order with this message when the cart needs shipping but it has no country to ship to, or when shipping costs are hidden until an address is complete and the address never becomes complete.
WooCommerce shows "Please enter an address to continue." when the cart needs shipping but checkout has no usable shipping address. The classic checkout's validate_checkout() raises it in two places. The first is when the shipping country is empty. The second is when Hide shipping costs until an address is entered is on and the address is still not complete enough for shipping to be calculated. The customer often has typed an address. What is missing is a field WooCommerce needs and the checkout no longer shows.
How the check works
When the cart needs shipping, validation runs in this order, and each step has its own message:
- No shipping country → "Please enter an address to continue."
- Country not in your shipping locations → "Unfortunately, we do not ship to …. Please enter an alternative shipping address."
- Shipping withheld because the address is incomplete → "Please enter an address to continue." again.
- A package has no chosen method → "No shipping method has been selected. Please double check your address…"
Only steps 1 and 3 produce this exact text. Step 4 is a rates problem, covered in free shipping not working and woocommerce_package_rates.
The whole check is skipped when the cart does not need shipping: every product is virtual, shipping is disabled, or no shipping methods exist. That is your first decision.
Cause 1: the products should be virtual
A store selling downloads, services or bookings often removes address fields from checkout but leaves products as ordinary simple products. Each one then "needs shipping", the cart needs shipping, and WooCommerce validates a shipping country the form no longer collects.
Fix the product data, not the checkout. In the product editor, tick Virtual (and Downloadable if it is a file). In bulk, filter Products by type, select all and use Bulk actions › Edit. Once no item in the cart needs shipping, steps 1 to 4 do not run at all.
Cause 2: the country field was removed
Code that trims the checkout with woocommerce_checkout_fields or woocommerce_billing_fields often removes billing_country along with street and city. Without a shipping address section, WooCommerce copies billing values to shipping, so an empty billing country becomes an empty shipping country, and step 1 fails.
If the products genuinely ship, keep the country field. If you want a shorter form, keep the country and remove the optional lines instead. Customising checkout fields shows the safe way to unset fields. If the store ships to a single country, you can set Default customer location in Settings › General to Shop country/region and make the country field read-only rather than removing it. The customer object then always has a country.
Removing billing address fields from a store that ships is exactly the case WooCommerce's own code comment describes for step 3: without the check, an order could be saved with no shipping line at all.
Cause 3: "Hide shipping costs until an address is entered"
This setting, in the Calculations group of WooCommerce's shipping settings, stops WooCommerce calculating shipping until the address is complete enough. For the classic checkout, "complete enough" means:
- a shipping country;
- a state, if that country's address format requires one and the state field exists on the checkout;
- a postcode, if that country requires one and the postcode field exists on the checkout.
The useful detail is "field exists". If you removed the state or postcode field with a checkout-fields filter, WooCommerce notices and does not wait for it. It looks in the shipping fields, or the billing fields when the store ships only to the billing address, so removing billing_state alone does not help while shipping_state still exists. If you hid it with CSS instead, the field still exists, the customer cannot fill it, shipping is never calculated, and every order fails with this message.
So remove fields with code, not CSS. Alternatively, tell WooCommerce not to require them for shipping calculation:
add_filter( 'woocommerce_shipping_calculator_enable_postcode', '__return_false' );
add_filter( 'woocommerce_shipping_calculator_enable_state', '__return_false' );
Use these only when your rates genuinely do not depend on postcode or state; the same filters also remove those fields from the cart-page shipping calculator.
If local pickup is enabled, WooCommerce shows shipping before an address is entered so pickup locations are visible, and this step does not withhold shipping.
Cause 4: the address never reaches the session
The checkout sends the address to the server on every field change through the ?wc-ajax=update_order_review request, and validation uses the posted values again at submit. A JavaScript error, an optimisation plugin delaying WooCommerce scripts, or a cached checkout page can leave the server with an old or empty customer address. In the browser's Network tab, change the country and confirm the request fires and returns updated shipping HTML. If it does not, the problem is front-end, and checkout not working covers the usual script and caching culprits.
Common mistakes
- Making every field optional to "fix" it. Optional fields do not change whether the cart needs shipping, and step 1 still fails without a country.
- Turning off shipping to silence the error on a store that ships. The error disappears, and so does every shipping line on new orders.
- Testing as a logged-in customer with a saved address. The saved country masks the bug. Test in a private window.
- Using
display: noneon address fields while "Hide shipping costs until an address is entered" is on.
Verify
- In a private window, add one physical product and one virtual product, then check out with the shortest address your form allows.
- Confirm shipping rates appear after you enter the country and any required state or postcode.
- Place the order and confirm it has a shipping line and a shipping country in the admin.
- Repeat with a cart of virtual products only; no address should be required.
Frequently asked
- Because at least one product in the cart is not marked Virtual, so the cart needs shipping. Tick Virtual on every product that is never shipped and WooCommerce stops validating a shipping address for those orders.
- No. That message comes later in the same check: there is a country, shipping was calculated, but the chosen method for a package is missing. It points at shipping zones and rates, not at the address fields.
- No. The block checkout validates through the Store API and reports address problems as "There was a problem with the provided shipping address" with the field error, or "Sorry, this order requires a shipping option" when no rate is chosen.