0

I am trying to use woocommerce webhooks to send product and order data to sync with salesforce. But i notice that at any point only 2 webhooks work, while the others don't. Changing the delivery URL and then testing the other logic works, but only 2 webhooks at anytime. and I fail to understand why that is. Can anyone help to answer?

dmulter
  • 2,608
  • 3
  • 15
  • 24
Gagan
  • 337
  • 3
  • 7
  • 18
  • their code may be overriding ( conflicting ) with each other, try assign different priority to each of them – Tarun Mahashwari Aug 12 '16 at 06:04
  • hi @TarunMahashwari, can you please tell me where should I add the priority? I don't see any function that accepts priority as a parameter. :| Please suggest? – Gagan Aug 12 '16 at 10:57

1 Answers1

0

your hooks code may be overriding ( conflicting ) with each other, try assign different priority to each of them.

if you are using a filter hook, see this:

add_filter( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 )

and if you are using an action hook see this

add_action( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 )' for further details check this 
Tarun Mahashwari
  • 338
  • 1
  • 10
  • 19