diff --git a/classes/class-wc-session-transients.php b/classes/class-wc-session-transients.php index 574fce55df7..ca7911c233a 100644 --- a/classes/class-wc-session-transients.php +++ b/classes/class-wc-session-transients.php @@ -103,7 +103,7 @@ class WC_Session_Transients extends WC_Session { * @return void */ public function save_data() { - // Set cart data - set_transient( 'wc_session_' . $this->_customer_id, $this->_data, $this->_cookie_expiration ); + if ( ! empty( $this->_data ) ) + set_transient( 'wc_session_' . $this->_customer_id, $this->_data, $this->_cookie_expiration ); } } \ No newline at end of file