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 - 301 through 325 (of 1,909 total)
Author Replies
Author Replies
Posted: Friday Feb 15th, 2013 at 4:37 am #41812
Staff Member

Thanks for the follow-up :-)

Great to hear you resolved this. Thanks for letting me know!

Posted: Friday Feb 15th, 2013 at 3:53 am #41807
Staff Member

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

This can be accomplished by editing your Coupon Code Configuration file, and tying certain Coupon Codes to certain Posts/Pages where Pro Forms are served up to customers.

Please see: Dashboard -› s2Member® -› Pro Coupon Codes -› Coupon Code Configuration File

Posted: Friday Feb 15th, 2013 at 3:51 am #41804
Staff Member

Thanks for reporting this important issue.

That is actually the intended functionality :-)
Please see: Video » s2Member (Content Restriction Trouble?)

See also: Dashboard -› s2Member® -› Restriction Options -› Alternative View Protection
This will help you correct the situation with search results.

Posted: Friday Feb 15th, 2013 at 3:43 am #41800
Staff Member

Thanks for the heads up on this thread :-)

Here is an example showing how you might track User Role changes in WordPress® with more flexibility.

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_role_change_event_handler::init', 1);

class s2_role_change_event_handler
	{
		public static $current_user_id;
		public static $current_user_old_role;
	
		public static function init()
			{
				$current_user = wp_get_current_user();
				
				static::$current_user_id = $current_user->ID;
				static::$current_user_old_role = reset($current_user->roles);
				
				add_action('set_user_role', 's2_role_change_event_handler::event', 10, 2);
			}
		
		public static function event($user_id, $new_role)
			{
				if($user_id === static::$current_user_id && $new_role !== static::$current_user_old_role)
					{
						// Handle this role change event. The role for this User is changing.
						// Here you might have custom code that does something more.
					}
			}
	}
Posted: Friday Feb 15th, 2013 at 3:27 am #41797
Staff Member

Thanks for reporting this important issue.

What are the permissions set to on your /wp-content/ directory please?
What are the permissions set to on your /wp-content/plugins/ directory?
What are the permissions set to on your /wp-content/plugins/s2member-pro/ directory?

So far I’ve been unable to reproduce this, but if we duplicate your permission structure, perhaps we can get to the bottom of this. Also, who is your hosting provider please? Thanks!

Posted: Friday Feb 15th, 2013 at 3:19 am #41796
Staff Member

Thanks for the follow-up :-)

Glad to hear you resolved this! I appreciate the reply.

Posted: Friday Feb 15th, 2013 at 3:17 am #41794
Staff Member

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

Unless you know exactly what you’re doing (and have specific goals in mind), I don’t recommend adding any additional security plugins to WordPress®. The WordPress® software is already very secure, and so is s2Member®. I do recommend that you follow the guidelines here though, and attempt to qualify your site for an s2Member® Security Badge. See: Knowledge Base » s2Member® Security Badges

Posted: Friday Feb 15th, 2013 at 3:14 am #41792
Staff Member

Thanks for your reply :-)

I’m taking another look at your log files for recent activity. It appears that your Payflow API credentials are now passing through correctly (i.e. PayPal is authenticating your API calls now through the Payflow API).

I’m seeing several API calls to setup Express Checkout where a customer is redirected to PayPal to complete checkout. However, there is no recent activity to suggest that a customer ever returns from PayPal checkout; because there would be additional log entries that actually process the transaction using the TOKEN value that PayPal returns to s2Member®.

This is a local environment, hence the .local TLD, but I’ll test it out on production shortly. I’m curious about the return URLs.. Where is that configured, and why isn’t it using the IPN URL?

Express Checkout needs URLs to bring the customer back to after agreeing to your terms at PayPal checkout. This log entry does not indicate any transaction went through, it’s simply an API call that sets up an Express Checkout session. Did you actually complete checkout and return to your site?

