Download the PHP package ejosterberg/opensalestax-for-woocommerce without Composer

On this page you can find all versions of the php package ejosterberg/opensalestax-for-woocommerce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package opensalestax-for-woocommerce

OpenSalesTax for WooCommerce

Replace TaxJar / Avalara / WooCommerce Tax with self-hosted OpenSalesTax. Free, open-source, US sales-tax calculation at WooCommerce checkout.

Status: v0.4.1. Tested against WordPress 6.6+ / WooCommerce 10.7 / OpenSalesTax engine v0.39. 109 unit tests + an end-to-end integration test on a real WP+WooCom Proxmox VM.

What this saves you

Most WooCommerce tax plugins are paid services or limited free tiers:

Service Pricing model
WooCommerce Tax (Jetpack) Free up to 200 transactions/mo; paid tier above
TaxJar from $19/mo + transaction fees
Avalara AvaTax enterprise pricing
OpenSalesTax + this plugin $0 software cost, self-hosted

You run a small VM (or container) for the OpenSalesTax engine; this plugin calls into it from WC's checkout flow. Tax math runs locally on infrastructure you own.

Install

Activate via WP Admin → Plugins.

Or via Composer:

The SDK (ejosterberg/opensalestax) and the plugin (ejosterberg/opensalestax-for-woocommerce) are both on Packagist.

For the full step-by-step walkthrough including engine setup, configuration, and verification, see docs/INSTALL.md.

Configure

  1. Stand up an OpenSalesTax engine (5-minute Docker quickstart)
  2. In WP Admin: WooCommerce → Settings → Tax → OpenSalesTax
  3. Enter your engine's base URL (e.g. http://your-engine:8080)
  4. (Optional) Enter API key if your engine has authentication enabled
  5. Click Test Connection — should report status: ok with the engine version

Done. The next cart that includes a US shipping address gets destination-based sales tax.

How it works

The plugin hooks WooCommerce's woocommerce_calc_tax filter. On every line that needs tax computed:

  1. Read the customer's shipping ZIP from WC()->customer
  2. Resolve the line's tax category (WC tax class → OpenSalesTax category)
  3. Skip if customer is tax-exempt (WC()->customer->is_vat_exempt())
  4. Look up cached tax for (zip, category, line-amount) — return early on hit
  5. On cache miss, call POST /v1/calculate on your OpenSalesTax engine
  6. Return the calculated tax amount in WC's expected format

Tax breakdown (per-state, per-county, per-city, per-district) is computed and returned by the engine. The combined total flows into WC's tax line; per-jurisdiction detail can be inspected via wp opensalestax calc <zip> <amount>.

Design choices

Compatibility

Compatible with classic checkout AND Cart/Checkout Blocks (Blocks invoke the same woocommerce_calc_tax filter via the Store API).

HPOS-compatible: this plugin doesn't post-process orders in v0.1, so the HPOS tax-reading caveat doesn't apply.

What's shipping

What's coming next

Out of scope

Disclaimer

Tax calculations are provided as-is for convenience. The merchant is solely responsible for tax-collection accuracy and remittance to the appropriate jurisdictions. Verify against your state Department of Revenue before remitting.

Quality bar

Contributing

DCO sign-off (git commit -s) required on every commit. See CONTRIBUTING.md.

License

Dual-licensed: Apache-2.0 OR GPL-2.0-or-later — recipient picks. See LICENSE-APACHE.txt, and LICENSE-GPL.txt. The GPL-2.0-or-later option exists primarily for WordPress.org plugin directory compatibility; most merchants embedding the plugin in their own WooCommerce deployment will be served by the Apache-2.0 option.


All versions of opensalestax-for-woocommerce with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ejosterberg/opensalestax Version ^0.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ejosterberg/opensalestax-for-woocommerce contains the following files

Loading the files please wait ...