Created
May 22, 2025 21:16
-
-
Save jeremysimmons/4a74938290b3f27f92bb1d405e464a0f to your computer and use it in GitHub Desktop.
extend woocommerce cart session cookie
This file contains hidden or 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
add_filter('woocommerce_cookie_expiration', 'extend_woocommerce_cart_cookie_expiration'); | |
function extend_woocommerce_cart_cookie_expiration($expiration) { | |
return 60 * 60 * 24 * 14; // 14 days in seconds | |
} | |
add_filter('auth_cookie_expiration', function($expire, $user_id, $remember) { | |
return 60 * 60 * 24 * 14; // 14 days | |
}, 10, 3); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment