Statistics: Posted by Jason Caldwell — May 13th, 2011, 3:55 pm
Statistics: Posted by dethier — May 13th, 2011, 10:12 am
it appears that s2Member will always reset the EOT for the subscription length of the latest purchase. Is that what happens?
<?php
add_action ('ws_plugin__s2member_during_paypal_notify_during_before_subscr_signup_w_update_vars', 'during_before_subscr_signup_w_update_vars');
function during_before_subscr_signup_w_update_vars ($vars = array ())
{
$GLOBALS['existing_s2_eot_time'] = get_user_option ('s2member_auto_eot_time', $vars['user_id']);
}
add_action ('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars', 'during_subscr_signup_w_update_vars');
function during_subscr_signup_w_update_vars ($vars = array ())
{
if (($eot_time = get_user_option ('s2member_auto_eot_time', $vars['user_id'])) && $GLOBALS['existing_s2_eot_time'])
update_user_option ($user_id, 's2member_auto_eot_time', $eot_time + ($GLOBALS['existing_s2_eot_time'] - time ()));
}
?>
Statistics: Posted by Jason Caldwell — May 13th, 2011, 4:06 am
Statistics: Posted by dethier — May 11th, 2011, 10:22 pm