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 26 replies, has 5 voices.

Last updated by Ricardo Alday 1 year, 4 months ago.

Assigned support staff: Ricardo Alday.

Author Posts
April 20, 2018 at 12:56 pm #1724791

daveH-9

Our order notification emails are suddenly not working correctly but are showing:

[{site_title}] New customer order ({order_number}) - {order_date}

The issue only occurs when the WPML plugins are activated. I'm using the latest version of WPML, WordPress, WooCommerce and themes.

April 23, 2018 at 8:45 am #1761326

daveH-9

I don't know if it's a related issue, but we're also getting some additional code appearing next to product names on order emails (and invoices, delivery notes). The code looks something like:

wcml_converted_subtotal:
3.55
wcml_converted_total:
3.55

See attached screenshot.

April 23, 2018 at 9:21 am #1762384

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

Hello there,

Welcome to WPML support forum.

Please apologize for the delay in answering. This is not usual in this forum. While one of my teammates takes care of your case I will provide you with the first debugging steps.

This issue has already been identified by our developers and while we release a new version, you can try the following workaround:

- Open your /woocommerce-multilingual/inc/class-wcml-emails.php file.
- Comment out (remove) lines 138 and 139 seems to help:

        add_filter( 'woocommerce_email_heading_new_order',  array( $this, 'new_order_email_heading' ) );
        add_filter( 'woocommerce_email_subject_new_order',  array( $this, 'new_order_email_subject' ) );

Let us know if it helps.
Andrés

April 23, 2018 at 9:42 am #1763125

daveH-9

Thanks Andrés. That appears to have fixed the subject line issue.

The other problem of the "wcml_converted_..." text is still there.

April 23, 2018 at 11:04 pm #1777873

Ricardo Alday

Hi Dave,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.

If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Thanks,
Ricardo

April 24, 2018 at 6:12 am #1779797

torbenT-2

I have the same issue with lines of item meta, there I also get a

wcml_converted_total
wcml_converted_subtotal

how can I exclude these items from the item meta lines? hidden link

April 24, 2018 at 10:18 am #1786004

daveH-9

We've hit another issue that is being caused by the WPML plugins (only occurs when these plugins are active):

When adding an order in the backend, if multiple quantities of one product are selected and then another different product is added, the quantities divide the total for that product instead of multiplying it.

(If you look at the screenshot attached the "Relax-A-Lock" product costs £6.25 but is being calculated on the top item in the order as £3.13 x 2.)

All of these issues are causing my client a great deal of trouble and really need resolving ASAP.

April 24, 2018 at 6:39 pm #1795675

Ricardo Alday

Hi Dave,

I'm unable to replicate the first issue on a clean installation of WooCommerce, WPML, WPML add-ons, and WooCommerce Multilingual with the default theme. See attachment below.
Can you test with all plugins disabled except for the ones I just listed. Let me know if the problem persists.

For your other issue please open a new ticket to avoid duplicates and/or confusion.

Thanks,
Ricardo

April 25, 2018 at 10:21 am #1806341

daveH-9

I have tested it with just those plugins and we still get the problem (though it may no occur on all products). If those plugins are disabled the problem doesn't occur.

April 25, 2018 at 3:47 pm #1814260

Ricardo Alday

Does the issue still happen if you disable the "WooCommerce Print Invoice & Delivery Note" plugin?
I went through the plugin code and noticed that in the print-content.php file the plugin goes through a loop of the product's item_meta and displays it after the product title. "wcml_converted_total" and "wcml_converted_subtotal" are part of the item_meta array so their values will show there. You can remove the loop (lines 116 - 141)

if ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">="  ) ) {
									if( isset( $item[ 'variation_id' ] ) && $item[ 'variation_id' ] != 0 ) {
										$variation = wc_get_product( $item[ 'product_id' ] );
										foreach ( $item[ 'item_meta' ] as $key => $value ) {
											if( !( 0 === strpos($key, '_' ) ) ) {
												$term = get_term_by( 'slug', $value, $key );
												$attribute_name = wc_attribute_label( $key, $variation );
												if( isset( $term->name ) ) {
													echo '<br>'.$attribute_name.':'.$term->name;
												} else {
													echo '<br>'.$attribute_name.':'.$value;
												}
											}
										}
									} else {
										foreach ( $item[ 'item_meta' ] as $key => $value ) {
											if( !( 0 === strpos( $key, '_' ) ) ) {
												echo '<br>' . $key . ':' . $value;
											}
										}
									}
								} else {
								    $item_meta_new = new WC_Order_Item_Meta( $item['item_meta'], $product );   
                                	$item_meta_new->display( );

								} 

Or contact the plugin author to see if there's a way to filter out those two keys from the loop.

April 26, 2018 at 10:22 am #1831821

daveH-9

Thanks Ricardo. That's a good short-term fix for the delivery notes.

However, any orders that are added manually to the backend, are also generating the same code in the metadata which then appears in order confirmation emails (see attached screenshot for an example).

I know you asked me to start a different support ticket the miscalculating issue, but surely it could be related?

April 26, 2018 at 5:35 pm #1841836

Ricardo Alday

I was able to replicate the issue on a clean installation. I have escalated this to our 2nd tier support. I couldn't replicate the total miscalculation issue so I can't be 100% it's related but we'll check too.
I'll let you know as soon as I get feedback from 2nd tier folks.

Thanks for your patience.

May 4, 2018 at 12:16 am #1967428

Ricardo Alday

Hi Dave,

Thanks for your patience. Can you go to wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-orders.php and replace all instances of:
1. wcml_converted_total with _wcml_converted_total
2. wcml_converted_subtotal with _wcml_converted_subtotal

Let me know if that helps.

May 14, 2018 at 11:11 am #2117286

daveH-9

I've done that and I'll let you know what happens. Thanks.

May 14, 2018 at 7:59 pm #2126578

Ricardo Alday

Thanks. Although I'm not sure this will fix past order, it should not happen in new orders.