Automattic\WooCommerce\Admin\API\Reports
DataStore::get_match_operator
Returns logic operator for WHERE subclause based on 'match' query argument.
Метод класса: DataStore{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_match_operator( $query_args );
- $query_args(массив) (обязательный)
- Parameters supplied by the user.
Код DataStore::get_match_operator() DataStore::get match operator WC 10.8.1
protected function get_match_operator( $query_args ) {
$operator = 'AND';
if ( ! isset( $query_args['match'] ) ) {
return $operator;
}
if ( 'all' === strtolower( $query_args['match'] ) ) {
$operator = 'AND';
} elseif ( 'any' === strtolower( $query_args['match'] ) ) {
$operator = 'OR';
}
return $operator;
}