Opens in a new tab
Deliver toTennessee
0 0 0Cart
Get a Project Quote

Athenian Returns Manager

v1.0.1 October 7, 2026
A structured, order-aware RMA workflow for WooCommerce returns, refunds, labels, and restocking.

Overview

Product overview

Athenian Returns Manager is a WooCommerce-native returns and RMA operations plugin that gives store teams a structured way to receive, review, approve, process, refund, and close customer return requests.

The plugin adds a customer-facing Returns area inside WooCommerce My Account, where eligible customers can select an order, choose line items and quantities to return, provide reasons, and submit a return request. Each request becomes a dedicated ath_rma record inside WordPress, tied back to the original WooCommerce order, customer, and order line items.

For store teams, Athenian Returns Manager creates an admin workflow for reviewing RMAs, uploading or attaching return-label PDFs, sending customer emails, changing return statuses, restocking sellable returned items, and creating WooCommerce refunds from the returned item payload. Instead of returns living across scattered emails, support threads, carrier dashboards, and manual notes, the plugin centralizes the return lifecycle directly inside WooCommerce.

---

Customer self-service returns area connected to WooCommerce orders.
Dedicated RMA records with item-level quantities, reasons, status, and notes.
Admin label attachment, customer email, refund, restock, and close workflow.
HPOS-compatible order integration and operational safeguards with deployment provenance recorded separately.

Use cases

  • Customer self-service returns
  • Support and warehouse RMA operations
  • Refund and restock review
  • Return-label and status coordination

Developer

Developer starting point

This page documents the reviewed Returns Manager source baseline and a representative 1.0.1 deployment capture. It does not claim that a customer return, label, refund, restock, email, or carrier integration has been exercised.

5. Customer Workflow

  1. Customer logs into WooCommerce My Account.
  2. Customer opens the Returns account area.
  3. The plugin lists eligible recent orders based on the configured return window and allowed statuses.
  4. Customer selects an order.
  5. Customer chooses line items and quantities to return.
  6. Customer enters item-level return reasons and optional notes.
  7. The plugin creates an ath_rma record in ath_rma_requested status.
  8. The original WooCommerce order receives an order note indicating that the customer requested a return.
  9. Customer can view existing RMAs from the Returns area.

The v1.0 customer workflow is intentionally simple: the customer first selects an order, then the endpoint reloads to show the line-item picker for that order.

---

6. Admin Workflow

Review

Admins review RMA records under the WooCommerce-connected Returns Manager interface. The list table includes RMA, order, customer, status, refund, and date columns.

Approve and Communicate

The admin can mark an RMA approved, upload or attach a label PDF, and send the customer an email. When the email sends successfully, the plugin updates the status to ath_rma_label_sent.

Receive and Restock

Once a return arrives, the admin can mark the RMA as received. If the restock policy allows it, the plugin updates stock quantities for sellable returned items.

Refund

The refund metabox shows a refund preview based on the original order line items and returned quantities. Admins can create a WooCommerce refund from the RMA screen. The plugin stores the linked refund ID and prevents another refund from being created unless the stored refund metadata is manually cleared or the workflow is expanded later.

Close

After label, receive, restock, refund, and review actions are complete, the admin can close the RMA.

---

7. Technical Architecture

Bootstrap

Main file:

athenian-returns-manager.php

The bootstrap defines constants, declares WooCommerce HPOS compatibility, loads includes/Plugin.php, and initializes the plugin on plugins_loaded.

Declared constants include:

define( 'ATH_RMA_VERSION', '1.0.0' );
define( 'ATH_RMA_FILE', __FILE__ );
define( 'ATH_RMA_DIR', plugin_dir_path( __FILE__ ) );
define( 'ATH_RMA_URL', plugin_dir_url( __FILE__ ) );

Loaded Classes

