[WooCommerce Core] Change default cart session length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Sets when the session is about to expire | |
add_filter( 'wc_session_expiring', 'woocommerce_cart_session_about_to_expire'); | |
function woocommerce_cart_session_about_to_expire() { | |
// Default value is 47 | |
return 60 * 60 * 47; | |
} | |
// Sets when the session will expire | |
add_filter( 'wc_session_expiration', 'woocommerce_cart_session_expires'); | |
function woocommerce_cart_session_expires() { | |
// Default value is 48 | |
return 60 * 60 * 48; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment