The function '_prompt_helper_connect' was deleted

After removing the legacy code the method '_prompt_helper_connect' wasn't useful anymore so it was removed.
This commit is contained in:
Fernando Marichal 2020-04-15 13:35:56 -03:00
parent f83e5d32a4
commit 134c0ea0db
1 changed files with 0 additions and 46 deletions

View File

@ -1467,8 +1467,6 @@ class WC_Helper {
$screen = get_current_screen();
$screen_id = $screen ? $screen->id : '';
self::_prompt_helper_connect( $screen_id );
if ( 'update-core' !== $screen_id ) {
return;
}
@ -1485,50 +1483,6 @@ class WC_Helper {
}
}
/**
* Prompt a Helper connection if the user has WooCommerce.com extensions.
*
* @param string $screen_id Current screen ID.
*/
private static function _prompt_helper_connect( $screen_id ) {
if ( apply_filters( 'woocommerce_helper_suppress_connect_notice', false ) ) {
return;
}
$screens = wc_get_screen_ids();
$screens[] = 'plugins';
if ( ! in_array( $screen_id, $screens, true ) ) {
return;
}
// Don't show the notice on the Helper screens.
$screen_addons = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ) . '_page_wc-addons';
if ( $screen_addons === $screen_id && ! empty( $_REQUEST['section'] ) && 'helper' === $_REQUEST['section'] ) {
return;
}
// We believe we have an active connection.
$auth = WC_Helper_Options::get( 'auth' );
if ( ! empty( $auth['access_token'] ) ) {
return;
}
$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
if ( empty( $active_plugins ) ) {
return;
}
$woo_plugins = self::get_local_woo_plugins();
if ( empty( $woo_plugins ) ) {
return;
}
$active_woo_plugins = array_intersect_key( $woo_plugins, array_flip( $active_plugins ) );
}
/**
* Get an update notice if one or more Woo extensions has an update available.
*