Automattic\WooCommerce\DataBase\Migrations\CustomOrderTable

CLIRunner::is_enabled()privateWC 1.0

Check if the COT feature is enabled.

{} It's a method of the class: CLIRunner{}

No Hooks.

Return

true|false. Whether the COT feature is enabled.

Usage

// private - for code of main (parent) class only
$result = $this->is_enabled( $log ) : bool;
$log(true|false)
Optionally log a error message.
Default: true

Code of CLIRunner::is_enabled() WC 7.1.0

private function is_enabled( $log = true ) : bool {
	if ( ! $this->controller->is_feature_visible() ) {
		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://developer.woocommerce.com/' // TODO: Change the link when testing instructin page is live.
				)
			);
		}
	}

	return $this->controller->is_feature_visible();
}