Hide activation nag for Visual Composer and Ultimate Addons for Visual Composer

vc-nag

Updated 2016-04-26

Tired of the message “Hola! Please activate your copy of Visual Composer to receive automatic updates.”?

Here’s a quick way of turning it off. Put this in your themes functions.php file:

setcookie('vchideactivationmsg', '1', strtotime('+3 years'), '/');
setcookie('vchideactivationmsg_vc11', (defined('WPB_VC_VERSION') ? WPB_VC_VERSION : '1'), strtotime('+3 years'), '/');

Or, you can save the snippet below as stop-vc-nag.php, put it in your wp-content/plugins folder and activate the “Stop Visual Composer Activation Nag” plugin!

<?php
/*
Plugin Name: Stop Visual Composer Activation Nag
Plugin URI:
Description:
Version: 2016.04.26
Author: khromov
Author URI: http://snippets.khromov.se
License: GPL2
*/

add_action('admin_init', function()
{
    if(is_admin()) {
        setcookie('vchideactivationmsg', '1', strtotime('+3 years'), '/');
        setcookie('vchideactivationmsg_vc11', (defined('WPB_VC_VERSION') ? WPB_VC_VERSION : '1'), strtotime('+3 years'), '/');
    }
});

Disable Visual Composer Ultimate Addons nag

To disable this nag you have to add the lines below to your wp-config.php file:

define('ULTIMATE_NO_EDIT_PAGE_NOTICE', true);
define('ULTIMATE_NO_PLUGIN_PAGE_NOTICE', true);

