Support » Plugin: WooCommerce » Warning: strtolower() expects parameter 1 to be string

  • Resolved riccardomion

    (@riccardomion)


    Hi,

    I’m designing a website using the Enfold Theme and WooCommerce. Out of the blue on top of a page that shows several product sliders appeared a message that says

    Warning: strtolower() expects parameter 1 to be string, array given in /home/websitename/public_html/wp-content/plugins/woocommerce/includes/class-wc-query.php on line 453

    I don’t know what caused it and it only appears on that page. Not on the homepage (that right now is set on a coming soon page), not on the shop page, nor the check-out page.

    Could someone please help me? Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • P.S.: I don’t know if these following things are related with the issue but I’m gonna share them:
    – on the Enfold options whenever I make a change and save it a message says that “something didn’t work. Try again later” but the changes I made are still applied.
    – I tried installing WooCommerce Booster and Ajax Search for WooCommerce (both plugins are high-rated) but they both seem to crash the admin part of the website. The public face of the website still works but I can’t access the behind-the-scenes of it all (sorry for the lack of a proper vocabulary, I’m learning as I go) so I had to remove the plugins from the file manager. I then tried to install another trusted plugin (Smush) and that one works, so probably that’s an issue with those two plugins.

    Plugin Support Praveen

    (@spraveenitpro)

    Automattic Happiness Engineer

    Hi @riccardomion,

    Most of the time, errors and the warning [which you have provided] happen as the plugin/ theme being used is not updated to work with the latest version of WooCommerce. Best way to check for which plugin/theme is causing the trouble is to deactivate all plugins except WooCommerce and switch the theme to the StoreFront theme and then activate them one by one while observing which plugin [or theme] causes the warning. With regard to the 2 plugins [WooCommerce Booster and Ajax Search ] which caused the admin to crash, you could contact the developers from the support page so that they can update these plugins to work better.

    Cheers!

    Hi Praveen,

    Thanks a lot for your reply. The issue disappears only when I deactivate Woocommerce.

    Plugin Author peterfabian1000

    (@peterfabian1000)

    Hi @riccardomion

    It seems to me (unless I missed something) that it’s most likely some other code calling the function get_catalog_ordering_args incorrectly. Can you please confirm that this happens with the default theme (Storefront) and only 1 plugin (WooCommerce) active?
    I opened an issue on github to add some defence against this, though: https://github.com/woocommerce/woocommerce/issues/23387

    Sorry I didn’t update my message. Yesterday an update for WooCommerce came up (and one for Enfold as well). Updating solved the issue. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Warning: strtolower() expects parameter 1 to be string’ is closed to new replies.