Add a class to Woocommerce shop page (ok)

// Add a class to  Woocommerce shop page
  function my_custom_class($output){
  if( is_shop() ) {
    $custom_class = 'classshop';
    $output[] .= $custom_class;
  }
    return $output;
  }
  add_filter( 'body_class', 'my_custom_class' );

Last updated