I'm using woocommerce and i created a custom post type that has to be treated as a product and user may add to cart. I followed this tutorial 
<http://reigelgallarde.me/programming/how-to-add-custom-post-type-to-woocommerce/>
and made sure my price field meta key is “\_price”
but it didn't work.

when I tried to add this code to functions.php

```
function reigel_woocommerce_get_price($price = null,$post = null){
if ($post->post->post_type === 'aytam'){
    $price = get_post_meta($post->id, "_price", true);
    }

return $price;
}
add_filter('woocommerce_get_price','reigel_woocommerce_get_price',20,1);
add_action( 'init', 'reigel_woocommerce_get_price' );

```

didn't work either