Overview

Introduction

One of our customers runs his membership site with the popular WordPress membership plugin, MemberMouse.

He asked us if we could extend the flexibility of MemberMouse’s awesome SmartTags and SmartTag Equations.

*SmartTags are basically shortcodes that let you protect content in MemberMouse based on various conditions. Or, “conditional access shortcodes” if you prefer. 🙂

Our customer wanted to be able to show or hide content for his members based on several possible conditions:

  • Their membership level…  
  • Their bundle ID…
  • The date when they first became a member of the site (not to be confused with the date they gained access to a particular membership level)…
  • The number of days from the sign up date to the current date…

MemberMouse already has a few nice shortcodes like the Member Decision SmartTag and the Access Decision SmartTag which cover the above conditions.

BUT—there are some situations and conditions the native shortcodes don’t cover.

We call these “advanced decisions”.

And now you’ll some real life examples of how you can power up your content protection capabilities in MemberMouse using our Advanced Decisions Shortcodes. 🙂

In this case, our customer wanted to be able to check for three additional conditions related to a member’s access status.

And for this we can only have three possible values: true, false or future.

This way, this plugin allows you to add shortcode s for each one of the three access options at the same time on a single page/post.

Want to see exactly how the plugin works?

Let’s look at some real life examples. 🙂

How does the MemberMouse Advanced Decision Shortcodes plugin work?

Here’s a short video explanation that shows how to install and use this plugin.

 

A. Membership based shortcodes

Shortcode attributes:

1. membershipid – the ID number of the membership level to which a member is subscribed.

Multiple ID’s can be added using a pipe (|).

For instance:

membershipid=’3|8|11′ 

The pipe acts as an “or” operator.

So in the example above we’re checking for membership ID 3 or 8 or 11. If the member is subscribed to any of those membership levels it will make the condition TRUE.

*Note that unlike the default MemberMouse parameter “membershipId” (which uses a capital ‘I’ in the word ‘Id’), our parameter names use lowercase letters only.

2. access – Indicates what type of access state to check for.

Below is a list of acceptable values:

a. true – if the current member has access to the page/post then then the shortcode content will be displayed.

b. false – if the current member does NOT have access to the page/post then the shortcode content will be displayed.

c. future – if the current member does not have access to the page/post but will have it in the future, then the shortcode content will be displayed.

3. date – (optional) If the member subscribed to the website BEFORE this date, then the shortcode content will be displayed.

*The date when the member subscribed to the website is not the same date on which the member purchased a certain membership, but since the member first joined the site via any MemberMouse product, free or paid.

4. days – (optional) If the number of days since the member joined your site is greater or equal to this value, the shortcode content will be displayed.

*The number of days since the user joined your site is NOT the number of days since the member purchased a certain membership, but rather the number of days since he first become a member of your site.

Example shortcodes:

wp

[mm_adv_access_decision membershipid=’7′ days=’10’ date=’7/1/2019′ access=’true’]

This content will be visible if ANY of the following conditions are true:

1. User has membership ID of 7 and subscribed to the website before the 1st of July 2019.

2. User has membership ID of 7 and the number of days since the user subscribed to the website is greater or equal to 10.

3. User has membership ID of 7 and subscribed to the website before the 1st of July 2019 and the number of days since the user subscribed to the website is greater or equal to 10.

[/mm_adv_access_decision]

wp

[mm_adv_access_decision membershipid=’7′ date=’7/1/2019′ access=’false’]

This content will be visible if the following condition is true:

User has membership ID of 7 and subscribed to the website after the 1st of July 2019.

[/mm_adv_access_decision]

wp

[mm_adv_access_decision membershipid=’7′ days=’10’ date=’7/1/2019′ access=’future’]

When parameter access=’future’, you can use content like this one:

“You will have access to this content on [X].”

Where [X] will display the date when the member gets access.

The content in this shortcode will be visible if the following condition is true:

User has membership ID of 7 and subscribed to the website after the 1st of July 2019 and the number of days since the user subscribed to the website is less than 10.

In this case, [X] will be replaced with the date when the user can access the content.

