Merge branch 'fix-18452'
This commit is contained in:
commit
6389f1af9a
|
@ -1235,14 +1235,25 @@ class WC_Helper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompt a Helper connection if the user has WooCommerce.com extensions.
|
* 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 ) {
|
private static function _prompt_helper_connect( $screen_id ) {
|
||||||
// Don't show the notice on the Helper screens.
|
$screens = wc_get_screen_ids();
|
||||||
if ( 'woocommerce_page_wc-addons' == $screen_id && ! empty( $_REQUEST['section'] ) && 'helper' == $_REQUEST['section'] ) {
|
$screens[] = 'plugins';
|
||||||
|
|
||||||
|
if ( ! in_array( $screen_id, $screens, true ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We believe have an active connection.
|
// 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' );
|
$auth = WC_Helper_Options::get( 'auth' );
|
||||||
if ( ! empty( $auth['access_token'] ) ) {
|
if ( ! empty( $auth['access_token'] ) ) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue