You can follow the below mentioned steps to turn off file sharing on public networks.
1.) Login to Dashboard of your WD My Passport wireless pro device.
2.) Click on the Wi-Fi icon on the top and Switch ON the Wi-Fi networks and choose the network with which you want your device to be connected for the internet connection.
3.) While entering the internet Wi-Fi Password, untick the box infront of the statement quoting “Share content on this network”.
In this way, you can stop file sharing on public networks.
For more information, You can refer the Page 23 of the User Manual from the below mentioned link and look for the information under the topic “Sharing and Modifying the Wi-Fi Connection” to untick the “Share content on this network”.