It doesn't seem to work however and I think it's because the delivery_date is nested in an array and I'm not fetching it properly. The meta data ...
There is at least 2 ways to get custom order item meta data from a defined meta key: 1) Since WooCommerce 3 - Using WC_Data method ...
Try the following: // Get the $order object from an ID (if needed only) $order = wc_get_order( $order_id); // Loop through order line items ...
Step 4: Display User Custom Data on Cart and Checkout page. Step 5: Add Custom Data as Metadata to the Order Items. Step 6: Remove User ...
select. p.ID as order_id,. p.post_date,. max( CASE WHEN pm.meta_key = ' _billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email,.
One of the cooler things about WooCommerce (and WordPress) is the
php . You will also find functions to manage order items. But since this is a tutorial for order item meta data, we will only the item meta functions.
Fields can be imported and exported from orders, as they're stored as order metadata.
... doesn't seem to work within email templates, when used to get custom meta values associated with the order. WooCommerce 2.2.10, WordPress 4.1.
to the the orders meta-data object because I need to get all orders which has the ...