Home › Forums › Front-end Issues › WooCommerce Attribute Image to Single Product › Reply To: WooCommerce Attribute Image to Single Product
When working with WC you more than likely need to use one of their action hooks to show the field where you want it shown on the product page. https://docs.woocommerce.com/wc-apidocs/hook-docs.html
In your action you need to get/show the value by passing ACF the product ID (Post ID), example: get_field('your-field-name', $product_id);
Some of the action hooks pass the product ID and in other cases you’ll need to figure out how to get the ID.
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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.