Home / Admin / Custom Cart Expiration
Duplicate Snippet

Embed Snippet on Your Site

Custom Cart Expiration

Sets the cart expiration to a custom value with database sessions.
https://easydigitaldownloads.com/docs/edd_use_php_sessions/

Code Preview
php
<?php
/*
 * Sets the cart expiration to 48 hours
 */
function pw_edd_set_cart_expiration( $seconds ) {
	return 172800; // 48 hours in seconds
}
add_filter( 'wp_session_expiration','pw_edd_set_cart_expiration', 999990 );

Comments

Add a Comment