=== Recast for WooCommerce Subscriptions ===
Contributors: recastplugins
Tags: woocommerce subscriptions, bulk edit, subscription price, renewal date, csv export
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find subscriptions on old prices and renewals that will fail, then fix them in bulk with a preview and an undo.

== Description ==

When you change a subscription product, only new customers get the new terms. Existing subscribers keep their old price, dates and settings. To change hundreds of subscriptions by hand takes days.

Recast checks your subscriptions for money you are not collecting, then changes them in bulk, with a preview and an undo.

= Health check (free) =

Recast reads your active and on-hold subscriptions and reports:

* **Subscribers on old prices**: subscriptions that pay less than the product's current price, with the revenue per month they would add at current prices.
* **Renewals that will fail**: automatic renewals through a payment method that is not installed or is turned off.
* **Overdue renewals**: active subscriptions more than a day past their next payment, or with none.
* **Renewals that send an invoice**: manual renewals where the customer has a saved card that could pay automatically.
* **The next 30 days**: renewals due each day, with the amount to charge, and recurring revenue a month, per currency.

Each finding opens the matching subscriptions, and a preview of the fix. The health check only reads data.

= How it works =

1. **Select subscriptions.** Use filters: product, variation, payment method, status, renewal, currency, tax class, billing period, next payment date and customer. The count and the table update as you change them.
2. **Choose a change.** Example: set a new recurring price, or move the next payment date.
3. **Preview.** Recast shows each subscription with its values before and after. Nothing changes yet.
4. **Apply (Pro).** Recast changes the subscriptions in the background. You can undo the whole batch from History.

A batch is one change on one selection. Recast records every batch in History.

= Free =

* **Health check**: find subscriptions on old prices, renewals that will fail, overdue renewals and manual renewals that could charge automatically, and see the renewals due in the next 30 days.
* **Select subscriptions** with filters. Live count and a table of the selection.
* **CSV export** of the selection. Recast exports large selections in the background.
* **Preview** of every change: each subscription, each field, the value before and after, and the effect on recurring revenue.

= Pro =

* **Apply** a change to the whole selection. Recast works in the background, in small steps. You can pause or stop it.
* **Price changes**: set, increase or decrease the recurring price by a percentage or an amount, or raise it to the product's current price, with or without tax, with limits and coupon handling.
* **Date changes**: move the next payment, set the same day of the month for all, change the trial end or the end date, or change the billing period.
* **Other field changes**: status, renewal, payment method, tax class and custom fields.
* **History and undo**: Recast records the values before and after each batch. Undo a whole batch with one click.
* **Skip after change**: if a subscription changed between the preview and the apply, Recast skips it and tells you.

= What Recast does not do =

* It does not write to the database directly. Every read and write goes through WooCommerce and WooCommerce Subscriptions. High-Performance Order Storage (HPOS) works.
* It does not change products or past orders.
* It does not send emails to your customers. You decide how to tell them.
* It does not move saved cards between payment methods.

= Requirements =

WooCommerce 8.0 or newer and WooCommerce Subscriptions 5.0 or newer. WooCommerce Subscriptions is sold separately.

= External services =

Recast can use Freemius (https://freemius.com) for optional usage data and for Pro licenses. Recast sends nothing unless you opt in on the welcome screen. You can skip it. The free features keep working. When you opt in or activate a Pro license, Recast sends the site URL, the WordPress and plugin versions and, if you choose, your admin email to Freemius. Freemius uses them to check the license and to deliver updates. See the Freemius privacy policy (https://freemius.com/privacy/) and terms (https://freemius.com/terms/).

= Trademark note =

WooCommerce is a trademark of its owner. This plugin is an independent product and is not affiliated with or endorsed by the owner of that trademark.

== Installation ==

1. Upload the plugin folder to /wp-content/plugins/, or install it from the Plugins screen.
2. Activate it. WooCommerce and WooCommerce Subscriptions must be active.
3. Go to WooCommerce > Recast.

== Frequently Asked Questions ==

= Does it support High-Performance Order Storage (HPOS)? =

Yes. Every read and write goes through the WooCommerce Subscriptions API. Both storage modes work.

= Does a price change affect new customers? =

No. Recast changes only existing subscriptions. Product prices do not change.

= Does Recast charge customers at once? =

A price change applies on the next renewal. If a date change puts the next payment less than 24 hours away, Recast skips that subscription. You can permit immediate charges. Recast asks you to confirm first.

= Can I undo a batch? =

Yes, in Pro. You can undo every applied batch. Recast skips subscriptions that changed after the batch, so it does not overwrite newer changes. You can choose to restore them anyway.

= Is the free version limited by the size of the selection? =

No. Count, preview and export work on a selection of any size.

= What are the column names in the CSV file? =

The column names are fixed English keys, for example subscription_id and recurring_total. Scripts can rely on them. They do not change with the site language.

= Can Recast use the whole screen? =

Yes. Recast opens inside the WordPress admin, with the WordPress menu on the side. To give the steps more room, open the menu under your avatar and choose Full screen. The WordPress menu and toolbar then hide, like in the block editor. The exit button in the side rail takes you back to WordPress, and messages from WordPress and other plugins stay available under the bell icon. Choose Exit full screen in the same menu to go back. Without JavaScript the page keeps the normal WordPress admin.

= My exports folder is public on nginx =

On Apache an .htaccess file protects the folder. On nginx, add a rule that denies access to /wp-content/uploads/recast/.

== Third-party resources ==

* Poppins font by the Poppins Project Authors, licensed under the SIL Open Font License 1.1. Files and licence are in assets/fonts/poppins/.

== Screenshots ==

1. Select subscriptions with filters, a live count and a table.
2. Choose a change and set its options.
3. Preview with the values before and after for each subscription.
4. Batch progress with pause and stop.
5. History with undo.
6. CSV export.

== Changelog ==

= 0.1.1 =
* Batches, previews, exports and Health checks start at once instead of waiting for the next WP-Cron run.
* Translations for 70 languages. A language pack from translate.wordpress.org replaces the bundled translation for its language.

= 0.1.0 =
* Initial development release.
* Plain-language rewrite of all screens, the readme and the WP-CLI help. Adds a "How it works" guide.
* Recast's own design and components, inside the WordPress admin, with an optional full-screen workspace.
* Health check: subscriptions on old prices, renewals that will fail, overdue renewals and manual renewals with a saved card, each with a preview of the fix, and a 30-day renewal forecast.
* Set recurring price can raise lines to the product's current price.

== Upgrade Notice ==

= 0.1.1 =
Batches start at once, and the plugin is translated into 70 languages.

= 0.1.0 =
Initial release.