Posted: Friday Feb 15th, 2013 at 3:02 am #41790
Staff Member

Thanks for your reply :-)

I just took at look at your Registration Form. I’m not sure what I’m missing here, but there is no Password field on that Pro Form. See attached screenshot (translated to English for my purposes).

Posted: Friday Feb 15th, 2013 at 2:55 am #41787
Staff Member

This code sample you posted previously is very close. However, one of your functions has the wrong name here.

function my_s2_signup_msg should be: my_s2_registeration_msg

Or maybe: my_s2_registration_msg

Very close. Looks pretty good overall. If you want to inspect the $vars array, you can check the debug.log file for all of the array keys this variable contains. In the functions below, you are logging this data already.

add_filter ("ws_plugin__s2member_registration_notification_email_sbj", "my_s2_registeration_sbj", 10, 2);
function my_s2_registeration_sbj ($s2member_default_sbj, $vars = array ())
{
	print_r($vars);
 	file_put_contents(WP_CONTENT_DIR."/debug.log", var_export($vars, true));

    return "testing registeration email subject";
}
add_filter ("ws_plugin__s2member_registration_notification_email_msg", "my_s2_registeration_msg", 10, 2);
function my_s2_signup_msg ($s2member_default_msg, $vars = array ())
{
	print_r($vars);
 	file_put_contents(WP_CONTENT_DIR."/debug.log", var_export($vars, true));
 	
    return "Thank you! You purchased:\n" . $vars . "\n\nPlease register now:\n" . add_query_arg("action", "register", wp_login_url ());
}

In this code sample you posted, you are sending email (which you won’t want to do on a live site).
You probably know this already, but just to point this out. These are filters, not actions. You simply return the custom email subject and message body.

add_filter (“ws_plugin__s2member_registration_notification_email_sbj”, “my_s2_registeration_sbj”, 10, 2);
function my_s2_registeration_sbj ($s2member_default_sbj, $vars = array ())
{
wp_mail(‘testemail’, ‘subject triggered’, ‘subject triggered’, $headers);
return “testing registeration email subject”;
}
add_filter (“ws_plugin__s2member_registration_notification_email_msg”, “my_s2_registeration_msg”, 10, 2);
function my_s2_registeration_msg ($s2member_default_msg, $vars = array ())
{
wp_mail(‘testemail’, ‘body text triggered’, ‘body text triggered’, $headers);
return “testing registeration email body text”;
}

If these Filters are not working during test transactions, please be sure that you are actually registering for a new account, and not modifying an existing one. There are two additional filters against a short modification email that s2Member sends as well. You can look these up in the s2Member source code if you like.

ws_plugin__s2member_modification_notification_email_sbj
ws_plugin__s2member_modification_notification_email_msg
Posted: Friday Feb 15th, 2013 at 2:43 am #41784
Staff Member

Thanks for reporting this important issue.

Please post a link to a page where it’s suppose to be displayed and we’ll take a look for you. I’m not sure how this could be a cross-browser issue because it’s just an IMG tag; but we’ll be happy to investigate it for you :-) Maybe there is something I’m missing. Thanks!

Unable to reproduce this in Google Chrome 24.0.1312.57 m
Posted: Friday Feb 15th, 2013 at 2:36 am #41783
Staff Member
Your recent log entries look great! Please let us know if you have further trouble.
Posted: Friday Feb 15th, 2013 at 2:29 am #41782
Staff Member

Thanks for your patience.

I manually created a user account for this individual, so the website did not create any transaction numbers. The customer e-mailed me the notices they received from PayPal, which includes an Automatic Payment ID. Is that the number to provide? If so, I will e-mail it privately.

If it was an ID they received as a result of a transaction that s2Member® processed, please send that over privately for review. However, it sounds like the Automatic Payment ID was sent in response to something you did manually at PayPal. Is that correct? If that’s the case, s2Member® will have very little information about this, and it’s not likely to help in diagnosing the issue. We need to see an ID related to a transaction that s2Member® processed for you (e.g. not one that was generated from the PP Virtual Terminal).

