Descrizione
If you are extending WooCommerce by creating themes or developing plugins you will find this plugin to be priceless!
WooCommerce uses WordPress logic and database tables to store data on store items, orders, checkouts…
If you are integrating a payment gateway or any 3rd party app with your store, you sometimes need to
store some extra data for specific orders. It tends to be very hard or even impossible to extend orders
with custom data.
Extend WC Orders
Here’s how easy it is to extend a WooCommerce order in your code:
| WC_CustomOrderData::extend($order);
To set a custom property to an order, just type:
| $order->custom->your_custom_property = ‘some value’;
After that you can use your custom order property by referring the “custom” order property:
| $custom_property = $order->custom->your_custom_property;
You can allways check if a custom order property exists using the standard PHP way:
| if(isset($order->custom->your_custom_property)) { doStuff(); }
All custom order properties are saved in a separate database table. When you finish working with the order,
make sure you save custom data by typing:
| $order->custom->save();
Note: Storred objects and arrays will be restored as arrays.
Author
Miloš Đekić is a software enthusiast from Belgrade,
Serbia. He loves to create useful software.
Installazione
Just follow this simple guidelines.
Installation steps
- Upload ‘woocommerce-custom-order-data’ to the ‘/wp-content/plugins/’ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Use custom order data in your WooCommerce plugins and themes
- That’s it. Enjoy!
Recensioni
Non ci sono recensioni per questo plugin.
Contributi e sviluppo
“WooCommerce Custom Order Data” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.
CollaboratoriTraduci “WooCommerce Custom Order Data” nella tua lingua.
Ti interessa lo sviluppo?
Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.
Changelog (registro delle modifiche)
1.0.1
- Added ‘unset’ support
1.0
- First version – WooCommerce orders can now be extended with custom data.