Thread Starter
thibal
(@thibault87)
Currently, the only way I can get this table to be updated is by going into Woocommerce TOOLS and cliciking the regenerate attributes lookup table button.
It triggers this cron event: woocommerce_run_product_attribute_lookup_regeneration_callback
Hi @thibault87 plugin doesn’t update attributes lookup at the moment. Thanks.
Thread Starter
thibal
(@thibault87)
Thanl your for your reply.
That kind kills the purpose of this plugin if only PARTIALLY regenerate lookup tables.
Attribute table is very important because it is the one used for the store FILTERS. So it’s a core feature.
It looks like it could be achieved by using the method descripbed here
https://stackoverflow.com/questions/75023385/how-to-update-wp-wc-product-attributes-lookup-table-after-running-update-post-me
use Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore;
$lookupDataStore = new LookupDataStore();
$lookupDataStore->create_data_for_product($product_id);
As of today we have to manunally regenerate this table manually everyday by going to Woocommerce -> Tools -> Manually regenerate attributes lookup table button
I would be soooo glad if you could improve your plugin 🙂
@thibault87 Looks like an expensive action to regenerate attributes table. If you can, can you let me know how many product you have and how much time does it take to regenerate it.