title: woocommerce change position of price
body: <p>I get this error when trying to render the product price before the main content on the page.</p>
  
  <pre><code>Fatal error: Uncaught Error: Call to a member function get_price_html() on string in /wp-content/plugins/woocommerce/templates/single-product/price.php:27 
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code> //the remove action works fine
  
  remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
  
  //this breaks it
  
  add_action('woocommerce_before_main_content', 'woocommerce_template_single_price', 40);
  </code></pre>
  
  <p>I assume that because I'm trying to get the price before the main content I need to make sure the global <code>$product</code> is loaded.</p>
  
  <p>How would I ensure global <code>$product</code> is loaded?</p>