Automattic\WooCommerce\Admin\API\Reports

SqlQuery::add_sql_clause()publicWC 1.0

Add a SQL clause to be included when get_data is called.

Method of the class: SqlQuery{}

No Hooks.

Return

null. Nothing (null).

Usage

$SqlQuery = new SqlQuery();
$SqlQuery->add_sql_clause( $type, $clause );
$type(string) (required)
Clause type.
$clause(string) (required)
SQL clause.

SqlQuery::add_sql_clause() code WC 8.9.0

public function add_sql_clause( $type, $clause ) {
	if ( isset( $this->sql_clauses[ $type ] ) && ! empty( $clause ) ) {
		$this->sql_clauses[ $type ][] = $clause;
	}
}