latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Jason (Lead Developer)

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 826 through 850 (of 1,909 total)
Author Replies
Author Replies
Posted: Saturday Jan 19th, 2013 at 9:36 pm #38360
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

This KB article talks more about this topic. Please see:
Knowledge Base » Customizing Your Login Welcome Page

So, if i use the specific URL option for the welcome page will i have some mess like this: http://mydomain/school-1,cccap1,ccap2,ccap3 –?

Yea, not good. FYI: Custom Capabilities would be hyphen-delimited in a URL like this, not comma-delimited.

I would consider using s2Member’s Login Redirect Filter for this, in PHP code.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

<?php
add_filter('ws_plugin__s2member_login_redirect', 'my_login_redirect', 10, 2);
function my_login_redirect($what_s2_says, $vars = array())
	{
		$user = $vars&#91;'user'&#93;;
		
		if($user->has_cap('access_s2member_ccap_music'))
				return 'http://www.example.com/lwp-music-group/';
				
		else return $what_s2_says;
	}
Posted: Saturday Jan 19th, 2013 at 9:16 pm #38358
Staff Member

Thanks for the follow-up :-)

What is your fault then?

If you can provide information that shows we failed to deliver a product that performs advertised, as I said previously, we’ll be happy to offer you a refund. We don’t want to rip anyone off. If we’ve sold you a product which fails to perform as advertised, then it would be understandable to ask for a refund, absolutely.
However, we will NOT provide refunds for digital non-tangible, irrevocable, software — unless there is a circumstance which warrants this, as I just described.

You are right. We VERY rarely provide refunds, simply because we make it a point NOT to advertise something that is not possible with our software. We expect you to get what you paid for. If you did not, we will be happy to give you a refund, and make it a point to change and/or modify what was broken, or what was confusing, etc.

Example Of A Valid Refund Request

A customer writes…
s2Member was advertised to provide “feature X” (at s2Member.com), but this feature is not working properly. I contacted a Support Rep in the s2Member Forums about this. After attempting to resolve the issue, and after I tried all possible solutions presented to me by s2Member Support Reps, feature X is still not working on a clean installation of WordPress with no other plugins (except s2Member), and I’m running a default WordPress theme.

~ Refund granted by s2Member®

I will leave this thread open for you. If you can provide us with a clear violation, please do. If you have indeed been shorted by our product, I would like to know about it. We would certainly issue you a refund in that scenario. However, so far you’ve only stated this reason for your request.

When I uninstall s2member the other plugins work correctly. This is an issue only with s2member pro installation. I understand that you cannot guarantee the plugin compatibility with other plugins, but you do guarantee installation and in this case it does not install without breaking other aspects of my site.

Other aspects of your site being 3rd-party components and plugins, which, as I mentioned previously, are absolutely NOT covered by our terms of service. We sell and support s2Member, not WordPress itself, or other 3rd party components, plugins, themes, etc.

Posted: Saturday Jan 19th, 2013 at 8:46 pm #38357
Staff Member

That looks good. Here is a slightly different variation to give you an idea.

http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_is_protected_by_s2member()

Posted: Saturday Jan 19th, 2013 at 8:35 pm #38356
Staff Member

Thanks for the heads up on this thread :-)

Can I put %%full_coupon_code%% or %%coupon_code%% in the New User Notification email message?

Here is a simpler solution to this. Please follow the instructions below.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

Posted: Saturday Jan 19th, 2013 at 5:15 pm #38339
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

I got 3 different type membership: 30 days recurring, 60 days recurring and 90 days recurring
All of them access the same protected content. The only differences are the length of membership and price.
Am I need to create different access level to these membership type? Or just put them all into level 1 is ok?

Yes, it is perfectly OK to do that in the way you’re describing. With s2Member® you can generate multiple ccBill Buttons, all providing access to the same thing, but at different prices and terms. This is true for any of s2Member’s Payment Buttons and/or Pro Forms.

Posted: Saturday Jan 19th, 2013 at 5:08 pm #38338
Staff Member

Details received again. Still the same issue.

Posted: Saturday Jan 19th, 2013 at 5:05 pm #38337
Staff Member

Thanks for the follow-up :-)

