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

ShopifyClient::build_graphql_urlprivateWC 1.0

Build the GraphQL API URL.

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

Хуков нет.

Возвращает

Строку. The complete GraphQL API URL.

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

// private - только в коде основоного (родительского) класса
$result = $this->build_graphql_url( $domain ): string;
$domain(строка) (обязательный)
The Shopify domain.

Код ShopifyClient::build_graphql_url() WC 10.7.0

private function build_graphql_url( string $domain ): string {
	// Ensure the domain has the protocol.
	if ( ! preg_match( '~^https?://~i', $domain ) ) {
		$domain = 'https://' . $domain;
	}

	$shop_url = untrailingslashit( $domain );
	// Use the same API version as REST.
	$api_version = '2025-04';
	return "{$shop_url}/admin/api/{$api_version}/graphql.json";
}