| File | Responsibility | | --- | --- | | includes/Plugin.php | Main singleton loader and hook registration. | | includes/Utils.php | Settings, RMA ID generation, upload folder creation, eligibility checks, refund calculations, formatting, and HPOS-safe order URLs. | | includes/Installer.php | Activation/deactivation, rewrite flush, default settings seed, upload directory creation. | | includes/PostType.php | ath_rma custom post type and custom RMA statuses. | | includes/Admin.php | Settings screen, RMA metaboxes, list columns, label upload, status actions, restock handler, refund handler, admin-created RMAs. | | includes/Assets.php | Frontend and admin stylesheet registration/enqueue. | | includes/MyAccount.php | WooCommerce My Account endpoint, customer return request form, item picker, customer RMA table. | | includes/Email.php | Customer email send wrapper, placeholders, attachments, order notes, email hooks. | | includes/Hooks.php | Placeholder for future post-purchase hooks. | | includes/OrderAdmin.php | WooCommerce order screen actions and RMA lookup/display. | | includes/Integrations/Octolize.php | Optional Octolize label-detection and materialization bridge. |

---

8. Data Model

Custom Post Type

The plugin registers a private admin-facing custom post type:

ath_rma

It appears in the WooCommerce admin menu and uses shop_order-style capabilities with map_meta_cap enabled.

Core RMA Metadata

| Meta Key | Purpose | | --- | --- | | _ath_rma_id | Human-readable generated RMA ID, using the configured prefix and date. | | _ath_rma_order_id | Linked WooCommerce order ID. | | _ath_rma_user_id | Linked customer/user ID. | | _ath_rma_items | Array of returned line items, product IDs, variation IDs, quantities, sellable flags, reasons, and notes. | | _ath_rma_created_gmt | GMT timestamp for RMA creation. | | _ath_rma_restock_policy | Per-RMA restock policy: inherit, force_yes, or force_no. | | _ath_rma_label_path | Local filesystem path for attached PDF label. | | _ath_rma_label_url | Public URL for attached PDF label. | | _ath_rma_label_source | Label source marker, such as octolize. | | _ath_rma_last_emailed_gmt | Timestamp for the last customer email sent from the RMA. | | _ath_rma_refund_id | Linked WooCommerce refund ID created from the RMA. | | _ath_rma_refund_created_gmt | GMT timestamp for the refund creation. | | _ath_rma_refund_amount | Stored refund amount after WooCommerce refund creation. |

RMA Item Payload

Each item row in _ath_rma_items is normalized by Utils::sanitize_items_payload() into a structure like:

[
    'line_item_id' => 123,
    'product_id'   => 456,
    'variation_id' => 0,
    'qty'          => 1,
    'sellable'     => 'yes',
    'reason'       => 'Wrong size',
    'notes'        => '',
]

This design keeps the return tied to the actual WooCommerce order line item, which is necessary for accurate refunds and partial quantity handling.

---

9. Settings

Settings are stored in the ath_rma_settings option.

| Setting | Default | Purpose | | --- | --- | --- | | enabled | yes | Enables the customer returns portal. | | window_days | 30 | Number of days after order creation/completion in which an order is eligible. | | rma_prefix | ARM | Prefix used when generating RMA IDs. | | label_storage | uploads | Label storage mode; current implementation uses uploads. | | from_name | Site name | Sender name for RMA emails. | | from_email | Admin email | Sender email for RMA emails. | | email_subject | Your return is approved: {rma_id} | Customer email subject template. | | email_heading | Return approved | Email heading template. | | email_body | Configurable text | Email body template with placeholders. | | restock_on_received | yes | Automatically restock sellable items when RMA is received, unless overridden. | | add_order_note | yes | Add WooCommerce order notes when major RMA events occur. | | require_login | yes | Require customer login for the returns portal. | | refund_on_received_default | no | Indicates preference for refunding after receipt; admin still triggers refund manually. | | refund_reason | Return received (RMA {rma_id}) | Refund reason/note template. | | refund_note_to_customer | no | Controls whether refund order notes should be customer-visible. |

---

11. Restock Logic

Restocking is handled separately by the RMA workflow.

When an RMA is marked ath_rma_received, the plugin checks:

  • Global setting: restock_on_received
  • Per-RMA policy: inherit, force_yes, or force_no
  • Item sellable flag: sellable = yes
  • Product stock management state

