• Resolved lewebsimple

    (@lewebsimple)


    One of our clients is using Carts Guru and the database is now 4.8Gb which makes it quite inconvenient for backing up, etc.

    Is there a specific reason this plugin needs to store so much information that couldn’t be stored in Carts Guru’s own backend ?

    We will be asking our customer to switch marketing platform if this keeps getting bigger for no apparent reason.

Viewing 1 replies (of 1 total)
  • Thread Starter lewebsimple

    (@lewebsimple)

    This is caused by WC session being uninitialized for logged-out users, thus generating a new cart for every request to the site.

    Forcing the session initialization prevents most of the cart duplication:

    
    add_action( 'woocommerce_init', 'yourtheme_woocommerce_init_session' );
    function yourtheme_woocommerce_init_session() {
    	if ( ! WC()->session->has_session() ) {
    		WC()->session->set_customer_session_cookie( true );
    	}
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Database gets huge’ is closed to new replies.