Instead of adding the filter inside of the add_action()
, you need to call the filter directly. You have this in your functions.php file:
function filter_after_setup_theme() {
add_filter( 'tc_bridge_for_woocommerce_content_order_table_is_after', '__return_false' );
}
add_action('after_setup_theme', 'filter_after_setup_theme');
You are telling to WordPress to execute the filter when the action after_setup_theme
happens (which is called before init
hook, according to the Actions Hooks list).
Instead of the action, you should leave the filter to be registered alone, so instead of the previous code, you do this:
add_filter( 'tc_bridge_for_woocommerce_content_order_table_is_after', '__return_false' );
That filter will be registered in WordPress when the functions.php is loaded and not when the add_action('after_setup_theme', 'filter_after_setup_theme');
is executed.
If you still need to execute the filter inside a hook, I recommend to do it in init
or maybe wp_loaded
hooks.