That doesn’t really make sense since those that pay and join ARE level 1 members – so they are the only ones that should see this page. However, i did change the page to level zero as you suggested and it still didn’t work.

If you are absolutely sure that only existing Members at Level #1 or higher, will ever reach this Page (and they are always logged into the site when checkout occurs), then yes; it’s fine to leave it protected. If there could potentially be a customer that is currently NOT a Member at Level #1 or higher (or not logged in), the Thank-You page you’ve configured would redirect again, because the customer who is checking out would not have access until checkout is completed and they’ve logged-in.

Also, since you’ve been in we are now not seeing the form displayed on our affiliate registration page: http://tsnsuccess.com/affiliate-registration/

I am seriously wondering if this will ever end…

I’m not seeing a Pro Form on this page when visiting it publicly. Maybe that’s by design.
In either case, I have not adjusted anything on your site. We ran diagnostics only, by request.


Update: Further testing has revealed that even though users that go thru successful registration do not see our thank you page, they are able to login as paid members (a step in the right direction!). However, when a member clicks on logout they are taken to a page not found (404) error.

This is something new again. What is with all these redirect errors? These are all items that worked fine in previous tests. Is there some explanation for this?

I’ve been unable to reproduce this on a clean installation of WordPress. I can confirm the functionality you are attempting to accomplish works properly in an installation of WordPress v3.5 running s2Member and s2Member Pro v130116. Tested today.

I suggest that you continue testing, but do so on a clean installation of WordPress with no other plugins active, and running a default WordPress theme. If you can reproduce the problems you’re reporting in a clean installation of WordPress, please let us know. We take bug reports seriously, but we cannot debug other themes/plugins running in concert with s2Member.

Please see this article for some clarification on this: s2Member® » Support Policy


FYI: The Security Encryption Key you’ve configured for your installation of s2Member® is less than the recommended 60 characters. I suggest that you update this value to prevent unexpected behavior.

Please see: Dashboard -› s2Member® -› General Options -› Security Encryption Key

FYI: You have a corrupted s2Member Pro Form shortcode in your /registration/ page.

[s2Member-Pro-AuthNet-Form level="1" ccaps="" desc="One year TSN membership - $139 USD (Canadian residents add GST / HST)" cc="USD" custom="tsnsuccess.com" ta="0" tp="0" tt="D" ra="1.00" rp="1" rt="Y" rr="0" rrt="" accept="visa,mastercard" coupon="" accept_coupons="0" default_country_code="Canada" captcha="0"

The end of this shortcode has been cut-off. It also does NOT contain the success attribute that you’re reporting problems with. Please regenerate your Pro Form shortcode here:
Dashboard -› s2Member® -› Authorize.Net® Pro Forms

FYI: You have several WordPress Pages that contain raw HTML code, but I’m not seeing any theme/plugin installed that would prevent WordPress content filters from mangling this. If you’re going to use things like JavaScript snippets, etc, in a WordPress Post/Page, I recommend this plugin. Please see: http://wordpress.org/extend/plugins/raw-html/

Please let us know if problems persist after correcting these issues :-)

Posted: Saturday Jan 19th, 2013 at 4:26 pm #38331
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

Regarding this EOT/deletion type: auto-eot-cancellation-expiration-demotion

This occurs whenever s2Member’s Auto EOT System (powered by WP Cron) finds a User/Member with an EOT Time that is less than or equal to the current time (e.g. the time at which the CRON job is running). In other words, this event occurs whenever an EOT or deletion occurs, as a result of a customer having been associated with an Auto-EOT Time. s2Member expires the account at the specified Auto-EOT Time.

See: WordPress® -› Users -› Edit any User account and find this section.

It is possible for a User to be demoted (or even deleted) when an EOT occurs (based on your EOT Behavior configuration in s2Member). If they are simply demoted (the default behavior), in the future they might upgrade and/or purchase something new, causing the account to be re-instated. I think this is what you’re describing.

There is no way for s2Member to predict what the customer will do in the future, so all you can do is listen for EOT/Deletion events and react based on what is happening at the present time.

Is it possible if they’re renewing a subscription this would get triggered?

