File "MerchantProductReportQuery.php"
Full Path: /home/warrior1/public_html/wp-content/plugins/google-listings-and-ads/src/API/Google/Query/MerchantProductReportQuery.php
File size: 781 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query;
defined( 'ABSPATH' ) || exit;
/**
* Class MerchantProductReportQuery
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\API\Google\Query
*/
class MerchantProductReportQuery extends MerchantReportQuery {
/**
* Set the initial columns for this query.
*/
protected function set_initial_columns() {
$this->columns(
[
'id' => 'segments.offer_id',
]
);
}
/**
* Filter the query by a list of ID's.
*
* @param array $ids list of ID's to filter by.
*
* @return $this
*/
public function filter( array $ids ): QueryInterface {
if ( empty( $ids ) ) {
return $this;
}
return $this->where( 'segments.offer_id', $ids, 'IN' );
}
}