Clear order transients when trashing posts. Closes #7052
This commit is contained in:
parent
3c3fb22fe9
commit
64901d82e5
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue