WC_Widget_Product_Search

Product Search Widget.

Defined (1)

The class is defined in the following location(s).

/includes/widgets/class-wc-widget-product-search.php  
  1. class WC_Widget_Product_Search extends WC_Widget { 
  2.  
  3. /** 
  4. * Constructor. 
  5. */ 
  6. public function __construct() { 
  7. $this->widget_cssclass = 'woocommerce widget_product_search'; 
  8. $this->widget_description = __( 'A Search box for products only.', 'woocommerce' ); 
  9. $this->widget_id = 'woocommerce_product_search'; 
  10. $this->widget_name = __( 'WooCommerce product search', 'woocommerce' ); 
  11. $this->settings = array( 
  12. 'title' => array( 
  13. 'type' => 'text',  
  14. 'std' => '',  
  15. 'label' => __( 'Title', 'woocommerce' ),  
  16. ),  
  17. ); 
  18.  
  19. parent::__construct(); 
  20.  
  21. /** 
  22. * Output widget. 
  23. * @see WP_Widget 
  24. * @param array $args 
  25. * @param array $instance 
  26. */ 
  27. public function widget( $args, $instance ) { 
  28. $this->widget_start( $args, $instance ); 
  29.  
  30. get_product_search_form(); 
  31.  
  32. $this->widget_end( $args );