Revert "Flush term cache when saving product and settings closes #25375"

This reverts commit 8b0915c4e0.
This commit is contained in:
roykho 2021-02-26 12:42:23 -08:00
parent f6d77c206d
commit 503a218e85
No known key found for this signature in database
GPG Key ID: 7B36C0EA25795714
2 changed files with 0 additions and 7 deletions

View File

@ -64,10 +64,6 @@ class WC_Settings_Products extends WC_Settings_Page {
$settings = $this->get_settings( $current_section );
WC_Admin_Settings::save_fields( $settings );
// Any time we update the product settings, we should flush the term count cache.
$tools_controller = new WC_REST_System_Status_Tools_Controller();
$tools_controller->execute_tool( 'recount_terms' );
if ( $current_section ) {
do_action( 'woocommerce_update_options_' . $this->id . '_' . $current_section );
}

View File

@ -272,9 +272,6 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
$product->apply_changes();
// Any time we update the product, we should flush the term count cache.
$tools_controller = new WC_REST_System_Status_Tools_Controller();
$tools_controller->execute_tool( 'recount_terms' );
do_action( 'woocommerce_update_product', $product->get_id(), $product );
}