How to remove NAG screen from YITH Plugins

  • Welcome to Babiato Forum! All Resources are 100% clean and Safe to Use

TassieNZ

Old Age lusty uncle
Jan 17, 2019
9,014
19,820
120
Son of Bitch!
Although I've only tested it on a few YITH plugins, the ones I did try it on worked fine. I'd imagine they are all the same.

Make a backup of the file yit-plugin-license.php just in case!

You need to edit /wp-content/plugins/YITH Plugin Name/plugin-fw/license/lib/yit-plugin-license.php

Delete ALL lines from 134 to 146.

DONE! 😊

This needs to be done on ALL YITH plugins (free or paid) or it will not function.

PHP:
                    if ( !!$product_names ) {
                        $start          = '<span style="display:inline-block; padding:3px 10px; margin: 0 10px 10px 0; background: #f1f1f1; border-radius: 4px;">';
                        $end            = '</span>';
                        $product_list   = '<div>' . $start . implode( $end . $start, $product_names ) . $end . '</div>';
                        $activation_url = self::get_license_activation_url();
                        ?>
                        <div class="notice notice-error">
                            <p><strong>Warning!</strong> You didn't set license key for the following products:
                                <?php echo $product_list ?>
                                which means you're missing out on updates and support. <a href='<?php echo $activation_url ?>'>Enter your license key</a>, please.</p>
                        </div>
                        <?php
                    }
 
Last edited:

TassieNZ

Old Age lusty uncle
Jan 17, 2019
9,014
19,820
120
Son of Bitch!
Well, unfortunately for me plugins don't work all the time, as they caused a conflict with certain themes.

This is directly editing the YITH plugin so that no extra plugins are required. :)

It doesn't hide, it removes.
 
Last edited:
  • Like
Reactions: tanierlyons

TassieNZ

Old Age lusty uncle
Jan 17, 2019
9,014
19,820
120
Son of Bitch!
UPDATE!

If you aren't confident editing the file yourself, you should be able to use mine. I've tested it on 7 YITH plugins with success.

Just download and unzip the file below.

Upload it to /wp-content/plugins/YITH Plugin Name/plugin-fw/license/lib/ replacing the original yit-plugin-license.php

Please make a backup of yit-plugin-license.php first, just in case!!!

https://www71.zippyshare.com/v/LrLDYNhb/file.html
 
  • Like
Reactions: tanierlyons

Rubixvi

Well-known member
Trusted Uploader
Remove this from /wp-content/plugins/<yith plugin>/plugin-fw/lib/yit-upgrade.php

Code:
            global $wp_version;
            $is_wp_4_6 = version_compare( $wp_version, '4.6', '>=' );

            echo '<tr class="plugin-update-tr' . ( is_plugin_active( $init ) ? ' active' : '' ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">';

            echo '<div class="update-message' . ( $is_wp_4_6 ? ' notice inline notice-warning notice-alt' : '' ) . '">';

            echo( $is_wp_4_6 ? '<p>' : '' );

            if ( ! current_user_can( 'update_plugins' ) ) {
                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version );
            }

            elseif ( is_plugin_active_for_network( $init ) ) {
                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a>. <em>You have to activate the plugin on a single site of the network to benefit from automatic updates.</em>', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version );
            }

            elseif ( empty( $r->package ) ) {
                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin, please <a href="%5$s" title="License activation">activate</a> your copy of %6s.</em>', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, YIT_Plugin_Licence()->get_licence_activation_page_url(), $this->_plugins[ $init ]['info']['Name'] );
            }

            else {
                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox yit-changelog-button open-plugin-details-modal" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="%6$s" data-plugin="%7$s" data-slug="%8$s" data-name="%1$s">update now</a>.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $init, 'upgrade-plugin_' . $init ), $update_now_class, $init, $this->_plugins[ $init ]['slug'] );
            }

            if( version_compare( $this->_plugins[ $init ]['info']['Version'] , $r->new_version, '>' ) ){
                printf( __( '<br/><b>Please note:</b> You are using a higher version than the latest available one. </em>Please, make sure you\'ve downloaded the latest version of <em>%1$s</em> from the only <a href="https://yithemes.com" target="_blank">YITH official website</a>, specifically, from your <a href="https://yithemes.com/my-account/recent-downloads/" target="_blank">Downloads page</a>. This is the only way to be sure the version you are using is 100%% malware-free.', 'yith-plugin-fw' ), $this->_plugins[ $init ]['info']['Name'], esc_url( $details_url ), esc_attr( $this->_plugins[ $init ]['info']['Name'] ), $r->new_version, YIT_Plugin_Licence()->get_licence_activation_page_url(), $this->_plugins[ $init ]['info']['Name'] );
            }


            echo( $is_wp_4_6 ? '</p>' : '' );
 

Richard1x

New member
Apr 18, 2019
7
1
3
/public_html/wp-content/plugins/yith-woocommerce-order-tracking-premium/plugin-fw/licence/lib

Line: 80

if( version_compare( PHP_VERSION, '7.0', '>=' ) ) {
//add_action( 'admin_notices', function () {
//$this->activate_license_notice();
//}, 15 );
}

Line: 125

Comment or remove this entire function:
public function activate_license_notice() {

Do the same for all YITH plugins like yith-woocommerce-wishlist otherwise won't work.
 

Forum statistics

Threads
73,540
Messages
953,682
Members
282,144
Latest member
Aleeza

About us

  • Babiato Forum - The webmaster community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day, updating Daily resource to make sure our community is one of the best.

Quick Navigation

User Menu