How to call a generic code within my webhook function?
-
I’ve 2 webhook functions and both contains besides function specific code also some generic code which is the same. Due to maintenance I want to split this code of and call this withtin the webhook function. I don’t know how this is named but I will call it also function
Example
f`unction webhookFunction1() {
//Some specifieke function1 code
…//Shared code
sharedFunction();
}function webhookFunction2() {
//Some specifieke function2 code
…//Shared code
sharedFunction();
}function sharedFuntion() {
//Some generic code which is used in both web hook functions
….
}`In what way can I call this sharedfunction in my webhook functions because this code above is not working?
-
Hi there,
Can you please let me know your site’s address so I can point you in the right direction of getting support?
Please note that these forums are for WordPress.com hosted sites only. If your site is using the open-source WordPress.org software you need to seek help at these forums:
- The topic ‘How to call a generic code within my webhook function?’ is closed to new replies.