• I’m trying to get the line item discount or the price without the discount. I can get the full price with:
    $order->get_line_total( $item );

    this is the loop:

    private function get_legacy_one_row_per_line_item( $order_data, WC_Order $order ) {
    		$data = array();
    		foreach ( $order->get_items() as $_ => $item ) {

    but i can’t find any function that gives just the discount for each product or the final price for each product – just the total discount for all products, and I need it individually

    Any help will be greatly appreciated. Thank you

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘Line item discount or net price’ is closed to new replies.