LLMS_Admin_Tool_Wipe_Legacy_Account_Options::handle()
Process the tool.
Description Description
Deletes all core reusable blocks and then recreates the core forms, which additionally recreates the core reusable blocks.
Return Return
(boolean)
Source Source
File: includes/admin/tools/class-llms-admin-tool-wipe-legacy-account-options.php
protected function handle() { $options_to_wipe = array( 'lifterlms_registration_generate_username', 'lifterlms_registration_password_strength', 'lifterlms_registration_password_min_strength', 'lifterlms_user_info_field_names_checkout_visibility', 'lifterlms_user_info_field_address_checkout_visibility', 'lifterlms_user_info_field_phone_checkout_visibility', 'lifterlms_user_info_field_email_confirmation_checkout_visibility', 'lifterlms_user_info_field_names_registration_visibility', 'lifterlms_user_info_field_address_registration_visibility', 'lifterlms_user_info_field_phone_registration_visibility', 'lifterlms_user_info_field_email_confirmation_registration_visibility', 'lifterlms_voucher_field_registration_visibility', 'lifterlms_user_info_field_names_account_visibility', 'lifterlms_user_info_field_address_account_visibility', 'lifterlms_user_info_field_phone_account_visibility', 'lifterlms_user_info_field_email_confirmation_account_visibility', ); global $wpdb; $sql = " DELETE FROM {$wpdb->options} WHERE option_name IN (" . implode( ', ', array_fill( 0, count( $options_to_wipe ), '%s' ) ) . ')'; $wpdb->query( $wpdb->prepare( $sql, // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $options_to_wipe ) ); // db call ok; no-cache ok. $this->skip_cache = true; return true; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |