add woocommerce_add_order_item_meta hook
This commit is contained in:
parent
aef47868fa
commit
5f94c847b8
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue