I would like to require users to provide their cellphone numbers upon registration, since it would be useful to get in touch with them when it comes to their order details and tracking. But while I have found some code examples, I have not been able to make them work.
This one doesn’t seem to do anything
https://njengah.com/woocommerce-make-phone-number-required/?expand_article=1 IIRC,
and this one
https://www.cloudways.com/blog/add-woocommerce-registration-form-fields/
seems to mess about with other fields and from what I can tell doesn’t check that the user inputs only numbers when it comes to the mobile phone field and also gives me an error at line 34 after I activated it.
This one also doesn’t seem to check for incorrect input (aka preventing letters from being entered, but I could be wrong),
https://webkul.com/blog/custom-registration-form-fields-in-woocommerce/