You may want to take a look at Checkout Field Editor.
Remove country & state dropdown in Woocommerce Checkout & replace with regular Input box
-
10-07-2023 - |
题
I would like to change my checkout page in Woocommerce, so instead of a dropdown Country menu and a dropdown State/Region menu, I have simple Input boxes just like Name, Address, etc.
I haven't figured out how to fix this without crashing woocommerce. Does anyone know how to change Country & State to work as normal input boxes?
解决方案
其他提示
You can use
add_filter('woocommerce_billing_fields', 'billing_state_remove', 900, 1);
function billing_state_remove($fields)
{
unset($fields['billing_state']);
unset($fields['billing_country']);
};
不隶属于 StackOverflow