Error message array filter parameter above Website Header
-
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]
- The topic ‘Error message array filter parameter above Website Header’ is closed to new replies.