Cart Holding Time | WordPress.org

[ad_1]

Hi @nmd78,

That won’t work because you need to use a function as a callback to the add_filter function and in this case you are using an integer.

The code in your case should look like this:

add_filter('wc_session_expiring', function( $time ) { return 180; });
add_filter('wc_session_expiration' , function( $time ) { return 180; });

Please note that by default, WooCommerce has 47 hours for the first one and 48 hours for the second so I’m not sure about the effects of having the same value for both. The value there is in seconds so 180 will result in 3 minutes.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer