Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries
GetProduct::get_field_definition
Method of the class: GetProduct{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = GetProduct::get_field_definition(): array;
GetProduct::get_field_definition() GetProduct::get field definition code WC 10.9.1
public static function get_field_definition(): array {
return array(
'type' => ProductInterface::get(),
'description' => __( 'Retrieve a single product by ID.', 'woocommerce' ),
'authorization' => array(
array(
'attribute' => 'RequiredCapability',
'args' => array(
0 => 'read_product',
),
),
),
'args' => array(
'id' => array(
'type' => Type::nonNull( Type::int() ),
'description' => __( 'The ID of the product to retrieve.', 'woocommerce' ),
),
),
'resolve' => array( self::class, 'resolve' ),
);
}