Skip to content

Commit

Permalink
Clear order transients when trashing posts. Closes woocommerce#7052
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jan 8, 2015
1 parent 3c3fb22 commit 64901d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/admin/class-wc-admin-post-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -1994,6 +1994,7 @@ public function trash_post( $id ) {
}

delete_transient( 'woocommerce_processing_order_count' );
wc_delete_shop_order_transients( $id );
}

}
Expand Down Expand Up @@ -2028,6 +2029,7 @@ public function untrash_post( $id ) {
}

delete_transient( 'woocommerce_processing_order_count' );
wc_delete_shop_order_transients( $id );
}
}
}
Expand Down
1 change: 1 addition & 0 deletions includes/admin/class-wc-admin-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static function status_tools() {
switch ( $_GET['action'] ) {
case 'clear_transients' :
wc_delete_product_transients();
wc_delete_shop_order_transients();

echo '<div class="updated"><p>' . __( 'Product Transients Cleared', 'woocommerce' ) . '</p></div>';
break;
Expand Down

0 comments on commit 64901d8

Please sign in to comment.