Support

Account

Home Forums Add-ons Repeater Field Getting the attributes of a product from an ACF relationship field

Helping

Getting the attributes of a product from an ACF relationship field

  • Hello everyone,
    for quite some time I have been looking for solutions for this feature of mine, if anyone can help me I would be really happy.

    With a relationship field, article object, I created a select of 3 products from my e-commerce on woocommerce. With this code I was able to get the image, I would also need to get the attributes of the various products and link to each product the attributes and the buy button. Does anyone know how to do this?

    <?php

    $posts = get_field(‘product_id’);
    if( $posts ): ?>

    <?php endif; ?>
    </div>

  • You need to look into WC documentation on how to get the values for the products based on the post ID.

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

You must be logged in to reply to this topic.