Add sku to product url woocommerce [closed]

looks like this will do what you want just write out a custom function for it:
Custom field values in permalink

something like this: as the link says:

function jpb_custom_meta_permalink( $link, $post ){
  $post_meta = get_post_meta( $post->ID, '<insert your meta key here>', true );
  if( empty( $post_meta ) || !is_string( $post_meta ) )
    $post_meta="<insert your default value (could be an empty string) here>";
  $link = str_replace( '!!custom_field_placeholder!!', $post_meta, $link );
  return $link;
}

add_filter( 'post_link', 'jpb_custom_meta_permalink', 10, 2 );

you can hash the url and use this:

function append_sku_string( $link, $post ) {
  $post_meta = get_post_meta( $post->ID, '_sku', true );
      if ( 'product' == get_post_type( $post ) ) {
        $link = $link . '#' .$post_meta;
        return $link;
     }
}
add_filter( 'post_type_link', 'append_sku_string', 1, 2 );

which will return http://example.com/product/productname#sku