Starbucks stores are now open to all — no purchase necessary.

The company informed US employees on Friday that people can gather in their cafes and patios even if they don't buy drinks, and that store bathrooms are available to everyone.

"Any person who enters our spaces, including patios, cafes and restrooms, regardless of whether they make a purchase, is considered a customer," Starbucks said in an email to employees.

The policy change follows an uproar over the way two black men were treated at a Starbucks in Philadelphia last month.

One of the men asked to use the bathroom, but an employee told him it was only for paying customers. When the pair then sat in the store without ordering anything, the manager called police, and the men were arrested for trespassing. No charges were filed.

Starbucks later apologized to the men and said it will close 8,000 US stores on May 29 for racial bias training.

Related: Starbucks stores will shut down for an afternoon of training on racial bias

The revised Starbucks policy suggests a code of conduct for store visitors, who should use the spaces as intended, be considerate of others and act responsibly.

It also directs employees to a procedure for dealing with customers that behave in a "disruptive manner," including guidance on how to approach disruptive customers. Employees who witness a situation that "presents an immediate danger or threat to partner or customer safety" are still instructed to call 911.

Earlier this month, Starbucks Chairman Howard Schultz, speaking at the Atlantic Council in Washington, teased the policy change.

He said the company used to have a "loose" policy of only allowing paying customers to use the bathroom, with the decision ultimately left to the store manager, but that stores would change that rule.

"We don't want to become a public bathroom, but we're going to make the right decision 100% of the time and give people the key, because we don't want anyone at Starbucks to feel as if we are not giving access to you to the bathroom because you are less than. We want you to be more than," Schultz said.

The old policy, and the decision by the Philadelphia store manager last month, were "absolutely wrong in every way," Schultz added.