=== Stockrows - Bulk Price Update for WooCommerce ===
Contributors: stockrowsapp
Tags: bulk edit prices, bulk price update, rounding, sale price, variations
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Raise or lower regular and sale prices by a percentage, variations included. Round to .99, see every new price before saving, undo later. Free.

== Description ==

Bulk edit prices across the whole shop, or some categories, by one percentage: a 5% rise, a 20% cut, regular prices, sale prices or both, variations included. You see every new price before anything is saved, and you can undo the change afterwards. Free, with nothing locked and no account.

= How it works, under Products > Change prices =

1. Choose all products or some categories, and simple products, variations, or both.
2. Raise or lower the regular price, the sale price, or both, by a percentage such as 8 or 7.5.
3. Round the new prices to a whole amount, to .99 or .95 (on a shop with two decimals), or not at all.
4. See every new price, old and new side by side, cuts in red. Then save, and undo later if you need to.

= What WooCommerce's own bulk edit leaves out =

WooCommerce's own bulk edit changes the products you tick on one list page, and variations one variable product at a time. It has no preview, no undo and no rounding to .99. This plugin changes the whole shop or chosen categories, variations included, with all three, in batches, so a large shop doesn't time out.

* Variations are named by attribute, such as "Hoodie – Size: L".
* A row whose prices changed after your preview, by a sale or another admin, is skipped and listed, never overwritten.
* Rounding goes the way of the change: up on a rise, down on a cut.
* A sale price that would end at or above the regular price is skipped and listed with the reason.
* A free product stays free, an empty price stays empty, and scheduled sale dates stay as they are.
* The last 10 changes are kept so each can be undone, row by row, where the price is still the one the change set.
* A save cut short (a closed tab) is marked as such, and the same change again leaves out the rows it already changed.

One change holds up to 100,000 products and variations. The price page uses no outside service: every request goes to your own site.

= The Stockrows editor: a different value on each row =

For work that one rule can't do, such as a supplier's new price list, a stock count or sale prices typed row by row, the Stockrows editor is a separate, paid service. It shows products and variations in one table, in your own Google Sheet or on stockrows.com (there up to 20,000 products and 50,000 variations in one go). It changes the regular price, sale price, stock and status (the sheet also stock status). Saving is free for a 7-day trial with no card, then needs a paid licence: see https://stockrows.com/order.html.

= The connection page, for the editor =

WooCommerce > Stockrows makes a Read/Write REST API key pair for your user in one press, stored as WooCommerce stores its own keys, and hands it with the shop's address to the browser editor's tab (see External services), or shows it once with Copy buttons. It tries the new keys, checks HTTPS, permalinks and the REST API, and lists the Stockrows key pairs to revoke one with a click. The editor's button revokes your previous editor pair.

Stockrows is not affiliated with or endorsed by WooCommerce, Automattic or Google. WooCommerce is a trademark of its owner. Google Sheets is a trademark of Google LLC.

== External services ==

Change prices uses no outside service: its requests go only to your own site.

The connection page, WooCommerce > Stockrows, works with a separate service: the Stockrows editor and sheet at https://stockrows.com, offered by its maker, a private individual named on the legal notice at https://stockrows.com/legal.html. The plugin's PHP code sends no request to stockrows.com or to anyone else. Data reaches stockrows.com only in these cases, each started by your press:

* "Make a key pair and open the browser editor" opens https://stockrows.com/try/edit-shop.html (German admins: /de/shop-im-browser-bearbeiten.html) in a new tab. Once that page asks, the plugin's page passes it, inside your browser, by a tab-to-tab message that the browser delivers only to stockrows.com: your shop's address and the new Read/Write REST API key pair (consumer key and secret). They go in no web address and no request. The editor uses the pair only for requests from your browser to your shop, and forgets it when its tab closes. When you save there, it sends your shop's address and your licence key, if any, to the Stockrows licence service, never your keys or products.
* The page's links (setup guide, Prices, Terms, Privacy) open stockrows.com when clicked.
* The Stockrows sheet is a Google Sheet you copy into your own Google account; the plugin never contacts Google. With the shop's address and a key pair in its Settings, the sheet reads and writes your shop from Google's servers, and sends your shop's address and licence key to the licence service when you push.

