Street view of a Starbucks with flower-covered trellises and outdoor seating.
People sit outside a Starbucks in Phoenix in 2015. The company will now require customers to buy something if they are going to stay at the store. (File photo by Lynnie Nguyen/Cronkite News)

If you want to hang out or use the restroom at Starbucks, you’re going to have to buy something.

Starbucks said Monday it was reversing a policy that invited everyone into its stores. A new code of conduct — which will be posted in all company-owned North American stores — also bans discrimination or harassment, consumption of outside alcohol, smoking, vaping, drug use and panhandling.

Starbucks spokesperson Jaci Anderson said the new rules are designed to help prioritize paying customers. Anderson said most other retailers already have similar rules.

“We want everyone to feel welcome and comfortable in our stores,” Anderson said. “By setting clear expectations for behavior and use of our spaces, we can create a better environment for everyone.”

The code of conduct warns that violators will be asked to leave, and says the store may call law enforcement, if necessary. Starbucks said employees would receive training on enforcing the new policy.