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:
commit
f55a36c60d
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue