I develop a registrar module and I want to check if a domain is in a list and the prevent registration. I found out that ShoppingCartValidateDomain does the work, but it's not working correct in 'Standard Cart'.
If a domain belongs to the list and the custom message should be displayed instead of this, the message 'Domain must begin with a letter or a number' is displayed. If the domain does not belong to the list, everything is working fine. In 'Moden' template, which is currently deprecated in 7.6.1, the action hook works as expected, showing the correct error message.
add_hook('ShoppingCartValidateDomain', 1, function($vars) {
//
//
if (in_array($vars['sld'].$vars['tld'],$list) {
return 'my custom error message';
}
});
Any ideas?