woocommerce_note_where_clauses
Filter the notes WHERE clause before retrieving the data.
Allows modification of the notes select criterial.
Usage
add_filter( 'woocommerce_note_where_clauses', 'wp_kama_woocommerce_note_where_clauses_filter', 10, 3 ); /** * Function for `woocommerce_note_where_clauses` filter-hook. * * @param string $where_clauses The generated WHERE clause. * @param array $args The original arguments for the request. * @param string $context Optional argument that the woocommerce_note_where_clauses filter can use to determine whether to apply extra conditions. Extensions should define their own contexts and use them to avoid adding to notes where clauses when not needed. * * @return string */ function wp_kama_woocommerce_note_where_clauses_filter( $where_clauses, $args, $context ){ // filter... return $where_clauses; }
- $where_clauses(string)
- The generated WHERE clause.
- $args(array)
- The original arguments for the request.
- $context(string)
- Optional argument that the woocommerce_note_where_clauses filter can use to determine whether to apply extra conditions. Extensions should define their own contexts and use them to avoid adding to notes where clauses when not needed.
Where the hook is called
woocommerce_note_where_clauses
woocommerce/src/Admin/Notes/DataStore.php 459
return apply_filters( 'woocommerce_note_where_clauses', $where_clauses, $args, $context );