Closed CarlosLongarela closed 2 years ago
I tried using YITH Badge Management with Relevanssi and noticed no problems. I could create badges and search for them in the editor and on the product edit pages as expected.
Could you please explain how to reproduce this issue?
The problem is with badge selection on categories. Check this quick video wit Relevanssi enabled and disabled https://video.tabernawp.com/conversations/fdc340de-b716-5e74-aa8c-0e75377f147c
Ah, that's a Premium feature. But you showed me the AJAX query parameters on the video; that was very helpful. Try adding this to your site:
add_filter( 'relevanssi_prevent_default_request', 'rlv_yith_badge_management', 10, 2 );
add_filter( 'relevanssi_search_ok', 'rlv_yith_badge_management', 10, 2 );
function rlv_yith_badge_management( $do_stuff, $query ) {
if ( 'yith-wcbm-badge' === $query->query_vars['post_type'] ) {
$do_stuff = false;
}
return $do_stuff;
}
This should fix at least the badge search. If the category search still fails, please show me the AJAX query variables for that search as well.
I test it and works like a charm, thanks a lot @msaari quick and excellent solution.
All the best, Carlos Longarela.
With Relevanssi enabled, YITH Badge Management plugin do not return badge results. Yith support team advertise me that with Relevanssi disabled all works fine and that I should to contact you to resolve the problem (I'm uncertain if the problem is from YITH plugin or Relevanssi).