WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin\Features

Onboarding::add_help_tab() public WC 1.0

Update the help tab setup link to reset the onboarding profiler.

{} Это метод класса: Onboarding{}

Хуков нет.

Возвращает

Null. Ничего.

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

$result = Onboarding::add_help_tab();

Код Onboarding::add_help_tab() WC 4.7.1

<?php
public static function add_help_tab() {
	if ( ! function_exists( 'wc_get_screen_ids' ) ) {
		return;
	}

	$screen = get_current_screen();

	if ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids(), true ) ) {
		return;
	}

	// Remove the old help tab if it exists.
	$help_tabs = $screen->get_help_tabs();
	foreach ( $help_tabs as $help_tab ) {
		if ( 'woocommerce_onboard_tab' !== $help_tab['id'] ) {
			continue;
		}

		$screen->remove_help_tab( 'woocommerce_onboard_tab' );
	}

	// Add the new help tab.
	$help_tab = array(
		'title' => __( 'Setup wizard', 'woocommerce' ),
		'id'    => 'woocommerce_onboard_tab',
	);

	$task_list_hidden = get_option( 'woocommerce_task_list_hidden', 'no' );

	$help_tab['content'] = '<h2>' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '</h2>';

	$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce' ) . '</h3>';
	$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .
		'<p><a href="' . wc_admin_url( '&path=/setup-wizard' ) . '" class="button button-primary">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';

	$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';
	$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce' ) . '</p>' .
	( 'yes' === $task_list_hidden
		? '<p><a href="' . wc_admin_url( '&reset_task_list=1' ) . '" class="button button-primary">' . __( 'Enable', 'woocommerce' ) . '</a></p>'
		: '<p><a href="' . wc_admin_url( '&reset_task_list=0' ) . '" class="button button-primary">' . __( 'Disable', 'woocommerce' ) . '</a></p>'
	);

	if ( Loader::is_feature_enabled( 'devdocs' ) && defined( 'WP_DEBUG' ) && WP_DEBUG ) {
		$help_tab['content'] .= '<h3>' . __( 'Calypso / WordPress.com', 'woocommerce' ) . '</h3>';
		if ( class_exists( 'Jetpack' ) ) {
			$help_tab['content'] .= '<p>' . __( 'Quickly access the Jetpack connection flow in Calypso.', 'woocommerce' ) . '</p>';
			$help_tab['content'] .= '<p><a href="' . wc_admin_url( '&test_wc_jetpack_connect=1' ) . '" class="button button-primary">' . __( 'Connect', 'woocommerce' ) . '</a></p>';
		}

		$help_tab['content'] .= '<p>' . __( 'Quickly access the WooCommerce.com connection flow in Calypso.', 'woocommerce' ) . '</p>';
		$help_tab['content'] .= '<p><a href="' . wc_admin_url( '&test_wc_helper_connect=1' ) . '" class="button button-primary">' . __( 'Connect', 'woocommerce' ) . '</a></p>';
	}

	$screen->add_help_tab( $help_tab );
}