add woocommerce_add_order_item_meta hook

This commit is contained in:
kathy 2012-10-31 12:09:22 -05:00
parent aef47868fa
commit 5f94c847b8
1 changed files with 3 additions and 0 deletions

View File

@ -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 );
}
}