Jump to content

Need to run hook when a package is changed for a client.


craigedmonds

Recommended Posts

All I want to do is run a hook when I change the package for a client.

 

Documentation says "Runs after the ChangePackage function has been successfully run."

 

The documentation does not actually include any information on ChangePackage.

 

Trying to run this. add_hook("ChangePackage",1,"cab_spain_update_package_details_in_wordpress");

 

DOES NOTHING.

 

PLease help me as I am getting a bit pissed off with this.

Link to comment
Share on other sites

please include further information:

1. where your ActionHook file is saved?

2. is it possible to include the whole code to check?

3. I can see space in function name "packa ge" where this isn't valid, you may need to fix this and try.

 

Thanks for replying.

 

I have it working now becasue the actual name of the hook is called "ServiceEdit", however I now need to run the same hook when the product is added to the clients account, but in the documentation its not really clear what the name of the hook should be.

 

I have managed to figure out that to run the hook when the service is deleted from the clients account is "ServiceDelete" so logic would suggest to me that when a service is added or created it should be "ServiceCreated" or "ServiceAdded"...but no.

Edited by craigedmonds
Link to comment
Share on other sites

 

Ah ok. Now it makes sense. The documentation is not 100% clear. I think I get it now.

 

Thank you very much for your help.

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