woocommerce_note_where_clauses хук-фильтрWC 1.0

Filter the notes WHERE clause before retrieving the data.

Allows modification of the notes select criterial.

Использование

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(строка)
The generated WHERE clause.
$args(массив)
The original arguments for the request.
$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.

Где вызывается хук

DataStore::get_notes_where_clauses()
woocommerce_note_where_clauses
woocommerce/src/Admin/Notes/DataStore.php 458
return apply_filters( 'woocommerce_note_where_clauses', $where_clauses, $args, $context );

Где используется хук в WooCommerce

Использование не найдено.