41 thoughts on “Hide activation nag for Visual Composer and Ultimate Addons for Visual Composer

    1. Stanislav Khromov Post author

      Hey Diah,

      Did you put this code in a plugin file and activate it?

      Which version of VC are you using?

      Reply
  1. Aleksa

    Extra work !!! “Stop Visual Composer Activation Nag” plugin GREAT TNX AGAIN !!!

    Reply
  2. Alex

    How about buying Visual Composer and entering license? Looks like you are using it, why not pay developers that work constantly to improve it?

    Reply
    1. Stanislav Khromov Post author

      Versioning via Composer and multisite environments are two use cases off the top of my head that are perfectly valid without implying license violations. Some premium themes bundling VC without disabling this warning is another use case.

      Reply
    2. Elmer Twilley

      First, cheers on this article, but the ultimate add-ons define doesn’t work.

      REPLY
      Many theme authors bundled VC with their themes, which WE purchased, but since about 4 months past, you get this screen nag no matter what you do. I am sure that the theme author(s) could prevent these nags with a little due diligence, however that leaves us without a solution until they do.

      Reply
  3. Andhi Irawan

    Thanks for the plugin.
    You are right about some premium themes VC bundling without disabling this warning.
    I buy a premium theme that bundling VC in it.
    Although the themes we already buy / pay, VC nag remain frequent.
    The same thing we can do to Ultimate Addons for Visual Composer.

    add_action(‘admin_init’, function()
    {
    setcookie(‘vchideactivationmsg’, ‘1’, strtotime(‘+3 years’), ‘/’); //Visual Composer
    setcookie(‘uavchideactivationmsg’, ‘1’, strtotime(‘+3 years’), ‘/’); //Ultimate Addons for Visual Composer
    });

    Reply
    1. Stanislav Khromov Post author

      Hey Andhi,

      Thanks for the additional snippet, I added it to the main post!

      Reply
    2. Stanislav Khromov Post author

      Hey Andhi,

      It seems the snippet you provided does no longer work for Ultimate Addons (at least not for version 3.11.1). I have included an alternative snippet that should work at the bottom of the post.

      Reply
  4. Bjorn Solstad

    Looks like it’s not working for Ultimate Addons where I tested it. Single install. Latest versions of everything. All cookies cleared.

    And yes, I have bought a bunch of licences for both products, but this is for a staging environment, so it’s actually not a live site.

    Reply
    1. Stanislav Khromov Post author

      Hi Bjorn,

      You are correct, seems that the snippet does not work. I have added an alternative way to disable the activation nag, check at the bottom of the post. Hope that helps.

      Reply
  5. Andhi Irawan

    Hi Stanislav,
    I’ve tried all the latest snippet you.
    Only works for Visual Composer and do not work for the Ultimate Addons for Visual Composer.
    So finally I change it through html tags. Open wp-content\plugins\Ultimate_VC_Addons\admin\admin.php
    Find Howdy word.
    Above that word there is html tags .
    Add style = “display: none;” thus becoming
    But I do not know whether if the plugin update the tags will be lost or not.
    The same thing I did at Gravity Form.
    #gf_dashboard_message { display: none; }

    Reply
  6. Jeremie

    Hey,

    I was looking for a solution for that for a client as the theme includes the plugin without hiding the update nag…

    Andhi’s answer made me think and here is a safer solution than editing the plugin. Add this to your functions.php


    add_action('admin_head', 'hide_nag');

    function hide_nag() {
    echo '
    .update-nag.bsf-update-nag {
    display: none !important;
    }
    ';
    }

    This works for the ultimate addons but a little bit of customisation will make it work for every plugin.

    Reply
    1. Hammer

      Does it work with the latest version of ultimate addons ? This does not work for me.

      Reply
  7. WP_God

    If all the above solution fails, use below method:

    1. Open wp-content\plugins\Ultimate_VC_Addons\admin\admin.php

    Comment the line add_action( ‘admin_notices’, array( $this, ‘display_notice’ ) ) and save the file

    2. Open wp-content\plugins\Ultimate_VC_Addons\admin\auto-update\admin-functions.php

    Comment the line add_action(‘admin_notices’,’bsf_notices’,1000); and save the file

    This should keep away the nag messages on the screens.

    Thanks.

    Reply
  8. Yasir Bakhtiar

    Work with Version 3.13.5. heres how u do it. Thanks WP_God

    1. wp-content\plugins\Ultimate_VC_Addons\admin\admin.php

    The codes look like this, at the top of the line.
    ============================================
    if($_SERVER[‘HTTP_HOST’] !== ‘localhost’ && $_SERVER[‘REMOTE_ADDR’] !== ‘127.0.0.1’ && $_SERVER[‘REMOTE_ADDR’] !== ‘::1’){
    //add_action( ‘admin_notices’, array( $this, ‘display_notice’ ) );
    //add_action( ‘plugins_loaded’, array($this, ‘check_for_update’) );
    //add_action( ‘in_plugin_update_message-
    ===================================================
    Change it into.
    ===============================================
    if($_SERVER[‘HTTP_HOST’] !== ‘localhost’ && $_SERVER[‘REMOTE_ADDR’] !== ‘127.0.0.1’ && $_SERVER[‘REMOTE_ADDR’] !== ‘::1’){
    add_action( ‘admin_notices’, array( $this, ‘display_notice’ ) );
    //add_action( ‘plugins_loaded’, array($this, ‘check_for_update’) );
    //add_action( ‘in_plugin_update_message-
    ================================================
    I only remove comment line on “add_action( ‘admin_notices’, array( $this, ‘display_notice’ ) );”

    2. wp-content\plugins\Ultimate_VC_Addons\admin\auto-update\admin-functions.php
    The codes look like this, Line 477
    ===============================================
    add_action(‘admin_notices’,’bsf_notices’,1000);
    add_action(‘network_admin_notices’,’bsf_notices’,1000);
    if(!function_exists(‘bsf_notices’)) {
    ===============================================
    Change it to.
    ==========================
    //add_action(‘admin_notices’,’bsf_notices’,1000);
    add_action(‘network_admin_notices’,’bsf_notices’,1000);
    if(!function_exists(‘bsf_notices’)) {
    ==========================

    Yeah have fun.

    Reply
  9. John

    Thank you Yasir Bakhtiar.

    This worked for me. The next step is to get rid of the ‘Brainstorm’ tab in the admin menu.

    Reply
    1. Andhi Irawan

      Hi, John, to remove Brainstorm tab, maybe you can use css :
      .toplevel_page_bsf-dashboard { display: none }
      or #toplevel_page_bsf-dashboard { display: none }

      bsf-dashboard is Brainstorm Force Dashboard
      admin.php?page=bsf-dashboard

      Reply
        1. Andhi Irawan

          Hi Ray,
          Which part is not working?
          Have you tried using css?

          Try this :

          .bsf-update-nag, #toplevel_page_bsf-registration {display:none}

          Put at the bottom of the file:
          yourdomain.com\wp-admin\css\wp-admin.min.css

          bsf-update-nag -> for notification
          toplevel_page_bsf-registration -> for Brainstorm menu in the left

          Reply
  10. Javier

    For removing the Brainstorm item from the wp-admin menu you could add this to your functions.php:

    function custom_menu_page_removing() {
    remove_menu_page( ‘admin.php?page=bsf-registration’ );
    }
    add_action( ‘admin_menu’, ‘custom_menu_page_removing’ );

    as stated here:
    https://codex.wordpress.org/Function_Reference/remove_menu_page

    although I don’t know why it doesn’t work.

    so I’ve used CSS:

    function my_custom_css() {
    echo ‘
    .toplevel_page_bsf-registration {
    display: none !important;
    }
    ‘;
    }
    add_action(‘admin_head’, ‘my_custom_css’);

    Reply
    1. Stanislav Khromov Post author

      Hey Javier,

      It’s probably a priority issue – your code tries to remove the menu before the original plugin adds it. Try changing your filter to priority 999 so that it runs last. :-)

      Reply
      1. Javier

        Hello there!

        Unfortunately it doesn’t work even with the lowest priority set

        So I’ve got to stick with the CSS solution

        Thanks for the tip anyway!

        Reply
    1. Hossam Hossny

      That was the only solution that worked for me. Thanks, Shawn!
      Just create a folder mu-plugins under wp-contents then create a .php file and then copy and paste the code:

      That’s a must-use plugin that runs automatically without the need for activation or anything. Preferable method to hook in your code on top of everything without worrying about plugin/theme updates or even your child theme functions file. If you want a certain function to run with last priority just give your function the priority 999 so it run last.

      Cheers,
      Hossam

      Reply
  11. Carlos

    hello I need you help not work!!
    I have the next error

    Parse error: syntax error, unexpected T_FUNCTION in /home4/speedda6/public_html/love/wp-content/plugins/stop-vc-nag.php on line 12

    Reply
    1. Stanislav Khromov Post author

      Hi Carlos,

      Looks like you are running a very old PHP version. Please upgrade your version of PHP to at least 5.3!

      Reply
  12. WP_God

    Now the latest update of Ultimate addon (version 3.14.1) for nag screen is hidden by developer and none of the above solution work.

    So in order to get rid of the nag screen, only following solution will work after going deep into the code.

    Comment following line in \plugins\Ultimate_VC_Addons\admin\bsf-core\auto-update\admin-functions.php (line no is 478 and 479)

    add_action(‘admin_notices’,’bsf_notices’,1000);
    add_action(‘network_admin_notices’,’bsf_notices’,1000);

    So the line will look like this
    //add_action(‘admin_notices’,’bsf_notices’,1000);
    //add_action(‘network_admin_notices’,’bsf_notices’,1000);

    Hope this will help others as it did to me.

    Reply
    1. Shawn Hayes

      @WP_God

      You shouldn’t hack plugin code as it can create problems for you in the future when updating.

      If you check out my solution above it should work for you. I have tested the solution on the latest release (version 3.14.1) and it’s working as it should.

      Thanks,
      Shawn

      Reply
  13. youpain

    simple

    // disable activation vc
    setcookie(‘vchideactivationmsg’, ‘1’, strtotime(‘+3 years’), ‘/’); //Visual Composer
    add_action(‘admin_head’, ‘hide_nag’);
    function hide_nag() {echo ‘.update-nag.bsf-update-nag {display: none !important;}’;}

    Reply
  14. Rupinder

    Hi, I want to deactivate the theme activation line in wordpress.

    How to hide theme activation line without adding purchase code????

    Please inform me.

    Thanks.

    Reply
  15. Mike

    This worked:
    define(‘BSF_PRODUCTS_NOTICES’, false);

    Bonus: Add to wp-config.php
    At risk of losing the edit on a future theme update, I added it to wp-config.php (above the database settings) and it worked like a charm!!

    Reply
  16. James Revillini

    hello,
    mind if i turn this into an installable plugin and host it on my site or add it to the wordpress repo? not only would it save me a lot of time but i’m sure others as well. of course i’ll keep the credits as is but add myself so i can maintain the repo and answer questions.

    thanks,
    james

    Reply
  17. Faiz Khairi

    If you want to disable License Nag for Ultimate Addons, paste code below in function.php

    define(‘BSF_PRODUCTS_NOTICES’, false);

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.