WC_Widget_Cart::__construct()
Constructor.
Method of the class: WC_Widget_Cart{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Widget_Cart = new WC_Widget_Cart(); $WC_Widget_Cart->__construct();
WC_Widget_Cart::__construct() WC Widget Cart:: construct code WC 9.4.2
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(); }