For eligible items, the plugin updates stock with WooCommerce stock helpers and fires:

do_action( 'ath_rma_restocked_item', $rma_post_id, $product->get_id(), $qty, $stock, $new_stock );

This provides a practical extension point for inventory logs, warehouse reporting, supplier accounting, or external ERP sync.

---

12. Label Workflow

Manual PDF Upload

Admins can upload a PDF label from the RMA edit screen. The plugin validates the extension, stores the file in the dedicated RMA label upload folder, and saves both path and URL metadata.

The upload folder is hardened with:

  • .htaccess blocking executable PHP-like files
  • index.php silence file
  • WordPress upload directory creation via wp_mkdir_p()

Octolize Bridge

The optional Octolize bridge is intentionally defensive and dependency-light. Instead of requiring a specific Octolize class, it detects likely Octolize/flexible-shipping plugins by scanning installed plugin metadata.

It can scan WooCommerce order meta for PDF references that look like shipping labels and offers an Attach action from the RMA label metabox.

The bridge supports extension through:

ath_rma_octolize_label_meta_keys

This allows a site-specific integration to provide known meta keys once confirmed in a live Octolize shipping environment.

---

13. Hooks, Filters, and Extension Points

Filters

| Filter | Purpose | | --- | --- | | ath_rma_cap_manage | Override the admin capability required to manage RMAs. Default: manage_woocommerce. | | ath_rma_eligible_order_statuses | Override WooCommerce order statuses eligible for customer returns. Default: completed, processing. | | ath_rma_refund_payload | Modify computed refund payload before refund creation. Useful for shipping, fees, or policy adjustments. | | ath_rma_money_decimals | Override money rounding precision for refund calculations. | | ath_rma_email_placeholders | Add custom email placeholders. | | ath_rma_email_subject | Modify final email subject. | | ath_rma_email_heading | Modify final email heading. | | ath_rma_email_body | Modify final email body. | | ath_rma_email_is_html | Toggle HTML email rendering. | | ath_rma_email_reply_to | Add Reply-To email. | | ath_rma_email_attachments | Add or modify attachments for RMA customer emails. | | ath_rma_email_to | Override destination email address. | | ath_rma_octolize_label_meta_keys | Provide known order meta keys for Octolize label lookup. |

Actions

| Action | Purpose | | --- | --- | | ath_rma_email_sent | Fires after a customer RMA email sends successfully. | | ath_rma_email_failed | Fires after an attempted customer RMA email fails. | | ath_rma_restocked_item | Fires after an item is restocked through the RMA workflow. | | ath_rma_created_from_order | Fires after an admin-created RMA is generated from an order. |

---

14. Security and Operational Safeguards

The plugin includes several practical safeguards:

  • Nonces for customer return submission actions.
  • Nonces for admin status changes, label upload, label attachment, email send, restock, and refund actions.
  • Admin capability checks through Utils::can_manage().
  • Customer ownership checks before allowing return requests from My Account.
  • PDF-only label uploads by extension validation.
  • Dedicated hardened upload directory for return labels.
  • Refund creation guard to prevent duplicate refund creation from the same RMA metadata.
  • Refund quantity checks to reduce over-refund risk.
  • HPOS-safe order edit URLs and WooCommerce CRUD order access.

---

16. Implementation Notes From Inspection

  • The customer workflow is intentionally simple in v1.0: the customer selects an order, then reloads the Returns endpoint with ath_rma_order to reveal the line-item picker.
  • Refund helpers are line-item aware and use historical order data, which is stronger than recalculating from current product prices.
  • Shipping refunds are not included by default. This is a safe initial behavior, but a future settings layer could allow shipping refund policies.
  • The refund system stores a single _ath_rma_refund_id, so multiple refunds per RMA are not yet modeled as a first-class workflow.
  • The Hooks class currently contains a placeholder thank-you hook for future post-purchase messaging.
  • The CSS assets are minimal, leaving room for Athenian theme-token styling, richer admin cards, and customer-facing UX upgrades.
  • PHP syntax checks passed for the inspected plugin files.

