PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?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 ()));
}
?>
artEV wrote:4) Unfortunately, most of our members don't have Paypal accounts. They will only use their credit cards directly (without Paypal accounts). So there are no available shortcodes/scripts I could use to display their payment history at all?
Cristián Lávaque wrote:Buy Now
We need to improve this because the EOT Time needs to be incremented instead of reset to a completely new value. You'll need a hack similar to the one suggested for question (1).
artEV wrote:4) Unfortunately, most of our members don't have Paypal accounts. They will only use their credit cards directly (without Paypal accounts). So there are no available shortcodes/scripts I could use to display their payment history at all?
artEV wrote:Is the above code sufficient to cover both scenarios? If not, how would the code be needed to change in order to handle both of my Buy Now scenarios?
My 2 scenarios being: (i) user purchases an extension of current plan whilst current EOT still not up & (ii) user purchases an upgrade (higher level plan) whilst a lower level plan is still in effect (EOT for current plan not up)
I'm assuming here that extending and/or upgrading plans when a user's existing EOT is UP, will not be a problem - since S2M sees it as a 'new' purchase and not an extension/upgrade. Please correct me on this point is I'm wrong.
artEV wrote:Or would the system be smart enough to know its just 15 days Silver and subsequently 30 days Gold?
Cristián Lávaque wrote:
- Code: Select all
<?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 ()));
}
?>
No, you should NOT need to enter those manually. An EOT Time should be set immediately after checkout is completed when it's for fixed-term access, because s2Member will know ahead of time the exact date on which access should be denied. If it's not working this way for you, something is very wrong. The only case in which s2Member would NOT set an EOT Time for a Buy Now purchase with a fixed-term, is when the fixed term is for Lifetime access ( which would be the expected behavior ). If this problem continues, can you please post a copy of your Shortcode along with any details we need to reproduce this issue?drbyte wrote:Hi Jason
I have 6 transactions that is 4 days old and has not been demoted or canceled. The ETO is still blank. Do we have to manually cancel or demote the membership if we use the One Time ( for X day access, non-recurring )?
Access days: 3 Days
Transactions date: July 23th, 2011
Thank you
Sam
Users browsing this forum: No registered users and 1 guest