Home Forums ACF PRO Integrate custom fields to WooCommerce product


Integrate custom fields to WooCommerce product

  • I’m trying to integrate Woo products into Custom Post Type Fields. I’m creating a Recipe CPT with tons of custom fields, but the essential ones will be “Ingredients”, on the frontend those fields will have a button to take the user to the corresponding product that the Ingredient is mentioning. Example: In a Salad, I’m using Olive Oil as an ingredient, then in the ingredients list a button will take the user to the Olive Oil product page.

    How can I achieve something like that?

  • Hi @hcmendez

    I’d be inclined to use a repeater field for the ingredients list. I’d have 2 fields:
    1. The ingredient
    2. A post object which is then set to use products

    The code would then loop through the repeater fields, listing the ingredients but you can then create your links using the post object.

  • I think the best way to do it is by using the Link field inside a repeater to choose between Woo Products.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.