WC_Widget_Top_Rated_Products::__construct()publicWC 1.0

Constructor.

Method of the class: WC_Widget_Top_Rated_Products{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Widget_Top_Rated_Products = new WC_Widget_Top_Rated_Products();
$WC_Widget_Top_Rated_Products->__construct();

WC_Widget_Top_Rated_Products::__construct() code WC 9.4.2

public function __construct() {
	$this->widget_cssclass    = 'woocommerce widget_top_rated_products';
	$this->widget_description = __( "A list of your store's top-rated products.", 'woocommerce' );
	$this->widget_id          = 'woocommerce_top_rated_products';
	$this->widget_name        = __( 'Products by Rating list', 'woocommerce' );
	$this->settings           = array(
		'title'  => array(
			'type'  => 'text',
			'std'   => __( 'Top rated products', 'woocommerce' ),
			'label' => __( 'Title', 'woocommerce' ),
		),
		'number' => array(
			'type'  => 'number',
			'step'  => 1,
			'min'   => 1,
			'max'   => '',
			'std'   => 5,
			'label' => __( 'Number of products to show', 'woocommerce' ),
		),
	);

	parent::__construct();
}