So I have a following code inside the plugin:
if( window.wp.hooks.applyFilters( 'filtername', true, $(this) ) ) {
//do something
}
how can I make above statement always false without editing plugin files but using functions.php instead? I'm not sure if I understand applyfilters correctly but I've tried:
function filtername() {
return false;
}
add_filter( 'filtername', 'filtername', 10, 3 );
but it didn't work. What would be propper way to do it? Can someone please explain.