It’s possible. I’m not aware of this occurring, but it IS possible. It just depends on what (if any) notifications that your payment gateway is sending back to your server for s2Member® to process during an account upgrade/downgrade. You can use s2Member’s API Notification for EOTs/Deletions, to listen for events like this.

See: Dashboard -› s2Member® -› API / Notifications -› EOT/Deletion Notifications

If you would like us to review your s2Member log files, we might be able to tell you more about any EOT events that are occuring on your installation, immediately followed by a renewal. If you’d like us to review your log files, please submit those privately. See: s2Member® » Private Contact Form

Please let us know if problems persist :-)

Posted: Saturday Jan 19th, 2013 at 4:05 pm #38326
Staff Member

Thanks for your patience.

I’ve just reviewed your server and s2Member® log files. I can tell from your log files that you have HTTP connections failing whenever s2Member® is attempting to make contact with it’s core PayPal® IPN processor. This occurs during Specific Post/Page Checkout at random, for a reason which is yet to be determined. This is why you have emails missing, because s2Member is failing is complete post-processing on some transactions.

I can confirm that s2Member® functions properly in this respect, on a clean installation of WordPress v3.2+. Therefore I must assume, at least at this point, this is an installation-specific issue. In order to determine the underlying cause of these HTTP connection failures, please implement the HTTP debugging tool that we’ve documented here. Feel free to post the additional log file(s) produced by this tool, and we will review them with you. See: Knowledge Base » Debugging HTTP Connections

Please let us know if problems persist :-)

Posted: Saturday Jan 19th, 2013 at 3:38 pm #38324
Staff Member

Thanks for your patience.

~ Details received, but we were unable to access your Dashboard for the purpose of running diagnostics.

Posted: Saturday Jan 19th, 2013 at 3:36 pm #38322
Staff Member

Posted: Saturday Jan 19th, 2013 at 3:25 pm #38317
Staff Member

Thanks for your patience Conor.

~ Details received. Investigating now.

Posted: Saturday Jan 19th, 2013 at 3:24 pm #38316
Staff Member

Thanks for the follow-ups :-)

That’s great! I really appreciate you following up here. Thank you!

Posted: Thursday Jan 17th, 2013 at 11:12 pm #38006
Staff Member

Interesting! Thank you. I’m going to review this shortly!

Posted: Thursday Jan 17th, 2013 at 11:07 pm #38005
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

I’m sorry. No, not without integration through a payment gateway.

At this time, I’m only aware of PayPal. PayPal accounts can be funded by an eCheck, and customers can complete checkout via PayPal, using their checking account instead of credit card — if they choose to.

Please see: Knowledge Base » PayPal® Pro (PayFlow Edition)

Posted: Thursday Jan 17th, 2013 at 11:02 pm #38004
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

To Clarify; Do we need to have PayPal Pro to accept payments on our site, or are there other PayPal services we can use, if we use the Pro Form, provided by s2Member?

Please see this KB article regarding s2Member’s compatibility with products by PayPal.
Knowledge Base » PayPal® Pro (PayFlow Edition)

See also: Pre Sale FAQs » To use s2Member® Pro Forms, will I have to use PayPal® Pro?


Please let us know if you have any other questions/concerns.

Posted: Thursday Jan 17th, 2013 at 10:58 pm #38003
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

1. if we plan to install Pro on both a live site and a test site, does that require an Unlimited-Site License, or is a Single-Site sufficient?

Yes, it’s fine to do this. There is nothing in the software to prevent you from accomplishing this.

2. Is it possible to upgrade from one license to another in the future?

Absolutely. You will find upgrade links on your My Account page after you become a customer.


Please let us know if you have any other questions/concerns.

Posted: Thursday Jan 17th, 2013 at 10:54 pm #38002
Staff Member

Thanks for the heads up on this thread :-)

The wp_authenticate function is what logs a user into WordPress. Luckily, WordPress makes this a pluggable function. Meaning, you can define it yourself, and WordPress will use your version of the function instead of it’s default version.

Here is the default version of the function in WP v3.5.

/**
 * Checks a user's login information and logs them in if it checks out.
 *
 * @since 2.5.0
 *
 * @param string $username User's username
 * @param string $password User's password
 * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object.
 */
