Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created October 3, 2017 17:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lukecav/91ff53d3d228587dfa3e1937670b4f58 to your computer and use it in GitHub Desktop.
Save lukecav/91ff53d3d228587dfa3e1937670b4f58 to your computer and use it in GitHub Desktop.
Set cart expiration interval to 72 hours in WooCommerce
add_filter('wc_session_expiring', 'filter_ExtendSessionExpiring' );
add_filter('wc_session_expiration' , 'filter_ExtendSessionExpired' );
function filter_ExtendSessionExpiring($seconds) {
return 60 * 60 * 71;
}
function filter_ExtendSessionExpired($seconds) {
return 60 * 60 * 72;
}
@lukecav
Copy link
Author

lukecav commented Oct 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment