Last active
August 7, 2021 12:55
-
-
Save mihdan/e66184df195a775a6c46a5090e2d9bfe to your computer and use it in GitHub Desktop.
Время жизни серверной сессии в WordPress при использовании плагина wp-session-manager (например он интегрирован в WooCommerce)
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
<?php | |
/** | |
* Время жизни серверной сессии при использовании плагина wp-session-manager | |
* (например, он интегрирован в WooCommerce) | |
* | |
* @link https://github.com/ericmann/wp-session-manager | |
* | |
* @param int $length - секунды | |
* | |
* @return int | |
*/ | |
function nchl_wp_session_expiration( $length ) { | |
return 60 * 60 * 24 * 30; | |
} | |
add_filter( 'wp_session_expiration', 'nchl_wp_session_expiration' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment