Merge pull request #17726 from woocommerce/fix/17713

non-enabled children should not be ignored
This commit is contained in:
Claudiu Lodromanean 2017-11-17 10:07:38 -08:00 committed by GitHub
commit 9c1d3b8108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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',