title: changing the display location of custom product field on a variable product page
body: <p>i added a custom field to a variable product and displayed it on the front single product page with the help of an answer here</p>
  <p><a href="https://stackoverflow.com/a/55774613/14382875">https://stackoverflow.com/a/55774613/14382875</a></p>
  <p>by default the custom field is displayed on the front page above the add to cart button. but i want to move the custom field from there to right above the product meta data or the sku field in variable product. i was able to do this in simple product via hooks but the variable product code doesn't seem to be using any hook or i am missing something.</p>
  <p>the code i used to display the variable product on front is this</p>
  <pre><code>function vp_variation_display_commodity_code( $data, $product, $variation ) {
  
      if( $value = $variation-&gt;get_meta( 'jk_mpn' ) ) {
          $data['price_html'] .= '&lt;p class=&quot;vp-ccode&quot;&gt;&lt;strong&gt;' . __(&quot;Manifacturer Part #&quot;, &quot;woocommerce&quot;) .
          ': &lt;/strong&gt;'.esc_html( $value ).'&lt;/small&gt;&lt;/p&gt;';
      }
  
      return $data;
  }```
  </code></pre>