=== NowOrCry Deals ===
Contributors: noworcry
Tags: deals, offers, coupons, local business, shop
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show your shop's live NowOrCry deals on your site. Never cached – every visitor sees what is on offer right now.

== Description ==

NowOrCry is where local shops post deals and shoppers nearby grab them. This plugin puts your shop's live NowOrCry deals on your WordPress site.

* **Four layouts** – a swipeable carousel, cards, a compact list for sidebars, or one spotlight deal.
* **One deal in a post** – paste a deal's link from NowOrCry on its own line and it becomes the live deal card. Inside a sentence, the link gets a small live price tag.
* **Always live** – deals load from NowOrCry in the visitor's browser on every page view. Nothing is stored on your site, so page-cache plugins and CDNs never show an old deal. Time left counts down on the page, and a deal that ends or sells out leaves your site by itself.
* **Follow button** – visitors follow your shop on NowOrCry and get your next deals on their phone.
* **Block, widget and shortcode** – `[noworcry_deals layout="carousel" count="6"]`.
* **Private API key** – your key stays on your server. Visitors never see it.
* **You stay in control** – revoke the key in NowOrCry and your deals leave the site at the next page view, even on cached pages.
* **No credit link unless you want one** – a small "Deals by NowOrCry" link is off by default.

= Shortcode options =

`[noworcry_deals layout="carousel" count="6" follow="yes" new_tab="yes" prices="yes"]`

* `layout` – carousel, cards, list or spotlight
* `count` – 1 to 24
* `follow`, `new_tab`, `prices` – yes or no

== External services ==

This plugin shows deals from NowOrCry (https://noworcry.com), a service run by Connester SB Global Tech Private Limited. It cannot work without it.

* **When you save an API key** in Settings › NowOrCry Deals, your server sends the key to https://api.noworcry.com to check it and learn your shop's name. The key is sent only from your server, never from a visitor's browser.
* **When a visitor opens a page with deals** (a block, widget, shortcode or pasted deal link), the visitor's browser asks https://api.noworcry.com for that shop's or that deal's current public details: title, price, picture, time left and coupons left. The request carries the shop or deal id and your API key's id (not the key itself), so NowOrCry can stop showing deals on your site when you revoke the key. No cookies or visitor details are sent; like any web request, NowOrCry receives the visitor's IP address and browser details.
* **Pictures** of deals load from NowOrCry's image service.

NowOrCry terms: https://noworcry.com/terms
NowOrCry privacy policy: https://noworcry.com/privacy

== Installation ==

1. Install and activate the plugin.
2. On noworcry.com open your store's Settings › API Keys and create a key with "Read deals" and "Read store profile".
3. In WordPress open Settings › NowOrCry Deals, paste the key and press Save & test.
4. Add the NowOrCry Deals block, the widget or the shortcode – or paste a deal's link into a post.

== Frequently Asked Questions ==

= Will a caching plugin show old deals? =

No. The page only holds an empty box; deals are fetched fresh from NowOrCry in the visitor's browser every time, with caching switched off for those requests.

= What if NowOrCry cannot be reached? =

The box shows a plain "See our deals on NowOrCry" link – never old deals.

= How do I take the deals off my site? =

Revoke the key in NowOrCry (your store's Settings › API Keys). From the next page view the deal boxes are empty, even on cached pages. Or press Disconnect in Settings › NowOrCry Deals.

= Can I show another shop's deal? =

Yes – paste any public NowOrCry deal link into a post.

== Screenshots ==

1. Your live deals as a carousel on your website.
2. A deal link pasted into a post: live inside a sentence and as a full card, and how an ended deal looks.
3. Settings › NowOrCry Deals.
4. The NowOrCry Deals block in the editor, showing your live deals.

== Changelog ==

= 1.0.2 =
* Revoking your API key in NowOrCry now takes your deals off the site at the next page view, cached pages included. Pages carry the key's id (never the key) and NowOrCry checks it on every view.
* The settings page warns when NowOrCry no longer accepts your key.
* Permission names match the NowOrCry dashboard: "Read deals" and "Read store profile".
* A deal without a picture, or whose picture can no longer be loaded, shows NowOrCry's placeholder instead of an empty tile.

= 1.0.1 =
* Settings: the live price tag example is shown in dollars.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.2 =
Required: NowOrCry now shows deals only on sites whose API key is still active. Update to keep your deals showing.

= 1.0.1 =
Small wording change on the settings page.

= 1.0.0 =
First release.
