From 5f94c847b89e5261b9bd7dd045c4d3479c984f6f Mon Sep 17 00:00:00 2001 From: kathy Date: Wed, 31 Oct 2012 12:09:22 -0500 Subject: [PATCH] add woocommerce_add_order_item_meta hook --- classes/class-wc-checkout.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/class-wc-checkout.php b/classes/class-wc-checkout.php index 15e2943849e..2b3eef97adb 100644 --- a/classes/class-wc-checkout.php +++ b/classes/class-wc-checkout.php @@ -464,6 +464,9 @@ class WC_Checkout { // Add line item meta for backorder status if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $values['quantity'] ) ) woocommerce_add_order_item_meta( $item_id, __( 'Backordered', 'woocommerce' ), $values['quantity'] - max( 0, $_product->get_total_stock() ) ); + + //allow plugins to add order item meta + do_action( 'woocommerce_add_order_item_meta', $item_id, $values ); } }