• Resolved trodakiz

    (@trodakiz)


    Hello,

    I receive a warning message at the start of my website:

    Warning: array_filter() expects parameter 1 to be array, bool given in /homepages/9/d916496860/htdocs/app924536570/wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php on line 65

    Since it refers to the WooCommerce plugin I tried asking here first.

    I am not sure if it has something to do with this Code that I inserted with WPCode since it is also shown without this Code, but I only saw the message after doing something with this Code:

    function my_search_filter($query) {
    if ( $query->is_search && ! is_admin() ) {
    $query->set( ‘post_type’, ‘product’ );
    $query->is_post_type_archive = true;
    }
    }
    add_filter(‘pre_get_posts’,’my_search_filter’, 9);

    Does anyone knows how to fix this error? Sorry I wasn’t sure where else I could ask

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @trodakiz

    Thanks for reaching out!

    I understand that you are receiving an error message on your site.

    I tested your code on my test site and did not reproduce the error message you received.

    I’d like to understand your site properly, can you please share your System Status Report, that will help us further troubleshoot.

    You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Hi @trodakiz – This issue has been fixed and released in v6.9.1.

    Thread Starter trodakiz

    (@trodakiz)

    thank you for the information

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error message array filter parameter above Website Header’ is closed to new replies.