The PR is regarding https://github.com/responsiv/pay-plugin/issues/70 but I've decided to use currency_code in the invoice instead of currency_id. It turned out to be a better idea - the code is still clean but has a really nice feature of creating invoices with different currencies. Backward compatibility is handled and the plugin will behave as previously if one selects default currency in the backend dropdown, which makes currency an empty field.
Check the code and let me know if you like it or should I change anything.
Hi @samgeorges,
The PR is regarding https://github.com/responsiv/pay-plugin/issues/70 but I've decided to use
currency_code
in the invoice instead ofcurrency_id
. It turned out to be a better idea - the code is still clean but has a really nice feature of creating invoices with different currencies. Backward compatibility is handled and the plugin will behave as previously if one selectsdefault currency
in the backend dropdown, which makescurrency
an empty field.Check the code and let me know if you like it or should I change anything.
Thanks!