1
Magento 2.4.2-p1
Smartwave Porto
13 Amasty extensions

I have done a composer update and updated my Amasty extensions yesterday and ever since then, an extra line appeared in my checkout.

It is labeled:

Tax/VAT Number

We never had this before and we can not have that. I've googled this and checked Magento default settings in:

"Stores -> Configuration -> Customer Configuration -> Show VAT Number at Frontend"

and all setting having to do with VAT are set to "No".

I'm not sure if this is in any way related to the Amasty One Step Checkout? (we have that extension disabled)

I've looked everywhere in Amasty's extensions including:

Stores -> Configuration -> AMASTY EXTENSIONS -> ONE STEP CHECKOUT PRO -> ONE STEP CHECKOUT

but there doesn't appear to be anything relevant there.

Is this part of the Magento core functionality? And if so, why did it just appear by itself after doing the updates (I didn't update the version of Magento, just the composer and probably some or all of Amasty's extensions).

How does one remove this line from the checkout?

enter image description here

1 Answer 1

1

In file app/code/Vendor/Checkout/Plugin/ModifyCheckoutField.php which I shared with you on In-line translations do not update on the front end!

  • Replace $shippingAddressFieldset['vat_id']['label'] = __('Recipient\'s Tax/VAT Number');
    with
    $shippingAddressFieldset['vat_id']['config']['componentDisabled'] = true;
  • Replace $billingFormFields['vat_id']['label'] = __('Your Tax/VAT Number');
    with
    $billingFormFields['vat_id']['config']['componentDisabled'] = true;
1
  • I have implemented this and it works. Thank you Tu Van!
    – Allysin
    Dec 27, 2022 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.