Clear order transients when trashing posts. Closes #7052

This commit is contained in:
Mike Jolley 2015-01-08 15:47:58 +00:00
parent 3c3fb22fe9
commit 64901d82e5
2 changed files with 3 additions and 0 deletions

View File

@ -1994,6 +1994,7 @@ class WC_Admin_Post_Types {
}
delete_transient( 'woocommerce_processing_order_count' );
wc_delete_shop_order_transients( $id );
}
}
@ -2028,6 +2029,7 @@ class WC_Admin_Post_Types {
}
delete_transient( 'woocommerce_processing_order_count' );
wc_delete_shop_order_transients( $id );
}
}
}

View File

@ -46,6 +46,7 @@ class WC_Admin_Status {
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;