Estimated delivery

You are here:
Estimated reading time: 1 min

This tool is useful to display a specific date or timeframe until a product will be delivered. It’s purely based on custom input.

To enable please access Customizer > WooCommerce > Product page – Content and enable it there eg: https://d.pr/i/4KsZBL .

You can customize its display to show and exact date (eg: August 12-15 ) or number of days (eg: 3-5 Days).

How to add estimated delivery per product

Edit the product in the backend and click on the Estimated delivery tab eg: https://d.pr/i/no3Rv1 .

Enabling estimations per variation

Access Customizer > WooCommerce > Product page – Content and enable the allow overrides per variations eg: https://d.pr/i/qfOnrh . Afterwards there should be a new input in the variation settings eg: https://d.pr/i/4IOszz .

Fixing text issues (with other languages)

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: 230

Join the conversation