This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with adding products to the cart on a multilingual WooCommerce site, where Bulgarian is the main language and English is secondary, this might be due to a compatibility issue with the Buy Once or Subscribe for WooCommerce Subscriptions plugin. Solution: We recommend following these steps to resolve the issue: 1. Navigate to WPML > Settings > Custom Fields Translation and click on "Show system fields". 2. Search for "_bos4w_saved_variation_subs" and set it to Copy. Save your changes. 3. Search for "bos4w_use_variation_fixed_price_" and change all results to Copy. Save your changes. 4. Replace the code in
with the updated code from the provided link. 5. Do the same for
class-bos4w-cart-options.php
. 6. Make a minor edit to the original product experiencing the issue to apply the solution. 7. Update its translation. Additionally, you can translate the plugin strings in WPML > String Translation under the domain "bos4w". For the files with the updated code, please visit: https://we.tl/t-HmLg3HiCkZ
If this solution does not apply to your case, or if it becomes outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket at our support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Thank you for waiting. I checked a few things on the website, but couldn't get the plugin to work properly on translated pages. Again, this likely is a compatibility issue between the Buy Once or Subscribe for WooCommerce Subscriptions and WPML.
To verify that, I've created a Sandbox (a testing website), with the needed WPML plugins and WooCommerce setup. You can access it here:
hidden link
Please install the Buy Once or Subscribe for WooCommerce Subscriptions, setup one product that uses it, and translate the product. The idea is to test in isolation, so only one product is enough to test. Please don't import or create other unnecessary content. Let me know if the behavior is the same there.
I know this takes some effort, so thanks in advance for your cooperation on this matter.
Thank you for sharing. The result was the same, which indicates that this plugin is not WPML compatible, at first. I've escalated this ticket to our 2nd tier team, to see if they can find any workaround.
This might not be possible, and might depend on the WooCommerce's team collaboration. I'll keep you updated.
Our developers have come up with a solution that's a bit complex, and needs proper testing before being applied. Basically, the Buy Once or Subscribe for WooCommerce Subscriptions plugin is fully incompatible, and ignores the existence of secondary languages on the website. The solution involves changes in core files from this plugin, and that's what I'll test.
I'll download a copy of the website to make the proper tests and report them to our devs. I'll keep you updated. I'll likely bring new information tomorrow. Thank you for your patience so far.
I've tried in different ways to download a copy of the website, but I couldn't make it run locally. I got errors consistently.
To be able to further troubleshoot this issue without harming your live website, I need you to please create a staging (testing) version of it, preferably in the same server. You can use a plugin like WP Staging to do so.
You can keep the same user there, so it's not necessary to share credentials again. I know this takes some effort, so thanks in advance for your cooperation on this matter.
Thank you for sharing. The solution involves changing a few core files from the Buy Once or Subscribe for WooCommerce Subscriptions plugin, so it that it handles the multilingual products as expected. Please ensure to have a backup, and follow these steps:
1. Go to WPML > Settings > Custom Fields Translation and click on "Show system fields";
2. Search for "_bos4w_saved_variation_subs" and set the result to Copy. Save;
3. Search for "bos4w_use_variation_fixed_price_" and change all the results to Copy. Save;
4. Replace the entire code of the file content/plugins/buy-once-or-subscribe-for-woocommerce-subscriptions/functions/class-bos4w-front-end.php with the corresponding file's code in the link below;
5. Do the same for 'class-bos4w-cart-options.php';
6. Make a small change on the original product that has the issue, so that the solution is applied to it;
7. Update its translation;
I've applied the solution to your staging website, and recorded the steps for you, so you can visualize better how the solution is applied: hidden link
Also note that after that, you can translate the plugins strings in WPML > String Translation. They're under the domain "bos4w"
You can find the files with the proper code here: hidden link
We've prepared a fix to make our plugin compatible with WPML, which will be included in the next version release. I'll keep this ticket open and let you know when you'll be able to update the plugin.
Thank you for communicating that to us. It seems that the issue is then solved. If so, can you please mark this ticket as resolved? Let me know if you have other questions.