Menu Close

WooCommerce: Enable Holiday / Pause / Vacation Mode

default

Sometimes, just like physical stores, your WooCommerce website may need a few days off!

Nothing special there, as long as online customers are aware of the fact you will be reopening soon.

In WooCommerce words, this means hiding the add to cart buttons (one line of code) and also show a little notice on every WooCommerce page (one simple setting).

Enjoy!

WooCommerce Holiday / Pause / Closed Mode: add to cart buttons are hidden and therefore it’s not possible to go to Cart, Checkout and complete an Order.

1) PHP Snippet: WooCommerce Holiday / Catalog Mode – Hide Add to Cart Buttons

/**
 * @snippet       WooCommerce Holiday/Pause Mode
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 6
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_filter( 'woocommerce_is_purchasable', '__return_false' );

2) Setting: WooCommerce Holiday / Catalog Mode – Enable Store Notice

Go to WP Dashboard > Appearance > Customize > WooCommerce > Store Notice, type in your message, and click on “Enable store notice” (see screenshot above).

View Source
Posted in WooCommerce Tips