Automattic\WooCommerce\Admin\API\Reports

SqlQuery::add_sql_clause()protectedWC 1.0

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

Method of the class: SqlQuery{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->add_sql_clause( $type, $clause );
$type(string) (required)
Clause type.
$clause(string) (required)
SQL clause.

SqlQuery::add_sql_clause() code WC 7.3.0

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