Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seventhqueen/54d941cba1c31087bb1dd79959ab5948 to your computer and use it in GitHub Desktop.
Save seventhqueen/54d941cba1c31087bb1dd79959ab5948 to your computer and use it in GitHub Desktop.
Disable Visual composer nasty auto update functionality that won't let you update the plugin from TGMPA. A quick snippet that can be dropped in your child theme functions.php
/* Disable VC auto-update */
function seventhqueen_vc_disable_update() {
if (function_exists('vc_license') && function_exists('vc_updater') && ! vc_license()->isActivated()) {
remove_filter( 'upgrader_pre_download', array( vc_updater(), 'preUpgradeFilter' ), 10);
remove_filter( 'pre_set_site_transient_update_plugins', array(
vc_updater()->updateManager(),
'check_update'
) );
}
}
add_action( 'admin_init', 'seventhqueen_vc_disable_update', 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment