How to Modify Recipient Email for Return and Exchange Requests

Follow these steps to modify the recipient email addresses for return and exchange request notifications:

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 with comma saparate

    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 with comma saparate

    return $recipient;
}

3. Save the file

Save the changes to your functions.php file.

By following these steps, you’ve successfully modified the recipient email addresses for return and exchange request notifications.

4. Additional Notes

  • Both filters pass the recipient email(s) and the order ID as parameters.
  • The $order_id parameter can be used to:
    • Retrieve all items in the order.
    • Check product details such as brand, vendor, or manufacturer.
    • Dynamically route return/exchange request notifications to different email addresses depending on the products involved.
  • For example, if an order contains Nike products, you could route the request to a Nike support email, while Adidas products could go to their own support team.

$129.00

Billed annually

Buy Now