Skip to content

Instantly share code, notes, and snippets.

@tharmann
Forked from lukecav/functions.php
Created March 2, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tharmann/082a8aa470013b748e9c46767afb72df to your computer and use it in GitHub Desktop.
Save tharmann/082a8aa470013b748e9c46767afb72df 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment