non-enabled children should not be ignored

This fixes #17713 by also returning private children (non-enabled).
This commit is contained in:
Mike Jolley 2017-11-16 11:56:51 +00:00
parent 541dde95b3
commit 11d0293ddd
1 changed files with 4 additions and 1 deletions

View File

@ -63,9 +63,12 @@ class WC_Product_Variable_Data_Store_CPT extends WC_Product_Data_Store_CPT imple
'post_type' => 'product_variation',
'orderby' => array( 'menu_order' => 'ASC', 'ID' => 'ASC' ),
'fields' => 'ids',
'post_status' => 'publish',
'post_status' => array( 'publish', 'private' ),
'numberposts' => -1,
);
$visible_only_args['post_status'] = 'publish';
if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ) {
$visible_only_args['tax_query'][] = array(
'taxonomy' => 'product_visibility',