Picture taken from their Twitter
There’s no way this is legal unless it’s already in a contract – and even then, it might still be illegal. The notion of charging people more money because you’ve raised your prices after they’ve already bought something just breaks economics completely. You’d be able to sell a bunch of a product for cheap, and then later say sike and charge everyone a lot more.
I’m sure companies would love to do that, but no company exists in isolation. Every single company is buying something from another company to sell their product. If they could do this to their buyers, then their suppliers could do it to them. It would probably end up cancelling any gains you’d get.
I’m guessing this was a move their executives made without any consultation with legal, because it’s the kind of idiotic move only they could think of.