Under Article II of the US Constitution, in order for a case to be justiciable in federal court, a matter must present actual case or controversy brought by a person who has standing (facing personal injury), ripeness (denial would result in immediate permanent harm) and not moot ( not already resolved with finality by other means).
Commerce Clause.
Under article I of the constitution congress has ENUMERATED powers. Congress has the power to regulate INTERSTATE commerce which includes any activity that has an effect on interstate commerce. States have concurrent power to regulate INTRASTATE commerce within their borders.
Here the State attempts to intentionally discriminate against out of state cheese producers and the state is not a market participant. Since the intent of the law is discrimination and the law is not permissible under an exception the law is invalid.
The Named Defendants.
Under the 11th amendment, an individual cannot sue a state in federal court. However, individuals can sue subdivisions of state (cities, counties, districts) in federal court. Further, individuals can seek an injunction against a state official to prevent the state from taking some action under what is called the stripping doctrine.
Here the action is in federal court because it is a "class action suit in federal court" and it is brought by individuals because it is by "wine and cheese producers" and not by a suit by the federal government or another state.
The suit is against a state because one defendant is the "State of Oregon" but the other defendant is a state official, the "director of the department of revenue" the suit seeks an injunction.
Therefore, the 11th amendment may bar this action against the state of Oregon but it would not prevent the federal court from enjoining the director of the department of revenue who is a state official. So effectively the action is not barred by the 11th amendment.