• How can i use a function to change the text on the customer order cancellation request email subject line? we don’t use loco translate for just one language. I need to fix the grammar issue:
    Order cancellation request for order no. #8518 is submitted successfully

    no. and # are redundant. Need to remove the “no.” so that it reads
    Order cancellation request for order #8518 is submitted successfully

Viewing 1 replies (of 1 total)
  • Plugin Author rajeshsingh520

    (@rajeshsingh520)

    Hi,

    You can change the text using this code

    add_filter( 'woocommerce_email_subject_customer_order_cancel_request', function($subject, $order){
    $order_no = $order->get_order_number();
    return "Order cancellation request for order #{$order_no} is submitted successfully";
    }, 10, 2);

    add_filter( 'woocommerce_email_heading_customer_order_cancel_request', function($subject, $order){
    $order_no = $order->get_order_number();
    return "Order cancellation request for order #{$order_no} is submitted successfully";
    }, 10, 2);
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.