Add support for gallery/popup/lightbox on WooCommerce product pages – Applicable on WC 3.X.X

With WC 3.0 they removed the support of gallery/popup/lightbox on WooCommerce product page.

To Add support for gallery/popup/lightbox on WooCommerce product pages, please try to add following code lines to theme’s functions.php file:

add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );

WooCommerce 3+ featured product filter

Filter to show only “featured” products, compatible with WC 3+.

Ticket URL: https://wp-types.com/forums/topic/toolset-views-not-showing-_featured-in-view-gui-for-woocommerce/

As of WC 3, Featured Products are managed a bit differently. Before, we could use the hidden field “_featured” to filter a View. Now the flag has been migrated to a hidden taxonomy “product_visibility” and has a term name “featured”. Until this is supported in the Views GUI, a filter can be used to add the “featured” product filter to a search:

/* --------------------------------------------- */
// WooCommerce 3+ featured products filter
// Only include "featured" products
add_filter( 'wpv_filter_query', 'featured_products',99,3 );
function featured_products( $query_args,$views_settings, $view_id) {
 
  if ($view_id == 10){
    $query_args = array(
      'post_type'  => 'product',
      'tax_query' => array(
        array(
          'taxonomy'     => 'product_visibility',
          'field'   => 'name',
          'terms' => 'featured',
          'operator' => 'IN'
        ),
      ),
    );
  }
  return $query_args;
}

Be sure to change $view_id == 10 to match your View.