I have a plugin that send a legal invoice automatically using an external app when an order is placed.
I need to edit that plugin to achieve:
1.- Send invoice just for "Paid" orders.
2.- Send 1 invoice per product line, and no 1 invoice per order. (For example, if a user purchased 3 products in one order, he should receive 3 invoices)
3.- There are some restrictions based on product selection and custom fields (For example, all foreign customers should receive invoice to a default DNI. User select its nationality in product line)
4.- Some other little considerations on total calculation for invoice.
5.- Each invoice should be sent to users email. (its already a feature of current plugin)
Expert in PHP/Woocommerce/Wordpress. I need clean coding.
The site is [login to view URL]