• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Modifications to use Restrict Content Pro in staging or local safely

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 847 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. ๐Ÿ˜‰

PHP Restrict Content Pro wp-config

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice ยท Privacy Policy ยท Cookie Policy ยท Terms and conditions
Copyright © 2023

Lost your password?