=== Email Orders Digest ===
Contributors: nwells
Donate link: https://www.limelightdigital.co.nz/contact-us/
Tags: woocommerce, orders, order emails, daily order email, daily digest
Requires at least: 6.5
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 1.5.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Sends out a daily or weekly email digest of the orders made in WooCommerce

== Description ==

Sends out a daily or weekly email digest of the orders made in WooCommerce. A daily digest covers the previous day; a weekly digest, sent on the day you choose, covers the seven days before it. Pick the time it's sent, and send the latest report on demand with the **Run now** button. This provides a great summary of yesterday's activities as well as helping with quickly checking orders against any payments received overnight without needing to log in. It can also be useful as a packing slip for a warehouse and what stock goes with which order.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/woo-email-orders` directory, or install the plugin through the WordPress plugins screen directly.
1. Activate the plugin through the 'Plugins' screen in WordPress
1. Go to WooCommerce > Settings > Emails and click **Manage** on **Order digest** to set the recipient(s), subject, heading, introduction text and schedule (daily or weekly, the report day and the send time), or click **Run now** to send the latest report

== Frequently Asked Questions ==

= When does the email go out and what does it cover? =

By default it's sent daily at 1am (site time) and covers the previous day. On the **Order digest** Manage screen you can switch to weekly, choose the report day and pick the hour it's sent. A weekly report covers the seven full days before the report day, e.g. a Sunday report covers Sunday to Saturday of the week before.

= I didn't receive any email overnight =

The digest is only sent when orders were made in the period it covers. Also check the **Order digest** email is enabled under WooCommerce > Settings > Emails.

= Can I change the email layout? =

Yes. The digest uses your WooCommerce email styles, header and footer. To change its body, copy `templates/emails/email-orders-digest.php` from the plugin to `yourtheme/woocommerce/emails/email-orders-digest.php` and edit it there.

= I didn't receive any email at the scheduled time =

If you are relying on the built-in WordPress scheduler, then this only gets triggered by site visitors. Therefore, if no one visits your site at the exact time of your intended schedule then the email won't trigger exactly when you want it. A preferred option, if your hosting supports, is to set up a cron task at server level to trigger the `/wp-cron.php` URL.

== Screenshots ==

1. Example layout for the order email that is sent out

== Changelog ==

= 1.5.0 =
* Weekly reports: choose daily or weekly, the day of the week, and the time the report is sent. A weekly report covers the seven days before the report day
* **Run now** button on the Manage screen sends the latest report straight away, without changing the schedule. It replaces the single-day "Send a test" field
* The send time now stays fixed across daylight saving changes, and existing sites move to 1am site time with their next report
* The email is now called "Order digest"

= 1.4.0 =
* The digest is now its own WooCommerce email: find it under WooCommerce > Settings > Emails as **Daily order digest**, with the usual enable/disable toggle, recipients, subject, heading and CC/BCC options. Its settings no longer appear on every email's settings screen. Existing recipient and introduction text settings are carried over automatically
* Multiple recipients now receive a single email addressed to all of them, as with WooCommerce's own admin emails
* The email body is a template that themes can override, and it can be viewed in WooCommerce's email preview
* Customer details in the digest are now escaped
* Fixed a fatal error when a refund was made on the day being summarised

= 1.3.2 =
* Tested up to WordPress 7.1 and WooCommerce 11.1
* Declared compatibility with WooCommerce High-Performance Order Storage (HPOS)
* Fixed the "View" link on each order, which was blank in the scheduled email and did not open the order when HPOS is enabled
* Fixed the daily digest being scheduled for 1am UTC instead of 1am in the site's timezone. Existing sites keep their current schedule; deactivate and reactivate the plugin to move it to 1am site time
* Raised the minimum WordPress version to 6.5

= 1.3.1 =
* Added the license to the plugin header
* Security hardening: nonce checks and improved escaping and sanitizing

= 1.3.0 =
* Renamed plugin to Email Order Digest
* Tested up to WooCommerce 10.3.3
* Update email template to use WooCommerce email styles

= 1.2.2 =
* Allow all orders for a day to be sent rather than the default 10

= 1.2 =
* Added a date selector to test the email digest out for a specific date

= 1.1 =
* Added support for internationalization
* Added support for multiple recipients - comma separated

= 1.0.3 =
* Added sub-total, freight, discounts, and total to each order
* Added grand total for all orders for the day

= 1.0.2 =
* Bug fixes

= 1.0.1 =
* Added new introduction text as an option
* Removed cancelled orders from the email
* Adjusted timestamp to use the correct timezone set in WP

= 1.0.0 =
* Initial release

== Upgrade Notice ==
None
