Home › Forums › General Issues › ACF – WooCommerce – Product Variation › Reply To: ACF – WooCommerce – Product Variation
Okay I have a pretty crispy workaround, but it works.
I am using ACF Pro 5.7.11
In the old thread find the first reply by shaun where he has a code block. Here’s the link:
Use that code in functions.php or wherever.
In ACF setup whatever custom fields you need, but in the rule select product instead of product_variation because that option isn’t present.
Go to the ACF Tools page and export the .json of your custom fields. Open that file with a text editor and scroll down to the “locations” section. Simply change the “value” from “product” to “product_variation” and then on that same tools page re-upload the file. You should see custom fields in your product variations drop downs now on variable products.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.