Make the DataRegenerator::delete_all_attributes_lookup_data method public.

This commit is contained in:
Nestor Soriano 2021-04-28 16:56:29 +02:00
parent 21053afec1
commit 94f5dfaa11
No known key found for this signature in database
GPG Key ID: 08110F3518C12CAD
1 changed files with 6 additions and 1 deletions

View File

@ -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' );