Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats

DataStore::initialize_queries()protectedWC 1.0

Initialize query objects.

Method of the class: DataStore{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->initialize_queries();

DataStore::initialize_queries() code WC 7.3.0

protected function initialize_queries() {
	$this->clear_all_clauses();
	unset( $this->subquery );
	$this->total_query = new SqlQuery( $this->context . '_total' );
	$this->total_query->add_sql_clause( 'from', self::get_db_table_name() );

	$this->interval_query = new SqlQuery( $this->context . '_interval' );
	$this->interval_query->add_sql_clause( 'from', self::get_db_table_name() );
	$this->interval_query->add_sql_clause( 'group_by', 'time_interval' );
}