=' ) ) { return $stored_version; } // Ensure that AutomatorWP tables have been created if( automatorwp_database_table_exists( AutomatorWP()->db->automations ) ) { // Process 1.3.0 upgrade automatorwp_process_130_upgrade(); // There is nothing to update, so upgrade $stored_version = '1.3.0'; } return $stored_version; } add_filter( 'automatorwp_process_upgrades', 'automatorwp_130_upgrades', 130 ); /** * Process 1.3.0 upgrades */ function automatorwp_process_130_upgrade() { global $wpdb; ignore_user_abort( true ); set_time_limit( 0 ); // Bail if AutomatorWP tables haven't been created yet if( ! automatorwp_database_table_exists( AutomatorWP()->db->automations ) ) { return; } $automations = AutomatorWP()->db->automations; // Update old automations type $wpdb->query( "UPDATE {$automations} AS a SET a.type = 'user' WHERE a.type = ''" ); // Updated stored version update_option( 'automatorwp_version', '1.3.0' ); }