• Resolved The Pedal Bike

    (@thistlefinch12)


    All,

    Buidling a theme from scratch with core WP and Woo. I’m using ACF to add custom details to my single-product template and it renders fine. My problem is the location/order my acf field appears. It should be above the product tabs; not below. I’ve hooked into ‘woocommerce_after_single_product_summary’ and given it a higher priority than the assigned 10 for ‘woocommerce_output_product_data_tabs

    My function:

    add_action( 'woocommerce_after_single_product_summary', 'tpb_product_description', 7 );

    function tpb_product_description() { ?>
    <div class="product-description"><?php the_field('product_description'); ?></div>
    <?php }
    }

    Is my hook outdated? Is there something else I should be using for block themes?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @thistlefinch12,

    You seems to be doing everything right in the code you shared. If you’re still not seeing the ACF field appear above the tabs despite your hook having a higher priority, you may need to adjust your priority further, e.g. use 5 or 6 instead of 7.

    Additionally, offering code support falls outside the scope of this forum. You might want to join the WooCommerce public Slack and seek help in the #developers channel: https://woocommerce.com/community-slack/, or consider consulting a WooCommerce developer who is also familiar with the WordPress framework.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.