Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output
ProductImage::get
Method of the class: ProductImage{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = ProductImage::get(): ObjectType;
ProductImage::get() ProductImage::get code WC 10.8.1
public static function get(): ObjectType {
if ( null === self::$instance ) {
self::$instance = new ObjectType(
array(
'name' => 'ProductImage',
'description' => __( 'Represents a product image.', 'woocommerce' ),
'fields' => fn() => array(
'id' => array(
'type' => Type::nonNull( Type::int() ),
'description' => __( 'The image attachment ID.', 'woocommerce' ),
),
'url' => array(
'type' => Type::nonNull( Type::string() ),
'description' => __( 'The image URL.', 'woocommerce' ),
),
'alt' => array(
'type' => Type::nonNull( Type::string() ),
'description' => __( 'The image alt text.', 'woocommerce' ),
),
'position' => array(
'type' => Type::nonNull( Type::int() ),
'description' => __( 'The image display position.', 'woocommerce' ),
),
),
)
);
}
return self::$instance;
}