Feefo Script is not support for Woodmart the Load More Ajax in Product List page
-
Just a quick update on the Feefo issue.
At the moment, the Feefo script does not fully support Woodmart’s “Load More” / infinite scroll AJAX used on the product listing pages. Since products are added dynamically via AJAX, the Feefo widget is not re-initialized for the newly loaded items, which is why the rating stars do not appear on the additional products.
Could you please guide us on the recommended way to handle this scenario?
We’re happy to follow any official method or script re-initialization approach you suggest.
add_action('woocommerce_after_shop_loop_item_title', function() {
global $product;
if ( ! $product ) return;
// Simple product use product ID
if ( $product->is_type('simple') ) {
$product_id = $product->get_id();
echo '<div class="feefo-product-stars-widget" data-product-sku="' . esc_attr($product_id) . '"></div>';
}
// Variable product use parent product ID
if ( $product->is_type('variable') ) {
$parent_id = $product->get_id();
echo '<div class="feefo-product-stars-widget" data-parent-product-sku="' . esc_attr($parent_id) . '"></div>';
}
});
This code is working in on load page
Thank you.
Hello,
You can use our wdLoadMoreLoadProducts wdArrowsLoadProducts events to run your custom JS code to re-initialize the plugin’s scripts. Here is an example
$(document).on('wdLoadMoreLoadProducts wdArrowsLoadProducts', function() {
// your custom code here.
});
Kind Regards