tel7
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Region not stored in orders or order emailsThank you so much yukikatayama, that’s great!
Although it’s not explicitly stated in that post, having successfully tested it myself it looks as if adding “\n{state}” after “{postcode}” on the following line of woocommerce/includes/class-wc-countries.php will do it:
‘NZ’ => “{name}\n{company}\n{address_1}\n{address_2}\n{city} {postcode}\n{country}”,
So the new line would be:
‘NZ’ => “{name}\n{company}\n{address_1}\n{address_2}\n{city} {postcode}\n{state}\n{country}”,
That puts the region (state) on the line after the city + postcode.
If I decide to use that, I’ll need to work out how to put it in a plugin, because I assume the next time I take a WooCommerce update such a change would be overwritten.If anyone knows what code would need to go into a plugin, please post that code here. I guess a child theme option would also work, but I’m putting all my tweaks in a single plugin, in the hopes that’s more efficient.
Thanks.
TRSForum: Plugins
In reply to: [WooCommerce] Region not stored in orders or order emailsHello?
Seems to have stopped, thanks Mark!
OK Gemma, I’ve sent the site address via the link you provided.
I await your response.
Terry
Forum: Plugins
In reply to: [WooCommerce] Region not stored in orders or order emailsThanks for your prompt response and suggestion, Shane.
Questions:
Q1. Is “region” really a custom field? I haven’t added it as a custom field. It automatically appears in the Checkout page presumably because I’ve specified New Zealand somewhere in the settings. The code I linked to in my original post may give a clue to this. I see that it refers to this field: $locale[‘NZ’][‘state’][‘required’], so does that mean “state” is being used to store region data? Is that a custom field?
Q2. If “region” is NOT a custom field, then does your suggestion above apply?
Q3. Without “hacking” into the database, how can I know the region data is even being stored when people place orders? As mentioned in my first post, I can’t even see it in Dashboard > WooCommerce > Orders. So where can I see it?
Q4. How can I make the “region” appear under Dashboard > WooCommerce > Orders?
Thanks.
TRS