* Service: https://stockrows.com
* Setup guide: https://stockrows.com/docs.html
* Terms of use: https://stockrows.com/terms.html
* Privacy notice: https://stockrows.com/privacy.html

== Installation ==

1. Install and activate WooCommerce, then this plugin.
2. Go to Products > Change prices, choose the products and the change, and press "Show the new prices".
3. Check the list, then press the save button under it.
4. For the Stockrows editor: go to WooCommerce > Stockrows and press "Make a key pair and open the browser editor".

== Frequently Asked Questions ==

= How do I increase all prices by a percentage? =

Under Products > Change prices, keep "All products" and Raise, type the percentage, such as 10, and press "Show the new prices". Check the list, then save. Lower works the same way.

= Can I bulk edit sale prices only? =

Yes: choose "Sale price". A sale price that would end at or above the regular price is skipped and listed.

= Can I undo a change? =

Yes. Recent changes, at the bottom of the page, lists the last 10 changes. Undo shows what it would set back first, and skips and lists a price changed since. An undo can be undone too.

= What if a price changed after my preview? =

Each row is read again as it is saved; one whose prices no longer match the preview is skipped and listed.

= Does it change variable products? =

It changes their variations' prices; WooCommerce shows the product's price range from them.

= Does it edit stock, titles or other product fields? =

No. Stock, or a different price on each row, is the paid Stockrows editor's work, described above.

= What does it store? =

The last 10 changes, so they can be undone: the time, the user's ID, the choices, and each changed price's product ID, old and new value, in this site's database (not autoloaded). Per user, the ID and key ending of the editor key pair it made, and the last press. Deleting the plugin deletes both.

= Does the plugin store my keys or send them anywhere? =

WooCommerce stores it, like every REST API key. The plugin shows the secret once and keeps no copy. Only "Make a key pair and open the browser editor" passes the pair on, to the editor's tab on stockrows.com, inside your browser: see External services.

= What does it cost? =

The plugin, Change prices included, is free, with nothing locked. The Stockrows editor and sheet are paid, after a 7-day free trial with no card: see https://stockrows.com/order.html.

= Who can change prices, or make and revoke keys? =

Shop Managers and Administrators. A key acts as the user who made it. As on WooCommerce's own key page, you can revoke your own keys and those of users you may edit.

= What happens when I deactivate or delete the plugin? =

Prices stay as they are. Key pairs it made stay valid until you revoke them (WooCommerce > Settings > Advanced > REST API). Deleting the plugin deletes its records.

= Where do I get help? =

The setup guide at https://stockrows.com/docs.html, and https://stockrows.com/contact.html. Never send anyone your shop's keys.

== Screenshots ==

1. Products > Change prices: every new price before saving, old and new, cuts in red, with counts of rows that change, stay the same or are skipped.
2. The report after saving, with the button that undoes the change.
3. Recent changes: the last changes saved, an Undo button on each, and a change already undone marked as such.
4. WooCommerce > Stockrows after "Make a key pair and open the browser editor": handed over, the key pair shown once (keys blurred), and a check that the new keys read a product.
5. The same page: the shop's checks, and the Stockrows key pairs to revoke.
6. The Stockrows editor on stockrows.com after the hand-over: the shop's products in a table, two edits typed, ready to save.

== Changelog ==

= 1.2.2 =
* The editor's button revokes the key pair it made for you before, so pairs no longer pile up. Other pairs, older ones too, stay: revoke unused ones under 4.
* Change prices: the editor link is now "Connect the Stockrows editor".
* The connection page fits a phone.

= 1.2.1 =
* Readme: an "External services" section.
* The same plugin name in the readme and the plugin header.
* The self-checks verify the site's TLS certificate.
* No inline script on the Change prices page.

= 1.2.0 =
* New: Products > Change prices: prices up or down by a percentage, with rounding, a preview and an undo.

= 1.1.0 =
* New: "Make a key pair and open the browser editor" hands a new key pair and the shop's address to the browser editor, tab to tab.

= 1.0.0 =
* First release: a REST API key pair in one click, shop checks, and a list to revoke Stockrows key pairs.

== Upgrade Notice ==

= 1.2.2 =
Key pairs no longer pile up; the connection page fits a phone.
