Hooking the backoffice
-
Hi, i’m not quite a hooker but i try to be.
I need to change one link with a hook cause i know where to hard-change it but i want to become a hooker so really hard.the link is:
$product_link = $_product ? admin_url( 'post.php?post=' . absint( $_product->id ) . '&action=edit' ) : '';
Found in:
html-order-item.phpInclude in:
html-order-items.php with a S to itemJuste after:
do_action( 'woocommerce_before_order_item_' . $item['type'] . '_html', $item_id, $item, $order ); include( 'html-order-item.php' );
I manage to hook (using “Simply Shows Hooks” plugin) that action with:
add_action ( 'woocommerce_before_order_itemmeta' , 'change_item_url'); function change_item_url() { }
But what to code in those brackets cause i’m not a real coder yet???
I simply tried including another file in order to load my own file:
(to test only cause i would have to remove the original html-order-item.php too to have only my file loaded i guess )
include( 'my-html-order-item.php' );
So can someone show me what code i should do or direct me to somewhere on web i can understand simple functions to put into my hooks?
Thanks
- The topic ‘Hooking the backoffice’ is closed to new replies.