Can’t display product categories on woocommerce getting Invalid taxonomy?

it’s was working fine last 2 installation

Those two installation might still be on WordPress prior to version 4.5.0, and according to the reference:

Since 4.5.0, taxonomies should be passed via the ‘taxonomy’ argument
in the $args array


$args = array(
  'orderby'  => 'title',
  'order'    => 'ASC',
  'taxonomy' => 'product_cat',
$categories = get_terms( $args );

If that doesn’t work, then maybe on the new installation, your code is executed before the product_cat taxonomy is registered.