Find out in this tutorial how to modify the registration button text in Restrict Content Pro using code.
By default, Restrict Content Pro displays the text “Register” in the button to finish the checkout
But it’s likely that at some point you’ll want to change it to a call to action that better suits your website and your product, right?
An example: when you have more than one membership level and you want to differentiate between them.
OsomCode is the perfect example, because you have the option of monthly and yearly subscription. And since I use a fairly minimalistic checkout, placing the subscription price on the button is a good way to make sure customers fully understand the amount that will be charged.
Do you want to do something like this? Here’s how to customize that text to your liking:
Snippet to change the checkout button text in Restrict Content Pro
Add the following code at the end of functions.php or in your functionality plugin:
In this case you use the 3 conditionals:
- If it is the page with ID = 77 will show Subscribe ($49/month).
- If it is the page with ID = 637 it will show Subscribe ($490/year).
- If it is neither of these pages it will display Subscribe.
And this is how it will look depending on the page:
Of course, you can customize it to your liking by modifying the page ID and customizing the text with the call to action that suits you best.
Now you know how to customize the Restrict Content Pro checkout button text with a little bit of code. It’s a fairly simple thing to implement and allows you to refine the RCP registration/purchase page a bit more.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