From 6f4a91e36eb9d75ba5d78caf1183bf66eb3933d1 Mon Sep 17 00:00:00 2001 From: tamarazuk Date: Fri, 14 Feb 2014 00:06:30 -0500 Subject: [PATCH] Dashboard: Fixes # of "out of stock" products Use woocommerce_notify_no_stock_amount rather than woocommerce_notify_low_stock_amount to count out of stock products --- includes/admin/class-wc-admin-dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-dashboard.php b/includes/admin/class-wc-admin-dashboard.php index e8d08af7c1f..3aa6e11ca38 100644 --- a/includes/admin/class-wc-admin-dashboard.php +++ b/includes/admin/class-wc-admin-dashboard.php @@ -116,7 +116,7 @@ class WC_Admin_Dashboard { AND posts.post_type IN ('product', 'product_variation') AND posts.post_status = 'publish' AND ( - postmeta.meta_key = '_stock' AND CAST(postmeta.meta_value AS SIGNED) <= '{$stock}' AND postmeta.meta_value != '' + postmeta.meta_key = '_stock' AND CAST(postmeta.meta_value AS SIGNED) <= '{$nostock}' AND postmeta.meta_value != '' ) AND ( ( postmeta2.meta_key = '_manage_stock' AND postmeta2.meta_value = 'yes' ) OR ( posts.post_type = 'product_variation' )