Plugin fail to load for different languages
-
Hello Ilario.
I’ve tried to install your plugin and it crashed wp when I’ve activated it.
the error is:
File not found: https://cakecompare.co.uk/wp-content/plugins/payment-cash-pickup/language/payment-cash-pickup-en_GB.mo
fortunately I know how to deal with these things and I’ve used ftp to deactivate the plugin, but other people could have problems with this.
then I’ve actually had a look at your code and I’ve noticed that in your plugin init you “exit” in case there isn’t a language file for the current wp install. but this means that the plugin fails to load for anyone using a language which is not en_US or it_IT !
I suggest you to quickly take off the conditional which exits the script, and then eventually use a different method to localize the plugin.
you could just do something like this:
load_plugin_textdomain('your-plugin-textdomain', false, basename( dirname( __FILE__ ) ) . '/languages/' );
- The topic ‘Plugin fail to load for different languages’ is closed to new replies.