pmpro_upgrade_1_8_8

Upgrade to 1.8.8 Running the cron job cleanup again.

Description

pmpro_upgrade_1_8_8(); 

Fixing old Authorize.net orders with empty status. Fixing old $0 Stripe orders.


Usage

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

Defined (1)

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

/includes/updates/upgrade_1_8_8.php  
  1. function pmpro_upgrade_1_8_8() { 
  2. global $wpdb; 
  3.  
  4. //Running the cron job cleanup again. 
  5. require_once(PMPRO_DIR . "/includes/updates/upgrade_1_8_7.php"); 
  6.  
  7. //Fixing old Authorize.net orders with empty status. 
  8. $sqlQuery = "UPDATE $wpdb->pmpro_membership_ordersSETstatus = 'success' WHEREgateway= 'authorizenet' AND status = ''"; 
  9. $wpdb->query($sqlQuery); 
  10.  
  11. //Fixing old $0 Stripe orders. (Sets up update via AJAX) 
  12. $orders = $wpdb->get_col("SELECT id FROM $wpdb->pmpro_membership_orders WHEREgateway= stripe AND total = 0");  
  13. if(!empty($orders)) 
  14. pmpro_addUpdate('pmpro_upgrade_1_8_8_ajax'); 
  15.  
  16. pmpro_setOption("db_version", "1.88"); 
  17. return 1.88;