Automattic\WooCommerce\Internal\ProductAttributesLookup
CLIRunner::disable_core
Core method for the "disable" command.
Метод класса: CLIRunner{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->disable_core( $args, $assoc_args );
- $args(массив) (обязательный)
- Positional arguments passed to the command.
- $assoc_args(массив) (обязательный)
- Associative arguments (options) passed to the command.
Код CLIRunner::disable_core() CLIRunner::disable core WC 11.0.1
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." );
}