Ad
Change Wp_woocommerce_session_ Cookie
Woocoomerce sets the Cookie wp_woocommerce_session_ , the duration of this cookie is 2 days. It contains a unique code for each customer so that it knows where to find the cart data in the database for each customer.
How can it set the duaration to 7 days, so that the cart data is not deleted after 2 days?
Can anyone help me?
Ad
Answer
You can use the following filter:
add_filter( 'wc_session_expiration', function(){
return 60 * 60 * 24 * 7;
});
You'll find the source for that filter over here.
Ad
source: stackoverflow.com
Related Questions
- → CORS missmatch because of http
- → Building sitemap for 2 wordpress install under 1 domain
- → How to remove empty elements after class?(jQuery)
- → Get width of an element and apply to another relative to the first one?
- → How to remove caption p class from wordpress?
- → 301 Redirection from no-www to www in wordpress
- → Laravel 5 routing using prefix
- → WordPress - Header position Top, Left &Right
- → how to add rel=nofollow to some specific external links in wordpress
- → octobercms install error: database is not empty?
- → How to edit the index page of wordpress theme?
- → How to select a Post Type (Wordpress) to pass a filter in head?
- → What sort of URL structure should be used to display AMP HTML vs vanilla HTML
Ad