eventsmanager

Snippet to safely store PayPal API credentials

May 11th, 2017
1,002
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. <?php
  2. /*
  3. This snippet stores PayPal API keys to the wp_options database table.
  4. Useful if site is not running SSL but you can upload via encrypted FTP or SFTP.
  5.  
  6. For installation instructions, see here (use the mu-plugins method) - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  7.  */
  8. function my_em_paypal_api_keys_save(){
  9.     update_option('em_paypal_api', array (
  10.         'username' => 'YOUR USERNAME',
  11.         'password' => 'YOUR PASSWORD',
  12.         'signature' => 'YOUR SIGNATURE',
  13.     ));
  14. }
Add Comment
Please, Sign In to add comment