Filter for line items in abstract-wc-order.php (#17759)
* Filter for line items in abstract-wc-order.php When creating custom product class there are places where line items is only value that can be handled. This is one of that places causing subtotal values after checkout not to be calculated and displayed. * Extension to woocommerce_order_get_items filter This is extension to filter as get_items() is used for different classes and types. This way it would be possible to distinct which type is called for items. * Removed filtering inside subtotal function $types parameter is added as parameter for filter inside get_items() function so previous commit is reverted as there is no need for it.
This commit is contained in:
parent
9a95441c61
commit
18e7b25eab
|
@ -708,7 +708,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
}
|
||||
}
|
||||
|
||||
return apply_filters( 'woocommerce_order_get_items', $items, $this );
|
||||
return apply_filters( 'woocommerce_order_get_items', $items, $this, $types );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue