WooCommerce Shop Page Display Product Div as a Weird Loop
-
Greetings…
function neato() { global $product; if ( $product->get_permalink() ) { echo '<script src="https://code.jquery.com/jquery-1.10.2.js"></script><div class="new-projects"></div> <script> $( ".new-projects" ).load("'. $product->get_Permalink() .' .rp_wcdpd_pricing_table"); </script>'; } } add_action('woocommerce_after_shop_loop_item','neato', 9);
I have a Shop Page Loop whereby I am attempting to display a product div that contains volume discounts. You may view it here: https://cdncoin.wpengine.com/product-category/gold/
What seems unusual to me is that the function shows the same Volume Discount for all products and on page load loops through all of the Volume Discounts in a cycle.
I feel as though I have requested the current product div only within the loop and am finding it difficult to isolate the issue.
All help is appreciated.
Rob
- The topic ‘WooCommerce Shop Page Display Product Div as a Weird Loop’ is closed to new replies.