orphaned variations cause "failed to load results" issue

This commit is contained in:
Manos Psychogyiopoulos 2015-12-12 16:37:32 +02:00
parent 9126a13a1c
commit 5597a2750b
1 changed files with 4 additions and 0 deletions

View File

@ -1809,6 +1809,10 @@ class WC_AJAX {
continue;
}
if ( ! $product || ( $product->is_type( 'variation' ) && empty( $product->parent ) ) ) {
continue;
}
$found_products[ $post ] = rawurldecode( $product->get_formatted_name() );
}
}