---

Deployment evidence\n\nObserved deployment version: 1.0.1 on Athenian Spa; 1.0.0 on ThixStrip (Representative active/inactive fleet deployment inventory). The captured deployment archive returns-manager-1.0.1.tar.gz has SHA-256 5968e710198cede0591126153c48a770bb2cabee4b536c3a7f1134724bcaa418. The 1.0.1 capture includes release provenance identifying 1.0.0 as its source baseline and 1.0.1 as the release version. The canonical GitHub main baseline remains 1.0.0, so the 1.0.1 release should be promoted to a reviewed branch before changing the page identity.

Deployment and source parity

Observed deployment version: 1.0.1 on Athenian Spa; 1.0.0 on ThixStrip (Representative active/inactive fleet deployment inventory). The captured deployment archive returns-manager-1.0.1.tar.gz has SHA-256 5968e710198cede0591126153c48a770bb2cabee4b536c3a7f1134724bcaa418. The deployed archive contains 23 runtime files matching the GitHub deployed-release branch after line-ending normalization. The branch has one repository-only .gitignore file; there are no deployed-only files. The 1.0.0 source snapshot remains the reviewed technical reference. The 1.0.1 release branch is now the canonical deployed identity, while ThixStrip remains explicitly documented at 1.0.0.

Live fleet review — 2026-10-07

ThixStrip is active on Returns Manager 1.0.0 with installed main-file SHA-256 9b34c6af1421b467b05ed6a2a38b5139b9be3105da978b2f26c55e20093f5c4b. Athenian Spa is active on 1.0.1 with main-file SHA-256 9352890b43c2b0ffc5fa3482b3605922a0d9fc85d2c356db1472fe8f0894fcdf. The documented deployed release identity is baseline/deployed-1.0.1-20261006 at commit 2c2d0f925e6a0764a16ee7a0ce1910bb6b22c872.

The local comparison shows the core RMA behavior files remain unchanged between the reviewed 1.0.0 and 1.0.1 trees; 1.0.1 adds the Athenian license/update bootstrap and release metadata. ThixStrip currently registers the private ath_rma post type, but the read-only runtime review found zero RMA posts and zero _ath_rma_* metadata rows. No return request, label, email, refund, restock, order, or carrier action was invoked.

Keep ThixStrip explicitly on its site-specific 1.0.0 state until owner confirmation and a separately bounded return-state canary are complete.

Install

Source and dependencies
  • Reviewed source folder: athenian-returns-manager
  • Reviewed source baseline version: 1.0.0; deployed release identity: baseline/deployed-1.0.1-20261006.
  • Local source inventory: 21 files (temporary, test, and Git metadata excluded).
  • Reviewed source baseline: baseline/devdocs-1.0.0-20261006 @ a47b91b25a7dddd9d5d0c8c4f5d61598fa42987f; deployed release: baseline/deployed-1.0.1-20261006 @ 2c2d0f925e6a0764a16ee7a0ce1910bb6b22c872.

  • WordPress 6.2 or newer, PHP 8.0 or newer, and WooCommerce 7.0 or newer.
  • Optional carrier/label integrations extend the manual return-label workflow; refund, restock, email, and customer effects require separate verification.
  • Normalized deployment parity: The deployed archive contains 23 runtime files matching the GitHub deployed-release branch after line-ending normalization. The branch has one repository-only .gitignore file; there are no deployed-only files.

  • Current ThixStrip runtime: active 1.0.0, main-file SHA-256 9b34c6af1421b467b05ed6a2a38b5139b9be3105da978b2f26c55e20093f5c4b.

  • Athenian Spa reference runtime: active 1.0.1, main-file SHA-256 9352890b43c2b0ffc5fa3482b3605922a0d9fc85d2c356db1472fe8f0894fcdf.

  • The 1.0.1 release adds the license/update bootstrap; core RMA workflow files were unchanged in the reviewed comparison.

