I’m having the same problem after updating a couple of unrelated plugins. Can you tell me what you did to resolve the problem?
I have the same issue … please can you share your resolution ?
Warning: array_filter() expects parameter 1 to be array, boolean given in /home
wp-content/plugins/woocommerce/includes/class-wc-cart.php on line 212
this is around line 212
// Load cart session data from session
foreach ( $this->cart_session_data as $key => $default ) {
$this->$key = WC()->session->get( $key, $default );
}
$update_cart_session = false;
$this->removed_cart_contents = array_filter( WC()->session->get( ‘removed_cart_contents’, array() ) );
$this->applied_coupons = array_filter( WC()->session->get( ‘applied_coupons’, array() ) );
/**
* Load the cart object. This defaults to the persistant cart if null.
*/
Hi guys,
I also had this issue. just go to the cart page by typing the url.
http://www.yoursite.com/cart
It’ll say your cart is empty. just click return to shop button. that annoying warning msg will disappear.
That’s how I fixed it. Hope it helps
Thanks
Thank you very much for your response. That actually didn’t work for me.
I was only getting the warnings when I was in the backend, but not while logged in. When I did what you suggested (while logged in), it actually threw more warnings and the web page didn’t even show anymore. When I logged out of the backend and logged back in, the warnings disappeared. I don’t understand the reason, but i’ll take it.
I’m sorry – I meant I was only seeing it on the front end while I was logged into the backend.
Yep the typing domain/cart also brought up more errors for me, but as suggested logging out and back in removed them …
very odd I wasted a whole day on this lol thanks very much for the advice π
try adding a product to the cart and then empty it.
I encountered this problem when I cloned over a stage site I built for a client to their url. There was items still in the cart que. This also caused the media manager to stop working as well.
Whatever the issue, this was the fastest way to fix the issue.
1 – Backup Your Site!
2 – Install https://ww.wp.xz.cn/plugins/wp-optimize/ (WP Optimize) and activate it.
3 – Run WP Optimize (don’t forget to uncheck “Delete Revisions” if you want to keep them. Mostly you want to delete the transients.
Hope this helps someone. I fixed the site in 2 minutes.
I tried Dhanuka Nuwan’s fix, and it worked. I added an item to the cart and removed it and the error message went away.
Thanks Dhanuka! You’re the man!