Step 1: Remove Custom Code
- Go to your theme’s
functions.php
file or your custom plugin. - Remove any code that filters or disables the WooCommerce shipping methods (including the previous custom shipping code).
Step 2: Reset Shipping Zones
- Navigate to WooCommerce > Settings > Shipping.
- Delete any custom shipping zones you may have added.
- Recreate new shipping zones and assign shipping methods such as:
- Flat Rate
- Free Shipping
- Local Pickup
Step 3: Clear WooCommerce Cache
- Go to WooCommerce > Status > Tools.
- Clear these:
- Clear WooCommerce Transients
- Clear Expired Transients
- Regenerate Shipping Zone Cache
Step 4: Test Default Shipping
- Add a product to the cart.
- Check the cart and checkout pages to ensure default shipping methods are back.
Optional: Debugging
If the default shipping methods are not appearing, enable debugging:
add_action('woocommerce_package_rates', function ($available_shipping_methods) {
error_log(print_r($available_shipping_methods, true));
return $available_shipping_methods;
});
Check the wp-content/debug.log
file for any issues.
Would you like help setting up the default shipping zones again?