Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Tax::is_complete()publicWC 1.0

Task completion.

Метод класса: Tax{}

Хуков нет.

Возвращает

true|false.

Использование

$Tax = new Tax();
$Tax->is_complete();

Код Tax::is_complete() WC 8.7.0

public function is_complete() {
	if ( $this->is_complete_result === null ) {
		$wc_connect_taxes_enabled = get_option( 'wc_connect_taxes_enabled' );
		$is_wc_connect_taxes_enabled = ( $wc_connect_taxes_enabled === 'yes' ) || ( $wc_connect_taxes_enabled === true ); // seems that in some places boolean is used, and other places 'yes' | 'no' is used

		$this->is_complete_result = $is_wc_connect_taxes_enabled ||
			count( TaxDataStore::get_taxes( array() ) ) > 0 ||
			get_option( 'woocommerce_no_sales_tax' ) !== false;
	}

	return $this->is_complete_result;
}