[/mm_adv_access_decision]

You can use as many shortcodes at the same time as you want.

The content of each shortcode will only be visible if the member visiting that page meets that particular shortcode’s conditions.

Multiple memberhip ID’s

For the above shortcodes you can add more than one membership ID to the membershipid attribute, separated by a the pipe operator (|).

The code will check if the user has any of the membership IDs and show / hide the content accordingly.

Note that in MemberMouse users can have only one membership level at a time, whether free or paid.

So a shortcode will look like this:

wp

[mm_adv_access_decision membershipid=’7|10|11|14′ days=’10’ date=’7/1/2019′ access=’true’]

This content will be visible if ANY of the following conditions is true:

1. User has membership ID of 7 or 10 or 11 or 14 and subscribed to the website before the 1st of July 2019.

2. User has membership ID of 7 or 10 or 11 or 14 and the number of days since the user subscribed to the website is greater or equal to 10.

3. User has membership ID of 7 or 10 or 11 or 14 and subscribed to the website before the 1st of July 2019 and the number of days since the user subscribed to the website is greater or equal to 10.

[/mm_adv_access_decision]
Real life examples

Let’s see some real examples in order to have a clearer understanding about how these shortcodes work:

Example 1
a. User registered on website on 5/1/2019
b. User membership ID is 7
c. Today is 6/1/2019

wp

[mm_adv_access_decision membershipid=’7|10′ days=’10’ date=’4/1/2019′ access=’true’]

The content of this shortcode will be visible to the member because he has a membership ID of 7, and more than 10 days have passed since he subscribed to the website (31 days in this case).

Even if the ‘date’ attribute does not meet the condition (user subscribed to the website after 4/1/2019) that does not matter because the shortcode date attribute DOES meet the condition.

[/mm_adv_access_decision]
Example 2
a. User registered on website on 5/1/2019
b. User membership ID is 7
c. Today is 6/1/2019

wp

[mm_adv_access_decision membershipid=’7|13|2′ days=’40’ date=’4/1/2019′ access=’true’]

The content of this shortcode will NOT be visible to the user because even if he has a membership ID of 7, the ‘date’ and ‘days’ shortcodes attributes do NOT meet their respective conditions.

The user registered on the website after 4/1/2019 and 31 days have passed since then, which is 9 days LESS than the ‘days’ attribute shortcode requires (40 days in this case)

[/mm_adv_access_decision]
Example 3
a. User registered on website on 5/1/2019
b. User membership ID is 7
c. Today is 6/1/2019

wp

[mm_adv_access_decision membershipid=’7|13|2′ days=’40’ date=’4/1/2019′ access=’false’]

The content of this shortcode will be visible to the user because he has a membership ID of 7 and the ‘date’ and ‘days’ shortcode attributes conditions are not met.

In this case, which is similar to the above example, the content is visible because we have the ‘access’ shortcode attribute set to ‘false’.

[/mm_adv_access_decision]
Example 4
a. User registered on website on 5/1/2019
b. User membership ID is 7
c. Today is 6/1/2019

wp

[mm_adv_access_decision membershipid=’7|13|2′ days=’40’ date=’4/1/2019′ access=’future’]

You will have access to this content on [X].

The above content of this shortcode will be visible and will show this message:

“You will have access to this content on 6/10/2019”.

This happens because the ‘access’ shortcode attribute is set to ‘future’, and the user has a membership ID of 7, and 31 days have passed since he registered.

The ‘date’ shortcode attribute does not matter because it does not meet the condition.

So the math is:

The user has been signed up for 31 days and the date condition is 40.

40 – 31 = 9 days till access, which is 6/10/2019

Don’t forget to add the square brackets around X, like so: [X] [/mm_adv_access_decision]

This last example also explains why multiple shortcodes can be added on a page/post.

A shortcode with the ‘access’ attribute set to ‘future’ can be added.

This one informs the user that he will have access on X date.

Then another shortcode with the ‘access’ attribute set to ‘true’ can be added.

The content for this one will be visible after the X datewhile the ‘future’ message becomes hidden.

