Hide Shipping Method Based on Day and Time of Day

Hide Shipping Method Based on Day and Time of Day
Author Bartosz Gajewski
Updated:
2021-04-30
Reading time:
3 minutes read

Learn how to hide shipping method based on the day and time of the day using one of WooCommerce’s most powerful shipping plugins, Flexible Shipping PRO. In this guide, I’ll walk you through it step by step.

Well-chosen and fast shipping methods have a positive impact on online store sales. So it’s important to have the right tool to configure shipping to match your client’s needs. An important part of configuring shipping is the ability to hide specific shipping methods based on day or/and time of day.

Why? Let’s say you offer a shipping method that provides faster delivery like next-day delivery. If you offer them all the time you may incur additional cost or compromise the user experience in your store. That’s why it’s important to offer special shipping methods only when you can make them happen. These may be weekends or simply orders after a specific time.
WooCommerce itself doesn’t provide this feature, but you can use one of WooCommerce’s most powerful shipping plugins, Flexible Shipping PRO. It allows you to add shipping rules based on the day of the week and time of the day. This allows you to hide or display shipping methods based on that factors.

Flexible Shipping PRO WooCommerce
$99.00

The best Table Rate Shipping for WooCommerce. Period. Create shipping rules based on weight, order totals or item count.

View Details or Add to cart
100,000+ Active Installations 30-day money back guarantee
Last Updated: 2024-09-26
Works with WooCommerce 9.0 - 9.4.x

Hiding or displaying shipping method based on day and time of day is only one of many features of the Flexible Shipping PRO plugin. It also allows you to set shipping costs by weight, price, shipping class, dimensions, and many, many other conditions.

How to hide shipping method on particular day?

Let’s say you have a shipping method that you don’t want to offer to your customers on certain days. For example, let’s assume that it is Saturday. To hide the shipping method on that particular day, you’ll need a shipping method made with the Flexible Shipping PRO plugin. If you already have one, you can just edit it.

It can be, for example, a method that always costs $20, but this method will also work with more advanced shipping methods with rules based on price, weight, and other available conditions.

regular shipping method made with the Flexible Shipping plugin

In your shipping method add a new rule with condition based on Day of the week and select the proper day of the week.

new shipping rule based on Day of the weekNow, in the Special action section, choose Hide for that shipping rule.

hide shipping method on particular day

It’s very important to use that special action. It will cause that whenever the rule is called (i.e. on a certain day of the week), the shipping method will be hidden and will not appear in the store.

Save changes and that’s it. The shipping method won’t be displayed on that particular day. If you want, you can add multiple days in the same shipping rule to hide the shipping method based on two or more days of the week.

How to hide shipping method based on time of day?

In a very similar way, you can hide the shipping method based on time of the day. This solution will be very useful for shipping methods like next-day delivery or same-day delivery. After a certain hour, the method will simply be unavailable to customers in the store. To set this, add a new rule based on Time of the Day in your existing shipping method made with the Flexible Shipping PRO plugin. Set the hourly time range when you want the method to be unavailable. For example, if you want to hide it after 6 PM, set it this way:

set time of the day for shipping

Remember to set the Special action as Hide in that shipping rule.

hide shiping method on time of the day

It will cause that whenever the rule is called (i.e. after 6 PM), the shipping method will be hidden and will not appear in the store.

Please have in mind, that Flexible Shipping uses your WordPress time zone to determine the Time of the Day feature. Check the plugin’s docs to learn more.

How to hide shipping method based on day and time of the day?

You can combine those two conditions to hide the shipping method based on both the day and time of that day. For example, if you don’t want to offer the next-day shipping method from 4 PM on Friday to the end of Sunday, you can hide a certain shipping method for the whole weekend. To do so, add a few rules to your shipping method.

First, let’s hide that shipping method for Fridays after 4 PM. Add a new rule based on time and set the hours range after 4 PM. Then, add a new condition in the same rule. Use the plus button to do so.

add a new condition to the same rule

In a new condition, choose Day of the week and select Friday.

Hide shipping method based on day and time of day

This rule with two conditions will be called only when both conditions will be true. So, in this case, it will be hidden only on Fridays after 4 PM.

Now, hide the shipping method for both Saturday and Sunday. Add a new rule in the same shipping method and set the condition as Day of the week. Additionally, select Saturday and Sunday. You can set them in one rule.

hide shipping method for more than one day

Remember to set the Special action as Hide in both rules.

Spacial action in the Flexible Shipping plugin

And that’s it. Now you know how to hide shipping method based on the day and time of the day in WooCommerce. I hope that it will be useful for you.

Comments
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments