get_children should get published products only for grouped products. Closes #3880.

@coenjacobs This should go in .15
This commit is contained in:
Mike Jolley 2013-10-11 13:25:34 +01:00
parent 708423b96f
commit 6fd823dabd
1 changed files with 1 additions and 2 deletions

View File

@ -92,10 +92,9 @@ class WC_Product_Grouped extends WC_Product {
if ( false === ( $this->children = get_transient( $transient_name ) ) ) {
$this->children = get_posts( 'post_parent=' . $this->id . '&post_type=product&orderby=menu_order&order=ASC&fields=ids&post_status=any&numberposts=-1' );
$this->children = get_posts( 'post_parent=' . $this->id . '&post_type=product&orderby=menu_order&order=ASC&fields=ids&post_status=publish&numberposts=-1' );
set_transient( $transient_name, $this->children );
}
}