woothemes/woocommerce — pull request #5292 by kloon (2014-04-08 07:42:51+00:00)
Title: Fix _wc_session_expires autoloading

We discovered in excess of 10k rows autoloading.

After a cleanup is run it will delete all session options from the options table, however in the constructor of the session handler class it check for the cookie on the customer's computer and then just call an update_option on the session expires option based on the cookie data, resulting in an autoloading option being added as it was removed prior with the cleanup.

This PR first checks if the option exists before updating it and if not exist adds it without autoloading it.