First, open the dropdown menu in the top right corner and click on profile settings:
Next, click on Privacy:
Switch ON or OFF the Battle mode enabled slider.
Enable/disable battle mode to allow/prevent other users from sending you battle invites