A California special-education teacher filed suit earlier this week against the state teachers' union and California Attorney General Xavier Becerra, saying she wasn't told she could opt out of paying union dues.

Bethany Mendez, a teacher in Northern California’s Freemont Unified School District and the lead plaintiff in the case, claimed she was never informed that she no longer was required to have $1,500 in annual dues deducted from her pay.

Mendez and five other California teachers named as plaintiffs want the California Teachers Association to be required to get the consent of educators before union fees are deducted -- and to refund fees because the union failed to inform them of the changes in the law.

NEW YORK, CALIFORNIA SUE TRUMP ADMIN IN 9TH CIRCUIT OVER NATIONAL EMERGENCY DECLARATION

In a court filing, lawyers representing the teachers argued that the unions “regularly divert a portion of wages to financially support the unions and their political activity,” and that the teachers “never gave legally valid consent for these deductions and have expressly objected to the deductions.”

The California Teachers Association did not immediately respond to Fox News' request for comment.

The lawsuit also said Becerra had failed to enforce a decision made last summer by the U.S. Supreme Court that found government workers couldn't be forced to contribute to labor unions representing them.

The landmark 5-4 decision in Janus v. American Federation of State, County and Municipal Employees scrapped a 41-year-old decision that had allowed states to require public employees to pay some fees to unions that represent them.

The ruling fulfilled a longtime wish of President Trump and conservatives to do away with the fair share fees non-members pay to unions in 22 states; the court stated that the laws violated the First Amendment by compelling workers to support unions with which they may disagree.

CLICK HERE TO GET THE FOX NEWS APP

“Great news today for America’s public servants, like teachers, police officers, and firefighters, who will no longer be forced to join a union or political organization and financially support leadership they disagree with,” House Majority Whip Steve Scalise, R-La., tweeted on Wednesday. “This is a victory for free speech!”

The ruling, however, was immediately slammed by union leaders as a blow to working-class Americans.

“In this case, a bare majority of the court, over the vigorous dissent of four justices, has conceded to the dark web of corporations and wealthy donors who wish to take away the freedoms of working people,” AFL-CIO President Richard Trumka said in a statement. “[I]t will further empower the corporate elites in their efforts to thwart the aspirations of millions of working people standing together for a better life.”

Fox News' Gregg Re contributed to this report.