Skip to content

Instantly share code, notes, and snippets.

@rwkyyy
Created August 24, 2020 14:27
Show Gist options
  • Save rwkyyy/7e164ee109ecf307661ed58fd9e5552e to your computer and use it in GitHub Desktop.
Save rwkyyy/7e164ee109ecf307661ed58fd9e5552e to your computer and use it in GitHub Desktop.
Disable WPBakery Page Builder API update check via function
/* Disable WPBakery Page Builder auto-update check*/
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