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.