=== Herbalife & Competitor Price Match ===
Contributors: hillac1993
Tags: woocommerce, price match, competitor prices, herbalife, distributor
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

For UK Herbalife Independent Distributors with a WooCommerce shop: price checks against Herbalife and other distributors, profitable price matching, missing and discontinued products, and MyHerbalife orders prepared for you.

== Description ==

Herbalife & Competitor Price Match keeps your WooCommerce shop's prices right and saves you time placing orders on MyHerbalife.

**Know where you stand**

* Every product with your price, Herbalife's customer price (RRP), what it costs you including VAT, your margin, and the cheapest competitor, in one table.
* Each price is labelled with where it came from: your shop, the Herbalife catalogue, or the named competitor shop.
* Alerts on your WordPress dashboard: products selling below cost, cheaper elsewhere, Herbalife price changes, and discontinued products.

**Match prices without losing money**

* One-tap price matching per product: match the sale price, the regular price, or both.
* Competitor pricing rules: match or beat the cheapest shop automatically, only while you stay profitable by a margin you set.
* Raise below-cost prices to your cost plus a markup, by hand or automatically.
* Every price change is logged and can be undone.

**Keep your range complete**

* Find products and bundles other distributors sell that you don't.
* Create a draft product from Herbalife's own UK product page in one tap, or all of them at once: name, SKU, description, ingredients, how to use, images and SEO description, priced as competitively as you can while staying profitable.
* Take discontinued products off sale in one tap.

**Prepare orders on MyHerbalife**

* A browser script for Firefox on Android or Chrome on a computer prepares your shop's orders in your MyHerbalife basket: it finds or adds the customer, selects their address and adds the products, including the right Formula 1 flavours for your kits.
* It always stops at the basket: you check, pay and submit.
* The script also reads Herbalife's catalogue prices for your dashboard.

Compares with five UK distributor shops by default; add or remove shops in Settings.

This plugin is independent software for Herbalife Independent Distributors. It is not made, endorsed or supported by Herbalife.

== Installation ==

1. Upload the plugin zip under Plugins > Add New > Upload Plugin, then activate it and enter your licence key.
2. Open WooCommerce > Price Match. The Setup guide panel on that page walks you through the rest: your kits, competitor shops, and installing the order script on your phone or computer.

== Frequently Asked Questions ==

= Does it place or pay for orders? =

No. It fills your MyHerbalife basket and stops. You always check, pay and submit yourself.

= Does it need my Herbalife password? =

No. You log in to MyHerbalife yourself, as usual. The plugin never sees your Herbalife password.

= Which countries does it support? =

The UK: Herbalife UK prices, UK VAT, and UK distributor shops.

= How are competitor prices read? =

From each shop's public pages, once a day, with pauses between requests. Shops that ask for fewer visits are left until the next day.

== Changelog ==

= 1.3.0 =
* New: pay per sale. Instead of buying the licence, shops can use every feature for 5% of each paid order, taken from a prepaid balance (starting at £25, topped up automatically below £5). The plan choice, balance, top-ups and recent charges are on the Price Match page. Only each paid order's number, total and currency are sent; never customer details. Pay-per-sale shops download the plugin from api.andrewhill.org.uk/download/ and get updates in WordPress as usual. Shops with a licence are unaffected.

= 1.2.1 =
* New plugin icon.

= 1.2.0 =
* New: set the VAT rate yourself for products that aren't on Herbalife's price list (new, seasonal and limited-edition products), in Settings. Until now 20% was assumed, which made 0% products such as seasonal Formula 1 flavours look more expensive than they are and could raise their price wrongly. Your rate is used for costs, profit checks, price matching and new drafts.

= 1.1.1 =
* Fix: a new Herbalife product your catalogue doesn't have yet is no longer matched to a different product with a similar name.
* Fix: when the only shops selling a product are ones your rules skip (out of stock, say), new drafts use their price, flagged for you to check, instead of getting no price.
* Fix: invisible characters in Herbalife's product text no longer end up in draft names.

= 1.1.0 =
* Create all drafts: one button creates a draft for every missing product and accessory in the background, with progress, a Stop button and a list of anything skipped and why.
* New drafts are priced as competitively as your pricing rules allow while staying profitable: the cheapest shop's price (matched or beaten), never below your minimum price and never above Herbalife's customer price. Each missing product shows the price its draft will get, and why.

= 1.0.1 =
* Fix: drafts created from Herbalife now get the product photo as the featured image. Images come from Herbalife's image server, which still has photos the old addresses no longer serve.
* Imported images over 1000 px are scaled down; smaller ones are kept exactly as downloaded. Alt text is set to the product name.

= 1.0.0 =
* First release.
