Updates to 2.8.8

This commit is contained in:
WooCommerce 2023-11-07 16:49:27 +01:00
parent 5c650eed2c
commit 651aba7531
46 changed files with 5974 additions and 5818 deletions

View file

@ -132,14 +132,14 @@ $zip_url = $update_data->package;

line(
sprintf(
'WooCommerce Subscriptions Version: %s',
'WooCommerce EU VAT Number Version: %s',
$version
)
);

line(
sprintf(
'WooCommerce Subscriptions ZIP URL: %s',
'WooCommerce EU VAT Number ZIP URL: %s',
$zip_url
)
);
@ -161,9 +161,9 @@ $plugins_dir = $work_dir . '/plugins';
mkdir( $archives_dir );
mkdir( $plugins_dir );

$plugin_dir = $plugins_dir . '/woocommerce-subscriptions';
$plugin_dir = $plugins_dir . '/woocommerce-eu-vat-number';

$zip_file = $archives_dir . '/woocommerce-subscriptions-' . $version . '.zip';
$zip_file = $archives_dir . '/woocommerce-eu-vat-number-' . $version . '.zip';

/**
* Download ZIP.

View file

@ -11,9 +11,6 @@
"html": false
},
"textdomain": "woocommerce-eu-vat-number",
"editorScript": "file:./build/index.js",
"editorStyle": "file:./build/index.css",
"style": "file:./build/index.css",
"attributes": {
"lock": {
"type": "object",

View file

@ -1 +1 @@
<?php return array('dependencies' => array('wc-blocks-checkout', 'wc-settings', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '87d45ecf17216813b6d1215de074478a');
<?php return array('dependencies' => array('wc-blocks-checkout', 'wc-settings', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ece70d3d4ce2de6be1778d017be033ee');

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'c216817065c367a517a53cf1583f8d97');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '669f781aab7fd0be57f74d2127dcf4e1');

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,38 @@
*** EU VAT Number Changelog ***

2023-09-18 - version 2.8.8
* Add - Displays a notice warning of limited functionality if taxes are disabled.
* Fix - Removed broken settings link from plugin page if taxes are disabled.

2023-08-23 - version 2.8.7
* Dev - Bump WordPress "tested up to" version from 6.2 to 6.3.
* Dev - Bump WooCommerce "tested up to" version 7.9.
* Dev - Bump WooCommerce minimum supported version from 7.2 to 7.7.
* Dev - Bump PHP minimum supported version from 7.2 to 7.3.
* Fix - Error saving VAT numbers using block-based checkouts.
* Fix - PHP 8.1 deprecation notice caused by FILTER_SANITIZE_STRING.
* Security - Added nonce and permission check when dismissing tax advice notice.

2023-08-07 - version 2.8.6
* Fix - VAT number validation for number with space between country code and number.
* Dev - Added new GitHub Workflow to run Quality Insights Toolkit tests.
* Dev - Added Playwright end-to-end tests.

2023-07-05 - version 2.8.5
* Dev - Bump WooCommerce "tested up to" version 7.8.
* Dev - Bump WooCommerce minimum supported version from 6.8 to 7.2.
* Dev - Bump WordPress minimum supported version from 5.8 to 6.1.
* Dev - Ensure translations are properly defined.
* Dev - Remove deprecated class aliases for framework classes renamed in 2.4.0.
* Dev - Resolve coding standards issues.
* Fix - Admin can now save multiple merchant Account IDs.

2023-05-30 - version 2.8.4
* Fix - Compatibility with WooCommerce Blocks checkout flow.
* Dev Bump WooCommerce “tested up to” version 7.6.
* Dev Bump WordPress minimum supported version from 5.6 to 5.8.
* Dev Bump WordPress “tested up to” version 6.2.

2023-04-03 - version 2.8.3
* Fix - Fatal errors if SOAP extension is not installed.
* Fix - Plugin functions are not available when dependency requirements are not met.

View file

@ -446,7 +446,8 @@ class WC_EU_VAT_Admin {
// Create URL to dismiss the disclaimer.
$dismiss_url = add_query_arg(
array(
'dismiss_eu_vat_disclaimer' => 'yes',
'dismiss_eu_vat_disclaimer' => 'yes',
'dismiss_eu_vat_disclaimer_nonce' => wp_create_nonce( 'dismiss_eu_vat_disclaimer' ),
),
wc_get_current_admin_url()
);
@ -486,9 +487,18 @@ class WC_EU_VAT_Admin {
* Dismiss EU VAT Disclaimer.
*/
public static function dismiss_eu_vat_disclaimer() {
$maybe_dismiss = wc_clean( filter_input( INPUT_GET, 'dismiss_eu_vat_disclaimer', FILTER_SANITIZE_STRING ) );
if ( ! isset( $_GET['dismiss_eu_vat_disclaimer'] ) || ! isset( $_GET['dismiss_eu_vat_disclaimer_nonce'] ) ) {
return;
}

if ( 'yes' === $maybe_dismiss ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
if ( wp_verify_nonce( wp_unslash( $_GET['dismiss_eu_vat_disclaimer_nonce'] ), 'dismiss_eu_vat_disclaimer' ) === false ) {
return;
}

$maybe_dismiss = wc_clean( wp_unslash( $_GET['dismiss_eu_vat_disclaimer'] ) );

if ( 'yes' === $maybe_dismiss && current_user_can( 'manage_woocommerce' ) ) {
update_option( 'woocommerce_eu_vat_number_dismiss_disclaimer', $maybe_dismiss, false );
}
}

View file

@ -33,14 +33,8 @@ class WC_EU_VAT_Blocks_Integration implements IntegrationInterface {
* When called invokes any initialization/setup for the integration.
*/
public function initialize() {
$asset_file_front = include plugin_dir_path( __FILE__ ) . '../build/frontend.asset.php';
wp_register_script(
'wc-blocks-eu-vat-scripts-frontend',
plugins_url( 'build/frontend.js', __DIR__ ),
$asset_file_front['dependencies'],
$asset_file_front['version'],
true
);
WC_EU_VAT_Number::register_script_with_dependencies( 'wc-blocks-eu-vat-scripts-frontend', 'build/frontend' );
WC_EU_VAT_Number::register_script_with_dependencies( 'wc-blocks-eu-vat-scripts-index', 'build/index' );

add_action( 'woocommerce_store_api_checkout_update_order_meta', array( $this, 'update_order_meta' ), 10, 1 );
add_action( 'woocommerce_store_api_checkout_update_order_from_request', array( $this, 'update_order_from_request' ), 10, 2 );
@ -78,7 +72,7 @@ class WC_EU_VAT_Blocks_Integration implements IntegrationInterface {
* @return string[]
*/
public function get_editor_script_handles() {
return array( 'wc-blocks-eu-vat-scripts-frontend' );
return array( 'wc-blocks-eu-vat-scripts-frontend', 'wc-blocks-eu-vat-scripts-index' );
}


@ -124,6 +118,13 @@ class WC_EU_VAT_Blocks_Integration implements IntegrationInterface {
$order->update_meta_data( '_vat_number_is_validated', ! is_null( $data['validation']['valid'] ) ? 'true' : 'false' );
$order->update_meta_data( '_vat_number_is_valid', true === $data['validation']['valid'] ? 'true' : 'false' );
$order->update_meta_data( '_billing_vat_number', $vat_number );
$customer_id = $order->get_customer_id();

if ( $customer_id ) {
$customer = new \WC_Customer( $customer_id );
$customer->update_meta_data( 'vat_number', $vat_number );
$customer->save_meta_data();
}

if ( false !== WC_EU_VAT_Number::get_ip_country() ) {
$order->update_meta_data( '_customer_ip_country', WC_EU_VAT_Number::get_ip_country() );

View file

@ -259,12 +259,14 @@ class WC_EU_VAT_Number {
* @return bool|WP_Error if valid/not valid, WP_ERROR if validation failed
*/
public static function vat_number_is_valid( $vat_number, $country, $postcode = '' ) {
// Replace unwanted chars on VAT Number.
$vat_number = strtoupper( str_replace( array( ' ', '.', '-', ',', ', ' ), '', $vat_number ) );

$vat_prefix = self::get_vat_number_prefix( $country );
$vat_number_formatted = self::get_formatted_vat_number( $vat_number );
$transient_name = 'vat_number_' . $vat_prefix . $vat_number_formatted;
$cached_result = get_transient( $transient_name );


// Keep supporting prefix 'XI' for Northern Ireland.
if ( 'GB' === $country && ! empty( $postcode ) && preg_match( '/^(bt).*$/i', $postcode ) && 'XI' === substr( $vat_number, 0, 2 ) ) {
$vat_prefix = 'XI';
@ -688,9 +690,6 @@ class WC_EU_VAT_Number {
$billing_vat_number = wc_clean( $data['billing_vat_number'] );
$billing_postcode = wc_clean( $data['billing_postcode'] );

// Replace unwanted chars on VAT Number.
$billing_vat_number = strtoupper( str_replace( array( ' ', '.', '-', ',', ', ' ), '', $billing_vat_number ) );

if ( in_array( $billing_country, self::get_eu_countries(), true ) && ! empty( $billing_vat_number ) ) {
self::validate( $billing_vat_number, $billing_country, $billing_postcode );

@ -740,6 +739,43 @@ class WC_EU_VAT_Number {
}
}
}

/**
* Load script with all required dependencies.
*
* @param string $handler Script handler.
* @param string $script Script name.
* @param array $dependencies Additional dependencies.
*
* @return void
*/
public static function register_script_with_dependencies( string $handler, string $script, array $dependencies = [] ) {
$script_file = $script . '.js';
$script_src_url = plugins_url( $script_file, __DIR__ );
$script_asset_path = WC_EU_ABSPATH . $script . '.asset.php';
$script_asset = file_exists( $script_asset_path ) ? require $script_asset_path : [ 'dependencies' => [] ];
$script_asset['dependencies'] = array_merge( $script_asset['dependencies'], $dependencies );
wp_register_script(
$handler,
$script_src_url,
$script_asset['dependencies'],
self::get_file_version( $script_file ),
true
);
}

/**
* Gets the file modified time as a cache buster if we're in dev mode, or the plugin version otherwise.
*
* @param string $file Local path to the file.
* @return string The cache buster value to use for the given file.
*/
public static function get_file_version( $file ): string {
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( WC_EU_ABSPATH . $file ) ) {
return (string) filemtime( WC_EU_ABSPATH . trim( $file, '/' ) );
}
return WC_EU_VAT_VERSION;
}
}

WC_EU_VAT_Number::init();

View file

@ -2,10 +2,10 @@
# This file is distributed under the GNU General Public License v3.0.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce EU VAT Number 2.8.3\n"
"Project-Id-Version: WooCommerce EU VAT Number 2.8.8\n"
"Report-Msgid-Bugs-To: "
"https://wordpress.org/support/plugin/woocommerce-eu-vat-number\n"
"POT-Creation-Date: 2023-04-03 17:24:12+00:00\n"
"POT-Creation-Date: 2023-09-18 02:12:29+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -22,8 +22,8 @@ msgstr ""
#: includes/class-wc-eu-vat-my-account.php:207
#: includes/class-wc-eu-vat-my-account.php:218
#: includes/class-wc-eu-vat-number.php:186
#: includes/class-wc-eu-vat-number.php:710
#: includes/class-wc-eu-vat-number.php:724
#: includes/class-wc-eu-vat-number.php:709
#: includes/class-wc-eu-vat-number.php:723
#: includes/class-wc-eu-vat-privacy.php:147
#: includes/class-wc-eu-vat-report-ec-sales-list.php:215
msgid "VAT number"
@ -83,14 +83,14 @@ msgstr ""

#: includes/class-wc-eu-vat-admin.php:368
#: includes/class-wc-eu-vat-my-account.php:218
#: includes/class-wc-eu-vat-number.php:710
#: includes/class-wc-eu-vat-number.php:709
#. translators: %1$s VAT number field label, %2$s VAT number, %3$s Billing
#. Country.
#. translators: 1: VAT number field label, 2: VAT Number, 3: Billing country
msgid "You have entered an invalid %1$s (%2$s) for your billing country (%3$s)."
msgstr ""

#: includes/class-wc-eu-vat-admin.php:463
#: includes/class-wc-eu-vat-admin.php:464
#. translators: %1$s Opening strong tag, %2$s Closing strong tag, %3$s Break
#. tag.
msgid ""
@ -102,7 +102,7 @@ msgid ""
"from %1$sNorthern Ireland%2$s."
msgstr ""

#: includes/class-wc-eu-vat-admin.php:474
#: includes/class-wc-eu-vat-admin.php:475
#. translators: %1$s Opening strong tag, %2$s Closing strong tag.
msgid ""
"By using %1$sWooCommerce EU VAT Number%2$s plugin, you've agreed that the "
@ -111,19 +111,19 @@ msgid ""
"tax specific questions."
msgstr ""

#: includes/class-wc-eu-vat-admin.php:479
#: includes/class-wc-eu-vat-admin.php:480
msgid "I understand"
msgstr ""

#: includes/class-wc-eu-vat-blocks.php:196
#: includes/class-wc-eu-vat-blocks.php:197
msgid "Location confirmation."
msgstr ""

#: includes/class-wc-eu-vat-blocks.php:246
#: includes/class-wc-eu-vat-blocks.php:247
msgid "Invalid VAT number."
msgstr ""

#: includes/class-wc-eu-vat-blocks.php:325
#: includes/class-wc-eu-vat-blocks.php:326
msgid "VAT Data"
msgstr ""

@ -150,11 +150,11 @@ msgstr ""
msgid "VAT number updated successfully!"
msgstr ""

#: includes/class-wc-eu-vat-number.php:275
#: includes/class-wc-eu-vat-number.php:277
msgid "VAT number is required."
msgstr ""

#: includes/class-wc-eu-vat-number.php:281
#: includes/class-wc-eu-vat-number.php:283
#. translators: %1$s - VAT number field label, %2$s - VAT Number from user,
#. %3$s - Billing country.
msgid ""
@ -162,23 +162,23 @@ msgid ""
"country (%3$s)."
msgstr ""

#: includes/class-wc-eu-vat-number.php:295
#: includes/class-wc-eu-vat-number.php:313
#: includes/class-wc-eu-vat-number.php:297
#: includes/class-wc-eu-vat-number.php:315
#: includes/vies/class-vies-client.php:92
msgid "Error communicating with the VAT validation server - please try again."
msgstr ""

#: includes/class-wc-eu-vat-number.php:580
#: includes/class-wc-eu-vat-number.php:582
#. translators: %s: VAT Number
msgid "VAT Number: %s"
msgstr ""

#: includes/class-wc-eu-vat-number.php:724
#: includes/class-wc-eu-vat-number.php:723
#. translators: 1: VAT number field label, 2: Billing country
msgid "%1$s is a required field for your billing country (%2$s)."
msgstr ""

#: includes/class-wc-eu-vat-number.php:737
#: includes/class-wc-eu-vat-number.php:736
#. translators: 1: Ip Address.
msgid ""
"Your IP Address (%1$s) does not match your billing country (%2$s). European "
@ -466,27 +466,27 @@ msgstr ""
msgid "Save"
msgstr ""

#: woocommerce-eu-vat-number.php:154 woocommerce-eu-vat-number.php:166
#: woocommerce-eu-vat-number.php:177
#: woocommerce-eu-vat-number.php:171 woocommerce-eu-vat-number.php:183
#: woocommerce-eu-vat-number.php:194 woocommerce-eu-vat-number.php:241
#. translators: %1$s: Plugin page link start %2$s Link end
#. translators: %1$s: Minimum version %2$s: Plugin page link start %3$s Link
#. end
msgid "WooCommerce EU VAT Number is inactive."
msgstr ""

#: woocommerce-eu-vat-number.php:154
#: woocommerce-eu-vat-number.php:171
msgid ""
"The WooCommerce plugin must be active for EU VAT Number to work. %1$sPlease "
"install and activate WooCommerce%2$s."
msgstr ""

#: woocommerce-eu-vat-number.php:166
#: woocommerce-eu-vat-number.php:183
msgid ""
"The WooCommerce plugin must be at least version %1$s for EU VAT Number to "
"work. %2$sPlease upgrade WooCommerce%3$s."
msgstr ""

#: woocommerce-eu-vat-number.php:177
#: woocommerce-eu-vat-number.php:194
msgid ""
"Your server does not provide SOAP support which is required functionality "
"for communicating with VIES. You will need to reach out to your web hosting "
@ -494,31 +494,39 @@ msgid ""
"server."
msgstr ""

#: woocommerce-eu-vat-number.php:254
#: woocommerce-eu-vat-number.php:245
#. translators: %1$s: Settings link start %2$s: Link end
msgid ""
"The EU VAT Number extension functionality requires taxes be enabled on your "
"store. To do so, go to %1$sWooCommerce > Settings%2$s, check the Enable tax "
"rates and calculations checkbox, and click the Save changes button."
msgstr ""

#: woocommerce-eu-vat-number.php:325
msgid "Settings"
msgstr ""

#: woocommerce-eu-vat-number.php:274
#: woocommerce-eu-vat-number.php:345
msgid "View Plugin Documentation"
msgstr ""

#: woocommerce-eu-vat-number.php:274
#: woocommerce-eu-vat-number.php:345
msgid "Docs"
msgstr ""

#: woocommerce-eu-vat-number.php:280
#: woocommerce-eu-vat-number.php:351
msgid "View Plugin Changelog"
msgstr ""

#: woocommerce-eu-vat-number.php:280
#: woocommerce-eu-vat-number.php:351
msgid "Changelog"
msgstr ""

#: woocommerce-eu-vat-number.php:286
#: woocommerce-eu-vat-number.php:357
msgid "Support"
msgstr ""

#: woocommerce-eu-vat-number.php:323
#: woocommerce-eu-vat-number.php:394
msgid "VAT Number"
msgstr ""


View file

@ -3,16 +3,16 @@
* Plugin Name: WooCommerce EU VAT Number
* Plugin URI: https://woocommerce.com/products/eu-vat-number/
* Description: The EU VAT Number extension lets you collect and validate EU VAT numbers during checkout to identify B2B transactions verses B2C. IP Addresses can also be validated to ensure they match the billing address. EU businesses with a valid VAT number can have their VAT removed prior to payment.
* Version: 2.8.3
* Version: 2.8.8
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Text Domain: woocommerce-eu-vat-number
* Domain Path: /languages
* Requires at least: 5.6
* Tested up to: 6.1
* WC requires at least: 6.8
* WC tested up to: 7.4
* Requires PHP: 7.2
* Requires at least: 6.1
* Tested up to: 6.3
* WC requires at least: 7.7
* WC tested up to: 7.9
* Requires PHP: 7.3
*
* Copyright: © 2023 WooCommerce
* License: GNU General Public License v3.0
@ -24,8 +24,9 @@

// phpcs:disable WordPress.Files.FileName

define( 'WC_EU_VAT_VERSION', '2.8.3' ); // WRCS: DEFINED_VERSION.
define( 'WC_EU_VAT_VERSION', '2.8.8' ); // WRCS: DEFINED_VERSION.
define( 'WC_EU_VAT_FILE', __FILE__ );
define( 'WC_EU_ABSPATH', __DIR__ . '/' );
define( 'WC_EU_VAT_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );

/**
@ -38,13 +39,14 @@ class WC_EU_VAT_Number_Init {
*
* @var string
*/
const WC_MIN_VERSION = '6.8';
const WC_MIN_VERSION = '7.7';

/**
* Constructor.
*/
public function __construct() {
add_action( 'plugins_loaded', array( $this, 'init' ) );
add_action( 'woocommerce_blocks_loaded', array( $this, 'wc_eu_vat_number_block_init' ) );

add_action( 'plugins_loaded', array( $this, 'localization' ), 0 );

@ -73,6 +75,10 @@ class WC_EU_VAT_Number_Init {
'callback' => array( $this, 'is_soap_supported' ),
'notice_callback' => array( $this, 'requires_soap_notice' ),
),
'wc_tax_enabled' => array(
'callback' => array( $this, 'is_taxes_enabled' ),
'notice_callback' => array( $this, 'woocommerce_tax_disabled_notice' ),
),
);
foreach ( $dependencies as $check ) {
if ( ! call_user_func( $check['callback'] ) ) {
@ -119,6 +125,17 @@ class WC_EU_VAT_Number_Init {
return class_exists( 'Automattic\WooCommerce\Blocks\Package' );
}

/**
* Checks if WooCommerce taxes are enabled.
*
* @since 2.8.8
*
* @return bool
*/
public function is_taxes_enabled() {
return function_exists( 'wc_tax_enabled' ) && wc_tax_enabled();
}

/**
* Checks if the current WooCommerce Blocks version is supported.
* Note: Must be run after the "plugins_loaded" action fires.
@ -178,6 +195,61 @@ class WC_EU_VAT_Number_Init {
}
}

/**
* Taxes disabled notice.
*
* @since 2.8.8
*/
public function woocommerce_tax_disabled_notice() {
if ( ! current_user_can( 'manage_woocommerce' ) ) {
return;
}

/*
* Recheck if the notice is needed.
*
* This is needed on the settings page as the options are updated after the
* `init` hook fires. This means that the notice can be shown on the settings
* page immediately after taxes are enabled and save is clicked.
*/
if ( $this->is_taxes_enabled() ) {
return;
}

/**
* Filters whether to show the tax disabled notice.
*
* This allows developers to prevent the taxes disabled notice from
* being shown. In most cases it is recommended the extension be
* deactivated if taxes are intentionally disabled.
*
* This hook is targeted at multisite set ups in which the extension is
* globally enabled but individual sites may or may not need taxes to
* be enabled.
*
* @since 2.8.8
*
* @param bool $show_notice Whether to show the notice.
*/
$show_notice = apply_filters( 'woocommerce_eu_vat_show_tax_disabled_notice', true );

if ( ! $show_notice ) {
return;
}

echo '<div class="error">';
echo '<p><strong>' . esc_html__( 'WooCommerce EU VAT Number is inactive.', 'woocommerce-eu-vat-number' ) . '</strong> ';

printf(
/* translators: %1$s: Settings link start %2$s: Link end */
esc_html__( 'The EU VAT Number extension functionality requires taxes be enabled on your store. To do so, go to %1$sWooCommerce > Settings%2$s, check the Enable tax rates and calculations checkbox, and click the Save changes button.', 'woocommerce-eu-vat-number' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings' ) ) . '">',
'</a>'
);

echo '</div>';
}

/**
* Init the plugin once WP is loaded.
*/
@ -204,7 +276,6 @@ class WC_EU_VAT_Number_Init {
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
add_filter( 'woocommerce_get_order_item_totals', 'wc_eu_vat_maybe_add_zero_tax_display', 10, 3 );
add_action( 'init', array( $this, 'wc_eu_vat_number_block_init' ) );
add_filter(
'__experimental_woocommerce_blocks_add_data_attributes_to_block',
function ( $allowed_blocks ) {
@ -294,7 +365,7 @@ class WC_EU_VAT_Number_Init {
* Registers block type and registers with WC Blocks Integration Interface.
*/
public function wc_eu_vat_number_block_init() {
if ( $this->is_woocommerce_blocks_active() && $this->is_woocommerce_blocks_version_supported() ) {
if ( $this->check_dependencies() && $this->is_woocommerce_blocks_active() && $this->is_woocommerce_blocks_version_supported() ) {
include_once __DIR__ . '/includes/class-wc-eu-vat-blocks.php';
add_action(
'woocommerce_blocks_checkout_block_registration',