title: Shortcode - Display product price by product SKU in Woocomerce
body: <p>I need to display the price of a given product by using sku , trying to do it with few shortcodes i have found but not much luck - would like to view the price on the page after entering a product's sku into the shortcode, like this
  [woocommerce_price sku=&quot;sku123&quot;]
  [woocommerce_price sku=&quot;sku345&quot;]</p>
  <p>anyone would be able to advise how to achieve that?</p>
  <p>see here for an example code i tried but doesnt work</p>
  <pre><code>    extract( shortcode_atts( array(
          'sku' =&gt; null,
      ), $atts, 'woocommerce_price' ) );
      
      if( intval( $sku ) &gt; 0 &amp;&amp; function_exists( 'wc_get_product' ) ){
            $product = wc_get_product_id_by_sku( $sku );
            
            if ( $product-&gt;get_price() &gt; 0 ) {
                return $product-&gt;get_price_html();
            } else {
                return __( &quot;Price unavailable&quot;, &quot;woocommerce&quot; );
            }
       }
  }
  add_shortcode( 'woocommerce_price', 'wc_price_shortcode_callback' );``` 
  
  </code></pre>