WooCommerce plugin that manages the right of withdrawal compliant with D.Lgs. 209/2025, with full logging, traceability and tamper-proofing.
Overview
WooCommerce plugin that manages the right of withdrawal compliant with D.Lgs. 209/2025, allowing customers to exercise withdrawal both from their personal area and as guests, with full logging, traceability and tamper-proofing.
Main Features
1. Customer Withdrawal Management
- Withdrawal for registered users → Access from "My Withdrawals" area in My Account
- Guest withdrawal → Verification with Order Number + Email + Name (supports with/without #)
- Product selection → User can select individual products (partial withdrawal)
- Deadline calculation → Based on delivery date or order date (configurable)
- Optional notes → User can add notes to the request
- Privacy + Terms → Mandatory checkbox with links to Privacy Policy and Terms
2. Delivery Date
- Admin sets date → In order backend, "Delivery date" field
- Automatic calculation → Order date + X days (configurable, e.g., 2 days)
- User can enter → Optional (disabled by default)
- Validation → Date cannot be before the day after the order nor in the future
- "Delivered" status → Automatically set when delivery date is recorded
- "Set as Delivered" button → In order backend to update status and date
3. Product Exclusion
- Single exclusion → Metabox in product: "Exclude from withdrawal right"
- Category exclusion → Select excluded categories in settings
- Type exclusion → Digital, virtual, subscription, customized products
- Bulk edit → Mass edit from products list
- Exclusion reason → Digital, customized, perishable, other
4. Admin Management
- Withdrawal list → Columns: ID, Order, Customer, Products, Date, Integrity, Email
- Status filter → Pending, Accepted, Completed, Rejected
- Withdrawal details → View products, customer notes, rejection reason
- Status change → With automatic email to customer
- Rejection reason → Mandatory text field sent via email
- Internal notes → Private field for admin
- Manual creation → Dedicated page to create withdrawals from admin (with order search)
- Creation redirect → Redirects from post-new.php?post_type=wc_recesso to the correct page
- Order statuses → "Awaiting return", "Return completed", "Delivered"
- Withdrawal column → In WooCommerce order list shows withdrawal status
5. Logs and Traceability
- Email to customer → Immediate confirmation with timestamp and products
- Email to admin → New request notification
- Email log → Separate table wp_wc_recesso_email_log
- Email log page → Dedicated under WooCommerce with filters by email, type, date, status
- Email column → In withdrawal list shows number of sent emails
- Cryptographic hash → HMAC-SHA256 to verify data integrity
- IP and User Agent → Tracked for each request
- Soft delete → Withdrawals cannot be permanently deleted
6. Automatic Emails
- Customer receipt → Immediately after request: Withdrawal ID, order, timestamp, products, days, return address
- Admin notification → New request: Customer details, products, management link
- Status update → Admin changes status: New status, products, rejection reason (if any), return address (if accepted)
- All emails are customizable with placeholders and default texts visible in settings
7. Plugin Settings
- General → Withdrawal days (min 14), use/delivery, delivery window, automatic calculation, allow user
- Return address → Customizable, store default
- Excluded types → Digital, virtual, subscription, customized products
- Exclusions → Excluded categories, Terms page
- Form texts → Introductory message, success message, privacy (multilingual with placeholders)
- Emails → Subject and body for receipt, admin, status change (multilingual with placeholders)
- Privacy → Privacy Policy URL
- CSS → Custom CSS with available classes guide
8. Shortcode
[recesso_dlgs209] →
Public form for guest customers
9. License
- Activation → License key with API validation
- Daily cron → Automatic license status check
- Updates → Only with active license
- Plugin lock → If not activated, admin warning
Data Tables
- wp_posts (post_type=wc_recesso) → Withdrawal requests
- wp_postmeta → Metadata: order, products, timestamp, notes, hash
- wp_wc_recesso_email_log → Log of all sent emails (with status and error reason)
Security and Compliance
- HMAC-SHA256 hash for integrity
- Append-only email log
- Soft delete (cannot be permanently deleted)
- IP and User Agent tracking
- Confirmation email as documentary proof
- Guest support with email verification
- Email log page for complete audit
Multilingual
- Native support for Polylang and WPML
- Translations included: Italian, English
- Multilingual form and email texts with placeholders
- Extendable to other languages
Statuses
Withdrawal Statuses
- recesso-in-attesa → Request received, under evaluation
- recesso-accettato → Accepted, customer must return
- recesso-completato → Return completed, refund processed
- recesso-rifiutato → Rejected with reason
Order Statuses
- wc-in-reso → Awaiting return (total withdrawal)
- wc-reso-completato → Return completed
- wc-delivered → Delivered (delivery date recorded)
User Flows
Registered User
Order paid → Delivery date (if physical) → Access My Account → Order details → Click "Right of withdrawal" (if within terms) → Select products → Add notes → Confirm → Receives confirmation email → Admin manages request → Customer receives update emails
Guest User
Order paid → Access page with shortcode [recesso_dlgs209] → Enter: Order Number + Email + Name → Verify → Product selection → Confirm → Receives confirmation email → Admin manages request
Admin Flow
Withdrawal Management
- Withdrawal list: WooCommerce → Withdrawals DLgs 209
- Detail: Click on a withdrawal
- Change status: Select status + optional rejection reason
- Automatic email: Sent to customer
Manual Creation
- WooCommerce → New Withdrawal
- Search order: Enter ID or number (with/without #)
- Select products: Check those to withdraw
- Create: Generate the request
Email Log
- WooCommerce → Email Log
- Filters: By email, type, date, status
- View: All sent/failed emails
Technical Summary
- Version → 1.2.0
- Requires → WooCommerce
- Minimum PHP → 7.4
- Guest support → Yes
- Multilingual support → Yes (Polylang/WPML)
- Immutable log → Yes (hash + email log)
- Soft delete → Yes
- Bulk product edit → Yes
- CSS customization → Yes
- Email log page → Yes
- Admin withdrawal creation → Yes
What's New
- Email Log Page → Dedicated with filters for complete audit
- Email Column → In withdrawal list shows number of sent emails
- Excluded types → Digital, virtual, subscription products
- Default texts → Visible placeholders in all emails and form texts
- Modern CSS → Updated graphics in settings
- Creation redirect → "New withdrawal" CPT button redirected to correct page
- Return address → Customizable in settings