=== DahuConcept Order Notes for WooCommerce ===
Contributors: dahuconcept
Tags: order notes, internal notes, customer notes, orders, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.1.1
License: MIT
License URI: https://opensource.org/licenses/MIT

Makes the order notes a person actually wrote stand out from the ones WooCommerce generates on its own.

== Description ==

On a busy shop, the order notes panel fills up with machine-generated entries:
status changes, stock movements, refunds, tracking numbers, invoice events. The
one note that matters — the one a colleague typed about this particular
customer — is buried among them.

WooCommerce already styles customer notes and system notes differently. It
cannot style the third category: notes generated by code *while a staff member
is logged in*. Changing an order status from the admin screen produces a note
attributed to that person, indistinguishable in the markup from a note they
typed themselves.

DahuConcept Order Notes identifies those and leaves the hand-written ones highlighted.

= How detection works =

Automatic notes are recognised by their wording. Rather than hardcoding that
wording in one language, the plugin rebuilds its patterns at runtime from
WooCommerce's own translatable strings. It therefore follows whatever locale
your shop runs in, with no configuration — French, German, Spanish or any other
translated locale works out of the box.

Notes added by other plugins can be declared in the settings screen, one phrase
per line, or through a filter for developers.

= What it does not do =

The plugin never writes to the database and never alters a note's content or
metadata. Everything is computed at display time. Deactivating it leaves no
trace.

= Features =

* Highlights hand-written private notes on the order screen
* Locale-independent detection, rebuilt from WooCommerce's own translations
* Configurable highlight colours
* Additional phrases configurable from the settings screen, no code needed
* `ubac_notes_auto_patterns` filter for developers
* Works with both legacy order storage and High-Performance Order Storage

= External services =

This plugin does not contact any external service.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the
   Plugins screen.
2. Activate it through the Plugins screen.
3. Go to WooCommerce > DahuConcept Order Notes to adjust the colours if you want to.

Highlighting is on by default; there is nothing to configure to get started.

== Frequently Asked Questions ==

= Does it work on a shop that is not in English? =

Yes, and that is the point. The detection patterns come from WooCommerce's own
translated strings, so the plugin adapts to the shop's locale on its own.

= A plugin of mine adds notes that are not detected =

Add the beginning of the note's text in WooCommerce > DahuConcept Order Notes, one phrase
per line. Developers can use the `ubac_notes_auto_patterns` filter instead.

= Does it modify my order notes? =

No. Nothing is written to the database at any point.

= Is it compatible with High-Performance Order Storage (HPOS)? =

Yes.

== Screenshots ==

1. Order notes with hand-written entries highlighted.
2. The settings screen.

== Changelog ==

= 2.1.1 =
* Fixed: every translation call now names this plugin's own text domain. Recognising WooCommerce's automatic order notes means reading WooCommerce's own wordings in the shop's language, and that was done with 27 calls naming WooCommerce's text domain. The directory's review refused it, rightly: a plugin's translation calls must name its own domain, which is what lets the community translate it. The wordings are now read from WooCommerce's catalogue directly, which says the same thing without a translation call — and is the more honest shape, since looking up someone else's catalogue is exactly what happens.
* Detection in a translated shop is unchanged, and now proven in both directions: a French note is recognised when WooCommerce's catalogue is French, an English note when no catalogue is loaded, a hand-written note in neither case. A canary feeds the detector a nonsense catalogue and requires the French note to stop being recognised, so the proof cannot pass while the catalogue is ignored.
* Each of those wordings used to be written twice on its line, once as the array key and once inside the translation call, to satisfy the gettext parser. The duplication is gone with the calls.

= 2.1.0 =
* The activation screen now opens on the plugin's own mark rather than its initials, and the banner carries the same drawing as a watermark.

= 2.0.0 =
* First public release.
* Detection patterns are now rebuilt from WooCommerce's translated strings
  instead of a hardcoded French list, so the plugin works in any locale.
* Added a settings field to declare additional automatic notes without code.
* Styles are enqueued properly instead of printed in the admin head.
* Colour values are re-validated at output time.
* Added an uninstall routine, including multisite.
* Renamed the marker class to `ubac-auto-note` to avoid collisions.

== Upgrade Notice ==

= 2.0.0 =
First public release.
