PHP code example of silvercommerce / tax-admin

1. Go to this page and download the library: Download silvercommerce/tax-admin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

silvercommerce / tax-admin example snippets


use SilverCommerce\TaxAdmin\Model\TaxCategory;

// Get the tax category you want
$cateogry = TaxCategory::get()->byID(1);

// Find if we have a valid rate for Gloucestershire in the UK (GB)
$tax_rate = $category->getValidTax("GB", "GLS");