use woocommerce_single_product_summary
action hook with priority 15
//test
add_action('woocommerce_single_product_summary','ravs_credits',15);
function ravs_credits(){
echo'testing';
}
above code print testing
below price on product page.
Important Link:
woocommerce_single_product_summary hook
Updated:
I am assuming that your credit range form 1
to 100
and you specify them.now
- create custom meta box in product post type.read
How To Create Custom Post Meta Boxes - read this technique to create product rating in css
now you get meta box in each product,give it a value between 1
to 100
now code look like
//credits with rating
add_action('woocommerce_single_product_summary','ravs_credits',15);
function ravs_credits(){
global $post;
?>
<div class="ravs-credits">
<p>This package will grant you <?php echo get_post_meta($post->ID, $key, $single); ?> Stars</p>
<span style="width:<?php echo get_post_meta($post->ID, $key, $single); ?>%" class="rating"></span>
</div>
<?php
}
Important Link: