Helper: Prompt a Helper connection only on relevant screens.

Fixes #18452
This commit is contained in:
Konstantin Kovshenin 2018-01-18 12:28:00 +03:00
parent dbb6e2716d
commit 3c3077d305
1 changed files with 21 additions and 0 deletions

View File

@ -1237,6 +1237,27 @@ class WC_Helper {
* Prompt a Helper connection if the user has WooCommerce.com extensions.
*/
private static function _prompt_helper_connect( $screen_id ) {
$screens = array(
'plugins',
'product',
'edit-product',
'edit-product_cat',
'edit-product_tag',
'product_page_product_attributes',
'shop_order',
'edit-shop_order',
'shop_coupon',
'edit-shop_coupon',
'woocommerce_page_wc-reports',
'woocommerce_page_wc-settings',
'woocommerce_page_wc-status',
'woocommerce_page_wc-addons',
);
if ( ! in_array( $screen_id, $screens ) ) {
return;
}
// Don't show the notice on the Helper screens.
if ( 'woocommerce_page_wc-addons' == $screen_id && ! empty( $_REQUEST['section'] ) && 'helper' == $_REQUEST['section'] ) {
return;