• moji_vb

    (@moji_vb)


    There is also a report of this bug around one year ago(16 feb 2023) by user sgrassl which its topic was closed without any debug reports.

    This is exact php notice appeared in wp logs when I activate this plugin:

    [03-Mar-2024 03:51:15 UTC] PHP Notice: Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /home/cdks/domains/cdkeysell.ir/public_html/wp-includes/functions.php on line 5835.

    which cause add to cart button (shopping ability for woocommerce) not work (I’m a php developer so I could see generated json data file for adding to cart button is corrupted by this php notice added to begging of json file which should only include data). This happens only when user is logged in to the site and your plugin must be active too (I did checked this in logged out state both with and without product cache and its fine even when clearfy is active). If I disable your plugin this notice will disappear.

    Hope this helps development team to debug.

Viewing 1 replies (of 1 total)
  • Thread Starter moji_vb

    (@moji_vb)

    Temporary fix suggestion:

    I temporary skipped user shopping problem by manually adding this code to clearfy.php for my site:

    error_reporting(E_ALL & ~( E_USER_NOTICE ));

Viewing 1 replies (of 1 total)
  • The topic ‘Function WP_User_Query::query was called incorrectly’ is closed to new replies.