• Hello guys, after the last woocommerce(3.9.1) update, i`m facing this error on the cart page:

    Could someone help me?

    Warning: strpos() expects parameter 1 to be string, array given in /home/store/www/wp-content/plugins/woocommerce-cart-stock-reducer/includes/class-woocommerce-cart-stock-reducer.php on line 176

    public function expire_notice_added() {
    		if ( true === $this->expiration_notice_added ) {
    			// Don't loop through notices if we already know it has been added
    			return true;
    		}
    		foreach ( wc_get_notices() as $type => $notices ) {
    			foreach ( $notices as $notice ) {
    				if ( false !== strpos( $notice, 'wc-csr-countdown' ) ) {
    					$this->expiration_notice_added = true;
    					return true;
    				}
    			}
    		}
    		return false;
    	}
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author James Golovich

    (@jamesgol)

    I’m not able to reproduce this on my test setup but I will implement a fix for it. What other WooCommerce related plugins are you using? I suspect one of them is adding an empty notice and in the past WooCommerce would happily add it but they recently changed the way it handles empty notices.

    Edit: Scratch that, I was able to reproduce. I will get a fix pushed out soon

    Thread Starter bropke

    (@bropke)

    Thank you @jamesgol

    Plugin Author James Golovich

    (@jamesgol)

    Just pushed out version 3.10 that fixes it.

    Edit: Sorry I didn’t test it sooner, I read through the changelogs and didn’t see anything that would obviously break

    Hey @jamesgol,

    I seem to be having the same error, even after updating:

    View post on imgur.com

    I have tried clearing my browser and Autoptimize plugin cache, and have now disabled it completely.

    Any ideas?

    Plugin Author James Golovich

    (@jamesgol)

    Hi @ljackl,

    Sorry about that. Not exactly the same error, there was another usage that I didn’t see and didn’t experience since I didn’t actually wait for an item to expire.

    I just fixed that instance and uploaded a new version

    Hey @jamesgol,

    No need to apologize! Thanks for the quick fix.

    Have a nice day ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error after woocommerce update’ is closed to new replies.