=== Holy Day Off ===
Contributors: TopWP
Tags: shabbat, jewish holidays, woocommerce, close shop, holiday
Requires at least: 6.0
Tested up to: 6.9.4
Stable tag: 1.2.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The #1 Shabbat & Jewish holiday plugin for WordPress. Automatically close your WooCommerce store on schedule. Set your city once, rest every week.

== Description ==

**Holy Day Off** is the most trusted way for Jewish-owned WooCommerce stores to observe Shabbat and Jewish holidays — fully automated, zero manual work.

Pick your city, and the plugin does the rest. It knows exactly when Shabbat starts and ends based on halachic times for your location, and automatically manages your entire store: disabling purchases, hiding payment options, and showing visitors a beautiful, customizable alert bar.

Whether you run a small online shop or a high-traffic eCommerce site, Holy Day Off keeps your store compliant with your values — while you rest.

= Why Store Owners Choose Holy Day Off =

**Set it and forget it.** No need to manually close and reopen your store every week. Holy Day Off runs on autopilot — checking Shabbat times every 5 minutes so your store transitions seamlessly.

**Works with modern WooCommerce.** Full support for WooCommerce Blocks (cart & checkout), classic templates, and HPOS (High-Performance Order Storage). No matter how your store is set up, Holy Day Off has you covered.

**Beautiful admin experience.** A clean, card-based dashboard gives you instant visibility into your store's status, next Shabbat times, and all settings — with a live alert bar preview so you see exactly what your visitors will see.

= Full Feature List =

* **Automatic Shabbat scheduling** — Candle-lighting and Havdalah times calculated for your city
* **WooCommerce integration** — Hide "Add to Cart" buttons, disable payment gateways, and block checkout during Shabbat
* **WooCommerce Blocks support** — Works seamlessly with block-based cart and checkout pages
* **HPOS compatible** — Fully compatible with WooCommerce High-Performance Order Storage
* **Customizable alert bar** — Styled notification bar with custom message, colors, and optional close button
* **Full-page redirect** — Redirect your entire site to a dedicated Shabbat landing page
* **Force close** — Manually close your shop at any time with a single toggle
* **Live admin preview** — See your alert bar styling in real-time as you configure it
* **Cache-friendly** — Automatically clears WP Rocket cache when Shabbat status changes
* **Timezone-accurate** — Displays times in your city's local timezone, not the server's
* **Lightweight & fast** — Transient caching for API calls, scripts load only on plugin pages
* **Translation-ready** — Fully internationalized with i18n support
* **Clean uninstall** — Removes all plugin data and scheduled events when you uninstall

= How It Works =

1. Install & activate the plugin
2. Enter your license key
3. Select your city from the dropdown
4. Configure your preferences — alert bar style, WooCommerce behavior, or page redirect
5. Done! The plugin automatically manages your store every Shabbat

= Who Is This For? =

* **Jewish eCommerce store owners** who want to observe Shabbat without the weekly hassle
* **Agencies & developers** building stores for religious clients
* **Any WordPress site owner** who wants to display a scheduled alert bar or redirect visitors on specific days

= Pro Features =

Unlock the full power of Holy Day Off with a Pro license — automatic scheduling, custom alert bars, WooCommerce integration, and page redirects.

