LookupDataStore
Data store class for the product attributes lookup table.
Description Description
Source Source
File: src/Internal/ProductAttributesLookup/LookupDataStore.php
Methods Methods
- __construct — LookupDataStore constructor. Makes the feature hidden by default.
- create_lookup_table_entries_for_simple_product — Create lookup table entries for a simple (non variable) product.
- create_lookup_table_entries_for_variable_product — Create lookup table entries for a variable product.
- delete_lookup_table_entries_for — Delete all the lookup table entries for a given product (entries are identified by the "parent_or_product_id" field)
- get_attribute_taxonomies — Return the list of taxonomies used for variations on a product together with the associated term ids, with the following format:
- get_term_ids_by_slug_cache — Get a cache of term ids by slug for a set of taxonomies, with this format:
- get_variation_definition_term_id — 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)
- get_variations_of — Get the variations of a given variable product.
- hide_feature — Hides the feature, so that no entries will be added to the debug tools page.
- insert_lookup_table_data — Insert one entry in the lookup table.
- is_feature_visible — Checks if the feature is visible (so that dedicated entries will be added to the debug tools page).
- is_variable_product — Check if a given product is a variable product.
- is_variation — Check if a given product is a variation.
- show_feature — Makes the feature visible, so that dedicated entries will be added to the debug tools page.
- update_data_for_product — Insert or update the lookup data for a given product or variation.