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.
closed as off-topic by Pieter Goosen, TheDeadMedic, Mark Kaplun, cybmeta, Howdy_McGee♦ Sep 14 '15 at 18:40
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers' support routes." – Pieter Goosen, TheDeadMedic, Mark Kaplun, cybmeta, Howdy_McGee
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!