How to override the title tag for woocommerce endpoints?

If you added custom WC endpoints on init, you can use something like this instead to check for endpoints (adjust accordingly if you’re using Yoast):

function add_custom_endpoints_to_title( $post_title ) {

    if ( ! is_account_page() ) {
        return $post_title;
    }

    global $wp;

    if ( isset( $wp->query_vars['custom_endpoint_1'] ) ) {
        $post_title="Custom Endpoint 1";
    } elseif ( isset( $wp->query_vars['custom_endpoint_2'] ) ) {
        $post_title="Custom Endpoint 2";
    }

    return $post_title;
}

add_filter( 'single_post_title', 'add_custom_endpoints_to_title', 99 );