The purchase order data submitted during checkout (which doesn’t just include a number, but can also include a full postal address etc.) is stored in an array in the meta table, yes.
Changing this has backwards compatibility concerns, albeit ones that are straightforward to resolve.
There may be filters available within your MyWorks sync plugin that allow you to modify the data as it goes through, though?
They are wanting you to update the plugin. I have just made an order with a po number and the results are this.
array (
0 =>
array (
'number' => '123456789',
),
)
It might be an idea to force people to update your plugin….
Where is the other information you are referring to?
Some users may have the options turned on to collect other information as well as the purchase order number, for example the name and address of the person that provided the purchase order. This information is stored in the array too, if given.
The MyWorks Sync plugin doesn’t have any filters available which would allow this to be changed in your case, which is definitely something I’d suggest they add.
Meantime, I can change my plugin to save the data as individual keys instead of an array, but I’m unable to provide an ETA on this as I’m on Christmas break now.
Hi blenkhn,
I have just pushed a version 2.0 update live which, amongst a couple of other tweaks, now saves data in individual fields as well as the array so you should be able to do this now.