woothemes/woocommerce — pull request #1617 by IBaklanov (2012-10-17 18:45:19+00:00)
Title: Woo Sessions - Cookie expires customization (corrected EOL)

Hi!

In some cases developers migth want to have control over woo session cookies expiration time. For example, I want to be able to track guest-visitors (not logged in) to see whether it's their first visit this month, or if they previously have visited this particular category/page, etc. Currently cooke lifetime is hard coded as 48 hours.

By applying this update one can change cookie expiration time with the following code:
```php
$woocommerce->session->set_cookie_expires(60*60*24*7);
```

Also you can regenerate cookie every visit by adding "true" as a second parameter (could be useful as guests can visit your shop from search once in a while and you don't want to lose "history"):
```php
$woocommerce->session->set_cookie_expires(60*60*24*7,true);
```
p.s. corrected EOL