Warning: This method has been deprecated.

WC_Admin_Setup_Wizard::should_show_automated_tax()

The “automated tax” extra should only be shown if the current user can install plugins and the store is in a supported country.


Description Description


Source Source

File: includes/admin/class-wc-admin-setup-wizard.php

	protected function should_show_automated_tax() {
		if ( ! current_user_can( 'install_plugins' ) ) {
			return false;
		}

		$country_code = WC()->countries->get_base_country();
		// https://developers.taxjar.com/api/reference/#countries .
		$tax_supported_countries = array_merge(
			array( 'US', 'CA', 'AU' ),
			WC()->countries->get_european_union_countries()
		);

		return in_array( $country_code, $tax_supported_countries, true );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.