Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

Tax::is_complete()publicWC 1.0

Task completion.

Method of the class: Tax{}

No Hooks.

Return

true|false.

Usage

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

Tax::is_complete() code WC 9.0.1

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;
}