Developer Reference
Constants
| Constant | Value | Description |
|---|---|---|
RETURNDESK_PRO_VERSION | 1.0.0 | Pro plugin version |
RETURNDESK_SETTINGS_OPTION | returndesk_settings | WordPress option key |
Filters
| Filter | Arguments | Description |
|---|---|---|
returndesk_pro_is_excluded | $excluded (bool), $product_id (int), $type (string) | Override exclusion for a specific product and request type |
returndesk_pro_refund_amount | $amount (float), $request (array) | Modify the calculated refund amount |
returndesk_pro_auto_approve | $auto (bool), $request (array) | Override auto-approve decision per request |
returndesk_pro_exchange_eligible | $eligible (bool), $order, $item | Override exchange eligibility |
Actions
| Action | Arguments | Description |
|---|---|---|
returndesk_pro_refund_created | $request_id (int), $refund_id (int) | Fires after a WooCommerce refund is created |
returndesk_pro_whatsapp_send | $number (string), $message (string), $request (array) | Hook to send to additional WhatsApp numbers or alternative providers |
returndesk_pro_exchange_approved | $request_id (int), $request (array) | Fires when an exchange is approved |
returndesk_pro_auto_closed | $request_id (int) | Fires when a request is auto-closed |
Settings Defaults
| Key | Default | Description |
|---|---|---|
enable_exchange | no | Enable exchange request type |
exchange_window_days | 14 | Exchange eligibility window |
exchange_auto_approve | no | Auto-approve exchanges |
return_auto_approve | no | Auto-approve returns |
exchange_allow_partial | no | Allow partial exchange quantities |
return_allow_partial | no | Allow partial return quantities |
auto_restock_approved | no | Restock on approval |
refund_to_store_credit | no | Issue store credit refund |
refund_to_payment_method | no | Issue gateway refund |
include_shipping_fee_refund | no | Include shipping in refund |
cod_return_policy | '' | COD return instructions |
whatsapp_number | '' | WhatsApp notification number |
auto_close_enabled | no | Enable auto-close |
auto_close_days | 30 | Days before auto-close |
excluded_category_ids | [] | Excluded category IDs |
excluded_product_ids | [] | Excluded product IDs |