Configuration

Implementation reference sections
  • 1. Executive Summary — see the linked technical reference excerpt.
  • 2. Marketing Positioning — see the linked technical reference excerpt.
  • 3. Problems This Plugin Solves — see the linked technical reference excerpt.
  • 4. Feature Highlights — see the linked technical reference excerpt.
  • 5. Customer Workflow — see the linked technical reference excerpt.
  • 6. Admin Workflow — see the linked technical reference excerpt.
  • 7. Technical Architecture — see the linked technical reference excerpt.
  • 8. Data Model — see the linked technical reference excerpt.
  • 9. Settings — see the linked technical reference excerpt.
  • 10. Refund Logic — see the linked technical reference excerpt.
  • 11. Restock Logic — see the linked technical reference excerpt.
  • 12. Label Workflow — see the linked technical reference excerpt.
  • 13. Hooks, Filters, and Extension Points — see the linked technical reference excerpt.
  • 14. Security and Operational Safeguards — see the linked technical reference excerpt.
Fleet deployment review — 2026-10-07
  • Current ThixStrip runtime: active 1.0.0, main-file SHA-256 9b34c6af1421b467b05ed6a2a38b5139b9be3105da978b2f26c55e20093f5c4b.

  • Athenian Spa reference runtime: active 1.0.1, main-file SHA-256 9352890b43c2b0ffc5fa3482b3605922a0d9fc85d2c356db1472fe8f0894fcdf.

  • The 1.0.1 release adds the license/update bootstrap; core RMA workflow files were unchanged in the reviewed comparison.

Usage

Detected extension surface
  • Shortcodes detected in local PHP source: 0
  • Static action/filter hooks detected in local PHP source: 27
  • REST route registrations detected in local PHP source: 0

Shortcodes

Detected shortcodes
  • No static add_shortcode registrations were detected by the baseline scanner.

REST Endpoints

Detected REST routes
  • No register_rest_route calls were detected by the baseline scanner.

Hooks

Detected hooks
  • add_meta_boxes — includes/Admin.php
  • add_meta_boxes — includes/OrderAdmin.php
  • admin_enqueue_scripts — includes/Plugin.php
  • admin_init — includes/Plugin.php
  • admin_menu — includes/Admin.php
  • admin_post_ath_rma_attach_octolize_label — includes/Admin.php
  • admin_post_ath_rma_create_from_order — includes/Admin.php
  • admin_post_ath_rma_create_refund — includes/Admin.php
  • admin_post_ath_rma_restock — includes/Admin.php
  • admin_post_ath_rma_send_email — includes/Admin.php
  • admin_post_ath_rma_set_status — includes/Admin.php
  • admin_post_ath_rma_upload_label — includes/Admin.php
  • ath_rma_octolize_label_meta_keys — includes/Integrations/Octolize.php
  • before_woocommerce_init — athenian-returns-manager.php
  • display_post_states — includes/PostType.php
  • init — includes/Plugin.php
  • manage_ — includes/Admin.php
  • plugins_loaded — athenian-returns-manager.php
  • post_updated_messages — includes/PostType.php
  • save_post_ — includes/Admin.php
  • woocommerce_account_athenian-returns_endpoint — includes/Plugin.php
  • woocommerce_account_menu_items — includes/Plugin.php
  • woocommerce_admin_order_actions — includes/PostType.php
  • woocommerce_order_actions — includes/OrderAdmin.php
  • woocommerce_order_action_ath_rma_create — includes/OrderAdmin.php
  • woocommerce_thankyou — includes/Plugin.php
  • wp_enqueue_scripts — includes/Plugin.php

Data Model

Persistence and integration boundary
  • 8. Data Model — described in the local technical reference.
  • 9. Settings — described in the local technical reference.

API Reference

