Support

Account

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