Hi,
I got the same error too. Syntax error, but I
do not know how to fix it.
This is line 423:
$email_actions = array_merge($email_actions,array_map(function($val) {return $val.'_notification';},$email_actions));
Preceding lines, 397 to 422 … just in case one needs the previous codes to check line 423:
function email_footer() {
global $sitepress;
$sitepress->switch_lang();
}
function translate_email_notifications() {
$email_actions = array( //the first ones worked for WC 1.6
'woocommerce_order_status_pending_to_processing',
'woocommerce_order_status_pending_to_completed',
'woocommerce_order_status_pending_to_on-hold',
'woocommerce_order_status_failed_to_processing',
'woocommerce_order_status_failed_to_completed',
'woocommerce_order_status_pending_to_processing',
'woocommerce_order_status_pending_to_on-hold',
'woocommerce_order_status_completed',
//next are new, at least since WC 2.04; they also began to add the postfix '_notification'
//not clear they are consistent accross versions between 2.0 and 2.0.8, so adding them without postfix as well
'woocommerce_new_customer_note',
'woocommerce_reset_password',
/* the following are not added because messages to admins should not switch language; left here for reference of other _notification actions
'woocommerce_low_stock',
'woocommerce_no_stock',
'woocommerce_product_on_backorder'*/
);
//added for WC 2.0.x
Dear users,
We accidentally introduced a closure, which doesnt work until PHP 5.3. You must be using PHP 5.2. This is fixed already in our development version:
http://downloads.wp.xz.cn/plugin/woocommerce-multilingual.zip
Thank you for your reply. I upgraded to PHP5.3. All is ok now.
Thanks again.
Is the development version safe to install on my site?
The only change made since 2.3 is this one. Its safe.