add_action( 'wp_footer', 'weglotsupport_fix_avada_menu' );
function weglotsupport_fix_avada_menu() {
<script type="text/javascript">
/* WEGLOT FIX AVADA MENU */
jQuery(document).ready(function ($) {
var weglotMenuDone = false;
jQuery(document).on('click', '.fusion-mobile-menu-icons', function() {
jQuery(".menu-item-weglot.menu-item-object-custom").each(function() {
if ( typeof jQuery(this).attr("id") !== 'undefined' ) {
var id = jQuery(this).attr("id");
var dataId = id.substring(str.length, id.length);
jQuery('[data-item-id=\"' + dataId + '\"]').addClass( jQuery(this).attr("class") );