Plans for an extravagant Harry Potter-themed bash at the pub were cancelled after backlash from critics of JK Rowling's views on gender.