WordPress at Your Fingertips
function is not described

WC_Widget_Cart::__construct() public WC 1.0

Constructor.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Widget_Cart::__construct() WC 5.8.0

public function __construct() {
	$this->widget_cssclass    = 'woocommerce widget_shopping_cart';
	$this->widget_description = __( 'Display the customer shopping cart.', 'woocommerce' );
	$this->widget_id          = 'woocommerce_widget_cart';
	$this->widget_name        = __( 'Cart', 'woocommerce' );
	$this->settings           = array(
		'title'         => array(
			'type'  => 'text',
			'std'   => __( 'Cart', 'woocommerce' ),
			'label' => __( 'Title', 'woocommerce' ),
		),
		'hide_if_empty' => array(
			'type'  => 'checkbox',
			'std'   => 0,
			'label' => __( 'Hide if cart is empty', 'woocommerce' ),
		),
	);

	if ( is_customize_preview() ) {
		wp_enqueue_script( 'wc-cart-fragments' );
	}

	parent::__construct();
}