WC_Report_Sales_By_Product::get_chart_widgets()publicWC 1.0

Get chart widgets.

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

Хуков нет.

Возвращает

Массив.

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

$WC_Report_Sales_By_Product = new WC_Report_Sales_By_Product();
$WC_Report_Sales_By_Product->get_chart_widgets();

Код WC_Report_Sales_By_Product::get_chart_widgets() WC 9.4.2

public function get_chart_widgets() {

	$widgets = array();

	if ( ! empty( $this->product_ids ) ) {
		$widgets[] = array(
			'title'    => __( 'Showing reports for:', 'woocommerce' ),
			'callback' => array( $this, 'current_filters' ),
		);
	}

	$widgets[] = array(
		'title'    => '',
		'callback' => array( $this, 'products_widget' ),
	);

	return $widgets;
}