| @@ -789,9 +789,14 @@ | ||
| 789 | 789 | * @since 0.0.13 |
| 790 | 790 | * @return int|false The number of rows deleted, or false on error. |
| 791 | 791 | */ |
| 792 | 792 | public function use_delete( $where, $where_format = null ) { |
| 793 | - return $this->wpdb->delete( $this->get_tablename(), $where, $where_format ); | |
| 793 | + $result = $this->wpdb->delete( $this->get_tablename(), $where, $where_format ); | |
| 794 | + | |
| 795 | + // Reset cache so subsequent queries in the same request exclude the deleted row. | |
| 796 | + $this->cache_reset(); | |
| 797 | + | |
| 798 | + return $result; | |
| 794 | 799 | } |
| 795 | 800 | |
| 796 | 801 | /** |
| 797 | 802 | * Retrieve results from the database based on the given WHERE clauses and selected columns. |