Create custom Woo product title from multiple ACF Pro fields in backend
-
What is the best solution for creating new Woo product titles (or update) based on several custom fields in backend as admin, without using the default WP title field?
The title (and permalink + slug) should always be created based on values selected in two dropdown boxes and one text field in ACF Pro. When saving the product it should be created/updated and published. The title should be a combination of: “value 1 + 2 + 3”.
Any later changes directly in the products default WP title field should be ignored (maybe hide that). Changes in any of the three custom fields should not only update the title when saving, but also update the permalink and slug.I created a very bad solution to this at least 5 years ago (I′m not a coder). It took about 30 seconds to save a product so there were probably several errors in that code! I have searched for an updated code in several forums, but I have not succeeded.
Really appreciate any help with this!
WP (5.8.1), Avada (7.5), ACF Pro (5.10.2), PHP (7.4.25, can update to 8.0.12 if needed for performance/smarter code).
- The topic ‘Create custom Woo product title from multiple ACF Pro fields in backend’ is closed to new replies.