Source inventory and provenance
  • Local source digest: 3cb86cc85c9044fa600bf0d567b19c4833d7cfe9fd75832391e6d2e33b8c0e9b
  • Repository URL: https://github.com/Athenian-Brands/athenian-returns-rma
  • Reviewed source baseline reference: baseline/devdocs-1.0.0-20261006
  • Reviewed source baseline commit: a47b91b25a7dddd9d5d0c8c4f5d61598fa42987f
  • Source files include: assets/admin/admin.css, assets/front/front.css, athenian-returns-manager.php, athenian-returns-manager.zip, docs/athenian-platform-marketing.md, docs/athenian-platform-technical.md, docs/athenian-returns-manager-marketing-document.md, docs/technical-marketing.md, includes/Admin.php, includes/Assets.php, includes/Email.php, includes/Hooks.php, includes/Installer.php, includes/Integrations/Octolize.php, includes/MyAccount.php, includes/OrderAdmin.php, includes/Plugin.php, includes/PostType.php, includes/Utils.php, readme.txt, uninstall.php

  • Canonical deployed release: baseline/deployed-1.0.1-20261006 @ 2c2d0f925e6a0764a16ee7a0ce1910bb6b22c872
  • Observed deployment: 1.0.1 on Athenian Spa; 1.0.0 on ThixStrip (Representative active/inactive fleet deployment inventory).
  • Deployment archive SHA-256: 5968e710198cede0591126153c48a770bb2cabee4b536c3a7f1134724bcaa418.
  • Normalized deployment parity: The deployed archive contains 23 runtime files matching the GitHub deployed-release branch after line-ending normalization. The branch has one repository-only .gitignore file; there are no deployed-only files.

Live identity and runtime observation — 2026-10-07
  • ThixStrip registers the private ath_rma CPT with admin UI; runtime count was zero published RMA records and zero _ath_rma_* metadata rows.

  • Return, label, email, refund, restock, order-note, and carrier effects remain unexercised and must not be inferred from the registered post type alone.

Troubleshooting

Baseline review boundary
  • This page documents the reviewed Returns Manager source baseline and a representative 1.0.1 deployment capture. It does not claim that a customer return, label, refund, restock, email, or carrier integration has been exercised.

  • Confirm the deployed plugin version, active dependencies, and current repository tree before using implementation details as a release contract.
  • Treat payment, carrier, vendor, shipment, inventory, account, credential, tax, AI, and external-provider behavior as integration-dependent until exercised in the target environment.

  • The 1.0.1 capture includes release provenance identifying 1.0.0 as its source baseline and 1.0.1 as the release version. The canonical GitHub main baseline remains 1.0.0, so the 1.0.1 release should be promoted to a reviewed branch before changing the page identity.

Current fleet boundary — 2026-10-07
  • Treat ThixStrip 1.0.0 and Athenian Spa 1.0.1 as separate fleet states until the owner confirms whether the missing license/update layer is intentional.
  • A zero-record observation is a data-lifecycle finding, not proof that the return workflow is safe to remove or promote without a rollback archive.

FAQ

What is this page intended to establish?

A versioned, product-linked starting point for iterative developer documentation. It combines the local implementation reference with a detected-code inventory and a committed GitHub baseline.

Is the linked repository baseline verified?

Yes. The repository URL, ref, and commit recorded on this page were verified from the clean GitHub baseline prepared for this documentation pass. That does not by itself prove fleet deployment parity.

What remains for release-grade documentation?

Reconcile the recorded source baseline with the deployed plugin version, then exercise the relevant authenticated, store, provider, payment, tax, carrier, or generated-artifact paths in the target environment.

What does the deployment evidence establish?

It establishes the observed fleet version, immutable archive hash, canonical GitHub release identity, and normalized source parity boundary. It does not, by itself, establish that payment, checkout, return, provider, carrier, refund, or fulfillment workflows have succeeded.

Has the ThixStrip return workflow been exercised?

No. The review was read-only: the plugin loaded, the private RMA post type was registered, and zero RMA records were found. No return, label, email, refund, restock, order, or carrier action was performed.

Changelog

1.0.0 2026-10-06
deployment-1.0.1 on Athenian Spa; 1.0.0 on ThixStrip 2026-10-06
parity-1.0.1 2026-10-06