Problem with custom translation files – SOLUTION
-
From a long time we have been customizing WooCommerce standard translation files (woocommerce-bg_BG.mo woocommerce-bg_BG.po), as we have additionally placed them in /wp-content/languages/woocommerce so that they are not overwritten during an update.
Everything was working fine.After updates to WordPress 6.7 and WordPress 6.7.1 and WooCommerce 9.4.0 and above, our translations stopped loading and instead loaded the standard WooCommerce translations, which by default are located in /wp-content/languages/plugins and which they are not good for us.
No matter what I did, nothing worked. I even replaced the default translation files in their default directory, but that didn’t help either.
I rolled back WooCommerce 9.3.3 and then everything worked correctly, the old way.SOLUTION:
I updated to WooCommerce 9.4.3. Everything broke as I expected.
I went to /public_html/wp-content/languages/plugins
I deleted all the “.json” files that started with “woocommerce-bg_BG-….some-numbers….. “
I deleted and too
woocommerce-bg_BG.l10n.php
woocommerce-bg_BG.mo
woocommerce-bg_BG.poDone, everything is OK again.
Our custom files that were sitting all the time in /wp-content/languages/woocommerce started loading again.I don’t know what caused it and who is to blame WordPress or WooCommerce, but after many days of constant nerves and 100 different ways of trial and error, updates, downgrades, caches delete, changes PHP versions, restore backups, alternative test servers, only this one worked for me.
I tested it on 2 different sites – it works.… I’m finally going to sleep.
- You must be logged in to reply to this topic.