Resolved

Resolved in: 4.0.7

Topic Tags: Compatibility

Symptoms

After updating to WPML 4.0.6, caching with WP Super Cache does not work as expected or does not work at all.

The problem is caused by WPML integrating with new API in WP Super Cache for dealing with cookies.

It looks like these APIs were not properly implemented or documented preventing WP Super Cache to work as expected.

Workaround

A workaround would require commenting or removing all the calls to do_action( ‘wpsc_add_cookie’, … in WPML Core and, if installed, WooCommerce Multilingual.

As the changes are too many, editing the files (listed below) is not recommended, unless you know what you are doing.

A fix will be provided with a hot-fix version of WPML (4.0.7).

Here is the list of the files and lines where calls to do_action( ‘wpsc_add_cookie’, … should be commented out or removed:

  • WPML Core:
    • `classes/cookie/class-wpml-cookie.php:42`
  • WooCommerce Multilingual:
    • `classes/class-wcml-admin-cookie.php:44`
    • `compatibility/class-wcml-bookings.php:1257`
    • `inc/class-wcml-orders.php:372`
    • `inc/currencies/class-wcml-multi-currency-orders.php:380`
    • `inc/currencies/class-wcml-multi-currency-reports.php:149`