=== CatCode Email Preview for WooCommerce ===
Contributors: catcodestudio
Tags: email preview, test email, woocommerce emails, order emails, email templates
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Preview any WooCommerce email on a real order and send a test copy to any address — core emails, custom order statuses and emails from other plugins.

== Description ==

See exactly what your customer got — or is about to get — before anyone complains. Pick an email and a real order, and the plugin shows the email the way WooCommerce builds it for that order: the real products, prices, addresses, notes and refunds, the subject and the heading with their placeholders filled in, the recipients, Cc, Bcc, From and Reply-to.

Nothing is sent while you look. The preview never runs the email's own trigger, so it does not mark "New order" as already sent, does not add order notes and does not touch the order at all.

**Features**

* Preview every order email: the ones WooCommerce ships, emails for custom order statuses and emails added by other plugins or the theme.
* Real orders or WooCommerce's sample order (for a new store with no orders yet).
* HTML or plain text — see the plain-text version even when the store sends HTML.
* Desktop and phone (375 px) width, or open the email in a new tab.
* Subject, recipients, Cc, Bcc, From and Reply-to of the exact email, and a warning when the email is switched off or has no recipient.
* Send a test copy to up to 5 addresses. Only those addresses get it: Cc and Bcc are left out, the customer receives nothing and no order note is written. The copy goes through wp_mail(), so your SMTP plugin delivers it the same way as real emails.
* "Email preview" box on the order screen: one click to the email the customer got for the current status.
* Works with the block email editor of WooCommerce, with HPOS and with the classic order storage.
* English, Ukrainian and Russian interface.

**Pro** (7-day free trial, no card)

* Email log: every WooCommerce email the store sends — type, order, recipient, subject, sent or failed with the mail error — with preview and resend.
* Preview and test copies in any installed language.
* Send every email of an order to your inbox in one click.
* Staging mode: redirect every WooCommerce email to one address, with the original recipient in the subject — for copies of a live store and checkout test runs.

== Installation ==

1. Upload the plugin and activate it (WooCommerce must be active).
2. Go to WooCommerce → Email Preview. The latest order and the email its customer got are shown right away.
3. Pick another email or order, then "Preview". To check delivery, enter your address and press "Send test copy".

== Frequently Asked Questions ==

= Does previewing send anything to the customer? =

No. The preview only builds the email. A test copy goes to the addresses you type, and nowhere else.

= Why is my email in HTML although I chose "Plain text"? =

With WooCommerce's block email editor switched on, WooCommerce sends every email as HTML, so a plain-text version does not exist. The preview says so.

= An email from another plugin shows empty fields =

Some plugins fill their own placeholders only when the email is sent. Developers can fill them for the preview with the `catcode_emp_prepare_email` action, which receives the email object and the order.

= Does "Include attachments" create invoices? =

It asks the plugins that attach files (PDF invoices and the like) for their attachments, exactly as a real send does. Some invoice plugins create the document and its number at that moment, so the option is off by default.

== External services ==

The Pro licence is checked against the CatCode licence server (https://catcode.com.ua/wp-json/catcode/v1/license) when you activate a key and once a day afterwards; the 7-day trial is issued by https://catcode.com.ua/wp-json/catcode/v1/trial when you press "Try Pro for 7 days". Sent: the licence key, the site address and, for the trial, the e-mail you entered. Nothing is sent from an install without a key. Terms: https://catcode.com.ua/terms/ · Privacy: https://catcode.com.ua/privacy/

== Screenshots ==

1. Email preview on a real order with recipients and subject.
2. Test copy form.
3. Email preview box on the order screen.

== Changelog ==

= 1.0.0 =
* First release.
