pmpro_upgrade_1_8_9_1

Upgrade to 1.8.9.1 Fixing Stripe orders where user_id/membership_id = 0.

Description

pmpro_upgrade_1_8_9_1(); 

Usage

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

Defined (1)

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

/includes/updates/upgrade_1_8_9_1.php  
  1. function pmpro_upgrade_1_8_9_1() { 
  2. global $wpdb;  
  3.  
  4. //Fixing Stripe orders where user_id/membership_id = 0. (Sets up update via AJAX) 
  5. $orders = $wpdb->get_col("SELECT id FROM $wpdb->pmpro_membership_orders WHEREgateway= stripe AND user_id = 0 AND membership_id = 0 AND status <> error ");  
  6. if(!empty($orders)) 
  7. pmpro_addUpdate('pmpro_upgrade_1_8_9_1_ajax'); 
  8.  
  9. pmpro_setOption("db_version", "1.891"); 
  10. return 1.891;