She got married at the Waldorf-Astoria not knowing that two of her guests had just been wounded by gunfire, but the real shocker came later — when the hotel abruptly canceled her million-dollar reception.

Anna Goldshmidt was in her suite, preparing for her nuptials, when the accidental shooting occurred during a pre-wedding cocktail hour in the hotel’s lobby Saturday evening, sources told The Post.

Thanks to a veil of secrecy constructed by family and friends, Goldshmidt — decked out in a jewel-encrusted headpiece — remained in the dark until after the traditional Jewish ceremony, which included the breaking of a glass followed by a passionate kiss as hundreds of guests cheered.

Goldshmidt learned of the gunplay only when the hotel cited it as the reason it was canceling her reception, leaving her “hysterical,’’ a law enforcement source said.

She let out a “blood-curdling” scream, the source said.

The Waldorf decided to call off the party because police still hadn’t found the gun when the event was supposed to start, sources said.

Waldorf bosses also weren’t too happy that two of their workers sustained leg wounds when they were hit by bullet fragments, the sources said.

A worker at the hotel said Sunday that a reception there “goes for at least a million dollars.”

Guest Maya Rafailovich, 55, of Brighton Beach, Brooklyn, suffered a graze wound to her forehead from the ricochet, and a male guest suffered a minor leg wound.

Two brothers — relatives of the groom, Elan Stratiyevsky — were arrested Sunday over the shooting, although the charges against them were put on hold, or “deferred,’’ by Manhattan prosecutors pending the investigation.

Sources said Vladimir Gotlibovsky, 42, was packing the legal 9mm Ruger in his right pants pocket when he got sloshed during the cocktail hour for the Brighton Beach couple and his gun accidentally discharged.

A woman can be seen on hotel surveillance video passing by him just before the gun discharged and may have accidentally bumped into him, causing it to fire, sources said. The bullet tore a hole in his pants and ricocheted off the marble floor.

“The guy’s an idiot. It was during cocktail hour. It was just stupid that he brought it,’’ said a guest, who declined to give his name.

After the gun fired, Vladimir panicked and slipped the gun to his brother, Felix, 51, who turned it over to their mother, sources said.

She stashed the weapon, for which Vladimir has a permit, inside her purse, then handed it to off to his wife, Maya, sources said.

Vladimir owns a liquor store in Eastchester in The Bronx, and relatives told cops he carries the Ruger to protect himself.

Charges against him were “deferred” by Manhattan DA Cyrus Vance Jr. “while the investigation continues,” his office said in a statement. Felix was accused of weapon possession and evidence tampering.

Additional reporting by Larry Celona, Rebecca Rosenberg, Amber Sutherland, Dana Sauchelli and Rebecca Harshbarger