If you extending WooCommerce by creating topic or developing plugins you will find this plugin to be priceless.. WooCommerce uses WordPress and directory tables to store data on store number orders checkouts..
If you are full door or any 3rd subject app with your store you sometimes need to. store data for specific orders.
It tends to be hard or even not possible to extend orders. with custom data..
Here's how not hard it is to extend WooCommerce in your code. WC CustomOrderData extend $order.
To set part to order just type. $order->custom->your custom property = 'some value.
After that you can use part by applied the. custom. order property. $custom property = $order->custom->your custom property.
You can allways recheck if property live using PHP way. if isset $order->custom->your custom property { doStuff }.
When you finish working with the order. make sure you save data by typing. $order->custom->save.
Note Storred objects and arrays will be restored as arrays..
Miloš Đekić is enthusiast from Belgrade.
Read more