Home › Forums › General Issues › Is there a way to add / populate all fields in my postype? › Reply To: Is there a way to add / populate all fields in my postype?
The easiest way to do something like this would be to add a custom field to your category and then use this value instead of the value associated with individual products.
The only way to set this value for all products would be to run a query to get all of the products in the category and update each product individually and you would need something to trigger this update. This could be done using my first suggestion, using and acf/save_post action that runs when the category is updated. However, this solution is not scalable and could time out if there is a large number of products that need to be updated.
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!