After years of criticism from an internet safety organization and others, coffee chain Starbucks announced it will ban viewing pornography in its stores.

Business Insider reported that the company will introduce a tool for its in-store WiFi to prevent porn and other explicit material from being watched.

>> Read more trending news

"To ensure the Third Place remains safe and welcoming to all, we have identified a solution to prevent this content from being viewed within our stores and we will begin introducing it to our US locations in 2019," a Starbucks representative said in a Wednesday email to Business Insider.

Details on the solution were not provided, but the representative said tests were done to avoid blocking sites that were not offensive.

Starbucks says it has come up with a solutions to prevent explicit content, such as pornography,  from being accessed on store WiFi.

Credit: Scott Olson

icon to expand image

Credit: Scott Olson

Watching pornography is already banned at Starbucks, CNet reported, but has not been a content blocker in the U.S., although it exists in UK stores.

The news comes after Donna Rice, CEO of internet safety group Enough is Enough, criticized Starbucks earlier in the week for not following through on blocking explicit websites in 2016.

“By breaking its commitment, Starbucks is keeping the doors wide open for convicted sex offenders and others to fly under the radar from law enforcement and use free, public Wi-Fi services to access illegal child porn and hard-core pornography,” Hughes said in a statement. “Having unfiltered hotspots also allows children and teens to easily bypass filters and other parental control tools set up by their parents on their smart phones, tablets, and laptops continued.”

Although Hughes told Business Insider she was "thrilled" about Starbucks' decision, she said the company has lagged behind others, like Chick-fil-A, McDonald's, Panera Bread and Subway, which already filter content over WiFi.