• Is there any way for the plugin to add a note to the old order saying that it had been duplicated and include the new order’s order number? That would be very useful for bread crumb trail for customer service

    Let me know if this can be added potentially.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jamie Gill

    (@patchgill)

    Hi There,

    On line 147 in the clone order class just add the folowing :-

    $order->add_order_note('Order cloned to #'.$order_id.'');

    Cheers
    J

    Thread Starter Headsaflame

    (@headsaflame)

    So will this add the order note in the original order that the clone was cloned from? It looks like it would just add another note to the same order? Or am I wrong?

    I would like it so you could access the old order and see a note saying “Order cloned to #”, so there’s a bit if a paper trail between the orders.

    Would also be cool if there was a clickable link in the note, I’m not sure if that’s even possible in woocommerce.

    Thanks for helping me out with this!

    • This reply was modified 5 years, 6 months ago by Headsaflame.
    • This reply was modified 5 years, 6 months ago by Headsaflame.
    Plugin Author Jamie Gill

    (@patchgill)

    Hi,

    I am unsure if you emailed yeterday but i sent a quick solution via email :-

    On line 146 add :-

    $original_order->add_order_note(‘Order Cloned to #’.$order_id.”);

    Above

    $order->add_order_note(‘Cloned Order from #’.$this->original_order_id.”);

    This should create the paper trail you can use html in the notes so could link to the order ids using the variables.

    Cheers
    J

    Thread Starter Headsaflame

    (@headsaflame)

    Thanks so much for your help! I was able to get the code to work and also add links to the actual orders, here’s what my code looks like:

    // Set order note of original cloned order
    $original_order->add_order_note('Order Cloned to: <a href="'.site_url().'/wp-admin/post.php?post='.$order_id.'&action=edit">'.$order_id.'</a>');
    
    // Set order note in cloned order
    $order->add_order_note('Order Cloned From: <a href="'.site_url().'/wp-admin/post.php?post='.$this->original_order_id.'&action=edit">'.$this->original_order_id.'</a>');
    
    • This reply was modified 5 years, 6 months ago by Headsaflame.
    Thread Starter Headsaflame

    (@headsaflame)

    I noticed that this action is only accessible from the orders screen, is there a way to add the same action to the order edit screen? Our staff rarely use the orders screen, they’re usually going directly into orders to edit them.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add note to old order?’ is closed to new replies.