Shabbat Menucha

Description

Shabbat Menucha does one job well: from candle lighting on Friday until Havdalah on Saturday night, customers cannot complete a purchase. Instead of an Add to Cart button they see a message you choose, and once Shabbat ends the store reopens on its own.

Proudly created with love by Boost Media Ltd. — התוסף נוצר באהבה בבית בוסט מדיה בע”מ כדי לאפשר לכל חנות ווקומרס לשמור שבת וחג בצורה חלקה, מדויקת ואוטומטית לחלוטין.

Everything is automatic. You pick your city once; the plugin works out candle lighting and Havdalah times for every week and every festival from then on.

What it does

  • Replaces Add to Cart with a “Closed for Shabbat” button while the store is closed.
  • Blocks the purchase on the server as well, so it cannot be worked around — this covers classic themes, block themes, the block checkout and the Store API alike.
  • Handles Yom Tov, including two-day festivals outside Israel and festivals that run into Shabbat.
  • Shows a banner, or replaces the cart and checkout, or locks the whole store — your choice.
  • Reopens by itself at Havdalah.

Accurate times, without slowing your store down

Candle lighting and Havdalah times come from Hebcal.com. The plugin downloads two years of times in a single request and stores them in your database, then works everything out locally. No request is made to any external service while your customers browse, so there is no effect on page speed.

You can adjust the candle lighting offset, choose your Havdalah custom (nightfall, 42, 50 or 72 minutes), and add a safety margin of a few minutes at either end.

Three closing modes

  1. Purchases only (recommended) — customers can still browse and their cart is kept, they simply cannot buy. Best for SEO and the friendliest for customers.
  2. Purchases, cart and checkout — the cart and checkout pages show your Shabbat message instead.
  3. Full lockdown — the store is replaced by a closed page.

In every mode purchases are blocked on the server. The mode only decides how much the customer can still see.

Built to be safe for your store

  • Search engines can keep crawling while the store is closed, and lockdown mode answers with HTTP 503 and Retry-After, the standard signal for a temporary closure, so your pages are not dropped from the index.
  • Shop managers can keep working while the store is closed.
  • Works with page caching: a small script corrects a cached page, and the plugin clears the common caching plugins at each opening and closing.
  • A preview mode lets you see exactly how your store will look on Shabbat, without waiting for Friday.

Hebrew and RTL

The plugin ships with a full Hebrew translation and right-to-left styles. A Hebrew site shows Hebrew wording out of the box; every message can be edited from the settings.

External Services

This plugin connects to the Hebcal.com Jewish Calendar API to obtain candle lighting and Havdalah times for your store’s location.

Service used
Hebcal.com Jewish Calendar REST API — https://www.hebcal.com/hebcal
Service documentation: https://www.hebcal.com/home/developer-apis

A second endpoint, https://www.hebcal.com/shabbat, is contacted only when you
press “Check this location” on the settings screen, to confirm a location before
you save it.

Purpose
To determine when Shabbat and Yom Tov begin and end at your store’s location, so that purchases can be blocked and released automatically.

Data sent
* The location you configured: either a GeoNames city identifier, or a latitude, longitude and time zone.
* The date range requested (two calendar years).
* Your candle lighting offset and Havdalah preference.
* Whether the Israel or diaspora festival schedule applies.
* Your site’s language, so holiday names are returned in the right language.
* A user agent string identifying the plugin and your site URL.

No customer data, order data or personal information is ever sent.

When data is sent
* Once when the plugin is activated.
* When you save settings that change the location or the times.
* When you press “Refresh times now” or “Check this location”.
* Automatically by a scheduled task, which only contacts Hebcal when fewer than six months of stored times remain. Because each request covers two years, this works out at roughly once a year.

No request is made while customers browse your store.

Privacy and terms
* Privacy policy: https://www.hebcal.com/home/privacy-policy
* About the service: https://www.hebcal.com/home/about

Hebcal does not publish a separate Terms of Use document. The licensing terms
for the data are stated on the About and developer pages linked above.

Hebcal API content is licensed under Creative Commons Attribution 4.0 International. Attribution to Hebcal.com is shown on the plugin’s settings screen.

Credits

  • Developed with love by Boost Media Ltd. (בוסט מדיה בע”מ) — https://boostmedia.co.il/
  • Shabbat, Yom Tov, candle lighting and Havdalah times: Hebcal.com (https://www.hebcal.com/), licensed CC BY 4.0.
  • The city list uses identifiers from the GeoNames geographical database (https://www.geonames.org/), licensed CC BY 4.0.

Both licences are compatible with this plugin’s GPLv2-or-later licence, and no
code from either project is bundled.

Screenshots

Installation

  1. Install and activate the plugin. WooCommerce must be active.
  2. Go to WooCommerce Settings Shabbat.
  3. Choose your city, or enter a latitude, longitude and time zone.
  4. Save. The status panel at the top of the page shows when your store will next close and reopen.

FAQ

Do I need an account or API key?

No. Hebcal’s calendar API is free and needs no registration.

What happens to a customer who is in the middle of checking out?

Their cart is kept. They cannot complete the purchase during Shabbat, and can finish it after Havdalah.

Does it work with block themes and the block checkout?

Yes. The purchase is blocked through WooCommerce’s own product and Store API layers, which both classic templates and blocks go through.

Will this hurt my Google ranking?

It should not. Search engines are exempt from the closure by default, and full lockdown mode answers with HTTP 503 and a Retry-After header, which tells Google the closure is temporary. If you send a product feed to Google Merchant Center, schedule it outside the closing window, because products report as unavailable while the store is closed.

I use a caching plugin. Will customers see the wrong state?

Purchases are always blocked on the server, so a stale page can never result in an order being placed. To keep the display correct too, the plugin clears the common caching plugins at each opening and closing, and a small script corrects any page that was still served from cache.

Can I close on Yom Tov as well?

Yes, and it is on by default. Israel’s one-day festivals and the two-day festivals observed elsewhere are both handled, as is a festival that runs straight into Shabbat.

My city is not in the list.

Choose “Use latitude and longitude below” and enter your coordinates and time zone. The “Check this location” button confirms the times before you save.

How do I test it without waiting for Shabbat?

Use the “Preview the closed store” button on the settings screen. It opens your shop as it will look during the next closing, visible only to you.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Shabbat Menucha” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Shabbat Menucha” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial release.