How to change the return status instructions for customer
Follow these steps to change the return 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 return status for customer
*/
add_filter( 'customer_return_status_instructions', 'change_instruction_based_return_status', 10, 2 );
function change_instruction_based_return_status( $instruction, $return_status ) {
//for Return Requested
if ( 'return-requested' == $return_status ) {
$instruction = esc_html__('Please enter the instruction for the requested items.', 'zorem-returns-exchanges');
}
//for Return Approved
if ( 'return-approved' == $return_status ) {
$instruction = esc_html__('Please enter the instruction for the approved items.', 'zorem-returns-exchanges');
}
//for Return Rejected
if ( 'return-rejected' == $return_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 return status instructions for customer.