By default, the City field in the WooCommerce Checkout is a regular text input. State/Province is a field that changes based on which country is selected. For some, it’s a dropdown, for others it’s a regular text input.
Working SOAP services, with PHP, can be a cumbersome task if you’ve never worked on one. It happened to me. I had a project to estimate for a Shipping service using SOAP.
Tutorials around it were never showing me the information I needed, especially for using the correct namespaces, nested nodes, and such. Collecting information from everywhere and combining the knowledge I got with a bit of research, I was able to form the XML their SOAP service needed.
Some systems will give you flat arrays with their children and parent. I worked with Notion API and they do that as well. So in this tutorial, I’ll show a simple recursive function that can work to create a deep array with children and parents arrays.