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.

This thread is resolved. Here is a description of the problem and solution.

Problem: WooCommerce Cart become empty while switching between the languages

Solution: WooCommerce Cart become empty while switching between the languages. After connecting the English and Bulgarian Products. Then Products of the cart is sync between languages.

Relevant Documentation: https://wpml.org/forums/topic/product-buying-process-fails-because-of-an-error-product-is-not-supported-error/#post-4474523

This topic contains 12 replies, has 2 voices.

Last updated by samuelZ-2 1 month, 2 weeks ago.

Assigned support staff: Bigul.

Author Posts
August 22, 2019 at 1:44 pm #4439815

samuelZ-2

I was testing my products and checkout process but I have found that an error appears when I try to reach the end of the checkout saying " my product is no longer supported and it can't be purchased anymore. " I had few other issues regarding your plugin but this is the biggest since I started using the plugin.

I have been following this (link down below) but it never seemed to work, the last few updates from the support on this ticket they asked the owner to give their login credentials to take a deeper look and I was unable to follow any further steps regarding this issue.

https://wpml.org/forums/topic/has-been-removed-from-your-cart-because-it-can-no-longer-be-purchased-please-co/

Let me mention that I am not a developer and I feel difficulties if I have to work with something I don't understand and know so I will kindly ask if possible to share my details to anyone from the support guys who knows what he is going so he can check and fix the problem.

hidden link

August 22, 2019 at 7:11 pm #4442383

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

I was able to add the Bulgarian products to Cart and proceed with checkout. Please check the attached images.

Have you created the Products in Bulgarian? Because the English shop page is showing the following message. How many Products you are having in English.

No products were found matching your selection

Please deactivate WooCommerce Multilingual for a moment(after a backup) and check you are getting the expected result or not.

--
Thanks!

Bigul

August 24, 2019 at 8:21 pm #4452263

samuelZ-2

My issue is not yet resolved and I think I have found what cause the problem.
I have recorded a video for you to take a deeper look and inspect the problem so you can get an idea what causes the problem and I hope you can help me fix the issue because I haven't found any solution to this.
hidden link

August 26, 2019 at 9:29 am #4457181

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the details. Please enable the following options after a backup and make sure you are getting the expected result or not.

1) Visit WooCommerce>>WooCommerce Multilingual>>Settings
2) Make sure *Synchronize cart content when switching languages* option of *Cart* section is enabled
3) Visit WPML>>Languages
4) Enable *Adjust IDs for multilingual functionality* option of *Make themes work multilingual* section
5) Enable *Store a language cookie to support language filtering for AJAX* option of *Language filtering for AJAX operations* section

--
Thanks!

Bigul

August 26, 2019 at 2:01 pm #4459453

samuelZ-2

All these settings are "ON " and activated already but it still doesn't work.

August 26, 2019 at 3:25 pm #4460159

samuelZ-2

Please take a look here:
hidden link

August 26, 2019 at 6:31 pm #4460813

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. Please switch for a moment to *TheGem* parent theme after a site backup and make sure the issue is existing or not.

Also please share with me the WordPress debug.log (not WPML debug information) for further details.

Please check this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warning related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

August 27, 2019 at 8:06 am #4463563

samuelZ-2

So the first thing I did was to switch to the parent theme as you asked me to do and I did but the error still exists.

I have done what you asked me for but there is a question down below, please take a look.
As you mentioned:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true ) **********Not sure where should I put and modify this (above, last line) because in the wp-config file. php file there isn't that kind of line. **

Take a look at the screenshots here:
hidden link

I tried to recreate the problem which gave me an error once again and here is the result:

WPML Debug Error from the Plugin Support Settings: https://pastebin.com/wQ2y8dvc
Wordpress Debug Error from the Server: hidden link

If you think something more must be done, let me know I can provide you access to inspect and make sure everything works fine!

August 27, 2019 at 5:59 pm #4468875

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the details. The Debug.log is showing an error related to WPML. But it has happened in the 23rd of this month.

So I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

August 28, 2019 at 1:17 pm #4474523

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the login information. Maybe the issue is happening because the Products are not created as translation in Bulgarian. So it will be considered different Products in each language. Please check the attached images.

Therefore is it okay to connect the Bulgarian Products with the English one?

--
Thanks!

Bigul

August 28, 2019 at 1:43 pm #4474735

samuelZ-2

They were connected last time I checked but I see now that you properly have found that they are not.
So yes, it's okay to connect them and test what's going to happen then, because the "Presale"are the same products but in English which are not yet created, but I created them because you said I need to have English as well if I have Bulgarian.
So, yes. Please do it.

August 28, 2019 at 6:56 pm #4476551

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates and permission. I have connected the English and Bulgarian Products. Now the Products of the cart is sync between languages. Please check the attached images for more details.

Please check it and let me know your feedback.

--
Thanks!

Bigul

August 29, 2019 at 3:02 am #4477549

samuelZ-2

My issue is resolved now. Thank you!