Home › Forums › ACF PRO › Get woocommerce attribute with ACF › Reply To: Get woocommerce attribute with ACF
I’m not exactly sure of the specifics on how WooCommerce stores product attibutes, but I do know that it stores them in a serialized array in a single postmeta field. You’re going to need to figure out how this array is built and you’re going to need to create an acf/save_post filter (https://www.advancedcustomfields.com/resources/acfsave_post/) to take all the ACF fields and build that array and then store it where WooCommerce expects to find it.
I would start by creating some products with all of the attributes you want to be able to set with ACF and then looking into the database to see where it’s stored and how it is constructed. You’ll be looking for the value with a postmeta key of _product_attributes
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.