WC_Admin_Pointers::create_product_tutorial()publicWC 1.0

Pointers for creating a product.

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

Хуков нет.

Возвращает

null. Ничего.

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

$WC_Admin_Pointers = new WC_Admin_Pointers();
$WC_Admin_Pointers->create_product_tutorial();

Код WC_Admin_Pointers::create_product_tutorial() WC 7.3.0

public function create_product_tutorial() {
	if ( ! isset( $_GET['tutorial'] ) || ! current_user_can( 'manage_options' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
		return;
	}

	global $wp_post_types;

	if ( ! isset( $wp_post_types ) ) {
		return;
	}

	$labels          = $wp_post_types['product']->labels;
	$labels->add_new = __( 'Enable guided mode', 'woocommerce' );
	WCAdminAssets::register_script( 'wp-admin-scripts', 'product-tour', true );
}