Jon W.
Jon W.

Reputation: 1

How do I find where a specific WordPress action is triggered?

I'm trying to find where a specific thing is happening in a very complex Wordpress/WooCommerce website. I have no documentation and I did not write any of this code, so all I can do is try to trace it based on what I know of Wordpress, which isn't much. I've found some add_action commands that seem to be relevant, but I can't tell where these actions get triggered from. I thought that in an add_action function call like this:

add_action('woocommerce_order_action_iw_order_sync', 'ia_admin_manual_sync_order');

The first parameter is the name of the hook and the second is the name of the action to run. But I've tried repeatedly to find where this specific hook is defined, or under what conditions it gets called, and I can't find it. It's not in Wordpress; it's not in WooCommerce. It should be in the InfusionWoo_PRO plugin, but there is no documentation for that so all I can do is run string searches on the plugin's files. Searching for the string woocommerce_order_action_iw_order_sync finds this line in this file, and nothing else. Searching on partial strings is no more successful.

How do I tell where the hook woocommerce_order_action_iw_order_sync is getting called?

Upvotes: 0

Views: 45

Answers (0)

Related Questions