Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • thank you, Mike!
    but looks like answer even much easier)
    found:

    function filter_custom_details_header($heading) {
        return 'My Customer Details Heading';
    }
    
    add_filter('woocommerce_email_custom_details_header', 'filter_custom_details_header');

    So $order was optional.

    Hi Lorro! I have some issue with this part too!
    I found filter
    $heading = apply_filters( 'woocommerce_email_custom_details_header', $heading, $sent_to_admin, $order );
    and added next function

    //change email header customer info
    add_filter( 'woocommerce_email_custom_details_header', 'change_email_header');
    function change_email_header( $heading, $sent_to_admin = false, $order ) {
        global $order;
        $heading = $sent_to_admin ? __( 'Info', 'woocommerce' ) : __( 'Your info', 'woocommerce' );
        return $heading;
    }

    But it’s return an error:
    Warning: Missing argument 3 for change_email_header()

    Can you help me and tell how in this case defined $order?

Viewing 2 replies - 1 through 2 (of 2 total)