0

Hey i want to make some changes in woocommerce order page but i couldn't find the right php file to make those changes i changed the html code so i can see that it's possible the first screenshot is before the changes enter image description here

As you see i need to move the mouse to see the order note and the last customer note

and this is after the changes enter image description here

i need the name of the file or any other plugin that let me do that

1 Answer 1

0

You may want to use the hook manage_posts_custom_column see codex for more informations. https://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column

add_action('manage_shop_order_posts_custom_column' , 'wpse_306476_order_custom_column');
function wpse_306476_order_custom_column($colname) {
    global $the_order; // Get the order

    if($colname == 'customer_message') // You can also use a switch here
    {
        $message = $the_order->get_customer_note();
        // Do what you have to do here
    }
    elseif($colname == 'order_note') // For order_note
    {
        // Do what you want here
    }
}

It's a partial answer, but you'll be able to catch and change what you want in the desired column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.