Thompson, a Republican from Pennsylvania, and his wife were “thrilled to attend and celebrate their son’s marriage on Friday night as he began this new chapter in his life,” his press secretary Maddison Stone said in a statement to Newsweek on Tuesday. “The Thompsons are very happy to welcome their new son-in-law into their family.”

Thompson’s son told NBC News that he “married the love of [his] life” on Friday and that his “father was there.”

The wedding came after Thompson on Tuesday joined the majority of House Republicans in voting against the Respect for Marriage Act, which would enshrine marriage equality in federal law.

But 47 Republicans did join all of the Democrats to pass the landmark legislation. The vote came amid concern that people’s rights could be at risk in the wake of the Supreme Court’s recent reversal of landmark abortion case Roe v. Wade.

Stone last week called the bill “an election-year messaging stunt.”

“This bill was nothing more than an election-year messaging stunt for Democrats in Congress who have failed to address historic inflation and out of control prices at gas pumps and grocery stores,” Stone said in an email to the Centre Daily Times.

The news prompted a backlash on social media, with some accusing Thompson of hypocrisy.

Author Steve Silberman wrote on Twitter: “GOP family values: @CongressmanGT votes against protecting marriage equality and then goes to his gay son’s wedding. Rep. Glenn Thompson’s son deserves a better father.”

Michael J. Stern, an opinion columnist for USA Today, wrote: “Glenn Thompson, (@CongressmanGT), attended gay son’s wedding after opposing protections for same-sex marriage. What a disgusting waste of space. And, can you imagine the shame of his son?”

Holly Figueroa O’Reilly wrote: “Glenn Thompson, GOP (duh) lawmaker attended his gay son’s wedding 3 days after voting against same-sex marriage bill. I’d say something about hypocrisy but I don’t like to repeat myself.”

Journalist Redi Tlhabi wrote that the “hypocrisy of politicians is quite distinct. They seek for the public that which they won’t tolerate for themselves. Voters either don’t remember or don’t mind?”

Writer Skylar Baker-Johnson wrote: “Glenn Thompson’s son is a better man than I am, because if my father had voted against the Respect for Marriage Act three days before my wedding he would’ve been disinvited.”

Thompson’s press secretary did not comment on the criticism.

Update 7/26/22, 10:05 a.m. ET: This article has been updated with comment from Thompson’s press secretary.