Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Tax::is_complete()
Task completion.
Method of the class: Tax{}
Hooks from the method
Return
true|false
.
Usage
$Tax = new Tax(); $Tax->is_complete();
Tax::is_complete() Tax::is complete code WC 9.8.2
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 // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment -- We will replace this with a formal system by WC 9.6 so lets not advertise it yet. $third_party_complete = apply_filters( 'woocommerce_admin_third_party_tax_setup_complete', false ); $this->is_complete_result = $is_wc_connect_taxes_enabled || count( TaxDataStore::get_taxes( array() ) ) > 0 || get_option( 'woocommerce_no_sales_tax' ) !== false || $third_party_complete; } return $this->is_complete_result; }