WC_Widget_Cart::__construct() public WC 1.0
Constructor.
{} Это метод класса: WC_Widget_Cart{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Widget_Cart = new WC_Widget_Cart(); $WC_Widget_Cart->__construct();
Код WC_Widget_Cart::__construct() WC Widget Cart:: construct WC 5.0.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();
}