Hey everyone,
I had this same issue and it seemed to be with this perticular line of code:
ot_discount.php line 61 (accordinly to 2.4 release)
$tax_discount[$order->products[$i]['tax_description']] += $products_discount * $order->products[$i]['tax'] / 100;
This line of code kept spitting out a warning something about illigal blah blah.. (forgot the exact error)
After using a bunch of print_r statements, I noticed that the array ($tax_discount) was actually empty.
so i updated the above line of code into the following and it worked for me!
ot_discount.php
foreach($order->products[$i]['tax_description'] as $key123 => $value123){
$tax_discount[$key123] += $products_discount * $order->products[$i]['tax'] / 100;
}
Not sure if this was the best and most efficient way, but it worked for me. If anyone has a better example, please feel free to show!