WC_Helper::current_screen
Various early-phase actions with possible redirects.
Method of the class: WC_Helper{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Helper::current_screen( $screen );
- $screen(object) (required)
- WP screen object.
WC_Helper::current_screen() WC Helper::current screen code WC 10.8.1
public static function current_screen( $screen ) {
$wc_screen_id = 'woocommerce';
if ( $wc_screen_id . '_page_wc-addons' !== $screen->id && $wc_screen_id . '_page_wc-admin' !== $screen->id ) {
return;
}
self::maybe_redirect_to_new_marketplace_installer();
if ( empty( $_GET['section'] ) || 'helper' !== $_GET['section'] ) {
return;
}
if ( ! empty( $_GET['wc-helper-connect'] ) ) {
return self::_helper_auth_connect();
}
if ( ! empty( $_GET['wc-helper-return'] ) ) {
return self::_helper_auth_return();
}
if ( ! empty( $_GET['wc-helper-disconnect'] ) ) {
return self::_helper_auth_disconnect();
}
if ( ! empty( $_GET['wc-helper-refresh'] ) ) {
return self::_helper_auth_refresh();
}
if ( ! empty( $_GET['wc-helper-activate'] ) ) {
return self::_helper_subscription_activate();
}
if ( ! empty( $_GET['wc-helper-deactivate'] ) ) {
return self::helper_subscription_deactivate();
}
if ( ! empty( $_GET['wc-helper-deactivate-plugin'] ) ) {
return self::_helper_plugin_deactivate();
}
}