title: Wordpress - Order by meta_value_num not working
body: <p>I have a meta on my taxonomies terms that I increment each time they are used, like this :</p>
  
  <pre><code>$count = get_term_meta($id, 'used', true);
  update_term_meta($id, 'used', $count ? (intval($count) + 1) : 1);
  </code></pre>
  
  <p>But when I'm trying to get terms ordered by this meta, the <code>meta_value_num</code> doesn't seem to do anything and my terms are still ordered like if the <em>used</em> meta was a string.</p>
  
  <pre><code>$terms = get_terms([
      'taxonomy' =&gt; 'contract_type',
      'meta_key' =&gt; 'used',
      'order_by' =&gt; 'meta_value_num',
  ]);
  foreach ($types as $key =&gt; $type) {
      $types[$key]-&gt;used_count = get_term_meta($type-&gt;term_id, 'used', true);
      $types[$key]-&gt;used_count_type = gettype($types[$key]-&gt;used_count);
  }
  </code></pre>
  
  <p>And this is what is returned :</p>
  
  <pre><code>Array
  (
      [0] =&gt; WP_Term Object
          (
              ...
              [used_count] =&gt; 110
              [used_count_type] =&gt; string
          )
  
      [1] =&gt; WP_Term Object
          (
              ...
              [used_count] =&gt; 1995
              [used_count_type] =&gt; string
          )
  
      [2] =&gt; WP_Term Object
          (
              ...
              [used_count] =&gt; 810
              [used_count_type] =&gt; string
          )
  
  )
  </code></pre>
  
  <p>I've tried every variation of the request as I could find (with <code>meta_query</code> instead, <code>meta_type</code>, etc) without luck, so I'm suspecting that the problem is coming from the type of the meta, but I don't see what else I could do to force him to save an <code>int</code> instead of a <code>string</code>.</p>
  
  <p>Any ideas ?</p>