Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LookupDataStore::get_variation_definition_term_id( WC_Product_Variation $variation, string $taxonomy, array $term_ids_by_slug_cache )

Get the id of the term that defines a variation for a given taxonomy, or null if there’s no such defining id (for variations having “Any ” as the definition)


Description Description


Parameters Parameters

$variation

(Required) The variation to get the defining term id for.

$taxonomy

(Required) The taxonomy to get the defining term id for.

$term_ids_by_slug_cache

(Required) A term ids by slug as generated by get_term_ids_by_slug_cache.


Top ↑

Return Return

(int|null) The term id, or null if there's no defining id for that taxonomy in that variation.


Top ↑

Source Source

File: src/Internal/ProductAttributesLookup/LookupDataStore.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.