global $product; // $product->is_type( $type ) checks the product type, string/array $type ( 'simple', 'grouped', 'variable', 'external' ), returns boolean if ( $product->is_type( 'variable' ) ) {}
if ($product->is_type( 'variation' )) {} // $product->is_type( 'variable' ) will not work if the product has 3 or more variations