Tagged: Phone mandatory, woocommerce
Hi support, I’m having trouble with the phone field, which should be mandatory on my website https://www.portolortoacasa.it/ordina-online/.
I’ve tried several plugins, and this one also works via PHP:
add_filter( ‘woocommerce_billing_fields’, ‘wps_remove_filter_phone’, 10, 1 );
function wps_remove_filter_phone( $address_fields ) {
$address_fields[‘billing_phone’][‘required’] = true;
return $address_fields;
}
But I can’t get it to work. Can you please help me find a solution? Thanks, Gianluca.