function wp_authenticate($username, $password) {
	$username = sanitize_user($username);
	$password = trim($password);

	$user = apply_filters('authenticate', null, $username, $password);

	if ( $user == null ) {
		// TODO what should the error message be? (Or would these even happen?)
		// Only needed if all authentication handlers fail to return anything.
		$user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
	}

	$ignore_codes = array('empty_username', 'empty_password');

	if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {
		do_action('wp_login_failed', $username);
	}

	return $user;
}

A modified version might look something like this.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

/**
 * Checks a user's login information and logs them in if it checks out.
 *
 * @since 2.5.0
 *
 * @param string $username User's username
 * @param string $password User's password
 * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object.
 */
function wp_authenticate($username, $password) {
	$username = sanitize_user($username);
	$password = trim($password);

	$user = apply_filters('authenticate', null, $username, $password);

	if ( $user == null ) {
		// TODO what should the error message be? (Or would these even happen?)
		// Only needed if all authentication handlers fail to return anything.
		$user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
	}
	else if($user->has_cap('s2member_level1')) // A Level #1 Member?
		{
			$deny = TRUE; // Deny these Members?
			
			if($deny)
				{
					$user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: You have been denied access at this time. Please try again later.'));
				}
		}

	$ignore_codes = array('empty_username', 'empty_password');

	if (is_wp_error($user) && !in_array($user->get_error_code(), $ignore_codes) ) {
		do_action('wp_login_failed', $username);
	}

	return $user;
}
Posted: Thursday Jan 17th, 2013 at 10:42 pm #38000
Staff Member

Thanks for the heads up on this thread :-)

@Gary Cook

Yes, this is possible with iDevAffiliate/s2Member. Please see this section in your iDevAffiliate Dashboard. This can be integrated together with s2Member using the “Create Affiliate Account” script provided by iDev, and s2Member’s API Notification for the Registration event.


See: iDevAffiliate -› Advanced Developer Tools -› API Scripts


See: Dashboard -› s2Member® -› API / Notifications -› Registration Notifications

What you’re doing is pasting a special URL for s2Member to process during each customer registration. s2Member will contact your iDevAffiliate installation through this URL, and iDevAffiliate creates a matching affiliate account within it’s database.

The URL that you give to s2Member might look like this.

http://example.com/idevaffiliate/API/scripts/new_affiliate.php?secret=xxxxxxx&username=%%user_login%%&password=%%user_pass%%&email=%%user_email%%
Posted: Thursday Jan 17th, 2013 at 9:39 pm #37993
Staff Member

Thanks for the heads up on this thread :-)

Regarding PayPal ERP. If you integrate with Pro Forms (recommended), you will have no use for the ERP service. I’ve discussed this with Bruce, and I’m sorry for the confusion. ERP works with PayPal Standard Buttons only. If you are using s2Member Pro Forms, you’re integrating with PayPal Express Checkout and the optional PayPal ERP service is not needed or useful in this scenario.

ERP would be useful ONLY if you were planning to charge on a recurring basis, and only if you are NOT integrating Pro Forms, but instead using PayPal Standard Buttons.

To integrate s2Member Pro Forms (WITHOUT a PayPal Pro account), please see:
Pre Sale FAQs » To use s2Member® Pro Forms, will I have to use PayPal® Pro?

Posted: Thursday Jan 17th, 2013 at 9:32 pm #37989
Staff Member

Thanks for the heads up on this thread :-)

You might take a look at this WP function that would tell you what the current Page Template is, and then integrate PHP conditionals in your theme functions.php file, or maybe with an MU plugin file.

See: http://codex.wordpress.org/Function_Reference/get_page_template
See also: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

Posted: Thursday Jan 17th, 2013 at 5:18 pm #37949
Staff Member

Thanks for reporting this important issue.

Yes, I’ve seen this before. Some web hosts (servers), are configured NOT to allow PHP scripts to run from directories with 777 permissions. This is for added security. You might be able to serve static files from these directories, but accessing a PHP script will cause the server to trigger an error.

Solution: Set permissions to 755 (recommended) on all parent directories.

FYI: HostGator™ is known to do this.

Posted: Thursday Jan 17th, 2013 at 5:15 pm #37948
Staff Member

