=== Reycob Libro de Reclamaciones Peru ===
Contributors: reycob38
Tags: complaints, claims, peru, customer service, shortcode
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds a shortcode-based complaints book form for Peru with internal records, email receipts, and an admin management panel.

== Description ==

Reycob Libro de Reclamaciones Peru helps site owners publish a structured complaints book form using a shortcode.

The plugin stores each submitted complaint as a private admin record, sends an email receipt to the customer, and notifies the configured business email address.

Main features:

* Shortcode form: `[rlrp_libro_reclamaciones]`
* Consumer identification fields
* Product or service identification fields
* Complaint and claim type selection
* Request and detail fields
* Optional representative fields for minors
* Unique record numbering based on the year and the WordPress record ID
* Admin panel for reviewing submissions
* Administrator-only access to complaint records
* Internal status tracking
* Email receipt for the customer
* Email notification for the site administrator
* Configurable business information and colors
* Nonce validation, honeypot, timing check, rate limiting, and server-side validation
* WordPress personal data export integration

This plugin provides a practical form structure for handling complaint book records in Peru. It does not provide legal advice. Each business is responsible for reviewing its own legal obligations and adapting public notices, retention policies, response procedures, and privacy information to its specific case.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/reycob-libro-de-reclamaciones-peru/` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the Plugins screen.
3. Go to **Complaints Book > Settings** and configure the business information.
4. Add the shortcode `[rlrp_libro_reclamaciones]` to the page where the form should appear.

== Frequently Asked Questions ==

= What shortcode should I use? =

Use `[rlrp_libro_reclamaciones]`.

= Does the plugin delete submitted records? =

No. Submitted records are stored in WordPress as private admin records so they can be reviewed and managed from the dashboard.

Uninstalling the plugin removes its settings but intentionally preserves submitted complaint records. An authorized administrator can delete individual records from the WordPress dashboard after reviewing the business's legal and internal retention obligations.

= Does the plugin guarantee legal compliance? =

No. The plugin provides a structured form and record management workflow. Site owners should verify legal wording, operating procedures, privacy notices, and record retention requirements with the appropriate responsible party or legal advisor.

= Can I change business information? =

Yes. Go to **Complaints Book > Settings** to configure business name, RUC, address, email, colors, and visible response period.

== Privacy ==

When a visitor submits the complaints book form, the plugin stores the information entered in the form, the submission date, an internal status, and a unique record code in the site's WordPress database.

The plugin sends an email receipt to the address entered by the consumer and a notification to the business email configured by the site administrator. It does not send form data to any external service other than the mail service selected and configured by the WordPress site owner.

Version 1.0.3 and later does not store the visitor's IP address. Records created by an earlier version may contain an IP address in their metadata. A hashed, temporary request key may be stored for up to 15 minutes solely to limit automated or abusive submissions; it cannot be used by the plugin to recover the original IP address.

The plugin integrates with the WordPress personal data export tool. Erasure requests retain matching complaint records for administrator review because those records may be subject to legal or internal retention requirements. Site owners are responsible for defining and communicating their privacy, retention, and deletion policies.

Uninstalling the plugin removes its settings but intentionally preserves submitted complaint records.

== Screenshots ==

1. Public complaints book form.
2. Admin dashboard summary.
3. Complaint detail screen.
4. Plugin settings screen.

== Changelog ==

= 1.0.7 =
* Added configurable submit button text, colors, border, hover state, radius, alignment, and width.
* Isolated the submit button appearance from theme and page-builder overrides.

= 1.0.6 =
* Fixed a fatal error while rendering required form fields.
* Ensured public styles load before page builders render the shortcode.
* Updated frontend asset versions to prevent stale cached files.

= 1.0.5 =
* Fixed a WordPress capability mapping conflict that could hide WP Mail SMTP and other administrator-only menu pages.
* Kept complaint records restricted to administrators using post-type-specific meta capabilities.

= 1.0.4 =
* Improved compatibility with WP Mail SMTP and other providers that integrate through WordPress wp_mail().
* Kept sender and SMTP configuration under the mail plugin's control without global PHPMailer filters.
* Added isolated delivery handling so email failures do not remove or corrupt complaint records.
* Added per-record delivery status for customer and business notifications.
* Added safe Reply-To headers and prevented duplicate delivery when both recipients are the same address.

= 1.0.3 =
* Restricted complaint records and management screens to administrators.
* Added stricter server-side validation for required fields, document types, amounts, minors, and data consent.
* Added nonce validation, a honeypot, a submission timing check, and temporary rate limiting.
* Replaced the yearly counter with collision-resistant record codes based on the WordPress record ID.
* Stopped storing visitor IP addresses in new complaint records.
* Added WordPress personal data export and erasure-review integration.
* Preserved complaint records during uninstall to avoid accidental loss of legally relevant data.
* Improved translatable strings and WordPress coding standards compliance.

= 1.0.2 =
* Updated WordPress.org metadata and shortcode prefix for review compliance.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.5 =
Important administrator capability compatibility fix. Updating is strongly recommended.

= 1.0.4 =
Email compatibility and delivery diagnostics for WP Mail SMTP and other WordPress mail providers.

= 1.0.3 =
Security, privacy, and data-retention improvements. Updating is strongly recommended.

= 1.0.2 =
Updated WordPress.org metadata and shortcode prefix for review compliance.
