How do you remove nag in CoursePress?

How do you remove the nagging banner saying "Install MarketPress plugin in order to sell courses."

I don't *want* to sell my courses, I am using WPMUDEV's membership plugin so they are already paying monthly.

Cannot find an option in settings to get rid of the nag and if you close it then it pops right back up again.

I don't want to install a plugin I'm not going to use just to stop another plugin nagging me.

  • Nastia
    • Support Rock Star

    Hello Rod ,

    I trust you are doing well!

    You can hide the notice with CSS code. Please try the following code:

    .is-dismissible {
      display:none;
    }

    Add the code with the Ultimate Branding plugin. In Branding, enable the "Custom Admin CSS" module. Go to CSS tab and dd the code there. This should hide the notice.

    Let me know if you have any further questions!

    Kind regards,
    Nastia

  • Rod
    • Site Builder, Child of Zeus

    Hi

    Maybe it might be better for you guys to fix your code in your plugin so that your users don't have to install a completely different plugin alongside it just to fix broken functionality.

    A nag to install a plugin to provide unwanted functionality is not exactly user friendly.

  • Rod
    • Site Builder, Child of Zeus

    Also, won't your "fix" also disable notifications from other plugins that may be needed?

    .is-dismissible is not unique to you is it? A quick grep for it in my plugins folder shows it appearing in many other plugins.

  • Sajid
    • DEV MAN’s Sidekick

    Hello Rod,
    Hope you are doing good today :slight_smile:

    Apologies for inconvenience, I can understand that the nag could annoying if not handled correctly. I will pass on this suggestion to our developer for consideration.

    Meanwhile, you can remove that notice by using the following code snippet. This is unique to this nag and will only hide MarketPress plugin activation/installation notice.

    add_action( 'init', 'wpmudev_remove_mp_nag', 99 );
    function wpmudev_remove_mp_nag(){
    	remove_action( 'admin_notices', array( 'CoursePress_Helper_Extension_MarketPress', 'mp_notice' ) );
    }

    You can add this code in functions.php file of your theme or use it as mu-plugin.

    If you go with mu-plugin route then, go to your /wp-content/ folder via FTP, and find the folder called "mu-plugins". If there is no folder with that name, then you'll want to create one. Then, create a file inside that folder, and give the file any name you like and paste the code in there.

    You don't need to activate that plugin, as it will be always be automatically activated. Please be sure to add a PHP start tag at the beginning of the code if you insert this code as a mu-plugin, like this:

    <?php

    Best Regards,
    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.