Automattic\WooCommerce\Internal\CLI\Migrator\Platforms\Shopify

ShopifyFetcher::build_count_query_paramsprivateWC 1.0

Build query parameters for the count API request.

Метод класса: ShopifyFetcher{}

Хуков нет.

Возвращает

Массив. Query parameters for the REST API.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->build_count_query_params( $args ): array;
$args(массив) (обязательный)
Filter arguments.

Код ShopifyFetcher::build_count_query_params() WC 10.9.4

private function build_count_query_params( array $args ): array {
	$query_params = array();

	// Map standard filter args to Shopify REST count query params.
	if ( isset( $args['status'] ) ) {
		$query_params['status'] = strtolower( $args['status'] ); // REST uses lowercase.
	}

	if ( isset( $args['created_at_min'] ) ) {
		$query_params['created_at_min'] = $args['created_at_min'];
	}

	if ( isset( $args['created_at_max'] ) ) {
		$query_params['created_at_max'] = $args['created_at_max'];
	}

	if ( isset( $args['updated_at_min'] ) ) {
		$query_params['updated_at_min'] = $args['updated_at_min'];
	}

	if ( isset( $args['updated_at_max'] ) ) {
		$query_params['updated_at_max'] = $args['updated_at_max'];
	}

	if ( isset( $args['vendor'] ) ) {
		$query_params['vendor'] = $args['vendor'];
	}

	if ( isset( $args['product_type'] ) ) {
		$query_params['product_type'] = $args['product_type'];
	}

	return $query_params;
}