Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output
SelectedAttribute{}
No Hooks.
Usage
$SelectedAttribute = new SelectedAttribute(); // use class methods
Methods
- public static get()
SelectedAttribute{} SelectedAttribute{} code WC 10.9.1
class SelectedAttribute {
private static ?ObjectType $instance = null;
public static function get(): ObjectType {
if ( null === self::$instance ) {
self::$instance = new ObjectType(
array(
'name' => 'SelectedAttribute',
'description' => __( 'A selected attribute value on a product variation.', 'woocommerce' ),
'fields' => fn() => array(
'name' => array(
'type' => Type::nonNull( Type::string() ),
'description' => __( 'The attribute name or slug.', 'woocommerce' ),
),
'value' => array(
'type' => Type::nonNull( Type::string() ),
'description' => __( 'The selected attribute value.', 'woocommerce' ),
),
),
)
);
}
return self::$instance;
}
}