Support

Home Forums Event Espresso Premium Troubleshooting Surcharge on Total Amount Reply To: Troubleshooting Surcharge on Total Amount

Reply To: Troubleshooting Surcharge on Total Amount

Author Replies
Josh # Posted on April 26, 2018 at 6:43 am

The problem with your code is nowhere does it set a line item percentage amount. You can have a look at this method to see an example of how to add a percentage based line item:

https://github.com/eventespresso/event-espresso-core/blob/master/core/helpers/EEH_Line_Item.helper.php#L89

You’ll note that the LIN_unit_price is 0, the percentage amount is passed to LIN_percent, and the calculation happens in LIN_total.

Do NOT follow this link or you will be banned from the site!