How to Set Your WooCommerce Store to Holiday Mode

Posted by egedijital

On June 12, 2024

Ruxi Data brings together multi-model AI, automated website crawling, live indexation checks, topical authority mapping, E-E-A-T enrichment, schema generation, and full pipeline automation — from crawl to WordPress publish to social posting — all in one platform built for agencies and freelancers who run on results.

Managing an online store can be demanding, especially during the holiday season. Sometimes, you might need to take a break and pause your online sales without losing your customer base. In this tutorial, we'll show you how to set your WooCommerce store to holiday mode. By following these steps, you can disable online purchases temporarily and create an announcement to inform your customers about your holiday schedule.

Why Use Holiday Mode?

Putting your store in holiday mode is essential if you:

  • Need a break during the holiday season.
  • Are going on vacation.
  • Have maintenance work scheduled.
  • Want to manage inventory without new orders coming in.

Step-by-Step Guide

1. Install the Code Snippets Plugin

The first step is to install and activate the Code Snippets plugin. This plugin allows you to add custom code to your WordPress site without editing your theme or core files.

Steps:

  1. Log in to your WordPress dashboard.
  2. Navigate to Plugins > Add New.
  3. In the search bar, type Code Snippets.
  4. Install and activate the Code Snippets plugin.

2. Add the Holiday Mode Code Snippet

Once the plugin is activated, you can add a new code snippet to disable online purchases.

Steps:

  1. In your WordPress dashboard, click on Snippets > Add New.
  2. Copy and paste the following code into the snippet editor:
/**
 * @snippet       WooCommerce Holiday/Pause Mode
 * @how-to        egedijital.com
 * @author        Abdurrahman Simsek
 * @testedwith    WooCommerce 8.9.3
 */
 
add_filter( 'woocommerce_is_purchasable', '__return_false' );
  1. Give your snippet a title, such as "WooCommerce Holiday Mode".
  2. Click Save and Activate.

This code snippet uses the woocommerce_is_purchasable filter to disable the purchasable status of all products in your store, preventing any product from being added to the cart.

3. Create a Holiday Announcement

Now that your store is in holiday mode, it's important to inform your customers. We will use WooCommerce's announcements feature for this purpose.

Steps:

  1. Navigate to Theme Customizer
  2. Click on Woocommerce.
  3. Select Storre Notice
  4. Add a title, such as "Holiday Notice".
  5. Write a message, for example:"Our store is currently on holiday. We will resume operations on [date]. Thank you for your understanding!"
  6. Set the announcement to Visible.
  7. Click Save Changes.

Deactivating Holiday Mode

When you're ready to resume normal operations:

  1. Go to Snippets and deactivate the "WooCommerce Holiday Mode" snippet.
  2. Remove or hide the holiday announcement from Theme Customizer->Woocommerce ->Store Notice

Conclusion

Setting your WooCommerce store to holiday mode is a straightforward process that ensures your customers are informed and your sales are paused seamlessly. By using the Code Snippets plugin and WooCommerce announcements, you can easily manage your store during holidays or breaks.

We hope you found this tutorial helpful. If you have any questions or need further assistance, feel free to leave a comment below. Enjoy your holidays!

egedijital

Related Posts