Embed Snippet on Your Site
MemberPress: Make VAT field required for Registering EU-based Users
Adding this code snippet will make the VAT Number field on registration forms required for EU-based users.
For this code snippet to work, the Enable Tax Calculations checkbox needs to be ticked at Dashboard > MemberPress > Settings > Taxes tab. In addition, the Enable VAT and Tax all EU Businesses sub-options need to be enabled also.
The code snippet will add an error message that will be displayed if an EU-based user tries to register without adding a VAT number. The default "Sorry, but you must enter a valid company VAT Number to register." error text can be changed on this line:
$errors[] = 'Sorry, but you must enter a valid company VAT Number to register.';
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments