Skip to content Skip to sidebar

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

Problem:
After changing hosting, redirects for purchases in SK, CZ, and RO languages are incorrect, leading to the cart instead of the checkout page.
Solution:
1) Clear caching:
- Purge server/CDN cache and any caching plugins.
- Exclude WooCommerce endpoints from caching: /cart/, /checkout/, ?add-to-cart=, and /?wc-ajax=add_to_cart.

2) Create a test product in the SK language with price, stock, and published status, then try adding it to the cart on the SK site.

3) Enable debugging and check logs:
Edit wp-config.php (before the line "/* That’s all, stop editing! Happy publishing. */"):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

- Reproduce the issue and check /wp-content/debug.log for errors.
- Also check WooCommerce → Status → Logs for today’s logs (look for “fatal-error” or AJAX/add-to-cart entries).

4) Perform quick sanity checks:
- WooCommerce → Settings → Products → General: test with “Enable AJAX add to cart buttons on archives” on/off.
- Ensure that POST requests to /?wc-ajax=add_to_cart aren’t blocked by Security/CDN/WAF.

5) Fix database collation to avoid character corruption and related issues:
- Convert the database and all tables (including WPML icl_*) to Charset: utf8mb4 and Collation: utf8mb4_unicode_520_ci (or utf8mb4_unicode_ci if 520 isn’t available).

6) If problems started after the host change, consider re-migrating with the correct encoding/collation from the start (export/import as utf8mb4).

If this solution does not resolve your issue or seems 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 the problem persists, please open a new support ticket at WPML 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.

This topic contains 11 replies, has 0 voices.

Last updated by mariyaG-3 3 months, 1 week ago.

Assisted by: Andrey.

Author Posts
October 24, 2025 at 7:57 am #17515126

mariyaG-3

after the hosting change, some redirects don't work:

when I try to make a purchase for HU
hidden link
it redirect me to checkout and it is OK (EN, HR and SI are OK too)

When I try to make a purchase for SK, CZ or RO it redirect me to wrong page and I cannot make an order:

hidden link
hidden link

hidden link
hidden link

for these 3 countries SK, CZ or RO I cannot make a purchese, because it tedirect me to cart instead of checkout

October 24, 2025 at 8:09 am #17515159

Andrey
WPML Supporter since 06/2013

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

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

How did you set up those redirects? What happens if you temporarily remove all your custom redirects?

Are you using the standard WooCommerce functionality for this?
Also, please check whether the option “Redirect to the cart page after successful addition” is disabled under WooCommerce → Settings → Products → Add to cart behaviour.

October 24, 2025 at 8:32 am #17515288

mariyaG-3

A colegue of your give me this solution before and it worked perfect:

- Went to WPML >> String Translation page.
- Click on this section: "Not seeing strings that you are looking for?"
- Click on "Admin Texts Translation" link: hidden link
- Searched for the field name "mwca_redirect_to_page"
- Selected the string and press the Add to string translation button.

After that, went to the WPML >> String Translation page, assign the HU language for that string and added pages ID as translation

2363 was the HU page ID
1462 was the English page ID
Slovak: 7033
Czesh: 2333

You can also check yourself pages id by hovering over each page from here: hidden link

but when I changed the hosting half of the redirects work, the other - don't

these dont work:
hidden link
hidden link
hidden link

the other - EN, HU, SI, HR are OK

I can give you user and pass to check the admin

October 24, 2025 at 8:35 am #17515299

Andrey
WPML Supporter since 06/2013

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

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

Thank you for your feedback.

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. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.

October 24, 2025 at 10:27 am #17515704

mariyaG-3

I change the login URL due to hosting issues... can you send me another massage to give you the right WordPress access details.

Now the only problem I face after hosting change is that the above redirects don't work

October 24, 2025 at 11:01 am #17516013

Andrey
WPML Supporter since 06/2013

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

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

Yes, sure. The following message is set to private.

October 24, 2025 at 1:15 pm #17516768

Andrey
WPML Supporter since 06/2013

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

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

I’ve looked into this issue. I went to the checkout page (link you mentioned below), edited it, then used the admin language switcher at the top to switch to each language where the issue appeared. After simply re-saving (updating) the page for each language, everything started working as expected.

You can also check yourself pages id by hovering over each page from here: hidden link;

October 24, 2025 at 5:27 pm #17517696

mariyaG-3

It is not working: you cannot make an order for SK, CZ and RO
For example:
hidden link

If you try to buy the product you cannot... it redirect you to wrong page.

If you try to buy the product from HU - you can
hidden link

Please try bkth to see the difference

October 24, 2025 at 6:16 pm #17517754

mariyaG-3

Try to make an order in incognoto mode for both countries ans you will replicate the problem

October 24, 2025 at 7:43 pm #17517891

Andrey
WPML Supporter since 06/2013

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

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

I ran a few tests. In Incognito mode, the redirect doesn’t occur. This suggests that the product isn’t being added to the cart, so any redirect that depends on a successful “add to cart” never fires.

Please try the steps below:

1) Clear caching
• Purge server/CDN cache and any caching plugin.
• Exclude WooCommerce endpoints from caching: /cart/, /checkout/, ?add-to-cart=, and /?wc-ajax=add_to_cart.

2) Create a test product (SK)
• Add a simple test product in the SK language (price, stock, published).
• Try adding it to the cart on the SK site.

3) Enable debugging and check logs

Edit wp-config.php (before the line “/* That’s all, stop editing! Happy publishing. */”):

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

• Reproduce the issue, then check /wp-content/debug.log for errors.
• Also check WooCommerce → Status → Logs for today’s logs (look for “fatal-error” or AJAX/add-to-cart entries).

4) Quick sanity checks
• WooCommerce → Settings → Products → General: if relevant, test with “Enable AJAX add to cart buttons on archives” on/off.
• Security/CDN/WAF: make sure POST requests to /?wc-ajax=add_to_cart aren’t blocked.

5) Fix database collation (prevents related issues)

Your tables still show latin1_swedish_ci. Please convert the database and all tables (including WPML icl_*) to:
• Charset: utf8mb4
• Collation: utf8mb4_unicode_520_ci (or utf8mb4_unicode_ci if 520 isn’t available)

This avoids character corruption and can eliminate odd failures around localized data.

6) If problems started after the host change

Since the previous host worked fine, consider re-migrating with the correct encoding/collation from the start (export/import as utf8mb4).

October 25, 2025 at 9:47 pm #17518913

mariyaG-3

I made a test product for Romania and it cannot be added to cart:

hidden link

it is very strange that 3 countries work fine HU HR SI
but 3 countries - don't SK CZ RO

October 27, 2025 at 4:22 pm #17523110

Andrey
WPML Supporter since 06/2013

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

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

Yes, that is indeed strange.

I still recommend going through all the steps I shared earlier and letting me know the results. I’m confident this will bring us closer to a solution.

October 27, 2025 at 9:00 pm #17523714

mariyaG-3

I made a backup