IP Address Condition for WooCSP
Use customer IP address as input for WooCommerce Conditional Shipping and Payments
by Brian Henry · github.com/brianhenryie/bh-wc-csp-condition-ip-address · website
★ 2stars
23release downloads
≈10active sites
1forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/brianhenryie/bh-wc-csp-condition-ip-address/releases/download/1.2.1/bh-wc-csp-condition-ip-address.1.2.1.zipDeclares an update source (https://github.com/BrianHenryIE/bh-wc-csp-condition-ip-address), so updates arrive through the plugin's own updater.
From the readme
IP Address Condition for WooCommerce Conditional Shipping and Payments
WooCommerce Conditional Shipping and Payments
e.g. only show cheque payment option to schools in Ireland:
Development
Clone this repo, open PhpStorm, then run composer install to install the dependencies.
For integration and acceptance tests, a local webserver must be running with localhost:8080/bh-wc-csp-condition-ip-address/ pointing at the root of the repo. MySQL must also be running locally – with two databases set up with:
WordPress Coding Standards
See documentation on WordPress.org and GitHub.com.
Correct errors where possible and list the remaining with:
Tests
Tests use the Codeception add-on WP-Browser and include vanilla PHPUnit tests with WPMock.
Run tests with:
Show code coverage (unit+wpunit):
Static analysis:
To save changes made to the acceptance database:
To clear Codeception cache after moving/removing test files:
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.2.1 | Oct 1, 2022 | bh-wc-csp-condition-ip-address.1.2.1.zip | 13 |
| 1.2.0 | Oct 1, 2022 | bh-wc-csp-condition-ip-address.1.2.0.zip | 10 |
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.