Support

Account

Home Forums ACF PRO Integrating with WooCommerce Reply To: Integrating with WooCommerce

  • Hi @s7media

    WooCommerce has different template structure where you need to add the code. This page should give you more idea about it: https://docs.woocommerce.com/document/template-structure/.

    If the code is located inside of the product loop, you should be able to use the get_field() or the_field() functions in a standard way. But if it’s located outside of the loop, then you need to pass the product ID to the second parameter of the get_field() or the_field() functions like this:

    get_field('custom_field_name', 99);

    Where “99” is the product ID.

    For the product category, kindly check our tutorial here: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/.

    If you don’t know how to get the product ID or which file you should modify, kindly get in touch with WooCommerce support instead.

    I hope this makes sense πŸ™‚