... by WooCommerce 3.0: add_action(' woocommerce_checkout_update_order_meta',function( $order_id, $posted ) { $ order = wc_get_order( ...
Whenever an order is created, quite a lot is stored in the order's meta
Add custom data to order page with WooCommerce session.
Search forums. Support » Plugin: WooCommerce » Order post meta ...
you can use woocommerce_checkout_update_order_meta hook to update order meta. Please check sample code
for more info. Be careful not to mix upper and lowercase. Uses: get_metadata() to retrieve the metadata.
In this case, you may want to sort WooCommerce products by your custom fields or by other post meta values. Let's go over how we can add ...
switch orders. Each of these relationships is recorded in the database by adding a meta key to the post meta table for the given WooCommerce order, which is a ...
This code works for me. Sorry that the code is not good readable.
the field is automatically processed and saved to the order post meta (in this case, _shipping_phone).