• Resolved VincentLB77

    (@vincentlb77)


    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.php

    Include in:
    html-order-items.php with a S to item

    Juste 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

    • This topic was modified 8 years, 3 months ago by VincentLB77.
Viewing 1 replies (of 1 total)
  • Thread Starter VincentLB77

    (@vincentlb77)

    Well i hung on very hard and now i can hook!!!
    I’ll post the solution if someone need it but the path to that solution i can’t…
    You’ll have to make it on your own and it’s hard but worth it.

    • This reply was modified 8 years, 3 months ago by VincentLB77.
Viewing 1 replies (of 1 total)
  • The topic ‘Hooking the backoffice’ is closed to new replies.