title: get_metadata_by_mid() not working on live server but works on local installation
body: <p>I am using <code>get_metadata_by_mid()</code> function to pull the term id and using that to get term name and it's slug.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>//$booking_id is passed to function and it's not empty (tested via echoing)
  $term_data = get_metadata_by_mid('post', $booking_id);
  $vendor_data = get_term_by( 'id', absint( $term_data-&gt;post_id ), 'wcpv_product_vendors' );
  </code></pre>
  
  <p>In the html I use <code>$vendor_data-&gt;name</code> &amp; <code>$vendor_data-&gt;slug</code> variables to access them and it works on my local wordpress. But when I uploaded code on the live server the <code>$term_data</code> variable results nothing. Obviously <code>$vendor_data</code> will also be empty, as it doesn't receive <code>term_id</code></p>
  
  <p>It's very strange issue and I have no idea; what's wrong? </p>
  
  <p><strong>NOTE:</strong></p>
  
  <ul>
  <li>running same version of wordpress on both environments (local and server)</li>
  <li><code>$booking_id</code> var is not empty</li>
  </ul>