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

Automattic\WooCommerce\Admin\Features

Analytics::register_pages() public WC 1.0

Registers report pages.

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

Хуки из метода
Возвращает

Null. Ничего.

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

$Analytics = new Analytics();
$Analytics->register_pages();

Код Analytics::register_pages() WC 4.7.1

<?php
public function register_pages() {
	$report_pages = array(
		array(
			'id'       => 'woocommerce-analytics',
			'title'    => __( 'Analytics', 'woocommerce' ),
			'path'     => '/analytics/overview',
			'path'     => '/analytics/overview',
			'icon'     => 'dashicons-chart-bar',
			'position' => 56, // After WooCommerce & Product menu items.
		),
		array(
			'id'     => 'woocommerce-analytics-overview',
			'title'  => __( 'Overview', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/overview',
		),
		array(
			'id'     => 'woocommerce-analytics-revenue',
			'title'  => __( 'Revenue', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/revenue',
		),
		array(
			'id'     => 'woocommerce-analytics-orders',
			'title'  => __( 'Orders', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/orders',
		),
		array(
			'id'     => 'woocommerce-analytics-products',
			'title'  => __( 'Products', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/products',
		),
		array(
			'id'     => 'woocommerce-analytics-categories',
			'title'  => __( 'Categories', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/categories',
		),
		array(
			'id'     => 'woocommerce-analytics-coupons',
			'title'  => __( 'Coupons', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/coupons',
		),
		array(
			'id'     => 'woocommerce-analytics-taxes',
			'title'  => __( 'Taxes', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/taxes',
		),
		array(
			'id'     => 'woocommerce-analytics-downloads',
			'title'  => __( 'Downloads', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/downloads',
		),
		'yes' === get_option( 'woocommerce_manage_stock' ) ? array(
			'id'     => 'woocommerce-analytics-stock',
			'title'  => __( 'Stock', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/stock',
		) : null,
		array(
			'id'     => 'woocommerce-analytics-customers',
			'title'  => __( 'Customers', 'woocommerce' ),
			'parent' => 'woocommerce',
			'path'   => '/customers',
		),
		array(
			'id'     => 'woocommerce-analytics-settings',
			'title'  => __( 'Settings', 'woocommerce' ),
			'parent' => 'woocommerce-analytics',
			'path'   => '/analytics/settings',
		),
	);

	$report_pages = apply_filters( 'woocommerce_analytics_report_menu_items', $report_pages );

	foreach ( $report_pages as $report_page ) {
		if ( ! is_null( $report_page ) ) {
			wc_admin_register_page( $report_page );
		}
	}
}