I have re-created buttons using PayPal Pro Buy Now and published them onto the Membership Options page.

I would like to keep Enable Logging Routines set to Yes until a few customers join under the new PayPal Pro buttons that I created.

OK. Thank you. I’m going to review your logs again for any activity after the 12th. Please stand by.

Posted: Friday Feb 15th, 2013 at 2:20 am #41781
Staff Member

Thanks for the follow-up :-)

Yes, your previous response where you are
attempting to confirm all of the details — you are absolutely correct on all points. Thank you.

I do have one more issue.

I have a database of 1500+ users that are currently at level 0 and obviously don’t have the wp_usermeta fields set the same as if they had registered using the Free signup form with the level=1.

What do I need to update/add to each user to move them to level 1 so that payment processing can proceed?

Thanks for your assistance.

If I understand correctly, these are just Free Subscribers right now, but you want to make them Members at Level #1 (which is really a free trial Member on in your business model). Assuming they have not paid you, all that’s required is to change their WordPress® Role to Level #1. That’s it :-)

You can do this in the Dashboard manually, or you can loop through Users in PHP and make this change.

<?php
foreach(get_users('role=subscriber') as $user)
	{
		$user = new WP_User($user->ID);
		$user->set_role('s2member_level1');
	}

See also: http://codex.wordpress.org/Function_Reference/get_users
See also: Knowledge Base » Changing Roles/Capabilities via PHP

Posted: Friday Feb 15th, 2013 at 1:18 am #41777
Staff Member

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

I assume you’re talking about importing s2Member® Options via serialized import files?
See: Dashboard -› s2Member® -› Import/Export -› s2Member® Options

No, there are no issues that I’m aware of :-) s2Member® IS equipped to deal with this in it’s import/export routines. That being said, this is not something that’s been extensively tested, so please let us know if you have any trouble.
Posted: Friday Feb 15th, 2013 at 1:13 am #41774
Staff Member

Thanks for the follow-up :-)

Great! Glad to hear you resolved this.

If you have Google Analytics code, you can pop that into the box in this section so it is loaded up on each page view in the footer section of your site. See: Dashboard -› s2Member® -› General Options -› Security Badge

Posted: Friday Feb 15th, 2013 at 1:11 am #41771
Staff Member
UPDATE: It is now possible to change the amount, either manually or programmatically.
See: http://www.s2member.com/forums/topic/modifying-monthly-recurring-amt-w-authorize/#post-41769
Posted: Friday Feb 15th, 2013 at 1:10 am #41769
Staff Member

Thanks for your patience.

Yes, it appears this IS now possible. If you’re looking for a way to update the amount dynamically (i.e. based on a custom event that you have on your site), here is a PHP function that will accomplish this 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
function update_authnet_arb_amount_for_user($user_id, $amount)
	{
		$xml = '<?xml version="1.0" encoding="utf-8"?>';
		
		$xml .= '<ARBUpdateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">';
		
			$xml .= '<merchantAuthentication>';
				$xml .= '<name>'.esc_html($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_authnet_api_login_id']).'</name>';
				$xml .= '<transactionKey>'.esc_html($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_authnet_api_trans_key']).'</transactionKey>';
			$xml .= '</merchantAuthentication>';
		
			$xml .= '<subscriptionId>'.esc_html(get_user_option('s2member_subscr_id', $user_id)).'</subscriptionId>';
			
			$xml .= '<subscription>';
				$xml .= '<amount>'.esc_html($amount).'</amount>';
			$xml .= '</subscription>';
			
		$xml .= '</ARBUpdateSubscriptionRequest>';
		
		$url = 'https://'.
			(($GLOBALS['WS_PLUGIN__']['s2member']['o']['pro_authnet_sandbox'])
			? 'apitest.authorize.net' : 'api.authorize.net').
			'/xml/v1/request.api';
		
		$req['headers']['Accept'] = 'application/xml; charset=UTF-8';
		$req['headers']['Content-Type'] = 'application/xml; charset=UTF-8';
		
		return c_ws_plugin__s2member_utils_urls::remote($url, $xml, array_merge($req, array('timeout' => 20)));
	}

Now, you would simply call upon this function when you need to update the amount a User/Member is being charged. Here we obtain the current User’s ID, and then we pass in the new amount we want to charge them.

<?php update_authnet_arb_amount_for_user(get_current_user_ID(), '20.00'); ?>

The recurring amount is now changed to bill 20.00 on each recurring interval going forward.

Posted: Friday Feb 15th, 2013 at 12:31 am #41766
Staff Member

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

I’m reviewing this topic now.

Posted: Friday Feb 15th, 2013 at 12:30 am #41765
Staff Member

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

Regarding access at different Levels without paying.
Please see: Video » s2Member (Free Registration On Multiple Levels?)

It also sounds like your business model would benefit from s2Member’s support for Custom Capabilities.
See: Video » s2Member (Custom Capabilities)

Please let us know if you have any other questions/concerns :-)

Posted: Friday Feb 15th, 2013 at 12:24 am #41764
Staff Member

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

I went into the ‘/plugins/s2member/images/’ and sure enough all images within that folder were updated 2/8/2013 2:17:22PM. I wouldn’t think of any images needing to be updated on a version update, but that’s just what happened in my situation.

This is the nature of WordPress®. Anytime you update a WP plugin, the procedure that WordPress® follows is to delete the existing plugin directory entirely, and replace it with the new version.

Therefore, if you have custom images, those really should live outside of the s2Member® plugin directory so they will survive updates. If you need to overwrite images, that customization will need to be reapplied after each update.

Posted: Friday Feb 15th, 2013 at 12:21 am #41763
Staff Member
Posted: Friday Feb 15th, 2013 at 12:19 am #41762
Staff Member

Thanks for your patience.

I ran the s2Member® Server Scanner on your installation and I found the following issue.

[NOTICE] WordPress® Home/Site URLsdismiss?
s2Member® recommends that your WordPress® installation be configured with a matching HOST name. This can be changed in the Dashboard, under: WordPress -› Settings -› General -› WordPress/Site URLs. Your current configuration does NOT match: hauntedattractionassociation.com

This is the underlying conflict that is causing a problem for s2Member’s routines on your installation. It looks like you’ve configured WordPress® with a fake domain name while testing.

Posted: Friday Feb 15th, 2013 at 12:00 am #41761
Staff Member

Thanks for the follow-up :-)

It sounds like you’ve been editing your BuddyPress Registration Page in the WordPress® editor. As far as I know, this is not possible. I mean, you can do it, but BuddyPress will simply ignore any content you add to this Page.

When you designate a Page as your BuddyPress Registration Page, it simply becomes a placeholder. This BuddyPress Registration form is generated through a combination of BuddyPress itself and your BuddyPress-compatible theme. Please check the BuddyPress forums for assistance with this.

If you need a reCAPTCHA box on your BuddyPress Registration form, you will need a BuddyPress plugin, or a BuddyPress theme which makes this possible.

If you configure Custom Registration/Profile Fields with s2Member® and you enable s2Member’s BuddyPress integration with Registration/Profile Fields, they will be displayed on your BuddyPress Registration form. See: Dashboard -› s2Member® -› General Options -› Registration/Profile Fields

Posted: Thursday Feb 14th, 2013 at 11:23 pm #41756
Staff Member

It sounds like you might have your Membership Options Page set as your Home Page, or perhaps there is another Content Restriction conflict in your Posts/Pages. Please see: Video » s2Member (Content Restriction Trouble?)

Details received. Thank you!

Investigating now.

Viewing 25 replies - 301 through 325 (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.