$studiott_taxonomy, 'hide_empty' => false, 'fields' => 'ids', ) ); if ( ! is_wp_error( $studiott_terms ) ) { foreach ( $studiott_terms as $studiott_term_id ) { wp_delete_term( $studiott_term_id, $studiott_taxonomy ); } } } $studiott_posts = get_posts( array( 'post_type' => array( 'studiott_course', 'studiott_teacher', 'studiott_season' ), 'post_status' => array( 'publish', 'draft', 'pending', 'private', 'future', 'trash', 'auto-draft' ), 'numberposts' => -1, 'fields' => 'ids', ) ); foreach ( $studiott_posts as $studiott_post_id ) { wp_delete_post( $studiott_post_id, true ); } // phpcs:disable WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}studiott_class_teachers" ); $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}studiott_classes" ); // phpcs:enable delete_option( 'studiott_settings' ); delete_option( 'studiott_db_version' ); delete_option( 'studiott_seeded' ); delete_option( 'studiott_studios' ); delete_option( 'studiott_ignored_checks' );