Inserting above the comment template

It mainly depends on a theme, whether there is a hook, in which you can call an action. Simple ways, how to do that: You insert your code directly into single.php, right above the code calling comments_template(), You create a hook (e.g. above comments_template()) as do_action(‘my_hook’) and then you hook into it your function add_action(‘my_hook’, … Read more

woocommerce stored variable

There is $woocommerce, which is is crucial. Several classes stored into this, see woocommerce class reference and additionally WC API Docs. If you’re looking for product information: $product = get_product( $post->ID ); is certainly a good entry point. If you’re already on a product page or generally in the wc loop, you often have $product … Read more