=== Zakode Store Automation for WooCommerce ===
Contributors: zakode
Tags: woocommerce, automation, workflow, email, no-code
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

No-code WooCommerce automation workflows with a visual WHEN -> IF -> THEN builder.

== Description ==

Zakode Store Automation helps WooCommerce stores automate repetitive tasks without writing code.

Build workflows in three steps:
1. **WHEN** an event happens (trigger),
2. **IF** optional conditions match,
3. **THEN** actions are executed.

Workflows are processed asynchronously through Action Scheduler. Lower priority values are queued first, but final execution order can vary depending on Action Scheduler.

Supported languages:
- English (en_US)
- Polish (pl_PL)

Support: contact@zakode.pl

== Features ==

- Visual workflow builder in wp-admin (WHEN -> IF -> THEN).
- Trigger, condition, and action registries for extensibility.
- Workflow enable/disable state and queue priority.
- Execution logs (status, message, action, recipient, timestamp).
- Action Scheduler async processing with safe fallback.
- Optional retry scheduling for failed workflow runs.
- Email actions via `wp_mail()`.
- Logging toggle and uninstall data-retention setting.

== Installation ==

1. Upload the `zakode-store-automation` folder to `/wp-content/plugins/`.
2. Activate **Zakode Store Automation** in **Plugins**.
3. Ensure WooCommerce is active.
4. Go to **Zakode Store Automation -> Workflows**.

On activation, Zakode Store Automation creates:
- `{prefix}zakode_sa_workflows`
- `{prefix}zakode_sa_logs`

== Usage ==

1. Go to **Zakode Store Automation -> Add New**.
2. Enter workflow name, select trigger, set optional conditions, add actions.
3. Set workflow status (active/inactive) and priority.
4. Save workflow.
5. Check execution entries in **Zakode Store Automation -> Logs**.

== Screenshots ==

1. Workflow list with status toggle and quick actions.
2. Visual workflow editor (WHEN -> IF -> THEN).
3. Logs page with execution status and messages.

== FAQ ==

= Does Zakode Store Automation require WooCommerce? =

Yes. WooCommerce must be active.

= Does Zakode Store Automation guarantee strict workflow execution order? =

No. Lower priority values are queued first, but asynchronous execution depends on Action Scheduler processing.

= Why was an email action not delivered? =

Zakode Store Automation uses WordPress `wp_mail()`. Delivery depends on your server/SMTP configuration and mail provider.

= Can I disable logging? =

Yes. Use **Zakode Store Automation -> Settings**.

= Can I remove plugin data on uninstall? =

Yes. In **Zakode Store Automation -> Settings**, enable **Delete all Zakode Store Automation data when plugin is uninstalled**.

== Privacy ==

Zakode Store Automation stores automation-related operational data in WordPress database tables:
- workflow definitions (title, trigger, conditions, actions, status, priority),
- execution logs (workflow ID, order ID, user ID, action, recipient email, status, message, error text, timestamp),
- plugin options (version, DB version, logging toggle, uninstall data-retention preference).

Zakode Store Automation does not send telemetry to external services.

== Requirements ==

- WordPress 5.8 or newer
- PHP 7.4 or newer
- WooCommerce 6.0 or newer

== Changelog ==

= 1.0.0 =
- Initial public release.
- Visual WHEN -> IF -> THEN workflow builder.
- WooCommerce triggers, conditions, and actions.
- Async processing through Action Scheduler.
- Workflow logs and settings.
- English and Polish translations.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
