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.

This topic contains 8 replies, has 2 voices.

Last updated by Andrey 2 months, 4 weeks ago.

Assisted by: Andrey.

Author Posts
June 18, 2024 at 12:28 pm #15748944

mathieuG-7

Background of the issue:
I am trying to edit Ajax request headers that the addon 'Multi-Currency Features for WooCommerce' (https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/) makes when using the multicurrency feature, so that I can set up Cloudflare to cache that request. I can do that by editing the ajax request headers that the addon sends. Link to a page where the issue can be seen: hidden link

Symptoms:
I expected to see my site performing as it usually does, ranking green, since I already use WP Rocket and Cloudflare. Instead, I got a slow site that disregards the cache due to the ajax request that invalidated the site on each load.

Questions:
How can I edit the Ajax request headers that the 'Multi-Currency Features for WooCommerce' addon sends?

June 18, 2024 at 1:54 pm #15749400

Andrey
Supporter

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

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

Thank you for contacting WPML support.

Can you please provide me with screenshots showing how you are attempting to edit Ajax request headers? Also, can you explain where you are seeing the impact of multi-currency on performance and why you think it's affecting performance?

It's highly possible that if you cache the multi-currency feature, you might end up with incorrect prices due to caching.

Another important point is that you are using WooCommerce 8.6.1, which is very outdated. It's crucial to update everything in your WordPress installation.

June 19, 2024 at 10:40 am #15754903

mathieuG-7

Hello,
I have attached my picture bellow of how they are currently, and not to worry about the prices I only used the custom-defined prices option, so I don't need the option where currencies are updated.

So I have uploaded two pictures of the header when I use the multi-currency (of the header and the server response), and one where I have disabled it (of the header and server response). As you can see in the pictures when comparing the server response time, when using the multicurrency I have 3.42s wait time on every page load, when I have it disabled its just 233ms which is a HUGE DIFFERENCE, causing my site to lose a lot of SEO ranking. If you compare the header you will see when the multicurrency is enabled it has a revalidating no-cache header that bypasses my caching rules.

I have updated all the WPML plugins, the WordPress version, and woocomerce. So the issue is how the plugin handles this.

Screenshot 2024-06-19 123340.png
Screenshot 2024-06-19 123327.png
Screenshot 2024-06-19 123225.png
Screenshot 2024-06-19 123027.png
June 19, 2024 at 1:44 pm #15756113

Andrey
Supporter

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

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

Have I correctly understood that the problem occurs when activating the multicurrency option under WCML settings?

I have enabled debug information for this support ticket. Please click on the following link for instructions on how to retrieve this information from your site and provide it to us:
http://wpml.org/faq/provide-debug-information-faster-support/

June 19, 2024 at 4:55 pm #15757712

mathieuG-7

Yes, you are correct, I get a slow server response whenever I use the multicurrency feature.

Debug info uploaded.

June 20, 2024 at 7:48 am #15761904

Andrey
Supporter

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

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

Thank you for the update.

I can do that by editing the ajax request headers that the addon sends.

Did you do anything about this?

I need to request temporary access (wp-admin and FTP) to your site – preferably to a test site where the problem has been replicated if possible – in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private, which means only you and I can see it and have access to it.

Please make sure to update your WordPress.

June 21, 2024 at 9:27 am #15773094

mathieuG-7

I haven't edited the ajax request header yet. Would giving you access to the git repo that has only the theme be sufficient?

June 24, 2024 at 1:59 pm #15807868

Andrey
Supporter

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

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

I will take a look and keep you posted.

I haven't edited the ajax request header yet. Would giving you access to the git repo that has only the theme be sufficient?

No, it is not necessary. Is the same issue occurring with any default theme and only WPML, WooCommerce, and WooCommerce Multilingual?

July 4, 2024 at 4:32 pm #15893387

Andrey
Supporter

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

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

The support ticket has been unexpectedly closed. I have reopened it. Are you still experiencing the issue? If so, please provide the new access details.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.