Title: EOT not setting properly
Last modified: August 30, 2016

---

# EOT not setting properly

 *  [tsoheili](https://wordpress.org/support/users/tsoheili/)
 * (@tsoheili)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/)
 * I seem to be having problems with setting the EOT.
 * I have a number of different levels set up most are +1 year but we also have 
   a +2 years, +3 years and +10 days.
 * For example:
 *     ```
       if($_SESSION['free_trial']) {
               	$user = new WP_User($userid);
               	$user->set_role("s2member_level2");
       	        // Set membership expiration
       	        // 10 days
       	        $expire_on = date('Y-m-d', strtotime('+10 days'));
       	        update_user_option ($userid, "s2member_auto_eot_time", $expire_on);
       	        //echo $expire_on;
               }
       ```
   
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275203)
 * The “s2member_auto_eot_time” needs to be “Unix time”, you put a date.
 *  Thread Starter [tsoheili](https://wordpress.org/support/users/tsoheili/)
 * (@tsoheili)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275220)
 * i attempted the stringtotime()
 *     ```
       echo $expire_on = date('Y-m-d', strtotime('+10 days'));
       	        echo "<br>".$expire_on = strtotime(date('Y-m-d', strtotime('+10 days')));
       ```
   
 * 2015-07-08
    1436313600
 * Still failed. very strange.
 * [http://screencast.com/t/rrkRxraZp](http://screencast.com/t/rrkRxraZp)
 *  Thread Starter [tsoheili](https://wordpress.org/support/users/tsoheili/)
 * (@tsoheili)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275222)
 * [http://screencast.com/t/iyTY6of0Fi](http://screencast.com/t/iyTY6of0Fi)
 * those likes return the following:
 *     ```
       2015-07-08
       1436313600
       68370
       ```
   
 *  Thread Starter [tsoheili](https://wordpress.org/support/users/tsoheili/)
 * (@tsoheili)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275223)
 * Sorry this would be easier to see…
 *     ```
       echo $expire_on = date('Y-m-d', strtotime('+10 days'));
       	        echo "<br>".$expire_on = strtotime(date('Y-m-d', strtotime('+10 days')));
       	        echo "<br>".update_user_option ($userid, "s2member_auto_eot_time", $expire_on);
       ```
   
 * those likes return the following:
 *     ```
       2015-07-08
       1436313600
       68370
       ```
   
 *  Thread Starter [tsoheili](https://wordpress.org/support/users/tsoheili/)
 * (@tsoheili)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275224)
 * Im just ready to not have to manually update members’ EOT every time someone 
   registers.
 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275270)
 * Try this:
 *     ```
       if($_SESSION['free_trial']) {
               	$user = new WP_User($userid);
               	$user->set_role("s2member_level2");
       	        // Set membership expiration
       	        // 10 days
       	        $expire_on = strtotime('+10 days');
       	        update_user_option ($userid, "s2member_auto_eot_time", $expire_on);
       	        //echo $expire_on;
               }
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘EOT not setting properly’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [krumch](https://wordpress.org/support/users/krumch/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/eot-not-setting-properly/#post-6275270)
 * Status: not resolved