Estimated delivery text issues (with other languages)

You are here:
Estimated reading time: < 1 min

There are known issues with the texts of the Estimated delivery, showing strange symbols like question marks.

The days of the week are printed with PHP’s `strftime` function, so this is likely happening because the server’s PHP locale is not loading the most common locale module.

Luckily there’s a whole lot of awesome people online and this article helped me figure it out.

What you’ll need to do is to add this code in your child theme’s functions.php file:

add_filter('reycore/woocommerce/estimated_delivery', function( $settings ){
  $settings['locale'] = 'fr_FR.UTF-8';
  return $settings;
});

As you can see instead of the most common ‘fr_FR’ locale, it’s using and extra UTF-8 declaration.

Was this article helpful?
Dislike 0
Views: 83

Join the conversation