Documentation
ReturnDesk Pro
Developer Reference

Developer Reference


Constants

ConstantValueDescription
RETURNDESK_PRO_VERSION1.0.0Pro plugin version
RETURNDESK_SETTINGS_OPTIONreturndesk_settingsWordPress option key

Filters

FilterArgumentsDescription
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, $itemOverride exchange eligibility

Actions

ActionArgumentsDescription
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

KeyDefaultDescription
enable_exchangenoEnable exchange request type
exchange_window_days14Exchange eligibility window
exchange_auto_approvenoAuto-approve exchanges
return_auto_approvenoAuto-approve returns
exchange_allow_partialnoAllow partial exchange quantities
return_allow_partialnoAllow partial return quantities
auto_restock_approvednoRestock on approval
refund_to_store_creditnoIssue store credit refund
refund_to_payment_methodnoIssue gateway refund
include_shipping_fee_refundnoInclude shipping in refund
cod_return_policy''COD return instructions
whatsapp_number''WhatsApp notification number
auto_close_enablednoEnable auto-close
auto_close_days30Days before auto-close
excluded_category_ids[]Excluded category IDs
excluded_product_ids[]Excluded product IDs