How to change the exchange status instructions for customer

Follow these steps to change the exchange status instructions for customer:

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:

/*
* Change the instruction based exchange status for customer
*/

add_filter( 'customer_exchange_status_instructions', 'change_instruction_based_exchange_status', 10, 2 );

function change_instruction_based_exchange_status( $instruction, $exchange_status ) {

    //for Exchange Requested
    if ( 'exchange-requested' == $exchange_status ) {
        $instruction = esc_html__('Please enter the instruction for the requested items.', 'zorem-returns-exchanges');
    }

    //for Exchange Approved
    if ( 'exchange-approved' == $exchange_status ) {
        $instruction = esc_html__('Please enter the instruction for the approved items.', 'zorem-returns-exchanges');
    }

    //for Exchange Rejected
    if ( 'exchange-rejected' == $exchange_status ) {
        $instruction = esc_html__('Please enter the instruction for the rejected items.', 'zorem-returns-exchanges');
    }

    return $instruction;
}

3. Save the file

Save the changes to your functions.php file.

By following these steps, you’ve successfully changed the exchange status instructions for customer.

$129.00

Billed annually

Buy Now