WP_Meta_Query::has_or_relation(): bool

Checks whether the current query has any OR relations.


In some cases, the presence of an OR relation somewhere in the query will require the use of a DISTINCT or GROUP BY keyword in the SELECT clause. The current method can be used in these cases to determine whether such a clause is necessary.

Top ↑


bool True if the query contains any OR relations, otherwise false.

Top ↑


File: wp-includes/class-wp-meta-query.php. View all references

public function has_or_relation() {
	return $this->has_or_relation;

Top ↑


Version Description
4.3.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.