Would you like to set the default subscription plan by passing an URL parameter to forms?
Imagine you have a subscription form with a plan selector containing several subscription plans.
If you’d like to set the default subscription plan by passing an URL parameter, like on the screenshot below, then this article is for you:
If you’d like to set the default subscription plan of your subscription form via an URL parameter, then you have to do the following:
The following subsections explain these steps in detail.
You have to pass the plan id in the wpfsPlan parameter, like this (you can try it): https://demo.paymentsplugin.com/sell-recurring-services-inline/?wpfsPlan=silver
You can obtain the plan id on the “Full Stripe / Subscriptions / Subscription Plans” page in WP admin, or on the “Billing / Products” page on the Stripe dashboard.
For the sake of security, the plugin doesn’t let anyone set the default subscription plan without your consent.
You can give consent by implementing a short piece of code to approve the plan in the form of a Wordpress filter. The code needs to be added to the functions.php file of your active Wordpress theme.
This is the default implementation:
You can customize the code depending on your needs. For example, you can limit the default plan based on form name and plan id:
Our support team is happy to help you.Contact support
Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.