Error in widget "WooCommerce Layered Nav Filters" (6 posts)

  1. Kwayy Infotech
    Posted 3 years ago #

    When I add this in sidebar with "WooCommerce Price Filter" widget than it gives error:
    Warning: Invalid argument supplied for foreach() in /var/www/mysite/wp-content/plugins/woocommerce/classes/widgets/class-wc-widget-layered-nav-filters.php on line 79

    When I checked I found that the variable "$_chosen_attributes" is NULL.

    I am using TwentyEleven theme with latest WordPress and all plugins are latest.


  2. Kwayy Infotech
    Posted 3 years ago #

    Please note that this only happen if I filter price via "WooCommerce Price Filter" plugin

  3. funkolector
    Posted 3 years ago #

    I can't get it to work properly...
    weird no?

  4. dsomar
    Posted 3 years ago #


  5. dsomar
    Posted 2 years ago #

    I managed to solve this by removing the WooCommerce Layered Nav widget from my widgets for those dealing with the same issue... and it's probably because I'm not using the Woocommerce attributes for my product:

  6. Clarus Dignus
    Posted 2 years ago #

    In my case, the error appears under the following condition:

    Price Filter widget = Added to sidebar
    Layered Nav widget = NOT added to sidebar
    Layered Nav filter widget = Added to sidebar

    The absence of the Layered Nav widget in the sidebar causes the error whereas its presences eliminates the error message.

    Solution = add Layered Nav widget to sidebar if you want Layered Nav widget to work.

    Otherwise, remove both if (like in my case) you only require price filtering. In such a case, there's no need to show the price level filtering via the Layered Nav Filter widget since the Price Filter Widget already displays the filter and allows it to be removed (or "removed" via "changing" to be semantically correct).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.