pmpro_upgrade_1

The Paid Memberships Pro pmpro upgrade 1 function.

Description

pmpro_upgrade_1(); 

Usage

  1. if ( !function_exists( 'pmpro_upgrade_1' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/updates/upgrade_1.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = pmpro_upgrade_1(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/updates/upgrade_1.php  
  1. function pmpro_upgrade_1() 
  2. /** 
  3. default options 
  4. */ 
  5. $nonmembertext = sprintf( __( 'This content is for !!levels!! members only.<br /><a href="%s">Register</a>', 'paid-memberships-pro' ), wp_login_url() . "?action=register" ); 
  6. pmpro_setOption("nonmembertext", $nonmembertext); 
  7.  
  8. $notloggedintext = sprintf( __( 'This content is for !!levels!! members only.<br /><a href="%s">Log In</a> <a href="%s">Register</a>', 'paid-memberships-pro' ), wp_login_url(), wp_login_url() . "?action=register" ); 
  9. '?action=register">Register</a>'; 
  10. pmpro_setOption("notloggedintext", $notloggedintext); 
  11.  
  12. $rsstext = __( "This content is for !!levels!! members only. Visit the site and log in/register to read.", 'paid-memberships-pro' ); 
  13. pmpro_setOption("rsstext", $rsstext); 
  14.  
  15. $gateway_environment = "sandbox"; 
  16. pmpro_setOption("gateway_environment", $gateway_environment); 
  17.  
  18. $pmpro_currency = "USD"; 
  19. pmpro_setOption("currency", $pmpro_currency); 
  20.  
  21. $pmpro_accepted_credit_cards = "Visa, Mastercard, American Express, Discover"; 
  22. pmpro_setOption("accepted_credit_cards", $pmpro_accepted_credit_cards); 
  23.  
  24. $parsed = parse_url(home_url()); 
  25. $hostname = $parsed['host']; 
  26. $hostparts = explode(".", $hostname); 
  27. $email_domain = $hostparts[count($hostparts) - 2] . "." . $hostparts[count($hostparts) - 1]; 
  28. $from_email = "wordpress@" . $email_domain; 
  29. pmpro_setOption("from_email", $from_email); 
  30.  
  31. $from_name = "WordPress"; 
  32. pmpro_setOption("from_name", $from_name); 
  33.  
  34. //setting new email settings defaults 
  35. pmpro_setOption("email_admin_checkout", "1"); 
  36. pmpro_setOption("email_admin_changes", "1"); 
  37. pmpro_setOption("email_admin_cancels", "1"); 
  38. pmpro_setOption("email_admin_billing", "1"); 
  39.  
  40. pmpro_setOption("tospage", ""); 
  41.  
  42. //db update 
  43.  
  44. //updateversionand return 
  45. pmpro_setOption("db_version", "1.71"); //no need to run other updates 
  46. return 1.71;