Development¶
Local setup¶
git clone git@github.com:subscribed-aps/wp-pkg-async-bulk-order-completion.git
cd wp-pkg-async-bulk-order-completion
composer install
Requires access to the private Packagist at https://packagist.barberklingen.dk.
Running tests¶
Tests live in tests/ and use PHPUnit 6.x. The test bootstrap is configured in phpunit.xml.
Front-end (web component)¶
The admin UI is a Vue web component compiled to src/assets/js/order-completion-app.min.js. Source lives in app/.
To rebuild:
The compiled output is committed to the repo.
REST API¶
The plugin registers a REST namespace at /wp-json/async-bulk-order-completion/v1/.
| Method | Endpoint | Description |
|---|---|---|
| GET | /jobs | List jobs (with embedded orders and user info). Requires read_shop_orders or administrator. |
Query parameters for GET /jobs:
| Parameter | Type | Default | Description |
|---|---|---|---|
completed | bool | — | Filter by completed status |
limit | int | 100 | Max results |
embed | bool | true | Include orders and user info |
Coding standards¶
- PSR-4 autoloading, PSR-12 style.
- PHP 7.4 compatible — no PHP 8+ syntax.
- All hooks/filters use the
mark_completed_async/batch-order-completionprefixes. - Run
phpcswith WordPress Coding Standards if configured.
Branching & delivery¶
- Never commit directly to
master. - Branch naming:
feature/<description>orfix/<description>. - Open a PR and merge via GitHub.