Save WooCommerce order item custom fields sum as a new meta data
问题 When a particular product is ordered in this WooCommerce store, two meta values are added to the order. The two fields that store the meta values are located in wp_woocommerce_order_itemmeta The meta keys are : quantity assemblycost I want to create a new custom field programmatically when a new order is placed and set the value of this new field equal to quanity * assemblycost if the meta key assemblycost exists for the product that has been ordered. After some research I discovered that