Automattic\WooCommerce\Internal\ProductAttributesLookup
CLIRunner::disable_core()
Core method for the "disable" command.
Method of the class: CLIRunner{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->disable_core( $args, $assoc_args );
- $args(array) (required)
- Positional arguments passed to the command.
- $assoc_args(array) (required)
- Associative arguments (options) passed to the command.
CLIRunner::disable_core() CLIRunner::disable core code WC 9.3.3
private function disable_core( array $args, array $assoc_args ) { if ( 'yes' !== get_option( 'woocommerce_attribute_lookup_enabled' ) ) { $table_name = $this->lookup_data_store->get_lookup_table_name(); $this->warning( "The usage of the of the %W{$table_name}%n table is already disabled." ); return; } update_option( 'woocommerce_attribute_lookup_enabled', 'no' ); $table_name = $this->lookup_data_store->get_lookup_table_name(); $this->success( "The usage of the %W{$table_name}%n table for product attribute lookup has been disabled." ); }