Automattic\WooCommerce\Admin\API\Reports
DataStore::get_match_operator
Returns logic operator for WHERE subclause based on 'match' query argument.
Method of the class: DataStore{}
No Hooks.
Returns
String.
Usage
// protected - for code of main (parent) or child class $result = $this->get_match_operator( $query_args );
- $query_args(array) (required)
- Parameters supplied by the user.
DataStore::get_match_operator() DataStore::get match operator code WC 10.6.2
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;
}