WC_Helper_Compat::admin_menu()public staticWC 1.0

Register menu item.

{} It's a method of the class: WC_Helper_Compat{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Helper_Compat::admin_menu();

Code of WC_Helper_Compat::admin_menu() WC 6.6.1

public static function admin_menu() {
	// No additional menu items for users who did not have a connected helper before.
	$master_key = get_option( 'woothemes_helper_master_key' );
	if ( empty( $master_key ) ) {
		return;
	}

	// Do not show the menu item if user has already seen the new screen.
	$auth = WC_Helper_Options::get( 'auth' );
	if ( ! empty( $auth['user_id'] ) ) {
		return;
	}

	add_dashboard_page( __( 'WooCommerce Helper', 'woocommerce' ), __( 'WooCommerce Helper', 'woocommerce' ), 'manage_options', 'woothemes-helper', array( __CLASS__, 'render_compat_menu' ) );
}