If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 1 reply, has 2 voices.

Last updated by Diego Pereira 1 year, 1 month ago.

Assigned support staff: Diego Pereira.

Author Posts
October 13, 2018 at 11:00 am #2814046


I've been getting:

Warning: Invalid argument supplied for foreach() in /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-comments.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/woocommerce-multilingual/inc/class-wcml-comments.php:72) in /wp-includes/pluggable.php on line 1219

The solution is an additional check:

if ( $ratings && is_array($ratings) ) {
foreach ( $ratings as $rating => $count ) {
$average_ratings_sum += $rating * $count;
$average_ratings_count += $count;


October 15, 2018 at 3:33 pm #2818136

Diego Pereira

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @nikolayp-6, welcome to the WPML support Forum!

Thanks for the report. Do you think we can reproduce this issue in a clean install? If so, I can forward it to our developers to fix this in a future release.

I created a test website with a clean WordPress install with WPML, Woocommerce and some dyummy content. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please reproduce the issue on this new install. Please note that you don't need to setup a entire website or clone your existing site.

All the best,

The topic ‘[Closed] Warning on posting a Woocommerce review’ is closed to new replies.