Adding predefined tax rates to the invoicing add-on

The invoicing add-on allows you to quickly select predefined tax rates. By default, only a single rate is included to remove all taxes. You may want to add your own rates in order to avoid typing them each time. Here is a snippet to add to your theme’s functions.php file to add 2 predefined rates for VAT:

function cuar_add_my_predefined_tax_rates($rates)
    return array_merge($rates, array(
            'label' => __('VAT - standard rate', 'my-text-domain'),
            'rate'  => 20
            'label' => __('VAT - reduced rate', 'my-text-domain'),
            'rate'  => 10
add_filter('cuar/private-content/invoices/predefined-tax-rates', 'cuar_add_my_predefined_tax_rates');