Events Made Easy Plugin – Duplicate Title Tags

I try this following code with Events Made Easy version 2.0.35.
It looks like you were near of the solution. you have found all bricks but you don’t have succeed to assemble them.

Try this code to deactivate the automatic title if this is a event page and if the config of the title is set in the back-end :

add_action("wp_head", function () {


    if (eme_is_single_event_page()) {

        $extra_headers_format = get_option('eme_event_html_headers_format');

        if (!empty($extra_headers_format)) {
            remove_action( 'wp_head', '_wp_render_title_tag', 1 );
        }

    }


}, 0); // priority 0 to be launched before the call of "_wp_render_title_tag"