Coding standards
This commit is contained in:
parent
9a496e5d88
commit
02ebd8f2ee
|
@ -1235,9 +1235,11 @@ 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 ) {
|
||||||
$screens = wc_get_screen_ids();
|
$screens = wc_get_screen_ids();
|
||||||
$screens[] = 'plugins';
|
$screens[] = 'plugins';
|
||||||
|
|
||||||
if ( ! in_array( $screen_id, $screens, true ) ) {
|
if ( ! in_array( $screen_id, $screens, true ) ) {
|
||||||
|
@ -1246,11 +1248,12 @@ class WC_Helper {
|
||||||
|
|
||||||
// Don't show the notice on the Helper screens.
|
// Don't show the notice on the Helper screens.
|
||||||
$screen_addons = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ) . '_page_wc-addons';
|
$screen_addons = sanitize_title( __( 'WooCommerce', 'woocommerce' ) ) . '_page_wc-addons';
|
||||||
if ( $screen_addons == $screen_id && ! empty( $_REQUEST['section'] ) && 'helper' == $_REQUEST['section'] ) {
|
|
||||||
|
if ( $screen_addons === $screen_id && ! empty( $_REQUEST['section'] ) && 'helper' === $_REQUEST['section'] ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We believe have an active connection.
|
// 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