[Resolved] Split: after the hosting change, some redirects don't work:
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. */"):
- 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.
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.
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
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.
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;
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. */”):
• 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).