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.

  • Sajid

    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.