Merge pull request woocommerce/woocommerce-admin#2819 from woocommerce/add/notes-where-clause-filters

Add filter to notes datastore where clauses
This commit is contained in:
Ron Rennick 2019-09-23 10:46:59 -03:00 committed by GitHub
commit 5a66f70d21
1 changed files with 9 additions and 1 deletions

View File

@ -371,7 +371,15 @@ class DataStore extends \WC_Data_Store_WP implements \WC_Object_Data_Store_Inter
$where_clauses .= " AND status IN ($escaped_status_types)";
}
return $where_clauses;
/**
* Filter the notes WHERE clause before retrieving the data.
*
* Allows modification of the notes select criterial.
*
* @param string $where_clauses The generated WHERE clause.
* @param array $args The original arguments for the request.
*/
return apply_filters( 'wc_admin_notes_where_clauses', $where_clauses, $args );
}
/**