I would like to set up a repeater field, where WooCommerce products can be selected and presented. I know how to do the repeater field (I regularly set them up on websites we build!), but have zero idea on how to set it up to populate information from a product.
What I am after is the product thumbnail, product page link and product title. I can see it’s possible to select the product page link via a “Page Link” field (set to show products only), but I’d love to be able to set up the field in a way that the website manager only needs to select the product title or link, and then all details (title, link and thumbnail) are automatically populated in the repeater field.
I don’t have an answer for you. You would need to look into WC and how to get product content/data on another page. Most of the data is stored in postmeta just like ACF fields and you could probably use get_post_meta(). WC probably has built in functions that can be used, but I don’t know what they are. Most of this would be done by using WP functions to get what you want to show.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users