- This topic has 65 replies, 44 voices, and was last updated 4 years, 11 months ago by
Srinivasa M.
-
AuthorPosts
-
February 13, 2019 at 3:03 pm #21055
Jon Posting
Participantif guys just want to hide the nag
“Warning! You didn’t set license key for the following products:which means you’re missing out on updates and support. ‘>Enter your license key, please.”
go to /include/class.yith-wcwl-admin-premium.php and comment out line:
824: //YIT_Plugin_Licence()->register( YITH_WCWL_INIT, YITH_WCWL_SECRET_KEY, YITH_WCWL_SLUG );
838: //YIT_Upgrade()->register( YITH_WCWL_SLUG, YITH_WCWL_INIT );-
This reply was modified 6 years, 2 months ago by
Jon Posting.
February 13, 2019 at 8:06 pm #21057Gutre Lebowski
ParticipantThat worked, thank you. It required some digging to find the right file though :)
February 13, 2019 at 8:53 pm #21058Jon Posting
ParticipantYeah sorry about that. That was for the YITH wishlist. You can easily find it for other plugin using Notepad+ for window or Coda2 for Mac and do a search in file and folder for YIT_Plugin_Licence()->register and YIT_Upgrade()->register. It will find whatever file its in.
Most of the plugin I tested are in the Include folder just with different file name.February 13, 2019 at 8:56 pm #21059Gutre Lebowski
ParticipantNo problem at all. Thanks again.
February 14, 2019 at 3:17 am #21063Fitz
ParticipantThe mods still works. Its just that it has to be done on all instances of Yith, both free & premium. Coz all the Yith plugins (free & paid) are connected.
February 15, 2019 at 10:36 am #21074Bintang Priyonggo
Participantnew code : 134 – 153 -> delete
February 22, 2019 at 9:20 pm #21117Sam Aka
Participantyes they have updated the code so it’s now between those lines: 134-153
once deleting them then it should work fine. goodluckFebruary 22, 2019 at 9:26 pm #21118Sam Aka
ParticipantGosser
in your method it will disable the check for update notification as well as being checked for update in the WP update plugins page!!! i don’t recommend that because you still want to be notified when there is an update available so you can come here gpldl.com and download the update, all what the users want is just to disable and hide the nag screen about license activation only. at least this is my opinion but it’s up to you.March 7, 2019 at 9:25 am #21166Ruffo Valiente
ParticipantHey there!
please only copy all code to your file: please note the path:
/wp-content/plugins/yith-woocommerce-stripe-premium/plugin-fw/licence/lib
<?php
/**
* This file belongs to the YIT Plugin Framework.
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.txt
*/if ( !defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directlyif ( !class_exists( 'YIT_Plugin_Licence' ) ) {
/**
* YIT Plugin Licence Panel
*
* Setting Page to Manage Plugins
*
* @class YIT_Plugin_Licence
* @package YITH
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
class YIT_Plugin_Licence extends YIT_Licence {/**
* @var array The settings require to add the submenu page "Activation"
* @since 1.0
*/
protected $_settings = array();/**
* @var object The single instance of the class
* @since 1.0
*/
protected static $_instance = null;/**
* @var string Option name
* @since 1.0
*/
protected $_licence_option = 'yit_plugin_licence_activation';/**
* @var string product type
* @since 1.0
*/
protected $_product_type = 'plugin';/**
* Constructor
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function __construct() {
parent::__construct();if ( !is_admin() ) {
return;
}$this->_settings = array(
'parent_page' => 'yith_plugin_panel',
'page_title' => __( 'License Activation', 'yith-plugin-fw' ),
'menu_title' => __( 'License Activation', 'yith-plugin-fw' ),
'capability' => 'manage_options',
'page' => 'yith_plugins_activation',
);add_action( 'admin_menu', array( $this, 'add_submenu_page' ), 99 );
add_action( "wp_ajax_yith_activate-{$this->_product_type}", array( $this, 'activate' ) );
add_action( "wp_ajax_yith_deactivate-{$this->_product_type}", array( $this, 'deactivate' ) );
add_action( "wp_ajax_yith_update_licence_information-{$this->_product_type}", array( $this, 'update_licence_information' ) );
add_action( 'yit_licence_after_check', 'yith_plugin_fw_force_regenerate_plugin_update_transient' );/** @since 3.0.0 */
if( version_compare( PHP_VERSION, '7.0', '>=' ) ) {
add_action( 'admin_notices', function () {
$this->activate_license_notice();
}, 15 );
}else {
add_action( 'admin_notices', array( $this, 'activate_license_notice' ), 15 );
}
}private function _show_activate_license_notice() {
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : true;
$show_license_notice = current_user_can( 'update_plugins' ) &&
( !isset( $_GET[ 'page' ] ) || 'yith_plugins_activation' !== $_GET[ 'page' ] ) &&
!( $current_screen && method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() );
global $wp_filter;if ( isset( $wp_filter[ 'yith_plugin_fw_show_activate_license_notice' ] ) ) {
$filter = $wp_filter[ 'yith_plugin_fw_show_activate_license_notice' ];
$v = yith_plugin_fw_get_version();
$a = explode( '.', $v );
$l = end( $a );
$p = absint( $l );
$allowed_hook = isset( $filter[ $p ] ) ? $filter[ $p ] : false;
remove_all_filters( 'yith_plugin_fw_show_activate_license_notice' );if ( $allowed_hook && is_array( $allowed_hook ) ) {
$cb = current( $allowed_hook );
if ( isset( $cb[ 'function' ] ) && isset( $cb[ 'accepted_args' ] ) ) {
add_filter( 'yith_plugin_fw_show_activate_license_notice', $cb[ 'function' ], 10, $cb[ 'accepted_args' ] );
}
}}
return apply_filters( 'yith_plugin_fw_show_activate_license_notice', $show_license_notice );
}/**
* print notice with products to activate
*
* @since 3.0.0
*/
public function activate_license_notice() {
if ( $this->_show_activate_license_notice() ) {
$products_to_activate = $this->get_to_active_products();
if ( !!$products_to_activate ) {
$product_names = array();
foreach ( $products_to_activate as $init => $product ) {
if ( !empty( $product[ 'Name' ] ) )
$product_names[] = $product[ 'Name' ];}
}
}
}/**
* Main plugin Instance
*
* @static
* @return object Main instance
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}return self::$_instance;
}/**
* Add "Activation" submenu page under YITH Plugins
*
* @return void
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function add_submenu_page() {
add_submenu_page(
$this->_settings[ 'parent_page' ],
$this->_settings[ 'page_title' ],
$this->_settings[ 'menu_title' ],
$this->_settings[ 'capability' ],
$this->_settings[ 'page' ],
array( $this, 'show_activation_panel' )
);
}/**
* Premium plugin registration
*
* @param $plugin_init | string | The plugin init file
* @param $secret_key | string | The product secret key
* @param $product_id | string | The plugin slug (product_id)
*
* @return void
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function register( $plugin_init, $secret_key, $product_id ) {
if ( !function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}$plugins = get_plugins();
$plugins[ $plugin_init ][ 'secret_key' ] = $secret_key;
$plugins[ $plugin_init ][ 'product_id' ] = $product_id;
$this->_products[ $plugin_init ] = $plugins[ $plugin_init ];
}public function get_product_type() {
return $this->_product_type;
}/**
* Get license activation URL
*
* @author Andrea Grillo <[email protected]>
* @since 3.0.17
*/
public static function get_license_activation_url(){
return add_query_arg( array( 'page' => 'yith_plugins_activation' ), admin_url( 'admin.php' ) );
}
}
}/**
* Main instance of plugin
*
* @return YIT_Plugin_Licence object of license class
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
if ( !function_exists( 'YIT_Plugin_Licence' ) ) {
function YIT_Plugin_Licence() {
return YIT_Plugin_Licence::instance();
}
}March 10, 2019 at 10:58 am #21188Francisca Matamala
ParticipantOk so now has more lines … This worked for me ….
/** @since 3.0.0 */
// if( version_compare( PHP_VERSION, ‘7.0’, ‘>=’ ) ) {
//add_action( ‘admin_notices’, function () {
// $this->activate_license_notice();
// }, 15 );
//}//else {
//add_action( ‘admin_notices’, array( $this, ‘activate_license_notice’ ), 15 );
//}April 18, 2019 at 1:05 pm #21295James christopher
ParticipantYou can also remove the License Activation menu by finding the following code and commenting it out in (yit-plugin-licence.php):
$this->_settings = array(
‘parent_page’ => ‘yith_plugin_panel’,
‘page_title’ => __( ‘License Activation’, ‘yith-plugin-fw’ ),
‘menu_title’ => __( ‘License Activation’, ‘yith-plugin-fw’ ),
‘capability’ => ‘manage_options’,
‘page’ => ‘yith_plugins_activation’,
);change to:
// $this->_settings = array(
// ‘parent_page’ => ‘yith_plugin_panel’,
// ‘page_title’ => __( ‘License Activation’, ‘yith-plugin-fw’ ),
// ‘menu_title’ => __( ‘License Activation’, ‘yith-plugin-fw’ ),
// ‘capability’ => ‘manage_options’,
// ‘page’ => ‘yith_plugins_activation’,
// );May 7, 2019 at 2:42 am #21340Rachel Stinson
ParticipantInsert the following code and make sure to save the changes made:
add_action (‘admin_notices’, function () {
$ this-> activate_license_notice ();
}, fifteen );
//add_action( ‘admin_notices’, function () {
// $this->activate_license_notice();
//}, 15 );May 15, 2019 at 4:46 pm #21361Daniel Leyva
ParticipantI do this:
Edit file “yit-plugin-licence.php” on licence/lib/
Search line:
<div class="notice notice-error">
(Is on line 142)and change for this:
<div style="display:none;" class="notice notice-error">
June 3, 2019 at 9:05 am #21402Rafal Kurka
ParticipantDoes anyone know how to null this one?
<?php
/**
* This file belongs to the YIT Plugin Framework.
*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.txt
*/if ( !defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directlyif ( ! class_exists( 'YIT_Plugin_Licence' ) ) {
/**
* YIT Licence Panel
*
* Setting Page to Manage Products
*
* @class YIT_Licence
* @package YITH
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
class YIT_Plugin_Licence {
/**
* @var object The single instance of the class
* @since 1.0
*/
protected static $_instance = null;/**
* Constructor
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function __construct() {
//Silence is golden
}/**
* Premium products registration
*
* @param $init string | The products identifier
* @param $secret_key string | The secret key
* @param $product_id string | The product id
*
* @return void
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function register( $init, $secret_key, $product_id ){
if( ! function_exists( 'YITH_Plugin_Licence' ) ){
//Try to load YITH_Plugin_Licence class
yith_plugin_fw_load_update_and_licence_files();
}YITH_Plugin_Licence()->register( $init, $secret_key, $product_id );
}/**
* Main plugin Instance
*
* @static
* @return object Main instance
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}return self::$_instance;
}/**
* Get license activation URL
*
* @author Andrea Grillo <[email protected]>
* @since 3.0.17
*/
public static function get_license_activation_url(){
return function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_license_activation_url() : true;
}
add_action (‘admin_notices’, function () {$ this-> activate_license_notice ();}, fifteen );/**
* Get protected array products
*
* @return mixed array
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
public function get_products() {
return function_exists( 'YITH_Plugin_Licence' ) ? YITH_Plugin_Licence()->get_products() : array();
}
}
}/**
* Main instance
*
* @return object
* @since 1.0
* @author Andrea Grillo <[email protected]>
*/
if ( !function_exists( 'YIT_Plugin_Licence' ) ) {
function YIT_Plugin_Licence() {
return YIT_Plugin_Licence::instance();
}
}-
This reply was modified 5 years, 10 months ago by
Rafal Kurka.
July 7, 2019 at 1:11 am #21490Sam Aka
Participantok everyone, looks like they have changed their code again. so this is how we work around it in the last versions as of July 2019 versions:
inside the Yith plugin root folder go to:
plugin-upgrade>libthere you should edit the file yit-license.php as following:
before line 837 (add /**)
after line 857 (add **/)July 7, 2019 at 4:41 am #21491Sam Aka
Participantto clarify more this is how the codes looks after editing:
line 837:
/**if ( !!$product_names )
line 857:
}**/
July 12, 2019 at 7:48 am #21500Monica Emerson
MemberThank you for keeping on top of this. I would have no clue otherwise.
July 12, 2019 at 10:17 am #21501Sam Aka
Participantyou welcome.
July 17, 2019 at 12:05 pm #21511Creative Max
ParticipantIt’s easy.
You have to open the file in filezilla with notepad++ or another tool :
For example:
wp-content/plugins/yith-woocommerce-customize-myaccount-page/plugin-fw/licence/lib/yit-plugin-licence.php
Now delete the lines 140-151: (I think that there are the same lines in all yith plugins)
The hole DIV !
After it’s done, save and upload the file back to ftp.
Have fun !
-
This reply was modified 5 years, 9 months ago by
Creative Max.
-
This reply was modified 5 years, 9 months ago by
Creative Max.
-
This reply was modified 5 years, 9 months ago by
Creative Max.
July 17, 2019 at 12:52 pm #21515Creative Max
ParticipantHi again,
I forgot that YITH had changed their code.
So the solution of Sam Aka is the still the best:
ok everyone, looks like they have changed their code again. so this is how we work around it in the last versions as of July 2019 versions:
inside the Yith plugin root folder go to:
plugin-upgrade>libthere you should edit the file yit-license.php as following:
before line 837 (add /**)
after line 857 (add **/)July 23, 2019 at 3:47 am #21525Anne Winterino
ParticipantThanks, this worked perfectly for me!
July 23, 2019 at 8:37 am #21526Sam Aka
Participantin case they try to change the code order so you need to know what code to edit in that file instead of relying on line numbers, so here is the code which we need to comment out by adding /** before it and **/ after it.
the code is:
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 = '' . $start . implode( $end . $start, $product_names ) . $end . '';
$activation_url = $this->lru_esnecil_teg();
$c = str_replace( '##y2cgKsAXLQ##', '', '##y2cgKsAXLQ##y##y2cgKsAXLQ##i##y2cgKsAXLQ##t##y2cgKsAXLQ##h##y2cgKsAXLQ##-l##y2cgKsAXLQ##i##y2cgKsAXLQ##c##y2cgKsAXLQ##e##y2cgKsAXLQ##n##y2cgKsAXLQ##s##y2cgKsAXLQ##e##y2cgKsAXLQ##-##y2cgKsAXLQ##n##y2cgKsAXLQ##o##y2cgKsAXLQ##t##y2cgKsAXLQ##i##y2cgKsAXLQ##c##y2cgKsAXLQ##e##y2cgKsAXLQ##' );
?>
">%s %s:', _x( 'Warning!', "[Part of]: Warning! You didn't set license key for the following products:[Plugins List] which means you're missing out on updates and support. Enter your license key, please.", 'yith-plugin-upgrade-fw' ), _x( "You didn't set license key for the following YITH products", "[Part of]: Warning! You didn't set license key for the following products:[Plugins List] which means you're missing out on updates and support. Enter your license key, please.",'yith-plugin-upgrade-fw' ) ); ?>
%s, %s",
_x( "which means you're missing out on updates and support", "[Part of]: Warning! You didn't set license key for the following products:[Plugins List] which means you're missing out on updates and support. Enter your license key, please.", 'yith-plugin-upgrade-fw' ),
$activation_url,
_x( 'Enter your license key', "[Part of]: Warning! You didn't set license key for the following products:[Plugins List] which means you're missing out on updates and support. Enter your license key, please.", 'yith-plugin-upgrade-fw' ),
_x( 'please', "[Part of]: Warning! You didn't set license key for the following products:[Plugins List] which means you're missing out on updates and support. Enter your license key, please.", 'yith-plugin-upgrade-fw' )
); ?><?php
}July 23, 2019 at 8:46 am #21527Sam Aka
Participantnot all of their plugins have been updated with the latest framework, so in some plugins you won’t find the folder called plugin-upgrade. in this case the older trick still applies which editing the file in:
plugin-name/plugin-fw/licence/lib/yit-plugin-licence.phpsame code you need to search for and add /**
and **/ after it.hope it all work for you guys. enjoy
August 2, 2019 at 10:49 am #21545Gaetano Porcelli
Participantor use this: Webcraftic Disable Admin Notices Individually plugin
August 19, 2019 at 8:42 am #21584axa axa
Participantuse this
Insert code in the functions.php of your theme:
https://textuploader.com/11pruAugust 21, 2019 at 11:23 am #21591toto toto
ParticipantIt works perfectly, Thx a lot !
August 26, 2019 at 5:31 pm #21598GPL Person
ParticipantHacking the plugin source is no longer necessary. Adding the following to your theme’s functions.php file should hide all of the notices:
add_filter( 'yith_plugin_fw_show_eciton_esnecil_etavitca', '__return_false' );
October 9, 2019 at 2:51 pm #21764ff ff
ParticipantGo here:
/wp-content/plugins/yith-woocommerce-quick-view-premium/plugin-fw/licence/lib/yit-plugin-licence.php or
/wp-content/plugins/yith-woocommerce-quick-view-premium/plugin-upgrade/lib/yit-plugin-licence.phpfind this code section in second ftp path what i write a navigation:
protected function _show_eciton_esnecil_etavitca() {
$current_screen = function_exists( ‘get_current_screen’ ) ? get_current_screen() : false;
$show_license_notice = current_user_can( ‘update_plugins’ ) &&
( !isset( $_GET[ ‘page’ ] ) || ‘yith_plugins_activation’ !== $_GET[ ‘page’ ] ) &&
!( $current_screen && method_exists( $current_screen, ‘is_block_editor’ ) && $current_screen->is_block_editor() );
global $wp_filter;and replace with this code:
protected function _show_eciton_esnecil_etavitca() {
$current_screen = function_exists( ‘get_current_screen’ ) ? get_current_screen() : false;
// $show_license_notice = current_user_can( ‘update_plugins’ ) &&
// ( !isset( $_GET[ ‘page’ ] ) || ‘yith_plugins_activation’ !== $_GET[ ‘page’ ] ) &&
// !( $current_screen && method_exists( $current_screen, ‘is_block_editor’ ) && $current_screen->is_block_editor() );
global $wp_filter;this code is for a first ftp path what i write on a top: (find this code section)
private function _show_activate_license_notice() {
$current_screen = function_exists( ‘get_current_screen’ ) ? get_current_screen() : false;
$show_license_notice = current_user_can( ‘update_plugins’ ) &&
( !isset( $_GET[ ‘page’ ] ) || ‘yith_plugins_activation’ !== $_GET[ ‘page’ ] ) &&
!( $current_screen && method_exists( $current_screen, ‘is_block_editor’ ) && $current_screen->is_block_editor() );
global $wp_filter;replace with this:
private function _show_activate_license_notice() {
$current_screen = function_exists( ‘get_current_screen’ ) ? get_current_screen() : false;
// $show_license_notice = current_user_can( ‘update_plugins’ ) &&
// ( !isset( $_GET[ ‘page’ ] ) || ‘yith_plugins_activation’ !== $_GET[ ‘page’ ] ) &&
// !( $current_screen && method_exists( $current_screen, ‘is_block_editor’ ) && $current_screen->is_block_editor() );
global $wp_filter;October 10, 2019 at 10:54 pm #21765sdfsdfs sdfsdf
Participant/plugin-upgrade/lib/yit-licence.php
We search for the phrase: / ** @since 3.0.0 * /
Just below is the code separated into three lines:
add_action (‘admin_notices’, function () {
$ this-> activate_license_notice ();
}, fifteen );
We simply put a couple of “oblique lines” in front of each one of them, thus remaining.//add_action( ‘admin_notices’, function () {
// $this->activate_license_notice();
//}, 15 );October 11, 2019 at 11:45 pm #21768Walter Papo
ParticipantIs much more simple than touching files.
You just need to download a wordpress backend css editor (for example: Admin CSS MU).
Then add this:.notice.notice-error.yith-license-notice {
display: none;
}And that’s it. You are welcome ;)
-
This reply was modified 6 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.