can_export() ) { wp_die( esc_html__( 'You do not have permission to run this upgrade.', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), array( 'response' => 403, ) ); } $had_data = $this->get_data(); if ( $had_data ) { $this->done = false; // Save the *next* step to do. update_option( sprintf( 'edd_v3_migration_%s_step', sanitize_key( $this->upgrade ) ), $this->step + 1 ); return true; } else { $this->done = true; $this->message = $this->completed_message; edd_set_upgrade_complete( $this->upgrade ); delete_option( sprintf( 'edd_v3_migration_%s_step', sanitize_key( $this->upgrade ) ) ); edd_v30_is_migration_complete(); return false; } } /** * Set the headers. * * @since 3.0 */ public function headers() { edd_set_time_limit(); } /** * Perform the migration. * * @since 3.0 * * @return void */ public function export() { // Set headers. $this->headers(); edd_die(); } /** * Return the global database interface. * * @since 3.0 * @access protected * @static * * @return \wpdb|\stdClass */ protected static function get_db() { return isset( $GLOBALS['wpdb'] ) ? $GLOBALS['wpdb'] : new \stdClass(); } /** * Set properties specific to the export. * * @since 3.0 * * @param array $request Form data passed into the batch processor. */ public function set_properties( $request ) { } /** * Allow for pre-fetching of data for the remainder of the batch processor. * * @since 3.0 */ public function pre_fetch() { } }