WC_Widget_Cart::__construct()publicWC 1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код WC_Widget_Cart::__construct() WC 8.7.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();
}