From 94f5dfaa11254a6ada33170725b85b42a11c7859 Mon Sep 17 00:00:00 2001 From: Nestor Soriano Date: Wed, 28 Apr 2021 16:56:29 +0200 Subject: [PATCH] Make the DataRegenerator::delete_all_attributes_lookup_data method public. --- src/Internal/ProductAttributesLookup/DataRegenerator.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Internal/ProductAttributesLookup/DataRegenerator.php b/src/Internal/ProductAttributesLookup/DataRegenerator.php index 3d286c697de..a031844ffdb 100644 --- a/src/Internal/ProductAttributesLookup/DataRegenerator.php +++ b/src/Internal/ProductAttributesLookup/DataRegenerator.php @@ -102,8 +102,13 @@ class DataRegenerator { /** * Delete all the existing data related to the lookup table, including the table itself. + * + * There's no UI to delete the lookup table and the related options, but wp cli can be used + * as follows for that purpose: + * + * wp eval "wc_get_container()->get(Automattic\WooCommerce\Internal\ProductAttributesLookup\DataRegenerator::class)->delete_all_attributes_lookup_data();" */ - private function delete_all_attributes_lookup_data() { + public function delete_all_attributes_lookup_data() { global $wpdb; delete_option( 'woocommerce_attribute_lookup__enabled' );