Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 0 replies, has 1 voice.

Last updated by Andreas W. 21 hours ago.

Assisted by: Andreas W..

Author Posts
February 17, 2025 at 11:21 pm #16716581

gerwinV-2

<b>Background of the issue: </b>
I have set up shipping classes for different products and assigned these to these products. My shipping method has a different price for each shipping class and it will take the most expensive one. This works fine for the main domain, the .nl one. However, when I switch to .de or .com, the shipping class cost is no longer properly calculated. This used to work fine and now for my new shipping class it seems to be broken. Link to a page where the issue can be seen:

Steps to reproduce:
1. Add 5L variant of IJzerchloride to cart: hidden link
2. Go to cart.
3. Confirm that shipping cost to Netherlands is 9,95
4. Switch to german translation using button on top of page
5. See that shipping cost is empty
6 Switch to english translation using button on top of page
7. See that shipping cost is wrong

<b>Symptoms: </b>
When I switch to the German or English translation, the shipping cost is either empty or wrong.

<b>Questions: </b>
Why is the shipping class cost not calculated correctly on translated domains?
How can I fix the shipping cost issue on the .de and .com domains?

February 18, 2025 at 3:05 pm #16719781

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

While one of my teammates addresses your ticket, I will provide you with the initial debugging steps.

Please update your WPML plugin and any associated add-ons to the latest version, 4.7.0. This will allow you to benefit from the most recent bug fixes and improvements. While this update may not necessarily resolve your issue, working with the latest code will help us troubleshoot more effectively.

The latest released versions are under "My Account -> Downloads" on our website. Instructions for updating can be found here: http://wpml.org/faq/install-wpml/.

If you do not see the updates, please click the "Check for updates" button in the Plugins → Add New Plugin → Commercial tab.

Remember to back up your database before proceeding.

If the issue continues after the update, please share screenshots showing the problem. How have you set up the shipping classes? Are you using any extra plugins or custom code to set this up?

February 18, 2025 at 6:18 pm #16720559

gerwinV-2

Dear Andrey,

We have already updated everything to the latest version but the issue still persists.

February 20, 2025 at 1:06 pm #16729641

gerwinV-2

The issue persists and is causing us financial losses. Please provide assistance as soon as possible.

February 21, 2025 at 9:31 pm #16735325

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

This seems to be an issue between "WooCommerce Conditional Shipping Pro" and WPML.

Have you already checked WPML > Settings > Custom Field Translation for any fields that might be related to this plugin? If you find such setting-related fields, please set them to "Copy". Then translate the product again and run another test.

Guide:

If this will not solve the issue:

We had only one issue reported for this plugins so far.

The workaround we used to apply in the past was:

Open the file:
wp-content/plugins/woocommerce-conditional-shipping-and-payments/includes/conditions/class-wc-csp-condition-cart-shipping-class.php

Search for:

$shipping_class_id = $product->get_shipping_class_id();

Replace it with:

$shipping_class_id = apply_filters('wpml_object_id', $product->get_shipping_class_id(), 'product_shipping_class', true, apply_filters('wpml_default_language', NULL));

Could you give this a try please and let me know this solves the issue.

Best regards
Andreas

February 22, 2025 at 3:23 pm #16736507

gerwinV-2

The issue does not seem to be caused by Woocommerce Conditional Shipping Pro. I have disabled this plugin and the problem is still there.

Please check:
hidden link

Even after again updating the product through the advanced translation editor the shipping is not shown for this shipping class.

February 22, 2025 at 5:06 pm #16736721

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hi,

I would like to offer to take a closer look and request temporary access (wp-admin and FTP) to the site to investigate the issue further.

The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/.

If you are not able to provide such a copy of the website for testing, please let me know on this ticket.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.

Best regards
Andreas

February 23, 2025 at 1:24 pm #16737953

gerwinV-2

We have also found a error that seems to trigger the moment we go on the German website checkout page: https://pastebin.com/DYWDcUyR

February 25, 2025 at 8:42 pm #16747975

gerwinV-2

Hello, we have not yet received a reply regarding this issue and it is still persisting! Could you be so kind as to provide us with support?

February 25, 2025 at 8:53 pm #16748023

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

My apologies for the delay in answering!

Take kindly note that I do not work on Sundays and Mondays and my location is Lima, Peru.

I am looking into this issue but do not have a cause or solution ready.

Take note that such issues can not be analyzed on a live site. I will need first to take a copy of your site and install it on a virtual server to run tests and to debug the issue.

February 25, 2025 at 9:42 pm #16748311

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I created a package with "All In One WP Migration". When trying to download a package of your site the download is getting canceled every two seconds (each 10MB).

Could you please have a look into this issue and consult your hosting support team in case have any doubts about how to solve this issue?

February 28, 2025 at 10:54 am #16760311

gerwinV-2

Dear Andreas,

Could you try and download? It should work now.

February 28, 2025 at 7:21 pm #16762523

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The issue with the wrong shipping prices does not occur when I test the site only with WooCommerce and WPML plus our addons.

After enabling all plugins again the issue did not occur anymore.

I would suggest seeing the site into maintenance mode, disabling all plugins, and then reactivating all plugins again.

If this will not solve the issue, please clear the Object Cache and let us know in case the issue occurs again.

test.jpg
March 2, 2025 at 11:47 am #16765299

gerwinV-2

Remove the kaliumnitrat from your cart. This is a different shipping class than the ADR one. When you just have the Isopropanol 5L, which is a ADR shipping class. The shipping cost are not shown. See attached video:

hidden link
Link password: fZkFFBxik6

March 4, 2025 at 12:41 am #16771198

gerwinV-2

This issue remains unresolved despite previous troubleshooting steps. I would appreciate it if you could escalate this to a senior supporter or someone who can dedicate more time to resolving it.

Please provide an update on the next steps as soon as possible.