== Changelog ==

= 3.6.0 - 19/06/2025 =
* Dev - Block-based checkout compatibility - "New order" trigger added.
* Dev - Shortcodes - `[translate]` - TranslatePress (https://wordpress.org/plugins/translatepress-multilingual/) compatibility added.
* Dev - Shortcodes - `before` and `after` attributes escaped.
* Dev - Admin settings descriptions updated.
* Dev - Code refactoring.

= 3.5.3 - 18/06/2025 =
* Dev - WPFactory Admin Menu - Plugin icon added.
* Dev - WPFactory Admin Menu - Library updated.
* WC tested up to: 9.9.

= 3.5.2 - 14/05/2025 =
* Fix - Vulnerability in the `[translate]` shortcode output.
* Dev - Recommendations - Move to the `init` action.
* Dev - Key Manager - Move to the `init` action.
* Dev - Key Manager - Library updated.
* Tested up to: 6.8.

= 3.5.1 - 22/04/2025 =
* Fix - Translation loading for domain was triggered too early.
* WC tested up to: 9.8.

= 3.5.0 - 15/01/2025 =
* Dev - Security - Output escaped.
* Dev - Security - Input sanitized.
* Dev - Security - Nonces added.
* Dev - Recommendations - Library updated.
* Dev - Key Manager - Library updated.
* Dev - Composer - `autoloader-suffix` param added.
* Dev - Code refactoring.
* Dev - Coding standards improved.
* Tested up to: 6.7.
* WC tested up to: 9.5.
* Plugin name updated.

= 3.4.0 - 24/10/2024 =
* Dev - Plugin settings moved to the "WPFactory" menu.
* Dev - "Recommendations" added.
* Dev - Key Manager - Library updated.
* Dev - Code refactoring.

= 3.3.1 - 11/10/2024 =
* Dev - Admin settings descriptions updated.

= 3.3.0 - 10/10/2024 =
* Dev - General - "Replace line breaks" option added (defaults to `yes`).
* Dev - Key Manager - Library updated.

= 3.2.0 - 28/09/2024 =
* Fix - Pro - Admin Options - Admin actions - Orders > Bulk actions - HPOS compatibility (`wc-orders` page).
* Dev - "Key Manager" added.

= 3.1.2 - 27/09/2024 =
* Fix - Resolved Ctrl+Z shortcut issue in the rich text editor.
* Dev - Added search field to the shortcode selector.
* Dev - PHP 8.2 compatibility - "Creation of dynamic property is deprecated" notice fixed.

= 3.1.1 - 19/09/2024 =
* Fix - Email content - Rich text editor - Resolved vertical scroll issue in the "Text" mode.

= 3.1.0 - 18/09/2024 =
* Dev - Email content - Integrated a rich text editor.
* Dev - Subject / Email heading / Email content - Added a shortcode selector.
* WC tested up to: 9.3.

= 3.0.5 - 04/09/2024 =
* Dev - Trash buttons added.
* WC tested up to: 9.2.

= 3.0.4 - 18/08/2024 =
* Dev - Shortcodes - `[order_user_meta]` shortcode added.
* Dev - Shortcodes - `[order_details]` - `add_product_desc` attribute added (defaults to `no`).
* Dev - Shortcodes - `[order_details]` - `add_product_short_desc` attribute added (defaults to `no`).
* Tested up to: 6.6.

= 3.0.3 - 30/07/2024 =
* WC tested up to: 9.1

= 3.0.2 - 28/07/2024 =
* WC tested up to: 9.0.

= 3.0.1 - 05/06/2024 =
* Dev - Shortcodes - `[order_details]` - `add_product_images` attribute added (defaults to `no`).
* Dev - Shortcodes - `[order_item_product_images]` shortcode added.
* WC tested up to: 8.9.

= 3.0.0 - 15/05/2024 =
* Dev - Code refactoring.
* WooCommerce added to the "Requires Plugins" (plugin header).

= 2.9.9 - 06/05/2024 =
* Dev - "Email Sender Options" subsection added ("From"/"Reply-to" name/address).

= 2.9.8 - 03/05/2024 =
* Dev - Order Options - Require/Exclude products/users - Admin options are loaded only in the backend now.

= 2.9.7 - 02/05/2024 =
* Dev - Shortcodes - `[order_details]` - `add_product_links` attribute added (defaults to `no`).

= 2.9.6 - 29/04/2024 =
* Dev - Shortcodes - `[order_customer_order_notes]` shortcode added.
* WC tested up to: 8.8.

= 2.9.5 - 08/04/2024 =
* Dev - Shortcodes - `[order_total_items_qty]` shortcode added.
* Tested up to: 6.5.

= 2.9.4 - 01/04/2024 =
* Dev - Shortcodes - `[order_view_url]` shortcode added.
* Dev - Shortcodes - `[order_edit_url]` shortcode added.
* Dev - Shortcodes - `[order_received_url]` shortcode added.
* Dev - Shortcodes - `[order_cancel_url]` shortcode added.
* Dev - Shortcodes - `[order_shipping_address_map_url]` shortcode added.
* Dev - Shortcodes - `[order_id]` shortcode added.
* WC tested up to: 8.7.

= 2.9.3 - 13/03/2024 =
* Dev - Triggers - Extra - "Customer address changed" and "Customer address saved" triggers added.
* Dev - Scheduled - Admin - Object ID validation added.

= 2.9.2 - 01/03/2024 =
* Readme.txt - Changelog - Truncated (full changelog moved to the `changelog.txt` file).
* Readme.txt - Tags - `woo commerce` tag removed.

= 2.9.1 - 29/02/2024 =
* Dev - Developers - `alg_wc_custom_emails_delay_start_time` filter added.
* Dev - Developers - `alg_wc_custom_emails_email_sent` action added.
* Dev - Developers - `alg_wc_custom_emails_exclude_recipients` filter added.
* Dev - Code refactoring.

= 2.9.0 - 21/02/2024 =
* Dev - Order Options - Require/Exclude order status - "WooCommerce Subscriptions" statuses added.
* Dev - Shortcodes - `[order_checkout_payment_url]` shortcode added.
* Dev - Send email - Now trying to get object ID with the `get_id()` method (e.g., for "WooCommerce Subscriptions" status update hooks).
* Typos fixed in the plugin description section in readme.txt.
* WC tested up to: 8.6.

= 2.8.1 - 15/02/2024 =
* Dev - Shortcodes - `[order_billing_email]` shortcode added.
* Dev - Shortcodes - `[order_billing_phone]` shortcode added.

= 2.8.0 - 29/01/2024 =
* Dev - Order Options - "Require order status" option added.
* Dev - Order Options - "Exclude order status" option added.
* Dev - Debug - "Current filter" added to the "Triggered" log message.

= 2.7.3 - 11/01/2024 =
* Dev - Advanced Options - "Stop emails" option added.

= 2.7.2 - 09/01/2024 =
* Dev - Shortcodes - `[order_billing_first_name]` shortcode added.
* Dev - Shortcodes - `[order_billing_last_name]` shortcode added.
* Dev - Shortcodes - `[order_customer_note]` shortcode added.
* Dev - Shortcodes - Developers - `alg_wc_custom_emails_shortcode_prefix` filter added.
* Dev - Shortcodes - Code refactoring.
* WC tested up to: 8.5.

= 2.7.1 - 21/12/2023 =
* Dev - Email Data - "Email style" option added.
* Dev - Code refactoring.

= 2.7.0 - 19/12/2023 =
* Dev - General - "Scheduler" option added (defaults to "WP Cron").

= 2.6.3 - 18/12/2023 =
* Readme.txt file error fixed.

= 2.6.2 - 18/12/2023 =
* Readme.txt file updated.

= 2.6.1 - 14/12/2023 =
* Dev - Shortcodes - `[if]` - `case_insensitive` attribute added.
* Dev - Shortcodes - `[if]` - `operator` - `find` and `not_find` operators added.
* WC tested up to: 8.4.

= 2.6.0 - 30/11/2023 =
* Dev - Triggers - Extra - "Product published" and "Product updated" triggers added.
* Dev - Shortcodes - `[product_func]` shortcode added.
* Dev - Code refactoring.

= 2.5.0 - 22/11/2023 =
* Dev - Order Options - "Require users" option added.
* Dev - Order Options - "Exclude users" option added.
* Dev - Order Options - "Require user roles" option added.
* Dev - Order Options - "Exclude user roles" option added.
* Dev - Code refactoring.

= 2.4.0 - 17/11/2023 =
* Dev - General - Advanced Options - "Use actions for WC email template" option removed (now always using actions).
* Dev - Email Data - "WC email template" option renamed to "Header & footer". Now the option is applied to "Plain text" emails as well.
* Dev - Using overridable email templates now.
* Dev - Code refactoring.
* Dev - Developers - `alg_wc_custom_emails_get_wc_email_template_part` filter removed.
* Tested up to: 6.4.
* WC tested up to: 8.3.

= 2.3.0 - 03/11/2023 =
* Fix - Admin Options - Admin actions - Orders > Bulk actions - HPOS compatibility (`wc-orders` page).
* WC tested up to: 8.2.

= 2.2.9 - 25/09/2023 =
* WC tested up to: 8.1.
* Plugin icon, banner updated.

= 2.2.8 - 17/08/2023 =
* Dev - Developers - `alg_wc_custom_emails_is_enabled` filter - `$do_force_send` parameter added.

= 2.2.7 - 16/08/2023 =
* Fix - Declaring HPOS compatibility for the free plugin version, even if the Pro version is activated.
* Dev - General - "Base dir" option added (defaults to "WP root directory"). Affects the "Email attachments" options.
* Dev - Debug - Email attachments info added.

= 2.2.6 - 09/08/2023 =
* Dev - Admin settings - Delay - Description updated.
* Tested up to: 6.3.
* WC tested up to: 8.0.

= 2.2.5 - 04/08/2023 =
* Dev - Shortcodes - `[user_prop]` shortcode added.
* Dev - Developers - `alg_wc_custom_emails_is_user_email` filter - `current_filter()` parameter added.

= 2.2.4 - 03/08/2023 =
* Dev - Shortcodes - `[order_item_meta]` shortcode added.

= 2.2.3 - 18/07/2023 =
* Dev - "High-Performance Order Storage (HPOS)" compatibility.
* Dev - Developers - `alg_wc_custom_emails_subject` filter added.
* Dev - Developers - `alg_wc_custom_emails_content` filter added.
* WC tested up to: 7.9.

= 2.2.2 - 18/07/2023 =
* Dev - Developers - `alg_wc_custom_emails_do_send_order_email` filter added.

= 2.2.1 - 28/06/2023 =
* Dev - Shortcodes - `[order_payment_method_id]` shortcode added.

= 2.2.0 - 22/06/2023 =
* Dev - Order Options - "Require payment gateways" option added.
* Dev - Order Options - "Exclude payment gateways" option added.
* Dev - Order Options - "Require shipping methods" option added.
* Dev - Order Options - "Exclude shipping methods" option added.
* Dev - General - Advanced Options - "Use actions for WC email template" option added (defaults to `no`).
* Dev - Developers - `alg_wc_custom_emails_get_wc_email_template_part` filter added.

= 2.1.0 - 18/06/2023 =
* Fix - Admin settings - "Shortcodes" link fixed in the "placeholder text".
* Dev - General - "Enable plugin" option removed.
* Dev - General - "Custom triggers" option added.
* Dev - Shortcodes - `[if]` - `operator` - `in` and `not_in` operators added.
* Dev - Shortcodes - `[order_item_product_ids]` shortcode added.
* Dev - Shortcodes - `[order_downloads]` shortcode added.
* Dev - Shortcodes - `[order_user_data]` shortcode added. E.g., `[order_user_data key="user_nicename"]`.
* Dev - Shortcodes - `[order_user_id]` shortcode added.
* Dev - Developers - `alg_wc_ce_send_email()` function added.
* Dev - Developers - `alg_wc_custom_emails_check_order_products` filter added.
* Dev - Developers - `alg_wc_custom_emails_check_order_product_terms` filter added.
* Dev - Code refactoring.
* WC tested up to: 7.8.

= 2.0.0 - 09/05/2023 =
* Dev - Code refactoring - `Alg_WC_Custom_Email` class.
* WC tested up to: 7.6.

= 1.9.7 - 13/04/2023 =
* Fix - Email Data - Email attachments - Handling empty option value properly now.

= 1.9.6 - 10/04/2023 =
* Dev - Advanced Options - "Exclude recipients" option added.
* Dev - Admin Settings - Minor option titles, descriptions, style update.

= 1.9.5 - 05/04/2023 =
* Dev - Scheduled - "Unschedule email" (i.e., "Delete") buttons added.
* Dev - Developers - `alg_wc_custom_emails_do_send` filter added.

= 1.9.4 - 05/04/2023 =
* Fix - Admin Options - Admin actions - Empty value fixed.

= 1.9.3 - 31/03/2023 =
* Dev - Shortcodes - `[order_details]` - Now passing the email object to the `WC_Emails::order_details()` function.

= 1.9.2 - 31/03/2023 =
* Dev - Email Data - "Email attachments" option added.
* Tested up to: 6.2.

= 1.9.1 - 23/03/2023 =
* Dev - WPML/Polylang language - Order language detection algorithm improved.
* Dev - WPML/Polylang language - Admin option renamed (was "Require WPML language").
* Dev - WPML/Polylang language - Code moved to the `Alg_WC_Custom_Email_Order_Validator` class.
* WC tested up to: 7.5.

= 1.9.0 - 08/03/2023 =
* Dev - Admin Options - Admin actions - "Orders > Preview" option added.
* Dev - Admin Options - Admin actions - "Orders > Actions column" option added.
* Dev - Admin Options - Admin actions - Code refactoring.
* Dev - Developers - `alg_wc_custom_emails_order_product_term_ids` filter added.

= 1.8.0 - 08/03/2023 =
* Dev - Admin Options - "Admin actions" option added (defaults to "Edit order > Order actions" and "Orders > Bulk actions").
* Dev - Admin Options - Admin settings rearranged ("Settings Tools" subsection added).
* Dev - Order Options - Require/Exclude product categories/tags - Listing empty categories/tags as well now.
* Dev - Order Options - "Logical operator" option added (defaults to `AND`).
* Dev - Order Options - Code refactoring (`Alg_WC_Custom_Email_Order_Validator` class added).
* Dev - Shortcodes - `[if]` - Code refactoring.
* Dev - Compatibility - "Email Customizer for WooCommerce (Pro)" by ThemeHigh - PHP notice (regarding calling the `wc_get_product()` function too early) fixed.
* WC tested up to: 7.4.

= 1.7.2 - 26/01/2023 =
* Dev - Admin Options - "Copy settings" tool added.
* Dev - Admin Options - "Reset settings" tool added.
* Dev - Shortcodes - `[generate_coupon_code]` - Coupon description (`post_excerpt`) updated.

= 1.7.1 - 21/01/2023 =
* Dev - Order Options - Require/Exclude products - Now using AJAX in admin settings.
* WC tested up to: 7.3.

= 1.7.0 - 24/12/2022 =
* Dev - Email Data - "Require WPML language" option added.
* Dev - Shortcodes - `[translate]` shortcode added (for WPML and Polylang plugins).

= 1.6.0 - 21/12/2022 =
* Dev - Order Options - "Require product categories" option added.
* Dev - Order Options - "Exclude product categories" option added.
* Dev - Order Options - "Require product tags" option added.
* Dev - Order Options - "Exclude product tags" option added.
* Dev - Admin settings rearranged; subsection titles added.
* Dev - Code refactoring.
* Deploy script added.
* Tested up to: 6.1.
* WC tested up to: 7.2.

= 1.5.5 - 06/10/2022 =
* WC tested up to: 6.9.
* Readme.txt updated.

= 1.5.4 - 12/09/2022 =
* Dev - Shortcodes - `[order_details]` - `plain_text` and `sent_to_admin` attributes added (both default to `no`).
* WC tested up to: 6.8.

= 1.5.3 - 20/07/2022 =
* Dev - Triggers - "Subscription status updated" trigger groups added ("WooCommerce Subscriptions" plugin).
* WC tested up to: 6.7.

= 1.5.2 - 30/06/2022 =
* Fix - Settings - Trigger(s) - "Extra" triggers were not added to the list. This is fixed now.
* Dev - Developers - `alg_wc_custom_emails_is_enabled` filter added.
* WC tested up to: 6.6.
* Tested up to: 6.0.

= 1.5.1 - 01/08/2021 =
* Fix - Error on WooCommerce Analytics page fixed.

= 1.5.0 - 01/08/2021 =
* Fix - Shortcodes - `[order_shipping_total]` shortcode fixed.
* Fix - Shortcodes - `[order_shipping_method]` shortcode fixed.
* Fix - Shortcodes - `[order_payment_method_title]` shortcode fixed.
* Dev - General - "Enabled triggers groups" option added.
* Dev - Triggers - "Subscriptions: Renewal order" trigger groups added.
* Dev - Shortcodes - `[order_item_names]` shortcode added.
* Dev - Debug - More info is added to the log now.

= 1.4.1 - 28/07/2021 =
* Dev - Escaping all output now.

= 1.4.0 - 27/07/2021 =
* Dev - All user input is properly sanitized now.
* Dev - Localisation - `load_plugin_textdomain()` is called on `init` action now.
* Dev - Code refactoring.
* Tested up to: 5.8.
* WC tested up to: 5.5.
* Free plugin version released.

= 1.3.1 - 05/04/2021 =
* Dev - Email content - "Default content" button added.
* Dev - Settings - Link to each email settings added.
* Dev - Email settings - Triggers list rearranged; settings descriptions updated.
* Dev - Code refactoring.

= 1.3.0 - 30/03/2021 =
* Dev - "Delay" options added (including "Scheduled" section).
* Dev - Now always adding order note when sending an email.
* Dev - Debug - More info added.
* Dev - Code refactoring.

= 1.2.1 - 22/03/2021 =
* Dev - "Send email: ..." actions added to the "Bulk actions" select box in admin "Orders" list.
* Dev - Code refactoring.

= 1.2.0 - 19/03/2021 =
* Dev - "Minimum order amount" option added.
* Dev - "Maximum order amount" option added.
* Dev - "Require order product(s)" option added.
* Dev - "Exclude order product(s)" option added.
* Dev - General - Advanced - "Debug" option added.
* Dev - Settings - Minor descriptions update.
* WC tested up to: 5.1.
* Tested up to: 5.7.

= 1.1.0 - 07/10/2020 =
* Dev - `[generate_coupon_code]` shortcode added.
* Dev - Trigger - `alg_wc_custom_emails_is_user_email` filter added.
* Dev - Settings - Minor descriptions update.
* WC tested up to: 4.5.
* Tested up to: 5.5.

= 1.0.0 - 21/01/2020 =
* Initial Release.