Merge pull request #9837 from franticpsyx/orphaned-variations-issue

[2.5] Search-products: failing to load results when orphaned variation posts in the result set
This commit is contained in:
Claudio Sanches 2015-12-12 12:49:23 -02:00
commit f55a36c60d
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() );
}
}