Support

Account

Home Forums ACF PRO Integrating with WooCommerce

Solving

Integrating with WooCommerce

    • s7media

    • December 14, 2016 at 10:21 pm

    Hi there, has anyone had any luck with integrating into WooCommerce? I can’t seem to get anywhere with it.

    I’m trying to bring in ACF on the single product pages and in the category archive, but it just won’t work. In fact, the string breaks any code within that function thereafter.

    I have searched this forum and done many a Google and found very little information with ACF in Woocommerce. Could anyone point me in the right direction please?

    Thanks

    • James

    • December 15, 2016 at 2:10 pm

    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 🙂

  • Howdy, James – great name, btw.

    Just upgraded to Pro and looking for the way to hook a Field Group into the dropdown found at Attributes >> Custom product attribute. Had no issue adding 35 Select dropdowns to WooCommerce Single Products.

    Specs

    But I don’t want them in a separate place like this. I need to add Custom Fields to the Attributes >> Custom product attribute dropdown. This one.

    WooCommerce Custom product attribute dropdown

    Ideally, these custom taxonomies would also be automatically added to the Products >> Attributes page. This one.

    Attributes admin

    Are you able to point me in the right direction to make this happen?

    Thanks!

  • Facing same issue. would be great to get a hint on how to resolve.Thanks

  • The plugin looked impressive when reading all about it,Thanks for the great job.

  • Combining content and commerce has long been a benefit of using WooCommerce and WordPress. In WooCommerce 3.6, we are taking this a step further by introducing eight new product blocks that allow insertion of products on any post or page in the store.

  • In WooCommerce 3.6, we are taking this a step further by introducing eight new product blocks that allow insertion of products on any post or page in the store.
    The new interface also delivers an accurate preview of how that selection will look once published, so store owners can fine-tune the appearance by adjusting the order and layout.

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

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.