WC_Helper_Compat::admin_menu()public staticWC 1.0

Register menu item.

Метод класса: WC_Helper_Compat{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Helper_Compat::admin_menu();

Код WC_Helper_Compat::admin_menu() WC 9.4.2

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' ) );
}