Woocommerce meta keys list It is called in the file html-order-item-meta. Mar 9, 2022 · I'm looking for a way to extend the search field in WooCommerce admin orders list for a custom meta key. As of version 1. Jan 23, 2024 · Where are product details and meta stored in the database WooCommerce extends the functionality of the WordPress database by using the wp_postmeta table to store additional product details. It is a powerful concept with which plugin […] Click Save. Come and work with us! Introduced in WooCommerce 2. This id is clearly visible next to the label of each field you have created, so to import this data you’d title your columns like so: meta:_wc_acof_{id}. Orderby Modification: Sets the order to prioritise featured products, followed by newer items. These meta keys are saved as custom fields and can be accessed for integrations, custom workflows, or simply viewing order details. This tutorial explains how you can find the key for any meta field available on the post edit page in your admin area. ⚠️ This document has moved to the Developer Documentation site. Mar 9, 2021 · As each product attribute is a custom WooCommerce product taxonomy, for a specific custom taxonomy you can get the terms attached to a product and then the term meta data as follows: Nov 13, 2025 · This document serves as a comprehensive reference for the WooCommerce Command Line Interface (WC-CLI) commands. The difference between directly querying those Jul 27, 2017 · I've written a function to get products by price range. Method of the class: WC_Data {} You will see a list of other meta fields that WooCommerce uses to store product data. 0, updates since this release may affect the accuracy of this list. Jun 29, 2018 · Hiding the Item Meta Data If you’re storing item meta data for internal use only, you can hide them through the filter woocommerce_hidden_order_itemmeta. Custom fields are additional metadata of your products, which can be utilized in various ways within your theme or site to display extra information, tailor the shopping experience, or provide specific […] Jul 16, 2020 · I'm using WooCommerce and want to get the meta keys specifically for the product e. The billing email address for example is saved as ‘_billing_email’. Composite Products / Documentation / Data Structures and Storage Data Structures and Storage This document is written for WooCommerce developers looking to extend or customize WooCommerce Composite Products. The plugin that we are going to use as a reference is WooCommerce, the popular e-commerce platform for WP. I'm familiar with the WooCommerce structure and where the da. Product categories, tags, and attributes are different ways you can use to organize, display, and filter products in your WooCommerce store. All works, but now I need add a extra meta key, that will be like 50 - 100 and featured, but code is not returning any products. Jun 19, 2024 · Since WooCommerce is a WordPress plugin, it makes use of many of the WordPress tables. Hooked into wp_ajax_woocommerce_json_search_order_metakeys to return the list of unique meta keys for the edit order screen custom fields metabox. Update meta data by key or ID, if provided. May 3, 2019 · WooCommerce uses the meta key _sku to store the SKU for products. Nov 13, 2025 · Order field queries (field_query) This query type has a syntax similar to that of meta queries (meta_query) but instead of key you'd use field inside the different clauses. Resulting in this code, which allows me to search by the user id, order total and order number. The Documentation is not really helpful on this matter. This action can also be used to automatically resend the customer an invoice Here is a list of standard WooCommerce order meta keys which might be useful when setting order meta data based automatic assignment rules: This list is from WooCommerce 8. get_search_stopwords () : array<string|int, mixed> Jul 9, 2016 · Finding meta keys for third-party plugins and themes is not always straight-forward. Post meta are basically product custom fields that are added via the update_post_meta () WordPress function by WooCommerce itself, a custom plugin, a snippet, a theme. Oct 24, 2025 · Gets a list of props and meta keys that need updated based on change state or if they are present in the database or not. This should be simple enough but I need to have the meta keys for these fields. public static get_main_meta_query() : array<string|int, mixed> array<string|int, mixed> — get_main_query () Get the main query which product queries ran against. Jul 18, 2023 · I´m using Woocommerce with paid addon from automatic "product addon" which adds some meta values to the order item table I want to show 2 or more specific meta key values in the admin order WooCommerce offers the capability to enhance your product listings with custom fields, a feature that allows you to display additional product details to customers. Note that the posts tables is used by Custom Post Types, and WooCommerce uses those for products, coupons Nov 18, 2024 · Trying to search for an order with a very specific custom field key/value pair. I wasn't sure where to submit it, so if this the wrong place my apologies. I have to clarify that I'm not a pro in php and I have tried many ways to get field, with: get_meta() get Nov 12, 2025 · get_main_meta_query () Get the meta query which was used by the main query. Though their uses overlap a bit, each one serves a slightly different purpose. Mar 25, 2018 · If you wanted to see all the post meta keys and values for a post,page or custom post type in WordPress you can either see them in the database in the wp_postmeta table or you could use the get_post_meta function to retrieve all the post meta or a specific key. So if your form is being embedded in the product page, you can use {custom_field:_sku} as default value in a field to get the SKU. WooCommerce Orders contain a lot more custom fields than are listed here: addresses, payment gateway, dates, etc are all stored as custom fields. These include posts, pages, media, users, the list goes on. This documentation will guide you through two cases on how to include product attributes in your metadata effectively. The meta keys for each admin custom order field are in the format of _wc_acof_{id} where {id} is replaced by the integer id of the field. This is useful for WooCommerce, Events Manager, and other CPT’s. Adding custom meta You can add columns for order, coupon, or user meta to custom formats. Now, let’s finish the setup of the custom query. Apr 21, 2020 · I was working on a WooCommerce project recently and I didn’t want to waste time searching through all the hidden product post meta. Still there is no specific way to search product based on custom product attributes. Here, field refers to any order property (such as billing_first_name, total or order_key, etc. I'm working on creating some SQL Views for my Wordpress database to more easily view online orders generated via the WooCommerce plugin. 46 I'm trying to display post meta values and post meta keys, If only one value is to be display I can used the simple function get_post_meta () but what I need now is to post all post meta data with the same post_id. The table names are prefixed with your WP Database Table Prefix, usually wp_. By default, returns data for all keys. Apr 22, 2024 · SQL meta key and meta value Resolved trongtri35 (@trongtri35) 1 year, 4 months ago i use SQL to get order with custom product. Data associated with bundled items is not saved in the post meta table. What is wron The meta key to retrieve. After you insert the total_sales meta key, choose Order – “From highest to lowest values” that will allow you to order the products by the number of sales from the best selling products to the least. The key will be the slug (which can typically be found in the specific module you used to build the custom field in woocommerce). Jun 22, 2022 · First of all woocommerce_email_order_meta_keys is deprecated since WooCommerce 2. I’m not going to describe how you can get the available meta keys. Gets a list of props and meta keys that need updated based on change state or if they are present in the database or not. Mar 25, 2017 · This is just a "HOW TO" I wanted to share on what I did to customise Woocommerce to display more useful event / ticket information on the shop page under each event. 0. public static get_main_query() : WP_Query WP_Query — get_main_search_query_sql () In this article, you'll find a comprehensive list of available WordPress data field connection shortcodes. Any of these data points can be used simply by calling for them using “key” with a get command. It’s an array containing the names (keys) and values of your product attributes. There’s an “Include Meta” field on the Zap, but I can’t figure out how to put the key/value pair. I just thought some people may find it […] Jul 24, 2018 · So, to manage your product (that you’ll upload with this form) stock, you’ll need to find the necessary meta_key (s) from WooCommerce product. It includes syntax, options, and brief descriptions for each command. g. You can see where to find them in the Oct 31, 2025 · $meta_key : string Meta key to update. Custom product attributes are saved as a post meta called “_product_attributes”. Essentially, the meta key is a way to add extra data to a WooCommerce order. 9. The woocommerce_bundled Oct 30, 2023 · WooCommerce Product Bulk Meta Editor Plugin allows editing the values of multiple or all product meta keys or set different or the same value for the selected products. Get Meta Data by Key. php : 332 Check if the usage of the custom orders table is enabled. 4 days ago · The REST API is a powerful part of WooCommerce which lets you read and write various parts of WooCommerce data such as orders, products, coupons, customers, and shipping zones. Jul 11, 2024 · Tried like this: (select meta_value from wp_woocommerce_order_itemmeta where meta_key = '_qty' and order_item_id = oi. 8 the code is no longer required for the extension’s own fields, but the code is still valid for custom fields created in other ways. For To make things easier for you, I’ve compiled a list of WooCommerce user meta keys for billing information. In this document we’ll explore these three fundamental taxonomies for organizing and managing […] Sep 8, 2021 · I'm trying to get a custom meta data field from wc_order. To review, open the file in an editor that reveals hidden Unicode characters. For example the data form the custom checkout fields stored as user meta by the WooCommerce checkout from form the example above. You must know the correct meta key for the data when adding a column for meta. get_search_stopwords () : array<string|int, mixed> Sep 9, 2022 · In this example I have about 25 Meta Data values that pulled during this “get” order. Resend Order Email Resends one of the emails provided by WooCommerce for each order when it is cancelled, completed, refunded and so on. WooCommerce is using this meta data feature for its content types such as Orders, Products, Coupons, Customers and more. woocommerce_email_order_meta_fields seems ok, but it is less customizable that woocommerce_email_order_meta, for example you can not add some custom HTML with it. This table operates on a key/value pair system to store various attributes of products. Can you please check my code? Feb 7, 2025 · Struggling to manage WooCommerce metadata? Discover 5 essential tips to simplify management, integrate plugins, and boost performance. Add Note Adds a private or customer note to the order. Apr 10, 2018 · One of the cooler things about WooCommerce (and WordPress) is the ability to save custom meta for orders, customers, and subscriptions. 1. Oct 19, 2025 · How to add new tabs and custom fields to product data meta box programmatically in WooCommerce. Therefore, to understand the structure of WordPress, please see the WordPress Database Description doc. Return values bool — True if updated/deleted. 1, the REST API allows WooCommerce data to be created, read, updated, and deleted using JSON format. ) which are also accessible as top-level keys in the query arguments as usual. To add custom meta, select “Meta field…” from the Data source drop-down menu and enter the Meta key. Tags since 3. is_cot_in_use () includes/data-stores/class-wc-customer-data-store. WooCommerce is an open source commerce platform built for WordPress and lovingly crafted by Automattic and the WooCommerce community 💜. The actual meta is the Booster for WooCommerce "MSRP Price", which is added as a meta field. You can try it. Oct 11, 2021 · If you’re setting up a Meta Reference, but this isn’t showing up in your grid, the following tip can help to make sure the “Original Handle” being used is correct. This KB article will list out these meta fields which can be useful in importing/exporting data from Woo Products The custom fields for products are listed here. In this example, a custom field with the label hear_about_us was added: To add the newly added custom field hear_about_us to the order email, the Get Meta Data by Key. Here is an example using a custom field that was added with the Checkout Field Editor extension. What Is Meta Data? WordPress has a facility to store unstructured data against most of its managed content. This list will assist you in determining which keys relate to each piece of user data, allowing you to establish a seamless and efficient approach to manage client information directly from your customized forms. order_item_id) as testa, Was trying with MAX to but its displays only one qty, its good if in order is one item, but not when in order more like 2 Oct 1, 2022 · PRO TIP: If you are not familiar with WooCommerce, the “meta key” can be confusing. Learn more about bidirectional Unicode characters Here is the list of meta keys which you can use to manually update users information via custom form or jetengine's form/jetformbuilder. Meta Query: The meta query filters products by the _featured meta key, ensuring featured products are prioritised. Here's the entire story of what I'm doing (so it might help someone else, and so you know Oct 18, 2021 · How to add custom fields to WooCommerce product attributes in the same fashion as post and term metadata. I generally use ‘ Post Meta Inspector ‘ to find the available meta keys of a post/product. Aug 19, 2024 · You can also use existing meta keys if you already have some customer data stored as user meta. Currently i'm using the woocommerce_shop_order_search_fields filter hook. I tried using foreach loop but nothing displays. Being technical, you would call these product taxonomies. These shortcodes enable you to retrieve various types of data, including the title of your page or post, page or post content, publishing date, archive title, and more. Aug 7, 2024 · Solution: Add a Custom Filter Field and Custom Column in WooCommerce >Admin Orders Page This code snippet will help you to enhance the functionality on the WooCommerce Orders page by creating a custom filter field and adding a custom column, allowing users to view, filter, and search orders based on the selected custom meta data values. Feb 2, 2024 · WooCommerce provides a way to utilize product attributes, including personalized ones, in your metadata to enhance search engine optimization (SEO). Jan 9, 2021 · Get all products with specific meta_key whose meta_value is equal in WooCommerce Sep 5, 2025 · Kikote stores useful location-related data as meta keys on each WooCommerce order. Nov 22, 2024 · Explanation: Condition Check: This function only runs on the front end and only on the main query for shop, category, tag, and search pages. We store some data in meta fields on WooCommerce. Sep 23, 2019 · I'm trying to display some custom meta data that's associated with the shipping on an order in WooCommerce. 6. 3. They are different from the regular custom fields because their name / meta key has been prefixed with an underscore. php: Add/Update Order Meta Adds or updates a value for your chosen order meta key. I want the address information in my form to be added to the Shipping Address fields that Woocommerce adds to my user profile. Instead, for scalability and speed when working with bundle parent/child relationships, the extension adds three tables to the database: woocommerce_bundled_items, woocommerce_bundled_itemmeta, and wc_order_bundle_lookup. To view the public meta keys used by Kikote, go to your WordPress admin dashboard and head to WooCommerce > Orders. As i know meta value save in wp_woocommerce_order_itemmeta with serial… Jun 29, 2015 · meta_key that stores woocommerce attributes is '_product_attributes'. 0 Added to prevent empty meta being stored unless required. It requires an advanced understanding of PHP and WordPress development. price, color and so on But the problem is that I don't want to get all meta keys but only the ones needed. Visit wc_get_orders() and order queries for the up-to-date version. $meta_value : mixed Value to save. To output the data to […] Aug 25, 2019 · 2 Situation: modifying the product template to display some HTML only IF a specific product meta exists / is set / greater-than-zero (it's an additional price type, it will either be empty or a positive integer).