Skip to content

Commit

Permalink
Merge pull request woocommerce#20498 from woocommerce/update/20494
Browse files Browse the repository at this point in the history
Clear transients tool; clear wc_layered_nav_counts
  • Loading branch information
rodrigoprimo committed Jun 12, 2018
2 parents ebcdd5f + fcd2356 commit a03e84d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/api/class-wc-rest-system-status-tools-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,15 @@ public function execute_tool( $tool ) {
case 'clear_transients':
wc_delete_product_transients();
wc_delete_shop_order_transients();

$attribute_taxonomies = wc_get_attribute_taxonomies();

if ( $attribute_taxonomies ) {
foreach ( $attribute_taxonomies as $attribute ) {
delete_transient( 'wc_layered_nav_counts_pa_' . $attribute->attribute_name );
}
}

WC_Cache_Helper::get_transient_version( 'shipping', true );
$message = __( 'Product transients cleared', 'woocommerce' );
break;
Expand Down

0 comments on commit a03e84d

Please sign in to comment.