Call   0208 3131682   Mon-Fri 9am-6pm
Monthly Archives

January 2016

Woocommerce – Add an Important Admin Note to the Order Report for Order pickers to view

By | Ecommerce, PHP, Plugins, Programming, Woocommerce, Wordpress | 6 Comments

In this article I’ll show you how to add an Important Admin Note to the Order Report, very useful if there’s some information you want to add for Order pickers to view. For instance maybe the item is fragile you can highlight this to the order picker.

 

Screen Shot 2016-01-14 at 15.21.07

This plugin allows you to enter an Admin note on the order and then displays this note on order report screen.

Screen Shot 2016-01-14 at 15.23.27

If you just want to get the plugin please click here to download the plugin. The rest of this article will run over how to create a plugin like this, so if you have an interest int he programming side of wordpress, this is for you.

Essentially to write this plugin we need todo 3 things:

  1. display the important Order Note input field on Woocommerce edit order screen
  2. save it when needed (i.e. when you save the order)
  3. display the note (in red in the graphic above) on the Woocommerce Order Report

So lets dive in:

Display the important Order Note input field on Woocommerce edit order screen

To display the order note field we need to do something like this (below). Print out the html for the text input field and add some explanatory note for the admin user.

 

Save it when needed (i.e. when you save the order)

In the code below I’m saving the Import Order Note, and before doing so checking that its valid.

 

finally

Display the note (in red in the graphic above) on the Woocommerce Order Report

In this function I use the relevant hook to drop my Import Order Note into the Order Report in the correct place.

 

I hope you found that interesting, if you need any help with Programming WordPress or Woocommerce please get in touch.