=== Pricifylabs Connector ===
Contributors: pricifylabs
Tags: woocommerce, dynamic pricing, personalization, pricing optimization, ai
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Requires Plugins: woocommerce
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI driven pricing for WooCommerce. Pricifylabs turns visitor signals into statistically-optimized markup, applied automatically across your store.

== Description ==

Most stores charge every visitor the same price, whether or not that price is the best one for that visitor. **Pricifylabs Connector** connects your WooCommerce store to the [Pricifylabs](https://pricifylabs.com) AI-powered pricing engine, which works out a statistically-optimized markup for each visitor and product and applies it to the price shown in your store.

There's no need to set or adjust manual pricing rules. That's the feature: connect your store and pricing is handled automatically.

**Why store owners use it**

* **Set up in minutes.** Paste a one-time code and you're connected.
* **No rules to maintain.** Pricing is calculated by the engine, not by a rulebook you have to keep tuning.
* **Your catalog stays untouched.** The markup is applied at display time. Your stored WooCommerce prices are never modified.
* **Instant off switch.** Pause pricing and every price returns to base immediately, without disconnecting your store.
* **Control where you need it.** Exclude specific products so they always show the base price.
* **Consistent prices for 30 days.** Once a visitor has been priced, they keep the same price for a 30-day period, so customers who travel or move between states don't see prices jump around.

**How it works**

1. **Connect.** Generate a one-time code in your Pricifylabs dashboard and paste it into the plugin.
2. **Price.** On priced pageviews, the plugin sends anonymized visitor signals to Pricifylabs and applies the markup it returns to the displayed WooCommerce price.
3. **Monitor and control.** Check sessions on your Pricifylabs dashboard for detailed metrics, and control excluded countries and states, how far prices move up or down (%), and more.

**What to know before you install**

* This plugin is a connector, not a standalone pricing tool. Prices are calculated by the external Pricifylabs API, which requires an active [Pricifylabs](https://pricifylabs.com) account (paid) and WooCommerce.
* Pricing is dynamic and can differ between visitors. Review the "Privacy and your store" section below so your store's policies match how the plugin works.

**Features**
 
* Dynamic price tailored to the user
* Adjustable API "ping rate" to balance markup freshness against API usage
* Per-product exclusion list (by product ID) to always show the base price
* Pause/Resume to revert all prices to base without disconnecting
* Security built in: all communication with Pricifylabs is signed and verified, and incoming webhooks are authenticated before the plugin acts on them

**Markup and pricing features**

* Markup worked out automatically for each visitor and product, with no manual rules
* 30-day price consistency for returning visitors, even if their location changes
* Country and state exclusions, managed from your Pricifylabs dashboard
* Control over how far prices move up or down (%), managed from your Pricifylabs dashboard
* Session-level metrics in your Pricifylabs dashboard
* Display-time markup only, so base prices are never changed and pausing reverts everything instantly

== External services ==

This plugin connects to the Pricifylabs API (`api.pricifylabs.com`, a paid third-party service operated by Pricifylabs) to calculate and apply dynamic pricing. It is a core part of the plugin's functionality and cannot be disabled while the plugin remains connected.

* **Store registration:** when you enter a registration code on the settings page, the plugin sends the code and your store's generated public key to the Pricifylabs API to link your store to your Pricifylabs account.
* **Markup lookup:** on priced pageviews, the plugin sends the visitor's IP address and browser/user-agent information to the Pricifylabs API and receives a markup value to apply to the displayed price.
* **Conversion reporting:** after a purchase, the plugin sends the associated request ID, success status, and order value to the Pricifylabs API so Pricifylabs can measure pricing performance.
* **Webhooks:** Pricifylabs may call back to your store's REST API to push configuration updates. These requests are authenticated with a signature the plugin verifies before acting on them.
* **Cookie:** the plugin sets a `pricifylabs_vid` cookie (a random ID, 30-day expiry) in the visitor's browser to recognize returning visitors and keep their price consistent for 30 days.

**Security.** All communication between your store and Pricifylabs is cryptographically signed and verified in both directions, and incoming webhooks are authenticated before the plugin acts on them. Your store's private credentials never leave your server, and you can pause pricing or disconnect at any time. See [Pricifylabs' Terms of Service](https://pricifylabs.com/terms) and [Privacy Policy](https://pricifylabs.com/privacy) for how data sent to the API is handled.

== Privacy and your store ==

Because the plugin sends visitor IP addresses and user-agent data to a third-party service and sets a cookie, you will likely want to reflect this in your store's privacy policy and cookie notice. Requirements vary by region, so check what applies to your business. The "External services" section above lists exactly what is sent and when, which you can use as the basis for your disclosure.

== Installation ==

1. Install and activate [WooCommerce](https://wordpress.org/plugins/woocommerce/) if you haven't already. This plugin requires it.
2. Install Pricifylabs Connector from **Plugins → Add New**, or upload the zip via **Plugins → Add New → Upload Plugin**.
3. Activate the plugin.
4. Open **Pricifylabs** in your wp-admin menu.
5. Generate a one-time registration code in your Pricifylabs dashboard and paste it into the settings page to connect your store.
6. That's it. Pricing is applied automatically. Use the Pricing panel to pause/resume, adjust the API ping rate, or exclude specific products.

== Frequently Asked Questions ==

= Do I need a Pricifylabs account? =

Yes. You'll need an account at [pricifylabs.com](https://pricifylabs.com) and a registration code from your dashboard to connect your store. The pricing engine is a paid service.

= Does this plugin work without WooCommerce? =

No. It requires an active WooCommerce installation and applies its pricing to WooCommerce product prices.

= Will a visitor see the same price if they travel or move to another state? =

Yes. Once a visitor has been priced, their price is held for 30 days. A returning visitor is recognized by a cookie, so someone who moves or travels across states during that period keeps seeing the same price.

= Does it change the prices stored in my catalog? =

No. The markup is applied when prices are displayed. Your stored WooCommerce prices are never modified, so pausing or removing the plugin puts everything back to base.

= Do I have to set up pricing rules? =

No. There are no manual rules and no per-product setup. The only optional controls are an exclusion list for products that should always show the base price, plus the country, state, and percentage controls in your Pricifylabs dashboard.

= How do I exclude specific products? =

In the Pricing panel, add the product IDs you want to exclude. Those products will always display their base price.

= What happens if I pause pricing? =

All prices immediately revert to their base WooCommerce price. Your store connection and excluded-products list are preserved, so you can resume at any time.

= What happens if I use Full Reset? =

Full Reset disconnects your store from Pricifylabs and deletes all plugin data stored locally, including your signing keypair and settings. You'll need a new registration code to reconnect.

= Does it work with caching plugins? =

Yes. Each visitor always sees their own correct price, never a cached price meant for someone else, and the cache is kept up to date automatically whenever your settings change. This works out of the box with WP Rocket, W3 Total Cache, WP Super Cache, and LiteSpeed Cache. If you use a different caching plugin or CDN, contact support to make sure it's fully compatible.

= What data does this plugin send externally? =

See the "External services" section above for a full breakdown of what is sent to the Pricifylabs API and when.

= Do I need to update my privacy policy? =

Most likely, since visitor IP addresses and user-agent data are sent to Pricifylabs and a cookie is set. See "Privacy and your store" above. This is not legal advice, so check the requirements that apply to your business.

== Screenshots ==

1. Settings page: connect your store with a one-time registration code.
2. Pricing panel: pause/resume pricing, adjust the API ping rate, and manage the product exclusion list.
3. Pricifylabs dashboard: overview of total requests, active keys, and success rate.
4. Pricifylabs dashboard: generate a one-time setup code to connect your store.
5. Pricifylabs dashboard: session metrics and API activity.
6. Pricifylabs dashboard: detail view for a single session, including device, location, and applied markup.

== Changelog ==

= 1.0.2 =
* Improved: added the plugin icon, banner, and screenshots to the WordPress.org listing.

= 1.0.1 =
* Fixed: several caching issues that could show shoppers an outdated or incorrect price — expired tokens, sale prices, variable product price ranges, zero-markup visitors, and currency formatting are now all handled correctly on cached pages.
* New: the page cache now clears automatically when you save settings, pause/resume pricing, or run a full reset, and pages with a marked-up price are excluded from caching entirely. Works with WP Rocket, W3 Total Cache, WP Super Cache, and LiteSpeed Cache.
* Improved: prices on cached pages no longer flash the old value before updating.
* Improved: clearer readme, with a new "What to know before you install" section and privacy guidance.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.2 =
Listing update only (icon, banner, screenshots). No functional changes.

= 1.0.1 =
Fixes pricing on stores that use page caching, including on-sale and variable products, price formatting, and cache clearing after settings changes. Recommended for all stores.

= 1.0.0 =
Initial release.