D
D
DanilaBodrov2017-09-04 23:11:47
WordPress
DanilaBodrov, 2017-09-04 23:11:47

How to cache product in woocommerce cart?

Hello. Please help.
When a customer puts a product in the cart the next time they visit the site, the product must remain there.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yurka Blokhin, 2017-09-05
@blrik

cookies are used for this

D
dubart, 2017-09-06
@dubart

https://docs.woocommerce.com/wc-apidocs/source-cla...
add_filter('wc_session_expiring' , 'f1' );
add_filter('wc_session_expiration' , 'f2' );
static function f1($seconds) {
return xxx; // any time in seconds
}
static function f2($seconds) {
return 60 * 60 * 24 ; // for example, days in seconds
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question