// Delete empty taxonomies on post delete
function wpai_remove_taxonomies_on_delete( $post_id, $import ) {
$taxonomy = 'product_cat'; // change this to the taxonomy name
$terms = wp_get_object_terms( $post_id, $taxonomy );
if ( ! empty( $terms ) ) {
$all_terms = array();
foreach ( $terms as $term ) {
if ( $term->count < 2 ) {
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.