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™
lucjager wrote:If i am a custommer i registrer on 1 april 2011, but i would like to see that this account will be demoted to a free subscriber on a fixed date which i can set in the s2member button option like 23 april 2011.
<?php
$now = strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>
[s2Member-Pro-PayPal-Form ... ra="10.00" rp="<?php echo $days_until_fixed_time; ?>" rt="D" rr="BN" /]
p.s. is it possible to open an "paying" support part of the forum which is dedicated to the pro version of the plugin?
Jason Caldwell wrote:Yes, you can do something like this.
But this requires s2Member Pro Form integration.* The Shortcode in this example has been abbreviated for clarity.
- Code: Select all
<?php
$now = strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>
[s2Member-Pro-PayPal-Form ... ra="10.00" rp="<?php echo $days_until_fixed_time; ?>" rt="D" rr="BN" /]
And just as important, where can that "$days_until_fixed_time code" live?
Can I simply have it in the template for my form along with the rest or must it live in theme functions?
<?php
$now = strtotime("now");
$fixed_time = strtotime("30 April 2011");
$days_until_fixed_time = round(($fixed_time - $now) / ($seconds_in_one_day = 86400));
?>
Jason Caldwell wrote:You could *try* this with Buttons, but it gets VERY hairy, because unlike s2Member's Pro Form integrations, PayPal requires your "Button" code to adhere to specific limitations they have at PayPal regarding a maximum number of days.
The PHP code that I posted could go right inside your Post/Page that contains the Shortcode, but you will need to install the PHP Execution plugin for that to work. ... I recommend the PHP Execution route, because that keeps the variables confined only to the scope of the Shortcode, as it exists inside a particular Post/Page, thereby reducing your risk of creating a plugin conflict within WordPress.
Jason Caldwell wrote:If you integrate this with Buttons ( that is, if you manage that ), then no, you don't need to worry about PayPal Pro or any additional recurring services...
I don't mean to be a stickler but what do you mean "it's best to have a PayPal Pro account"?However, if you choose to integrate this with s2Member Pro Forms, then yes; it's best to have a PayPal Pro account...
Yes, the PHP Execution plugin allows you to incorporate PHP tags into your Shortcodes as well....
D – for days; allowable range is 1 to 90
W – for weeks; allowable range is 1 to 52
M – for months; allowable range is 1 to 24
Y – for years; allowable range is 1 to 5
"ws_plugin__s2member_during_configure_user_registration_front_side"
"ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars"
"ws_plugin__s2member_during_paypal_notify_during_subscr_modify
Cristián Lávaque wrote:Do you mean this hack? viewtopic.php?f=4&t=14384&p=30321#p30321
Well, you can just add more actions with the same function.
Users browsing this forum: No registered users and 1 guest