WPML

Overview of the Issue

Some of the strings from WooCommerce Checkout Field Editor plugin do not appear as translated on the order confirmation page or the order emails sent to the client.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

We’ve contacted WooCommerce for a permanent fix, but have yet to hear back. In the meantime, you can use the following workaround to fix the issue on your website:

  1. Backup your website files and database.
  2. Navigate to woocommerce-checkout-field-editor/includes/wc-checkout-field-functions.php
  3. Change lines 681 to 690
    From
    function wc_get_checkout_field_value( $order, $name, $options ) {
    	$order_id    = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id();
    	$field_value = get_post_meta( $order_id, $name, true );
    	if ( 'checkbox' === $options['type'] && '1' === $field_value ) {
    		$field_value = __( 'yes', 'woocommerce-checkout-field-editor' );
    	}
    	return $field_value;
    }

    To

    function wc_get_checkout_field_value( $order, $name, $options ) {
    	$order_id    = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id();
    	$field_value = get_post_meta( $order_id, $name, true );
    	if ( array_key_exists( $field_value, $options[ 'options' ] ) ) {
    		$field_value = $options[ 'options' ][ $field_value ];
    	}
    	if ( 'checkbox' === $options['type'] && '1' === $field_value ) {
    		$field_value = __( 'yes', 'woocommerce-checkout-field-editor' );
    	}
    	return $field_value;
    }

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.

Ask a support question

All known issues