DataRegenerator

This class handles the (re)generation of the product attributes lookup table.


Description Description

It schedules the regeneration in small product batches by itself, so it can be used outside the regular WooCommerce data regenerations mechanism.

After the regeneration is completed a wp_wc_product_attributes_lookup table will exist with entries for all the products that existed when initiate_regeneration was invoked; entries for products created after that are supposed to be created/updated by the appropriate data store classes (or by the code that uses the data store classes) whenever a product is created/updated.

Additionally, after the regeneration is completed a ‘woocommerce_attribute_lookup__enabled’ option with a value of ‘no’ will have been created.

This class also adds two entries to the Status – Tools menu: one for manually regenerating the table contents, and another one for enabling or disabling the actual lookup table usage.


Source Source

File: src/Internal/ProductAttributesLookup/DataRegenerator.php


			

Top ↑

Methods Methods


Top ↑

User Contributed Notes User Contributed Notes

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