Do not count trashed product variations
This commit is contained in:
parent
68460063a0
commit
6bb0dd864b
|
@ -612,7 +612,7 @@ class WC_Meta_Box_Product_Data {
|
|||
}
|
||||
}
|
||||
|
||||
$variations_count = absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'product_variation' AND post_status = 'publish'", $post->ID ) ) );
|
||||
$variations_count = absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'product_variation' AND post_status IN ('publish', 'private')", $post->ID ) ) );
|
||||
$variations_per_page = absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 10 ) );
|
||||
$variations_total_pages = ceil( $variations_count / $variations_per_page );
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue