$wpdb->query($wpdb->prepare($sql)) issue

Solution by Syed Ashik Mahmud :

old : $wpdb->query($wpdb->prepare($sql))

new: $wpdb->query($wpdb->prepare($sql,””))

Cheers, Solved 🙂