Warning: This method has been deprecated. in favour of Product data store’s find_matching_product_variation instead.
WC_Abstract_Legacy_Product::get_matching_variation( array $match_attributes = array() )
Match a variation to a given set of attributes using a WP_Query.
Description Description
Parameters Parameters
- $match_attributes
-
(Optional)
Default value: array()
Source Source
File: includes/legacy/abstract-wc-legacy-product.php
public function get_matching_variation( $match_attributes = array() ) { wc_deprecated_function( 'WC_Product::get_matching_variation', '3.0', 'Product data store find_matching_product_variation' ); $data_store = WC_Data_Store::load( 'product' ); return $data_store->find_matching_product_variation( $this, $match_attributes ); }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |