My site is a affiliate and I want woocommerce buy button to open up website in a new tab. As i go through the code i see its functions like do_action, calling functions. don't know where are the function based. I checked functions file too but cannot find it. How can i break it down, that which components of woocommerce is being called and editing that function like i want to open the external website in another window.
Dump the global: Use the name that is inside
apply_filters() as first arg.
var_dump( $GLOBALS['wp_filters']['hook_name'] );
I found a way a long time back, so updating that everyone knows. I did a search for title of button i.e 'Buy Now' and the file which had it, i copied it into my child theme. From there i updated the text and all went well!