Jump to content
nasos75

Buggy (??) ShoppingCartValidateDomain Hook

Recommended Posts

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?

Edited by nasos75

Share this post


Link to post
Share on other sites

I was just informed from WHMCS team, this is indeed a buggy behavior with bug number CORE-11987. 

Edited by nasos75

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated