Automattic\WooCommerce\DataBase\Migrations\CustomOrderTable
CLIRunner::is_enabled()
Check if the COT feature is enabled.
Метод класса: CLIRunner{}
Хуков нет.
Возвращает
true|false
. Whether the COT feature is enabled.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_enabled( $log ) : bool;
- $log(true|false)
- Optionally log a error message.
По умолчанию: true
Код CLIRunner::is_enabled() CLIRunner::is enabled WC 8.7.0
private function is_enabled( $log = true ) : bool { if ( ! $this->controller->custom_orders_table_usage_is_enabled() ) { if ( $log ) { WP_CLI::log( sprintf( // translators: %s - link to testing instructions webpage. __( 'Custom order table usage is not enabled. If you are testing, you can enable it by following the testing instructions in %s', 'woocommerce' ), 'https://github.com/woocommerce/woocommerce/wiki/High-Performance-Order-Storage-Upgrade-Recipe-Book' ) ); } } return $this->controller->custom_orders_table_usage_is_enabled(); }