It took more than four years, thousands of signatures and a little help from J.K. Rowling herself, but Harry Potter fans have scored a major victory: By the end of 2015, all chocolate sold at the Wizarding World of Harry Potter and through Warner Bros.' outlets and licensed partners will be fair trade certified.

Warner Bros., which holds merchandising rights to the Potter series, committed to higher standards of cocoa production after growing pressure from fans who believe the franchise should reflect the values Harry Potter fought for.

chocolate frogs at HoneydukesChocolate is an important part of Harry's world and appears throughout the series. Chocolate Frogs are a favorite wizarding treat that leap to life when opened, and chocolate is the go-to antidote after exposure to the chilling effects of Dementors, dark creatures that feed upon happiness.

After learning the cocoa used in Warner Bros.' candy could come from organizations that employ child slave labor, the Harry Potter Alliance (HPA) took action.

The nonprofit, which fights real-world "dark arts," launched its cocoa campaign in October 2010 in a live broadcast with bestselling author John Green.

The group encouraged fans to send "muggle howlers," asking Warner Bros. to ensure it wasn't using slave labor to produce chocolate sold in Harry Potter's name.

In response, the studio sent HPA its sourcing guidelines. Then, anti-slavery group Free2Work reviewed the practices of Warner Bros.' chocolate supplier and gave the company an F.

Warner Bros. responded, citing a report that proved its chocolate was ethically made. When the studio refused to share the report, HPA launched a petition — which garnered more than 400,000 signatures — asking Warner Bros. to make the report public.

HPA started marketing and selling its own chocolate frogs, and in 2013, they teamed up with Walk Free, another anti-slavery organization.

J.K. RowlingThen, last spring, Rowling joined the cause.

The increased pressure worked, and last year Warner Bros. invited HPA and Walk Free to meet with its executives to discuss the sourcing requirements for Harry Potter chocolate.

Just before Christmas, Joshua Berger, Warner Bros.' president for Harry Potter Global Franchise Development, sent HPA founder Andrew Slack a letter that read, "By the end of 2015, and sooner when possible, all Harry Potter chocolate products sold at Warner Bros. outlets and through our licensed partners will be 100-percent UTZ or fair trade certified."

"I can confirm that J.K. Rowling is delighted that Warner Bros. and Universal are taking positive steps to source only certified cocoa for Harry Potter chocolate," Rowling's publicist, Mark Hutchinson, said in a news release.

Warner Bros.' commitment to fair-trade practices marks a big victory for HPA and speaks to the power of fan activism, but Slack says this is only the beginning. He hopes to use Warner Bros.' decision to compel other chocolate manufacturers to make their products fair trade.

"Albus Dumbledore told the students of Hogwarts that there are times where we must choose between 'what is right and what is easy,'" Slack said. "Warner Bros. has chosen to do the right thing, and Harry Potter fans everywhere should take pride knowing that because of their efforts, the chocolate sourcing for Harry Potter products will match the values of the book series."

Related on MNN:

Photos: (Honeydukes) Anna Fox/flickr, (J.K. Rowling) Ben Pruchnie/Getty Images

Laura Moss writes about a variety of topics with a focus on animals, science, language and culture. But she mostly writes about cats.

Harry Potter chocolate will be fair trade, thanks to fans
The Harry Potter Alliance worked to ensure all the chocolate sold in the fictional wizard's name would reflect the values he fought for.