A WooCommerce returns API with webhooks and PHP hooks
The WooCommerce returns API in WPReturns is the set of REST routes, webhooks and PHP hooks that connect returns to your other systems. REST lives under ddwcwr/v1 with application password auth, and WooCommerce webhooks fire on return_request.created and return_request.updated. Actions and filters cover requests, labels, rules and the order layer.
The problem
Returns data trapped in wp-admin
Your helpdesk, warehouse and ERP all need to know when a return opens or changes. Without an API someone copies it across by hand.
None of the WooCommerce returns plugins we compared shipped a REST API or webhooks (compared on October 30, 2026). One listed only vague API settings.
How WPReturns solves it
What the WooCommerce returns API exposes
REST routes list, read, create and update requests, post messages and read reasons. Every route needs a user with the ddwcwr_manage_requests capability.
Webhooks use WooCommerce's own delivery. Add one under WooCommerce > Settings > Advanced > Webhooks and WooCommerce signs and retries it.
In PHP every order call goes through an adapter you can swap with the ddwcwr_order_adapter filter. New carriers plug in through DDWCWR_Label_Provider_Interface and the ddwcwr_label_providers filter.
- REST namespace ddwcwr/v1
- Application password auth
- Signed WooCommerce webhooks
- Request lifecycle actions
- Swappable order adapter
- Custom label providers
- Theme template overrides
- HPOS-safe order access
How it works
- 01
Create an application password
Add one under Users > Profile for a user who can manage requests. Send it with Basic auth on every REST call.
- 02
Call the REST routes
Use GET and POST on /wp-json/ddwcwr/v1/requests and GET and PUT on /requests/{id}. Messages and reasons have routes of their own.
- 03
Subscribe to webhooks
Pick Return request created or Return request updated as the topic. WooCommerce posts the request payload to your URL.
- 04
Hook into PHP events
Listen to ddwcwr_request_created or ddwcwr_request_status_changed for custom logic. Override front templates in yourtheme/wpreturns/front/.
The settings involved
These settings control this feature. The plugin explains each one next to its field.
Free or Pro
- Action and filter hooks
- Order adapter interface
- Theme template overrides
- Private upload folder filter
- GDPR export and erase
- REST API under ddwcwr/v1
- WooCommerce webhook topics
- Label provider interface
- Action Scheduler automation
- Rule and risk flag filters
Developer API questions
Ask the team or read the docs if your question is not here.
How do I authenticate REST requests?
Use a WordPress application password for a user with the ddwcwr_manage_requests capability. Administrators and shop managers have it by default.
Which REST routes are available?
GET and POST /requests, GET and PUT /requests/{id}, GET and POST /requests/{id}/messages and GET /reasons. All of them live under /wp-json/ddwcwr/v1/.
How do the webhooks work?
WPReturns registers two WooCommerce webhook topics named Return request created and Return request updated. WooCommerce handles delivery, signing and retries like any other webhook.
Can I add my own shipping carrier?
Yes. Write a class for DDWCWR_Label_Provider_Interface with get_id(), get_name(), is_configured() and create_label(). Register it through the ddwcwr_label_providers filter.
Can I move private uploads outside the web root?
Yes, with the ddwcwr_private_upload_dir filter. On nginx with the folder inside uploads, add location ~ /ddwcwr-private- { deny all; } to your server block.
Is there a free version?
Yes. The free WPReturns plugin includes the action and filter hooks, the order adapter and template overrides. The REST API, webhooks, label provider interface and Action Scheduler automation are part of WPReturns Pro.
Related features
- Return labelsBuy one prepaid return label per request from your EasyPost or Shippo account or upload your own label file.
- AnalyticsSee return rate and refunds next to revenue kept. Top reasons, the most returned products and a CSV export sit on the same screen.
- Return rulesSet return windows and final-sale items per product or customer and let rules approve or reject routine requests.
- PricingOne yearly license with every feature and no per-return fees.
Free plugin on wordpress.org
Developer API for your WooCommerce store
Start with the free plugin and the EU withdrawal button. Move to Pro from $99 a year when you want credit, exchanges and rules.