=== WebWMS2U Forms Messaging ===
Contributors: xgentech
Tags: forms, contact form 7, wpforms, gravity forms, messaging
Requires at least: 6.2
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 1.0.2
License: GPLv2 or later

Send configurable WebWMS2U WhatsApp text or saved-template messages when WordPress forms are submitted.

== Features ==
* Multiple independent form rules.
* Notify the visitor, administrator, or both.
* Visitor and administrator messages can use different Text or Template modes.
* Saved WebWMS2U template IDs and numbered parameters.
* Template media is delivered by the existing WebWMS2U API when the selected template has stored media.
* Contact Form 7, WPForms, Gravity Forms, Elementor Pro Forms, Ninja Forms and Fluent Forms adapters.
* Custom developer hook for other form systems.
* Field placeholders and arbitrary {{field:key}} placeholders.
* Optional consent-field requirement.
* Default country-code phone normalization.
* Background delivery using WP-Cron, with immediate-send fallback.
* Idempotency keys and minimal diagnostic logs.
* API-key verification and template list loading.

== Installation ==
1. Upload webwms2u-forms-messaging.zip in WordPress > Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Go to Settings > WebWMS2U Forms.
4. Add your WebWMS2U API key, administrator phone number and country code.
5. Verify the API key and load templates.
6. Create one or more rules.
7. Submit each form once if you want the plugin to show detected field keys.
8. Test visitor and administrator messages before production use.

== Message rules ==
Personal WhatsApp connections can usually use Text mode. Meta Cloud and Coexistence must follow Meta's customer-service window and approved-template requirements. A website form submission by itself does not open a WhatsApp customer-service conversation.

== Placeholders ==
{{name}}
{{email}}
{{phone}}
{{form_id}}
{{form_name}}
{{site_name}}
{{site_url}}
{{submitted_at}}
{{field:field_key}}

== Custom integration ==
Developers can trigger:

do_action(
    'webwms2u_forms_custom_submission',
    'custom',
    'lead-form',
    'Lead Form',
    array('name' => 'Jane', 'email' => 'jane@example.com', 'phone' => '0123456789'),
    'submission-123'
);

== Privacy ==
The plugin passes configured form-submission values to WebWMS2U only when a matching rule runs. Its own diagnostic log stores a masked recipient number and API result, not the full message body or full recipient number. WordPress cron may temporarily store already-rendered job data while background delivery is pending.

== Changelog ==
= 1.0.2 =
* Renamed the plugin and slug to avoid restricted trademark usage in the WordPress.org plugin name/slug.
* Added the required Tested up to header and limited readme tags to five.

= 1.0.1 =
* Hardened admin request validation and sanitisation for WordPress Plugin Check.
* Added cached log reads and safer identifier preparation for the custom log table.

= 1.0.0 =
* Initial release.
