Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output

ProductDimensions::getpublic staticWC 1.0

Method of the class: ProductDimensions{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = ProductDimensions::get(): ObjectType;

ProductDimensions::get() code WC 10.9.1

public static function get(): ObjectType {
	if ( null === self::$instance ) {
		self::$instance = new ObjectType(
			array(
				'name'        => 'ProductDimensions',
				'description' => __( 'Physical dimensions and weight of a product.', 'woocommerce' ),
				'fields'      => fn() => array(
					'length' => array(
						'type'        => Type::float(),
						'description' => __( 'The product length.', 'woocommerce' ),
					),
					'width'  => array(
						'type'        => Type::float(),
						'description' => __( 'The product width.', 'woocommerce' ),
					),
					'height' => array(
						'type'        => Type::float(),
						'description' => __( 'The product height.', 'woocommerce' ),
					),
					'weight' => array(
						'type'        => Type::float(),
						'description' => __( 'The product weight.', 'woocommerce' ),
					),
				),
			)
		);
	}
	return self::$instance;
}