• Resolved Qilin

    (@qilin2000)


    Hello there,

    My website has debug mode enabled. After a recent upgrade, the plugin frequently reports errors, with the following error message:

    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead. in example.com\wp-includes\functions.php on line 6078

    It may be related to the recent upgrade of the WooCommerce plugin, I’m not sure. However, after deactivating WooCommerce, the plugin still reports errors. After deactivating this plugin, the errors are gone.

    Please look into it, thanks.

    Qilin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author JWardee

    (@wardee)

    Hi Qilin,

    has_cap isn’t used anywhere in the plugin. Could you share the stack trace in your logs so we can see what led up to the error rather than just the error itself. Also what version of WordPress and PHP are you using?

    Thanks,
    James

    Thread Starter Qilin

    (@qilin2000)

    Hi James,

    I fixed the issue. There are two options in the settings, User capability needed to see logs and User capability needed to edit settings, I recently changed these two options, which caused an error, and after resetting them, the error message disappeared.

    I use PHP 7.4.33 and WP 6.5.4

    Qilin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Deprecated Error’ is closed to new replies.