Jump to content

Take data "record date"


tonnybarros

Recommended Posts

I have a module, and it works fine.

But I wanted to get my product registration date on the module.

 

I gave a var_dump($GLOBALS);

 

And that's what I want:

 

array(11) { [0]=> string(7) "profile" [1]=> string( "contacts" [2]=> string( "products" [3]=> string(14) "manageproducts" [4]=> string(7) "domains" [5]=> string(13) "managedomains" [6]=> string( "invoices" [7]=> string(7) "tickets" [8]=> string(10) "affiliates" [9]=> string(6) "emails" [10]=> string(6) "orders" } ["emailVerificationPending"]=> bool(false) ["action"]=> string(14) "productdetails" ["clientareaaction"]=> string(14) "productdetails" ["id"]=> string(3) "762" ["domainId"]=> string(0) "" ["serviceid"]=> string(3) "762" ["pid"]=> string(3) "121" ["producttype"]=> string(5) "other" ["regdate"]=> string(10) "15/09/2016" ["modulename"]=> stri....

 

But I could not get just this information.

["regdate"]=> string(10) "15/09/2016"

Link to comment
Share on other sites

Are you trying to get that in a hook or a standard module function? If a standard module function, it should be in the $vars variable (first variable in the function declaration). If in a hook, you'll need to use the GetClientProducts API https://developers.whmcs.com/api-reference/getclientsproducts/ and find the product in question in the products array. You can also try out the class based API . If those don't work for your situation, explain why using globals would be better?

Link to comment
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