Hi All,
I need some help to find/use the right hook in PrestaShop 1.7.6.
I want to automatically set the vat_number field for a new address in the checkout or creating a new address with a hook. Is this possible in PrestaShop 1.7.6?
I found the form in classes/form/CustomerAddressForm.php.
So I tried to set the field with the hook actionCustomerAddressFormBuilderModifier but it doesn't work.
public function hookActionCustomerAddressFormBuilderModifier(array $params) { /** @var FormBuilderInterface $formBuilder */ $formBuilder = $params['form_builder']; $params['data']['vatnumber'] = $vatReference['vatnumber']; $formBuilder->setData($params['data']); }
All help is welcome.