I get this error when trying to render the product price before the main content on the page.
Fatal error: Uncaught Error: Call to a member function get_pric
Just copy the code from the single product price template and stick that into your hooked function. https://github.com/woothemes/woocommerce/blob/master/templates/single-product/price.php
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
function price_in_title_row() {
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
global $product;
?>
get_price_html(); ?>
}
add_action('woocommerce_before_single_product', 'price_in_title_row', 50);