fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

woocommerce filter plugin wont work with your plugin

jamil khan

hey woocomerce filter plugin makes some conflict with it and wont working properly i have to refresh the page to see products here is the store url https://wege.ae/shop

Hakik Zaman

Hi jamil,

Thanks for reaching us.

We need an event from your filter plugin that should be triggered after new posts are loaded.

Just send this plugin to your plugin developer: https://wordpress.org/plugins/malinky-ajax-pagination/

And ask them to send triggers like the following as the Malinky Ajax Pagination plugin provides.

document.addEventListener(‘malinkyLoadPostsComplete’, function(e) {
console.log(‘LoadPostsComplete’);
});

Like this filter plugin: https://woocommerce.com/products/product-filters/

jQuery(document).ready(function( $ ){
// Your code in here
jQuery(window).on(‘wcpf_update_products’, function () {
console.log(‘Hi’);
});
});

Thank You

jamil khan

yes i’m using woocommerce product filter so its ajax even will be same than how to fix it

filter plugin: https://woocommerce.com/products/product-filters/

jQuery(document).ready(function( $ ){
// Your code in here
jQuery(window).on(‘wcpf_update_products’, function () {
console.log(‘Hi’);
});
});

Thank You

Hakik Zaman

Hi jamil,

The example code is very old. Could you please confirm whether this is still workable or not?

Just contact the filter plugin support for confirmation. I am waiting for your response.

Thank You

Hakik Zaman

Hi jamil,

You can also try it through the following steps:

Please add a plugin called Code Snippets and add the following snippet using the plugin:

add_action('wp_footer', function(){
?>
<script id="gwp-wcpf">
jQuery(window).on('wcpf_update_products', function () {
jQuery(document).trigger('woo_variation_swatches_pro_init');
});

</script>
<?php
}, 100);

Then check whether it resolves your issue or not.

Thank You

jamil khan

thanks for sharing snippet its worked for me

jamil khan

but there is another issue with filter if i choose a color from filter widget its not showing relevent images. wooswatch plugin choose diffrent color swatch thats why its showing diffrent images while using color attribute on widget how to fix it ?

Hakik Zaman

Hi jamil,

Could you record me reproducing your issue using a tool like this? https://www.useloom.com
It helps me to quickly figure out the issue.

Thank you

jamil khan

so how we can make it when we use choose color attribute from filter or widget its show products according to color

Hakik Zaman

Hi jamil,

so how we can make it when we use choose color attribute from filter or widget its show products according to color

As far as I know, there is no existing plugin that can do that. But, you can search for it yourself.

Thank You