{"id":15528162,"url":"https://github.com/brianhenryie/bh-wc-address-validation","last_synced_at":"2026-04-18T22:02:46.661Z","repository":{"id":71001686,"uuid":"296738309","full_name":"BrianHenryIE/bh-wc-address-validation","owner":"BrianHenryIE","description":"USPS address validation for WooCommerce with no subscription cost","archived":false,"fork":false,"pushed_at":"2024-03-20T03:22:26.000Z","size":2108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T17:52:15.564Z","etag":null,"topics":["address-validation","usps","woocommerce"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrianHenryIE.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-18T22:02:43.000Z","updated_at":"2022-10-11T06:08:42.000Z","dependencies_parsed_at":"2023-03-11T09:40:19.633Z","dependency_job_id":"7aa0fac6-a095-49bc-812a-e9dcecedc7a0","html_url":"https://github.com/BrianHenryIE/bh-wc-address-validation","commit_stats":{"total_commits":137,"total_committers":1,"mean_commits":137.0,"dds":0.0,"last_synced_commit":"14d762fa4378ec1b4d184db70463a3a39c04e329"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/BrianHenryIE/bh-wc-address-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2Fbh-wc-address-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2Fbh-wc-address-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2Fbh-wc-address-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2Fbh-wc-address-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHenryIE","download_url":"https://codeload.github.com/BrianHenryIE/bh-wc-address-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHenryIE%2Fbh-wc-address-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address-validation","usps","woocommerce"],"created_at":"2024-10-02T11:11:03.659Z","updated_at":"2026-04-18T22:02:46.625Z","avatar_url":"https://github.com/BrianHenryIE.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![WordPress tested 5.5](https://img.shields.io/badge/WordPress-v5.5%20tested-0073aa.svg)](#) [![PHPUnit ](.github/coverage.svg)](https://brianhenryie.github.io/bh-wc-address-validation/)\n\n# BH WC Address Validation\n\nUses USPS API to validate and update addresses when an order is marked processing.\n\n* Only changes the address once when run automatically\n* Can be run manually repeatedly\n* Sets order status to on-hold when deactivated\n* Checks on-hold orders for plugin meta-key when activated to re-set orders to bad-address status\n* Optionally triggers an email to admin when an order needs attention\n\nTODO: Verify orders with bad-address status are correctly accounted for in reports. \n\n![Settings Page](./assets/settings-page.png \"Setting Page\")\n\n![Order Notes After Automatic Check](./assets/order-notes-after-automatic-check.png \"Order Notes After Automatic Check\")\n\n![Link to USPS](./assets/link-to-usps.png \"Link to USPS\")\n\n![Order Action Manual Check](./assets/order-action-manual-check.png \"Order Action Manual Check\")\n\n\n## Develop\n\nAdd a `.env.secret` file in the root of the project containing your USPS username.\n\n```\nUSPS_USERNAME=\"123BH0003210\"\n```\n\n\nFor integration and acceptance tests, a local webserver must be running with `localhost:8080/bh-wc-checkout-rate-limiter/` pointing at the root of the repo. MySQL must also be running locally – with two databases set up with:\n\n```\nmysql_username=\"root\"\nmysql_password=\"secret\"\n\n# export PATH=${PATH}:/usr/local/mysql/bin\n\n# Make .env available \n# To bash:\n# export $(grep -v '^#' .env.testing | xargs)\n# To zsh:\n# source .env.testing\n\n# Create the database user:\n# MySQL\n# mysql -u $mysql_username -p$mysql_password -e \"CREATE USER '\"$TEST_DB_USER\"'@'%' IDENTIFIED WITH mysql_native_password BY '\"$TEST_DB_PASSWORD\"';\";\n# or MariaDB\n# mysql -u $mysql_username -p$mysql_password -e \"CREATE USER '\"$TEST_DB_USER\"'@'%' IDENTIFIED BY '\"$TEST_DB_PASSWORD\"';\";\n\n# Create the databases:\nmysql -u $mysql_username -p$mysql_password -e \"CREATE DATABASE \"$TEST_SITE_DB_NAME\"; USE \"$TEST_SITE_DB_NAME\"; GRANT ALL PRIVILEGES ON \"$TEST_SITE_DB_NAME\".* TO '\"$TEST_DB_USER\"'@'%';\";\nmysql -u $mysql_username -p$mysql_password -e \"CREATE DATABASE \"$TEST_DB_NAME\"; USE \"$TEST_DB_NAME\"; GRANT ALL PRIVILEGES ON \"$TEST_DB_NAME\".* TO '\"$TEST_DB_USER\"'@'%';\";\n```\n\n\n### WordPress Coding Standards\n\nSee documentation on [WordPress.org](https://make.wordpress.org/core/handbook/best-practices/coding-standards/) and [GitHub.com](https://github.com/WordPress/WordPress-Coding-Standards).\n\nCorrect errors where possible and list the remaining with:\n\n```\nvendor/bin/phpcbf; vendor/bin/phpcs\n```\n\n### Tests\n\nTests use the [Codeception](https://codeception.com/) add-on [WP-Browser](https://github.com/lucatume/wp-browser) and include vanilla PHPUnit tests with [WP_Mock](https://github.com/10up/wp_mock).\n\nRun tests with:\n\n```\nvendor/bin/codecept run unit;\nvendor/bin/codecept run wpunit;\nvendor/bin/codecept run integration;\nvendor/bin/codecept run acceptance;\n```\n\nShow code coverage (unit+wpunit):\n\n```\nXDEBUG_MODE=coverage composer run-script coverage-tests \n```\n\nStatic analysis:\n\n```\nvendor/bin/phpstan analyse --memory-limit 1G\n```\n\nTo save changes made to the acceptance database:\n\n```\nexport $(grep -v '^#' .env.testing | xargs)\nmysqldump -u $TEST_SITE_DB_USER -p$TEST_SITE_DB_PASSWORD $TEST_SITE_DB_NAME \u003e tests/_data/dump.sql\n```\n\nTo clear Codeception cache after moving/removing test files:\n\n```\nvendor/bin/codecept clean\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhenryie%2Fbh-wc-address-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhenryie%2Fbh-wc-address-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhenryie%2Fbh-wc-address-validation/lists"}