How do you make both City and Suburb fields required in WooCommerce Shipping Calculator
My Answer:
To make both the City and Postcode fields required in the WooCommerce Shipping Calculator, you can add the following code to your theme's functions.php file or a custom plugin:
php
add_filter( 'woocommerce_shipping_calculator_enable_city', '__return_true' );
add_filter( 'woocommerce_shipping_calculator_enable_postcode', '__return_true' );
This code will enable the City and Postcode fields in the Shipping Calculator and make them required fields. Make sure to test this code thoroughly on your site to ensure it works as expected.
Rate this post
5 of 5 based on 2336 votesComments