Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output
ProductDimensions{}
No Hooks.
Usage
$ProductDimensions = new ProductDimensions(); // use class methods
Methods
- public static get()
ProductDimensions{} ProductDimensions{} code WC 10.9.1
class ProductDimensions {
private static ?ObjectType $instance = null;
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;
}
}