Skip to content

Instantly share code, notes, and snippets.

@tallesairan
Created June 21, 2018 12:07
Show Gist options
  • Save tallesairan/c28350ee7e8a84276a33d66dd4856562 to your computer and use it in GitHub Desktop.
Save tallesairan/c28350ee7e8a84276a33d66dd4856562 to your computer and use it in GitHub Desktop.
Get order items from database #woocommerce #db #mysql #wp
SELECT order_item_name,
order_id,meta.order_item_id meta_item,
meta.meta_key meta_key,
meta.meta_value meta_value
FROM `unf_woocommerce_order_items` items
LEFT JOIN unf_woocommerce_order_itemmeta meta ON meta.order_item_id = items.order_item_id
WHERE order_id = 458
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment