Check if the Order has private note
-
I can’t find a way to check if the order has a private note added to it. I created a code which check if the customer note is added to the order but is there a way to check if the private note is added?
Here is the code I use:add_action('manage_shop_order_posts_custom_column', 'add_admin_note_icon_column', 10, 2); function add_admin_note_icon_column($column, $post_id) { if ($column === 'order_number') { $order = wc_get_order($post_id); $note = $order->get_customer_note(); if (!empty($note)) { echo '<span class="dashicons dashicons-format-status" style="color:#0073aa"></span>'; } } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Check if the Order has private note’ is closed to new replies.