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 do_action()
or apply_filters()
as first arg.
var_dump( $GLOBALS['wp_filters']['hook_name'] );
-
can you give me a example, as i did
var_dump( $GLOBALS['wp_filters']['woocommerce_after_shop_loop'] )
and it gave me null, also could you please guide me how can i edit the buy now button, so the website open up in new window. – localhost Aug 19 '13 at 18:37
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!