Hi I just updated my WP site from 3.8.1 to 4.4.1 version (related to this). After update I got this error

Fatal error: Call to undefined method stdClass::filter() in D:\wamp\www\mysite\wp-includes\taxonomy.php on line 805

We have our own plugin managed. To check if the issue is because of the plugin, I have switched to the default wp theme. But no luck there is still this error message. I know if the issue is with the plugin then it should be deactivated to debug, however I can't do that because all the features are from that plugin which is used in other sites as well and it's working fine even after updating WP to the latest version on those sites.

If I change:

$_term->filter( $filter );


if(method_exists($_term, 'filter')) {
$_term->filter( $filter );

the error is not there but the page doesn't come up how it should be. Is there anyway I can fix this issue without editing the core wp file?

Any help will be appreciated.

Thanks in advance

  • Is that you WP copy is customized? Not then use fresh version. Commented Feb 1, 2016 at 6:12
  • WP copy is not customized and have used the fresh copy for all except theme and all the plugins have been updated to the latest versions. The error is seen from WP version 4.4, it works fine upto version 4.3.2 though. Thanks
    – user478
    Commented Feb 1, 2016 at 6:24
  • 1
    The method WP_Term::filter() was added in 4.4, it is really strange that you get a error saying that WP_Term::filter() doesn't exist when you upgrade to WP 4.4. Maybe you are using get_term() function some where before WP_Term class is loaded? Note that the error says "undefined method stdClass::filter()" and not "undefined method WP_Term::filter()"
    – cybmeta
    Commented Feb 1, 2016 at 8:01
  • It is quite impossible to tell exactly where the issue is. If everything works on one site with the same setup and not on the other, you can have a corrupt WordPress install, a hacked installation or an issue with a corrupt db Commented Feb 1, 2016 at 11:33
  • 1
    @cybmeta, thanks a lot for mentioning "undefined method stdClass::filter()". Its actually the issue of the object that we have created in our plugin. While merging the arrays in add filter hook, the object got altered where that should have been "WP_Term" object. This has been resolved by returning the same object i.e. $term and this works perfect. Thanks again greatly appreciated :)
    – user478
    Commented Feb 1, 2016 at 23:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.