0

I am developing a plugin for WooComerce. I have to add a custom section in WooComerce order admin page, below order items section. My section will contain few text boxes and drop-downs and a button. On button click i will call a web service and pass parameters to it from my fields filled in section.

How should i start this i mean for designing is there any hook of WC order page through which i can add my section fields etc. or should i use meta boxes? Whats the best way.

I found woocommerce_before_order_itemmeta hook but it didnt work for me.

Ammar Ul Hassan
  • 826
  • 1
  • 18
  • 48
  • why or how it did not work? – Reigel Gallarde May 16 '16 at 09:24
  • @Reigel It didnt work the way i wanted. I want a new section under order items section, but using this hook its coming inside order items section.. – Ammar Ul Hassan May 16 '16 at 09:29
  • if you mean below the whole box of "Order Items". You will need to create a new meta box.. – Reigel Gallarde May 16 '16 at 09:39
  • @Reigel Yes i need it below whole box of "order items".. i have found this as well http://stackoverflow.com/questions/24179529/how-to-add-custom-fields-for-woocommerce-order-page-admin but em not sure if its the right way? – Ammar Ul Hassan May 16 '16 at 09:43
  • yes... that should be your starting point... you may need to change `'side'` to `'normal'`... – Reigel Gallarde May 16 '16 at 09:49
  • @Reigel i changed it to normal now its coming under custom fields box. any way i can set it under order items? – Ammar Ul Hassan May 16 '16 at 09:53
  • When you add meta boxes using `add_meta_boxes` it follows the same order: last added, last shown. But each registered user that can access to orders backend, can drag and drop and reorder the meta boxes… – LoicTheAztec May 16 '16 at 14:06

0 Answers0