Jason just coded up a new shortcode feature for a support customer and we wanted to share it—hooray open source! It’s a little tricky to explain, but once you wrap your brain around the features, you’ll begin to think of interesting ways to apply it to your membership site.
The shortcode is primarily useful for sites that offer free trials and want to show (or hide) content to users who are on the trial vs. those that are full paying members.
A little more detail…
The “haspaid” shortcode detailed below looks up a member’s order history and checks whether their current level or any past levels have a positive order total value. Then, using the shortcode attributes, you can show or hide content only to members that match your criteria.
For example, the image above shows an upgrade message to members on a free trial of level ID 1 that have NEVER paid for the level. This is the shortcode and content used to create that callout.
Members of level ID 1 that are paying (full members) will not see this callout or any interruption in the standard content of your page/post.
Another example may be to wrap the
[haspaid] shortcode inside of the