Skip Navigation

Resolved

Reported for: WooCommerce Multilingual & Multicurrency 5.2.0

Resolved in: 5.3.0

Topic Tags: Bug

Overview of the issue

When using the Checkout Block feature from WooCommerce  on a page, certain values are not being translated correctly. This includes normal checkout field labels and various strings found within the .js files. The issue persists even after scanning for the strings, translating them, and running the “changed .mo files” dialog.

Workaround

Option 1

For now, users are advised to use the legacy checkout page until this new WooCommerce feature is fully translatable.

Option 2

Alternatively, please make sure of having a full backup of your site before proceeding.

  • Open your theme’s functions.php file.
  • Add this code:
    add_filter( 'woocommerce_shared_settings', function( $data ) {
    	$gateways = WC()->payment_gateways->payment_gateways();
    	foreach ( $gateways as $code => $gateway ) {
    		if ( 'yes' === $gateway->enabled ) {
    			$data[ $code . '_data' ]['title'] = $gateway->title;
    			$data[ $code . '_data' ]['description'] = $gateway->description;
    		}
    	}
    
    	return $data;
    } );