|
NO answer? … any help is appreciated.
|
|
I used the following line to set an EOT
update_user_option( $user_id, 's2member_auto_eot_time', $expire_on );
|
|
|
|
I am also looking into implementing something like this. Any help would be appreciated.
|
|
Why has there been no response? Not even to say you can’t. Poor Support.
|
|
|
|
I got it to work with a few hooks. I am posting the code below for anyone who would like to use it. I am posting this as well for the moderators/programmers to see if there is an easier way to do this.
in s2hacks.php (in mu-plugins)
function save_tos_profile_modifications( $defined ) {
if( !$defined['fields_applicable'] || !in_array( 'tos', $defined['fields_applicable'] ) )
return;
if( isset( $defined['_p']['ws_plugin__s2member_profile_tos'] ) ) {
global $current_user;
if( isset( $defined['fields'] ) )
$fields = $defined['fields'];
else
$fields = array();
$fields['tos'] = $defined['_p']['ws_plugin__s2member_profile_tos'];
update_user_option ($current_user->id, 's2member_custom_fields', $fields);
}
return;
}
add_filter( 'ws_plugin__s2member_during_handle_profile_modifications', 'save_tos_profile_modifications', 10, 1);
function configure_tos_editable( $configured, $defined) {
if( isset( $defined['field'] ) )
if( $defined['field']['id'] == 'tos' )
array_push( $configured, 'tos' );
return $configured;
}
add_filter( 'ws_plugin__s2member_custom_fields_configured_at_level', 'configure_tos_editable', 10, 2 );
The first function will save the tos to the member profile. Just because you sent the new value of tos didn’t make the function save it. This will make the function always save it if it is present. The second function will allow the field to be visible. Before, it will block the showing of the field due to my current setup of not editable and hidden after registration.
I also used the code previously posted. Hope this helps someone.
|
|
was a double post … see below
-
This reply was modified 3 years, 3 months ago by RM.
|
|
Thanks for the help.
I am having a new problem. I am unable to edit the field using s2member. Here is what I have:
function tos_agreement_check( $obj ) {
if( is_user_not_logged_in() )
return;
$agreed_to_tos = get_user_field( 'tos' );
if( $agreed_to_tos )
return;
if( $obj->request != 'my-account' ) {
wp_redirect( home_url( '/my-account' ) );
}
return;
}
add_action( 'wp', 'tos_agreement_check' );
And to display the field:
<form method="post" name="accept_tos" id="accept_tos" action="<?php echo esc_attr (site_url ("/")); ?>">
<?php echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (true, $custom_fields['tos']['config'], 'ws_plugin__s2member_profile_', 'ws-plugin--s2member-profile-', 'ws-plugin--s2member-profile-field', '', 1, '', $custom_fields, $agreed_to_tos, '');?>
<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="<?php echo esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")); ?>" />
I can get to the point of it alerting me that the profile has been saved, but it hasn’t. I figured out that the reason is because I have it noteditable after registration. Is there anyway to bypass this. I have not found a way to do this without setting the field to editable. I only want it editable on registration and at this certain place.
Thanks in advance,
|
|
I need this to be handled immediately please. I would appreciate any and all help. Please help asap.
|
|
3. PayPal® Pro ($30/mo + optional Recurring Billing service) = $60/mo total.
PayPal pro is only available in the US (including Alaska/Hawaii), the UK, and Canada.
This allows you to keep Customers on your site throughout the entire checkout process. You can accept Visa, MasterCard, Amex, Discover, Maestro, Solo, and ALSO offer PayPal® as an option to those who prefer to pay with PayPal®.
The above quote is from “Knowledge Base » PayPal® Services / A Quick Comparison.” I do not understand how this is true if they select paypal as their payment for subscription.
So my reworded question is ….
How do I allow a customer to purchase/upgrade a subscription with paypal and keep them on our site. It says …
This allows you to keep Customers on your site throughout the entire checkout process.
How do I achieve this?
|
|
Is the only paypal way to checkout for a subscription, besides credit cards, express checkout?
|
|
I have enabled Paypal Pro on my test account. I do see that I have recurring payments enabled and running as well. With these all working on my test site (paypal), what else do I need in order to keep the user on my website? If I understood “Knowledge Base » PayPal Pro, PayFlow, DPRP, Express Checkout” page, the user must still login to paypal if selling subscription. Do they have to go to paypal.com to do that or can they stay on my site?
|
|
So by disabling all plugins (except s2member) and changing theme to twenty ten and then activating all plugins and changing theme back to custom it works. Weirdest thing ever. I am now having a problem with payment. I have selected paypal and then checkout with paypal, it goes to paypal.com. I thought everything was handled in pro forms on my site. I prefer the user to NOT leave my site. Also, how do I test credit cards inside s2member pro forms? Is there fake information that I can put in?
Thanks in advance.
|
|
I am not sure if I should start a new thread or not. Let me know if I should. Thanks again.
|
|
I am glad you figured it out. I am not using multi-site. So this does not help me. :( I am still trying to figure this out. I am hoping support can help me.
|
|
So, the problem lies with the “\s2member\includes\classes\css-js-in.inc.php” file not loading the constants.
I have no problem with this page. S2MEMBER_CURRENT_USER_IS_LOGGED_IN is true when logged in and false when not. That just sets the global variable for javascript and does work correctly.
|
|
I am logged in as an administrator on one browser and it gives the “Create Profile”. On a different browser (different session) I am logged in as a free member and still get the “Create Profile”. And on a third browser, I am logged in as a paid member and still see the “Create Profile.” I will continue to dig deeper
|
|
I have been looking into the code and noticed that the create profile shows no matter what. If a user is logged in, is there a way not to show it with the fields filled in? Maybe I am overlooking this, but why would you show their information? Is it for paypal’s purposes?
|
|
I have been reading the code and was unable to see any detection of a user being logged in or not and what to display if there was. Not even a check by global variables. It seems to always show up no matter what. Still looking into this.
|
|
I am having the same problem. I would like some debugging help. I can’t imagine any plugin or theme that can interfere with this part of the code, besides another member plugin, which I don’t have. Looking forward to a response. Thanks in advance.
|