Editing the subscribe form functionality so it only shows a specific subscription

I'm planning to sell some WordPress Child Themes and this membership plugin looks to be a good fit. Instead of "subscribe", the button would say "purchase" because I want users to sign up for a membership and then download the theme. This way I can keep all the users separated into different membership groups, based on the theme name, making it easy to track who has which theme. I see many other benefits later on based on this setup. A couple of questions...

1. Is it possible to make edits to the subscribe form shortcode? Basically, I need more than 1 shortcode because I don't want all the different subscriptions showing all on the same page at one time. Theme #1 should only have that theme's subscription/purchase button. I'm envisioning a shortcode such as [subscriptionform id="1"] or [subscriptionform id="subscription_name"].

2. Is it possible to edit/remove the text on the form that says the following:

Step 2. Select a subscription
Please select a subscription from the options below.

Thanks in advance

  • Barry

    Hi - I'm going to either release an add-on, or pop up a tutorial, to accomplish something similar as I need it myself for a side-project I'm working on. Luckily for both of us I implemented the hooks needed to do it in version 2.0 :slight_smile:

    Is it possible to edit/remove the text on the form that says the following:

    You can either edit the includes/subscription.form.php to remove the HTML you don't need, or to remain "upgrade safe":
    1. create a new php file and place it in a folder in your plugins directory
    2. cut and paste the content of the subscription form php file into it and make the necessary changes
    3. Work out the path of the file and put the following in your wp-config.php file
    define('MEMBERSHIP_SUBSCRIPTION_FORM', path_to_the_new_file);

    or if you need to programatically calculate the location of the new form, you can change the file used with the filter:
    membership_override_subscription_form
    It passes in the default file, and you should return the form path of the one you want to use.

  • Steven

    Thank you guys. Barry, that sounds great. Would be fantastic to see this as an add-on or tutorial. Would surely be a nifty little feature to be able to separate the forms. I'd be happy to test a beta version for you if you decide down the add-on route. Thanks also on how to change that test. Looks like something I can do :slight_smile:

    Just on the same subject of this subscribe form. Would it be also possible to use Gravity forms in conjunction with this plugin to gather additional info before they clicked subscribe? Or perhaps Gforms could completely replace it, making it easiter to split the subscribe buttons? Not sure how any of this would work from a development point of view :slight_smile:

  • Steven

    Hi Barry, thought I'd post a little update on my need to split the subscriptions. I ended up using Gravity forms for this as mentioned above and it worked a treat. I have a developer license so was able to use the GF user registration plugin to create a new user and join them to the "free membership" subscription based on the free user registration setting in your membership plugin options. I've then left the one subscription on the default register page and have made the free plan "private" so it doesn't show. So far so good :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.