Multiple functions run when finish_waiting_payment($payment_id) called

Discussion in 'Customization & add-ons' started by james_wa, Nov 1, 2010.

  1. james_wa

    james_wa New Member

    Joined:
    Aug 29, 2006
    Messages:
    9
    I am using fwp hook already and it works fine. I now need to have an additional function run when a payment is applied. I am currently calling the function in this way:

    setup_plugin_hook('finish_waiting_payment','my_function');

    would I add my second function and then add:
    setup_plugin_hook('finish_waiting_payment','my_2nd_function);

    or what? How would I have multiple functions run when fwp is called?
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Might be cleaner to have multiple functions called from my_function.. allows you to add logic and error wrapping more consistently as well as potentially run parallel processes.
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    james_wa,
    That way will work as well, but this is better to use one function as skippybosco said.
  4. james_wa

    james_wa New Member

    Joined:
    Aug 29, 2006
    Messages:
    9
    Thanks!

    I think I will do that. A little more work, but DOES seem like a better way to do things. Thanks.

Share This Page