From 08c4953b61fb1d05e0f503fb46162ad11fb0b2cc Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 26 Oct 2017 20:16:52 +0100 Subject: [PATCH] Clear counts cache when updating product attributes Closes #17377 --- includes/data-stores/class-wc-product-data-store-cpt.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/data-stores/class-wc-product-data-store-cpt.php b/includes/data-stores/class-wc-product-data-store-cpt.php index 0ae3b5f3b5b..f53fd949660 100644 --- a/includes/data-stores/class-wc-product-data-store-cpt.php +++ b/includes/data-stores/class-wc-product-data-store-cpt.php @@ -696,6 +696,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da } } update_post_meta( $product->get_id(), '_product_attributes', $meta_values ); + delete_transient( 'wc_layered_nav_counts' ); } }