Pro version - how to display & cancel individual custom capabilities

Hello & thanks for an awesome plugin! :slight_smile: I looked all over and was not able to find answers to a couple of questions:

– How do I display all of a member’s purchases with cancellation links and let users cancel one without affecting the others?

To explain our setup:
We have a full site membership for which we use standard s2Member level subscriptions.
On top of that, we let users upload additional “Fan Club” content that we want to sell per user basis.

For this, we’ll be using custom capabilities as recurring subscription to a dynamically created capability ie. “fanclubUSERID” (because these can’t be level based/have to be able to have a number in parallel).

At any time, a member can have a recurring site membership (or not), and in addition any number of custom capability subscriptions.

How do we allow

  1. users to see all their subscriptions
  2. cancel a particular subscription or capability subscription without affecting the rest of their subscriptions

Thanks!

  1. Use attach_s2member_query_filters(); and create your own loop. See API/Scripting -> Advanced/PHP Query Conditionals.

It says to use query_posts, but it was also written some years ago. Now I think it’s almost certain (I haven’t actually tried) that you should use new WP_Query instead. See https://codex.wordpress.org/Class_Reference/WP_Query

  1. Use a Billing Modification form. Click on the ? next to the Custom Capabilities box to get an explanation of how you deal with multiple ccaps.
1 Like