Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output
ProductImage{}
No Hooks.
Usage
$ProductImage = new ProductImage(); // use class methods
Methods
- public static get()
- public array(
- ERROR: no method name found on line ``
- ERROR: no method name found on line `),`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
ProductImage{} ProductImage{} code WC 10.8.1
class ProductImage {
private static ?ObjectType $instance = null;
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;
}
}