Conflict with the Yith Product Filter plugin
-
Hello there!
I am experiencing a conflict with the YITH WooCommerce Ajax Product Filter plugin. The filters do not fully load because they are initialized before the products are loaded.
I opened a support ticket with the YITH team, and they informed me that your theme renders products via Ajax, which is causing this issue. They mentioned it can be fixed by firing the following code once your Ajax request completes:
$(document).trigger( ‘yith_wcan_init_shortcodes’ );
Could you please guide me on how to properly integrate this code into my child-theme/functions.php file, or let me know which JS hook I should use?
Yith ticket support: https://drive.google.com/file/d/1mzL1IRxLjfMHwVPcc3k1Hc60ORrtDcSg/view?usp=sharing
Please, let me know.
Regards,
-
This topic was modified 1 month, 4 weeks ago by
chefnelone.
The correct code is this one, without the: $(document) at the beginning
.trigger( 'yith_wcan_init_shortcodes' );
Hello,
Add the following Custom JS code to the Theme Settings > Custom JS.
(function($) {
$(document).on('wdShopPageInit', function () {
$(document).trigger( 'yith_wcan_init_shortcodes' );
});
})(jQuery);
Best Regards.
Hello,
You’re Most Welcome!
Feel free to write back anytime. If you need further assistance, we are always here to help you.
If you have a minute, we’d truly appreciate your feedback — it helps us improve the product and shape future updates more effectively. We’d love your feedback on our theme: https://tally.so/r/w4l54k
Thanks for contacting us.
Have a great day.
Topic Closed.
Best Regards.
The topic ‘Conflict with the Yith Product Filter plugin’ is closed to new replies.