Skip to content
Advertisement

Add product weight and dimensions as order item meta data on WooCommerce admin manual orders

based on Save product custom-field as custom order item metadata for WooCommerce admin manual orders

I have these codes that show the weight and dimensions of the product for orders placed from the frontend, but I can’t get them to work for orders that are placed manually from the backend. When I add the products I do not see the weight and dimensions and they are not shown on the page to pay the order, in order-received and email.

That is my code:

Show and Save the weight of the product everywhere.

JavaScript

Show and Save product dimensions everywhere.

JavaScript

Advertisement

Answer

To display product weight and dimensions as custom order item meta data on manual backend orders, you will use woocommerce_before_save_order_item dedicated action hook as follow:

JavaScript

Code goes in functions.php file of your active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement