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.

s2Member If Statements & WP_Redirect

Home Forums Community Forum Unofficial Extensions/Hacks s2Member If Statements & WP_Redirect

This topic contains 2 replies, has 2 voices. Last updated by  Eduan 4 years, 1 month ago.

Topic Author Topic
Posted: Sunday Nov 18th, 2012 at 11:58 am #31934

Greetings s2Member Community,

I’m greatly loving this product, and within the coming few days will purchase the premium version, until then though, I am looking for a little help with a rather simple If Statement.

I’m looking to offer a Trial to our usually membership required TV Station. In the TV Station though I wish to offer certain videos, so we’ll be using Pages and eventually releasing content for people to access through If Statements. I have the entire thing working except the expiry.

After their trial ends (14 days) I want to re-direct them to a specific page that informs them their Trial has expired, and they should sign up for Membership to continue. I want to do this through an If Statement. The content works fine, but the WP_Redirect is not working. Any help would be loved!

Here is the whole code.

= 1){ ?>
				
					

				
				
				
					<!-- FIRST VIDEO - AVAILABLE IMMEDIATELY -->
				
					= 0){ ?&gt;
				
						<div class="ChildVideoBar"> VIDEO #1 (Available) </div> 
					
					
				
						<div class="ChildVideoBar"> VIDEO #1 (Unavailable) </div> 
					
					
					
					<!-- SECOND VIDEO - AVAILABLE AFTER ONE DAYS -->
	
					= 1){ ?&gt;
				
						<div class="ChildVideoBar"> VIDEO #2 (Available) </div> 
					
					
				
						<div class="ChildVideoBar"> VIDEO #2 (Unavailable) </div> 
					
					
				
					<!-- THIRD VIDEO - AVAILABLE AFTER TWO DAYS -->
					
					= 2){ ?&gt;
				
						<div class="ChildVideoBar"> VIDEO #3 (Available) </div> 
					
					
				
						<div class="ChildVideoBar"> VIDEO #3 (Unavailable) </div> 
					
					
					
					= 3){ ?&gt;
										
						
					
					
					
					
				
				
   					
   					 					
				 

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Tuesday Nov 20th, 2012 at 4:52 am #32062

I’ve found the problem. After stripping back all of the code and rebuilding it, there was an extra } in place where it shouldn’t have been.

Recommendation: Copy & Paste your desired Php Code from the API Scripting Menu on the S2Member Settings. It’ll save you a lot of hassle.

Posted: Tuesday Nov 20th, 2012 at 9:53 am #32099
Eduan
Username: Eduan
Moderator

Glad you solved the problem Alec! Thanks for the tip BTW. :)

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.