Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Display Shipping Estimates with Shipping Methods on Cart/Checkout Pages in WooCommerce?

This code snippet helps you to provide estimated delivery days that it takes to ship the products based on the selected shipping methods. Additionally, it may reduce customer inquiries about delivery times, as the information is readily available during the checkout process.

function ts_shipping_method_estimate_label( $label, $method ) {

	$label .= '<br /><small>';

	switch ( $method->method_id ) {
		case 'flat_rate':
			$label .= 'Est delivery: 2-4 days';
			break;

		case 'free_shipping':
			$label .= 'Est delivery: 4-7 days';
			break;

		case 'local_pickup':
			$label .= 'Est delivery: 3-5 days';
			break;

		// No default case
	}
	
	$label .= '</small>';
	return $label;
}
add_filter( 'woocommerce_cart_shipping_method_full_label', 'ts_shipping_method_estimate_label', 10, 2 );

Output

The code implies to display the shipping estimate for all shipping methods on the cart page as shown below.

How to Display Shipping Estimates with Shipping Methods on Cart/Checkout Pages in WooCommerce? - Tyche Softwares

Similarly, the same shipping estimate is also displayed on the checkout page.

How to Display Shipping Estimates with Shipping Methods on Cart/Checkout Pages in WooCommerce? - Tyche Softwares

And, similar to the above delivery day range, you can also display a delivery day range based on shipping country in WooCommerce cart.

Or else, want to show the date & time slot range based on the selected shipping method? Then consider the WooCommerce Order delivery date pro plugin that will add the delivery date & time settings for shipping methods helping customers to choose their preferred date and time during the checkout process.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x