WC_Report_Sales_By_Product::get_chart_widgets()publicWC 1.0

Get chart widgets.

{} It's a method of the class: WC_Report_Sales_By_Product{}

No Hooks.

Return

Array.

Usage

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

Code of WC_Report_Sales_By_Product::get_chart_widgets() WC 6.6.1

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