Jump to content
paperweight

What function controls how product is deleted upon expiration?

Recommended Posts

When a product expires inside a user's account, the product is removed/deleted. What function inside WHMCS causes the product to be deleted?

 

I want to add a hook to the function that removes/deletes the product, but I can't find something in the API that does this.

 

Thank you~

Share this post


Link to post
Share on other sites

I believe you're looking for any one of these hooks:

 

* ServiceDelete (runs just before a service is removed from the database)

* PreModuleTerminate (runs just before a service is terminated)

* AfterModuleTerminate (runs just after a service was terminated)

 

I believe any one of the ModuleTerminate hooks is the most useful for you, because it will run when a service is automatically (or manually) terminated. So, it will also run when a product is overdue and terminated because of this.

Share this post


Link to post
Share on other sites
I believe you're looking for any one of these hooks:

 

* ServiceDelete (runs just before a service is removed from the database)

* PreModuleTerminate (runs just before a service is terminated)

* AfterModuleTerminate (runs just after a service was terminated)

 

I believe any one of the ModuleTerminate hooks is the most useful for you, because it will run when a service is automatically (or manually) terminated. So, it will also run when a product is overdue and terminated because of this.

 

Thank you, I will test using those~

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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