Automattic\WooCommerce\Admin\Notes

DataStore::get_notes_where_clauses()publicWC 1.0

Return where clauses for getting notes by status and type. For use in both the count and listing queries. Applies woocommerce_note_where_clauses filter.

{} Это метод класса: DataStore{}

Хуки из метода

Возвращает

Строку. Where clauses for the query.

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

$DataStore = new DataStore();
$DataStore->get_notes_where_clauses( $args, $context );
$args(массив)
Array of args to pass.
По умолчанию: array()
$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.
По умолчанию: self::WC_ADMIN_NOTE_OPER_GLOBAL

Код DataStore::get_notes_where_clauses() WC 6.6.1

public function get_notes_where_clauses( $args = array(), $context = self::WC_ADMIN_NOTE_OPER_GLOBAL ) {
	$where_clauses = $this->args_to_where_clauses( $args );

	/**
	 * 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.
	 * @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 apply_filters( 'woocommerce_note_where_clauses', $where_clauses, $args, $context );
}