[Get Pro Version](https://topwp.net/product/holy-day-off-wp-plugin/)

== Installation ==

1. Upload the `holy-day-off` folder to `/wp-content/plugins/` or install directly from the WordPress plugin directory
2. Activate the plugin through the **Plugins** menu in WordPress
3. Navigate to **Holy Day Off** in your admin sidebar
4. Enter your license key to activate
5. Select your city and configure your preferred settings
6. That's it — your store will automatically close and reopen every Shabbat

== Frequently Asked Questions ==

= Does this work with the new WooCommerce Blocks checkout? =

Yes! Holy Day Off fully supports both the classic WooCommerce checkout and the new block-based cart and checkout pages. It prevents purchases through the Store API, disables payment gateways, and shows appropriate notices — no matter which checkout experience you use.

= Is it compatible with HPOS (High-Performance Order Storage)? =

Yes. Holy Day Off officially declares HPOS compatibility and works flawlessly with WooCommerce's High-Performance Order Storage feature.

= Does it work with caching plugins? =

Yes. When Shabbat status changes, the plugin automatically clears WP Rocket cache and the WordPress object cache. This ensures your visitors always see the correct store status.

= Will the times be accurate for my city? =

Absolutely. Shabbat times are calculated based on halachic standards for your specific city's geolocation. The plugin checks times every 5 minutes, and all times are displayed in your city's local timezone.

= Can I use this without WooCommerce? =

Yes! The alert bar and redirect features work on any WordPress site. WooCommerce-specific features (hiding add-to-cart, disabling payment) are only active when WooCommerce is installed.

= Can I force-close my store manually? =

Yes. The "Force Close" toggle in the Schedule Settings card lets you close your store immediately, regardless of the Shabbat schedule. Perfect for holidays or special occasions.

= What happens when I uninstall the plugin? =

Holy Day Off cleanly removes all its options, transients, and scheduled cron events from your database. No leftover data.

== Screenshots ==

1. Modern card-based admin dashboard with real-time shop status, license info, and next Shabbat times
2. Alert bar settings with live preview — customize message, colors, and close button
3. WooCommerce integration — hide add-to-cart and disable payment with toggle switches
4. Redirect settings — send visitors to a dedicated Shabbat page
5. Frontend alert bar as visitors see it

== Changelog ==

= 1.2.6 =
* **Fixed:** Critical — expired licenses caused the store to never close. The API returns demo-mode data (human-readable strings instead of ISO timestamps) for expired keys, but the plugin was still trying to parse them as timestamps, resulting in broken schedules
* **Fixed:** Plugin now detects the `demo: true` flag from the API and immediately triggers license revalidation instead of waiting for the daily check
* **Fixed:** If license revalidation confirms expiry, the plugin deactivates Pro features immediately rather than continuing with broken data
* **Improved:** Added `strtotime` sanity check — if timestamp parsing fails for any reason, the schedule is rejected instead of storing garbage values
* **Improved:** Debug report error log filter tightened — no longer matches false positives from Cloudflare headers or other plugins containing "hdo" in encoded URLs

= 1.2.5 =
* **New:** "Send Debug Report" button in plugin settings — sends diagnostic data (environment, timezones, cron status, recent error logs, plugin options) to TopWP support for faster troubleshooting
* **New:** "Preview Data" button lets you inspect the full debug payload before sending, with a copy-to-clipboard option
* **Fixed:** "Hide Add to Cart" button now works on Flatsome and other custom themes that bypass the default WooCommerce product summary hook
* **Improved:** Theme-agnostic add-to-cart hiding — uses `woocommerce_before_add_to_cart_form` / `woocommerce_after_add_to_cart_form` hooks that fire from inside WooCommerce templates regardless of theme
* **Improved:** Variation selectors remain visible on variable products when shop is closed — only the purchase button and quantity field are replaced with the disabled "Shop is closed" button
* **Fixed:** Prevented duplicate disabled button rendering on standard themes where both the summary hook and form hook fire

= 1.2.4 =
* **Fixed:** Fatal error caused by dev dependencies included in autoloader (myclabs/deep-copy, phpunit)
* **Updated:** Tested up to WordPress 6.9.1

= 1.2.3 =
* **Fixed:** "Hide Add to Cart" now shows a styled disabled button instead of hiding the button completely
* **New:** Customizable disabled button colors (background & text) in WooCommerce settings
* **Improved:** Disabled button uses WooCommerce `single_add_to_cart_button` class for theme-consistent styling
* **New:** LiteSpeed Cache support — automatically purges cache when Shabbat status changes
* **New:** Sticky "Save Changes" button — always accessible while scrolling the settings page

= 1.2.2 =
* **Fixed:** Hebrew translation not loading — text domain was loaded too late (on `init` hook) causing all `__()` calls during plugin registration to return English strings
* **Improved:** Recompiled .mo translation file from updated .po source

= 1.2.1 =
* **Fixed:** Shabbat times now display in the city's local timezone instead of the server timezone
* **Improved:** Schedule data includes original timezone from API for accurate display
* **Improved:** Updated plugin description and marketing copy

= 1.2.0 =
* **New:** Modern card-based admin UI with status dashboard
* **New:** Toggle switches replace checkboxes for better UX
* **New:** Live alert bar preview in admin settings
* **New:** WooCommerce Blocks checkout and cart support
* **New:** HPOS (High-Performance Order Storage) compatibility declared
* **New:** Transient caching for API calls (faster admin page loads)
* **New:** Translation-ready with full i18n support
* **New:** Clean uninstall — removes all plugin data
* **New:** Frontend assets properly enqueued (CSS/JS files)
* **Improved:** Better input sanitization and output escaping (OWASP compliant)
* **Improved:** Admin scripts and styles only load on plugin pages
* **Improved:** Close button only renders and loads JS when enabled
* **Fixed:** Deprecated FILTER_SANITIZE_STRING replaced with sanitize_text_field()
* **Fixed:** "Invalid plugin slug" on View Details link
* **Fixed:** Version inconsistencies between plugin files

= 1.1.5 =
* Initial release on WordPress.org

== Upgrade Notice ==

= 1.2.6 =
Critical fix: expired licenses caused broken schedules and the store would never close. Immediate revalidation now triggers when the API returns demo mode. Recommended for all Pro users.

= 1.2.5 =
Adds debug report tool for support troubleshooting. Fixes add-to-cart button still showing on Flatsome and other custom themes when shop is closed. Recommended for all Pro users.

= 1.2.4 =
Fixes fatal error on activation caused by dev dependencies in autoloader. Recommended for all users.

= 1.2.3 =
Fixes disabled add-to-cart button visibility, adds button color customization, LiteSpeed Cache support, and sticky save button. Recommended for all users.

= 1.2.2 =
Fixes Hebrew (and other translations) not displaying in the admin settings page. Recommended for all users with a non-English WordPress installation.

= 1.2.1 =
Fixes timezone display for Shabbat times. Times now correctly show in your city's local timezone. Recommended for all users.

= 1.2.0 =
Major update: modern admin UI, WooCommerce Blocks support, HPOS compatibility, and security improvements. Recommended for all users.
