Woocommerce Widget Featured Product by Category
In Woocommerce > Includes > Widgets > class-wc-widget-products.php
Add at line 70:
‘in_cat’ => array(
‘type’ => ‘text’,
‘std’ => __( ‘Category Number’, ‘woocommerce’ ),
‘label’ => __( ‘In Category’, ‘woocommerce’ )
),
Add at line 101:
$cat = ! empty( $instance[‘in_cat’] ) ? sanitize_title( $instance[‘in_cat’] ) : $this->settings[‘in_cat’][‘std’];
Add at line 114:
array(
‘taxonomy’ => ‘product_cat’,
‘field’ => ‘term_id’,
‘terms’ => $cat,
),