Created
April 22, 2016 22:09
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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