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 - |
Domanda
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?
Soluzione
Altri suggerimenti
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']);
};
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow