Why Add Delivery Dates?

When customers shop online, one of the most common questions is:

“When will my order arrive?”

Adding an Estimated Delivery Date on product pages increases customer trust, reduces cart abandonment, and improves overall user experience.

How It Works

We’ll display a simple delivery message on every product page. For example:

“Estimated delivery between 25th Aug – 30th Aug”

This can be fully customized based on your shipping process.

PHP Snippet: Show Estimated Delivery Date

/**
 * @snippet       Show Estimated Delivery Date on Product Page
 * @author        Spiderwares
 * @compatible    WooCommerce 8+
 */

add_action( 'woocommerce_single_product_summary', 'spiderwares_estimated_delivery_date', 25 );

function spiderwares_estimated_delivery_date() {
    // Set delivery time in days
    $min_days = 3;
    $max_days = 7;

    $today = current_time( 'timestamp' );
    $min_date = date_i18n( 'jS M', strtotime( "+$min_days days", $today ) );
    $max_date = date_i18n( 'jS M', strtotime( "+$max_days days", $today ) );

    echo '<p class="spiderwares-delivery-date">🚚 Estimated delivery: <strong>' . $min_date . ' - ' . $max_date . '</strong></p>';
}

CSS Snippet: Style the Delivery Message

.spiderwares-delivery-date {
    margin-top: 10px;
    font-size: 15px;
    color: #2c7a7b;
    background: #f0fdfa;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

Where to Add the Code?

  • Add the PHP code into your functions.php file (or a custom plugin).
  • Add the CSS code into your child theme’s style.css file.

Result

Every product page will now display a clean estimated delivery date range under the product price or summary.

– Customers know exactly when to expect their order, which increases trust and conversions.