Not really sure where you got instructions to paste custom functions into a core WooCommerce plugin file. Or perhaps you mean your theme's function file?
But if it is the first case, you can simply use FTP and rename the plugin folders name to something else and WordPress will not load that plugin and therefore give you back your access.