Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Output

DeleteCouponResult::getpublic staticWC 1.0

Method of the class: DeleteCouponResult{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = DeleteCouponResult::get(): ObjectType;

DeleteCouponResult::get() code WC 10.9.1

public static function get(): ObjectType {
	if ( null === self::$instance ) {
		self::$instance = new ObjectType(
			array(
				'name'        => 'DeleteCouponResult',
				'description' => __( 'The result of deleting a coupon.', 'woocommerce' ),
				'fields'      => fn() => array(
					'id'      => array(
						'type'        => Type::nonNull( Type::int() ),
						'description' => __( 'The ID of the deleted coupon.', 'woocommerce' ),
					),
					'deleted' => array(
						'type'        => Type::nonNull( Type::boolean() ),
						'description' => __( 'Whether the coupon was permanently deleted.', 'woocommerce' ),
					),
				),
			)
		);
	}
	return self::$instance;
}