Settings, so replacing Free with Pro keeps everything. * * @package CodeCraft\Gridsmith */ defined( 'WP_UNINSTALL_PLUGIN' ) || exit; if ( ! (int) get_option( 'bdbe_delete_data', 0 ) ) { return; } global $wpdb; foreach ( array( 'bdbe_settings', 'bdbe_delete_data', 'bdbe_license', 'bdbe_jobs', 'bdbe_db_version' ) as $bdbe_option ) { delete_option( $bdbe_option ); } foreach ( array( '_bdbe_undo', '_bdbe_views' ) as $bdbe_meta ) { delete_metadata( 'user', 0, $bdbe_meta, '', true ); } wp_unschedule_hook( 'bdbe_run_job' ); wp_unschedule_hook( 'bdbe_prune_history' ); wp_unschedule_hook( 'bdbe_license_check' ); if ( function_exists( 'as_unschedule_all_actions' ) ) { as_unschedule_all_actions( 'bdbe_run_job' ); } // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange -- dropping the plugin's own tables on uninstall. $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'bdbe_changes' ) ); $wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i', $wpdb->prefix . 'bdbe_batches' ) ); // phpcs:enable