Find out in this tutorial how to safely work with Restrict Content Pro in a staging installation using code.
If you have had to make important changes to a website with a payment system in place, you probably already know that it is a delicate subject.
Most of the time the process involves making a copy of the production site to a staging or local site. The problem is that you must be careful not to send duplicate emails, or worse, duplicate or cancel payments.
Luckily, Restrict Content Pro provides you with a couple of constants that you can add to your configuration file to avoid such unwanted side effects. ๐
Here’s how you can do it.
Snippet to use Restrict Content Pro in staging or local
Add the following code in the wp-config.php file:
To see this and another 1097 code snippets of this website, login or subscribe here.
You got it.
On one hand, you make sure that no Restrict Content Pro email is sent and on the other you “force” the payment gateway to go into test mode.
Conclusions
Now you know how to modify Restrict Content Pro in test installations (staging or local) with a little bit of code. It is something very simple to implement but it can save you a lot of trouble. ๐
Any questions? Let me know 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. ๐