title: WooCommerce find_matching_product_variation() - how to prioritize variation when there are few of them?
body: <p>So I am finding a variation by matching attributes with this function:</p>
  
  <pre><code>function rdk_find_variation($product_id, $attributes) {
      $product_data_store = new WC_Product_Data_Store_CPT();
      $product = new WC_Product($product_id);
  
      return $product_data_store-&gt;find_matching_product_variation($product, $attributes);
  }
  </code></pre>
  
  <p>But, if there are, for example, two variation that matches the attributes, like:</p>
  
  <ul>
  <li>Variation 1: color: yellow, size: XL</li>
  <li>Variation 2: color: any, size: any</li>
  </ul>
  
  <p>This function will simply return the first variation that its found - the one with the lower ID.</p>
  
  <p>I need variations with attribute values: <code>Any</code> to be prioritized over variation with specific attribute value - just like the WooCommerce single product page behaves when user is selecting attribute values before adding product to cart. </p>