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:
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.
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. 😉