Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Adjusting Paywall Cookie Expiry Time
This code snippet modifies the default expiration period (30 days) for the MemberPress paywall cookie. The code will set the cookie to expire after a specified number of days.
To set the duration of the paywall cookie, replace X with the actual number of days (whole numbers only), on this line:
$expire_time = (time() + 60 * 60 * 24 * X);
For example, replacing X with number 7 will set a one-week expiration period for the cookie.
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
Comments