Use the rwc_return_request_recipient_email and rwc_exchange_request_recipient_email filters to change which email addresses receive return and exchange request notifications — for example, to route notifications to a vendor, a brand-specific inbox, or a returns team address. Add the snippet to your child theme’s functions.php file or a site-specific snippets plugin.
1. Open your theme’s functions.php file
Navigate to your child theme’s directory and locate the functions.php file. If it doesn’t exist, create one.
2. Insert the following code snippet
Copy and paste the code snippet below into your functions.php file:
/*
* Modify recipient email address for return and exchange requests
*/
// Modify recipient email for return request
add_filter('rwc_return_request_recipient_email', 'custom_return_request_recipient_email', 10, 2);
function custom_return_request_recipient_email($recipient, $order_id) {
// Set custom email address for return requests
$recipient = '[email protected],[email protected]'; // Enter your recipient emails, comma-separated
return $recipient;
}
// Modify recipient email for exchange request
add_filter('rwc_exchange_request_recipient_email', 'custom_exchange_request_recipient_email', 10, 2);
function custom_exchange_request_recipient_email($recipient, $order_id) {
// Set custom email address for exchange requests
$recipient = '[email protected]'; // Enter your recipient emails, comma-separated
return $recipient;
}
3. Save the file
Save the changes to your functions.php file. Return and exchange notifications will now be sent to the addresses you specified.
4. Additional Notes
- Both filters pass the recipient email(s) and the order ID as parameters.
- Use the
$order_idparameter to retrieve order items and dynamically route notifications based on product brand, vendor, or manufacturer — for example, route Nike product returns to a Nike-specific inbox.