From 134c0ea0db8fd934053906f7c68beedf5af2ea30 Mon Sep 17 00:00:00 2001 From: Fernando Marichal Date: Wed, 15 Apr 2020 13:35:56 -0300 Subject: [PATCH] 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. --- includes/admin/helper/class-wc-helper.php | 46 ----------------------- 1 file changed, 46 deletions(-) diff --git a/includes/admin/helper/class-wc-helper.php b/includes/admin/helper/class-wc-helper.php index 92a39f8fdfc..7a7743459a0 100644 --- a/includes/admin/helper/class-wc-helper.php +++ b/includes/admin/helper/class-wc-helper.php @@ -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. *