If you need to give MANY Users/Members a Custom Capability, here is an example script to accomplish it for you.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

<?php
add_action('init', 's2_update_customer_ccaps');
function s2_udpate_customer_ccaps()
	{
		if(!empty($_GET&#91;'s2_update_customer_ccaps'&#93;))
			{
				foreach(get_users() as $user)
					{
						$user = new WP_User($user->ID);
						$user->add_cap('access_s2member_ccap_members_only');
						// $user->remove_cap('access_s2member_ccap_additional_access');
					}
				exit;
			}
	}

Now run this by visiting:
http://www.example.com/?s2_update_customer_ccaps=yes


See also: http://codex.wordpress.org/Function_Reference/get_users
See also: http://codex.wordpress.org/Class_Reference/WP_User

Posted: Thursday Jan 17th, 2013 at 5:07 pm #37944
Staff Member

Thanks for your reply :-)

A. In the Page Restrictions area, in Level 1, enter all the IDs of all the restricted pages on the site.

That is correct.

B. Change all paying members of the site from Level 2 to Level 1.
Question: Would this not work if I just left the page restrictions on Level 2 and made all paying members Level 2?

Yes. Either way would be fine.

C. On a per page basis, give every single restricted page on the site the custom capability of “all”

Correct.

D. On a per page basis, give certain pages other custom capabilities, such as “limited”.

Correct.

E. Add the custom code to functions.php to support these custom groupings.

Correct.

Questions:
+ Is there anything else I need to do to make this work?

No. That would be it.


+ If I do it this way it seems that using tags won’t do much, as it will all be based on the custom capabilities. I was hoping I could create the custom capabilities groupings using tags alone, as opposed to adding custom capabilities labels to every single page.
+ Is there any way to bulk assign custom capabilities, as we have many pages on our site?

I’m VERY glad you’re asking this question, because with everything listed above, that’s a LOT of manual work to implement and maintain. Instead of trying to implement all of this within the UI, all you really need to do is sell Custom Capabilities and assign Tags to your Posts as they’re being published. That’s easy enough.

So in the following example, we might have two Tags that we use.

1. If I publish a new Post that requires Membership, I would give it the Tag members-only.

2. If I publish a new Post that requires Membership, but it ALSO requires some additional paid access (e.g. an additional Capability), I would give it both of these Tags.
members-only, additional-access-required.

Of course, you can name your Tags whatever you prefer.

Now… You might have something like this, which would encompass everything you’re trying to accomplish here, in a more custom way, for your business model.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

<?php
add_action ('wp', 'my_custom_capability_handler');

function my_custom_capability_handler()
	{
		if(is_singular() && has_tag('members-only')) // Restricted?
			{
				if(!current_user_can('access_s2member_ccap_members_only'))
				// Is this a Member that I sold the Custom Capability: `members_only` to?
				// If NOT, we redirect them to the Membership Options Page so they can purchase.
					{
						header('Location: '.S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
						exit;
					}
				
				if(has_tag('additional-access-required')) // Also requires additional access?
					{
						if(!current_user_can('access_s2member_ccap_additional_access'))
						// Is this a Member that I also sold the Custom Capability: `additional_access` to?
						// If NOT, we redirect them to the Membership Options Page so they can purchase.
							{
								header('Location: '.S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
								exit;
							}
					}
			}
	}
&#91;/hilite&#93;
&#91;info_box&#93;
If you were to use something like this, all you do is sell Custom Capabilities. You're protecting your content by it's association with the Tags I listed above. Nice! The &#91;hilite path&#93;Dashboard -› s2Member® -› Restriction Options&#91;/hilite&#93; panel would not be used in a case like this, because you're implementing something more custom here.
&#91;/info_box&#93;

<h4>Recommended Reading/Viewing...</h4>
See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

Video » s2Member (Custom Capabilities)

Posted: Thursday Jan 17th, 2013 at 4:41 pm #37940
Staff Member

Thanks for reporting this important issue.

I reviewed your report about this from the past, including the log entries you posted. I’d like to see if there is something more going on than meets the eye. Please submit a Dashboard login privately so I can run diagnostics on your installation. Please use: s2Member® » Private Contact Form

Viewing 25 replies - 826 through 850 (of 1,909 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.