B. Bundle based shortcodes

The bundle based shortcodes behave almost exactly like the membership based ones, except that you can have only ONE bundle ID added (not multiple bundle IDs…)

This happens because for the bundles we can pull the exact date when a bundle was added to the member.

So if the member has more than one bundle assigned, which happens frequently, then we have multiple potential bundles to choose from, all of which might have been assigned on different dates.

We only need a single date and therefore we need to use a single bundle ID.

For memberships we do not have this issue because the date when a member first registers is added as a reference, as I have explained above.

Shortcode attributes:

1. bundleid – the bundle ID assigned to the user.

Only one ID can be added.

2. access – Indicates what type of access state to check for.

Below is a list of acceptable values:

a. true – if the current member has access to the page/post then then the shortcode content will be displayed.

b. false – if the current member does NOT have access to the page/post then the shortcode content will be displayed.

c. future – if the current member does not have access to the page/post but will have it in the future then then the shortcode content will be displayed.

3. date – (optional) If the bundle was assigned to the member before this date, the shortcode content will be displayed.

4. days – (optional) If the number of days since the bundle was assigned to the member is greater or equal to this value, the shortcode content will be displayed.

Example shortcodes:

wp

[mm_adv_access_decision bundleid=’7′ days=’10’ date=’7/1/2019′ access=’true’]

This content will be visible if ANY of these conditions is true:

1. User has bundle ID of 7 assigned before the 1st of July 2019.

2. User has bundle ID of 7 assigned and the number of days since the bundle was assigned is greater or equal to 10.

3. User has bundle ID of 7 assigned before the 1st of July 2019 and the number of days since the bundle was assigned is greater than or equal to 10.

[/mm_adv_access_decision]

wp

[mm_adv_access_decision bundleid=’7′ date=’7/1/2019′ access=’false’]

This content will be visible if this is true:

User has bundle ID of 7 assigned and the bundle was assigned after the 1st of July 2019.

[/mm_adv_access_decision]

wp

[mm_adv_access_decision bundleid=’7′ days=’10’ date=’7/1/2019′ access=’future’]

When access=’future’ then you can use a message like this one:

“You will have access to this content on [X].”

The above content will be visible if this is true:

User has bundle ID of 7 assigned and the bundle was assigned after the 1st of July 2019 and the number of days since the bundle was assigned is less than 10.

In this case, [X] will be replaced with the date when user gets access.

[/mm_adv_access_decision]
All shortcodes can be used in the same time on a page/post in WordPress. Only the content for the shortcodes which meet the conditions will be visible on page.

Real life examples

Let’s see some real examples in order to have a clearer understandig about how these shortcodes work:

Example 1
a. Bundle ID of 7 was assigned to user on 5/1/2019
b. Today is 6/1/2019

wp

[mm_adv_access_decision bundleid=’7′ days=’10’ date=’4/1/2019′ access=’true’]

The content of this shortcode will be visible to the user because he has a bundle ID of 7 assigned and more than 10 days have passed since it was first assigned (31 days).

Even if the ‘date’ shortcode attribute does not meet the required condition (bundle was assigned after 4/1/2019) that does not matter because the shortcode ‘date’ attribute DOES meet the condition.

[/mm_adv_access_decision]
Example 2
a. Bundle ID of 7 was assigned to user on 5/1/2019
b. Today is 6/1/2019

wp

[mm_adv_access_decision bundleid=’7′ days=’40’ date=’4/1/2019′ access=’true’]

The content of this shortcode will not be visible to the user because even if he has a bundle ID of 7 assigned, the ‘date’ and ‘days’ shortcode attributes do not meet the condition (bundle was assigned after 4/1/2019 and 31 days have passed since then—which is 9 days less than the ‘days’ attribute requires—which is 40).

[/mm_adv_access_decision]
Example 3
a. Bundle ID of 7 was assigned to user on 5/1/2019
b. Today is 6/1/2019

wp

[mm_adv_access_decision bundleid=’7′ days=’40’ date=’4/1/2019′ access=’false’]

The content of this shortcode will be visible to the user because he/she has bundle ID of 7 assigned and date and days shortcodes attributes do not meet the condition.

In this case, which it is similar to the above, the content is visible because we have the access shortcode attribute set to ‘false’.

[/mm_adv_access_decision]
Example 4
a. Bundle ID of 7 was assigned to user on 5/1/2019
b. Today is 6/1/2019

wp

[mm_adv_access_decision bundleid=’7′ days=’40’ date=’4/1/2019′ access=’future’]

You will have access to this content on [X].

The above content of this shortcode will be visible and will show this: “You will have access to this content on 6/10/2019”.

This happens because the access shortcode attribute is set to ‘future’, user has bundle ID of 7 assigned and already has 31 days since bundle has assigned.

The date shortcode attribute does not matter because it does not meet the condition.

So the math is simple: user has bundle ID of 7 assigned for 31 days and the date condition is 40 ; 40 – 31 = 9 days till access which is 6/10/2019.

Don’t forget to add the square brackets around X: [X].

[/mm_adv_access_decision]

How to install and use the MemberMouse Advanced Decision Shortcodes plugin

1 – Install the plugin by uploading the mm-advanced-tags.zip file in WordPress => Plugins => Add New.

2 – Activate the plugin.

3 – At this point you are ready to use the shortcode on WordPress pages or posts. Of course, you also need to have MemberMouse activated on your website.

This plugin creates two main shortcodes types: Membership based and Bundle based

Why did we develop the MemberMouse Advanced Decision Shortcodes plugin?

As I said above, one of our customers needed such a plugin with this functionality for his WordPress membership website which uses MemberMouse.

So we went ahead and developed this plugin for him.

And now you get to use it too! 🙂

Will you provide support for this plugin?

Absolutely!

If you have any questions or issues please come back to this post and leave a comment describing them (you can also upload screenshots in the comments).

We will also provide email support at [email protected] but using comments instead, everybody benefits from the conversation and explanations, including existing and potential customers. 🙂

It also fosters transparency which improves the direction of development by involving our entire community.

Thanks!

How can I download the MemberMouse Advanced Decision Shortcodes plugin?

We offer this plugin for sale starting at $25 for a single site license. If you’d like to purchase it please complete the checkout below.

You’ll gain access after checkout.

mm advanced decision shortcodes box - [WordPress Plugin] MemberMouse Advanced Decision Shortcodes

? Secure Checkout ?

MemberMouse Advanced Decision Shortcodes

Dependencies

To use this product you need to have the following plugins installed on your WordPress installation:

1 – MemberMouse

 

Product Stats

Version1.0.0
Last UpdatedDec 21, 2019
RequiresWordPress4.8+
TestedWordPress 5.3.2
MemberMouse 2.3.1
Change LogView

After you’ve purchased and downloaded the plugin, go to your WordPress installation => Plugins => Add new => Upload the zip file.

Activate the plugin.

After that you are ready to use the shortcodes as I have explained above.

Enjoy!

Change Log

1.0.0 – December 21, 2019

  • Initial release

Frequently Asked Questions

Can I use the MemberMouse Advanced Decision Shortcodes plugin on client sites, or only on my own sites?

You can use it on both your sites and client sites.

Are there any plugin dependencies

Yes, you will need MemberMouse in order to use these shortcodes.

Can I use other shortcodes inside the shortcodes created by MemberMouse Advanced Decision Shortcodes plugin?

Yes, you can use other shortcodes inside these (also known as nested shortcodes).



What do you think of this plugin? 24.97
mm advanced decision shortcodes box 300x213 - [WordPress Plugin] MemberMouse Advanced Decision Shortcodes

Name: [WordPress Plugin] MemberMouse Advanced Decision Shortcodes

Description: MemberMouse Advanced Decision Shortcodes based on user's membership or associated bundles with options for current access, future access or forbidden access. The shortcodes content is displayed considering either the date when user subscribed or the number of days as member.

Offer price: 24.97

Currency: USD

Application Category: WordPress Plugin

User Review
5 (1 vote)
 
Share This