Pfändungsrechner
A WordPress plugin that calculates garnishable income (Pfändungsbetrag) based on §850c ZPO. It automatically updates table data yearly from official PDF sources, supports manual admin-triggered updates, stores values in the database, and provides an easy-to-use frontend shortcode calculator.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/japa-le/pfandungsrechner-wp-plugin/archive/refs/heads/main.zipPfändungsrechner WP Plugin
WordPress plugin to calculate the garnishable amount (Pfändungsbetrag) based on § 850c ZPO.
The plugin stores table values in the WordPress database, provides a frontend calculator via shortcode, and includes automatic yearly update logic.
Features
- ✅ Frontend calculator for net income + dependents
- ✅ Shortcode integration:
[pfaendungsrechner] - ✅ Data stored in custom DB table (
wp_pfaendungstabellenwith site prefix) - ✅ Automatic yearly update scheduling (1 July, or next workday)
- ✅ Manual admin trigger for testing/forced refresh
- ✅ Email notifications on success and error
- ✅ PDF parser dependency bundled via Composer (
smalot/pdfparser)
Requirements
- WordPress 6.x (recommended)
- PHP 7.4+ (8.x recommended)
- PHP extensions used by dependency:
iconv,zlib
Installation
Option A: Manual (ZIP)
- Download the repository as ZIP.
- Extract to:
wp-content/plugins/pfaendungsrechner - Ensure the
vendor/directory is present. - Activate Pfändungsrechner in WP Admin → Plugins.
Option B: Git clone
git clone https://github.com/japa-le/pfandungsrechner-wp-plugin.git pfaendungsrechner
Place the folder in wp-content/plugins/ and activate it.
Usage
Add the shortcode to a page/post:
[pfaendungsrechner]
The calculator renders a form for:
- Net income (
Nettoeinkommen) - Number of dependents (
Unterhaltspflichtige Personen)
Result is returned via AJAX.
Automatic Update Behavior
On activation, the plugin:
- Creates/updates the custom table.
- Fills initial values.
- Schedules yearly update event.
The scheduled updater:
- fetches source page/PDF
- parses values
- regenerates and imports table rows
- sends notification email to site admin
If update fails, current data remains active and an error email is sent.
Manual Update Trigger (Admin)
For testing, use:
/wp-admin/admin.php?page=pfaendungsrechner_trigger
Only users with manage_options can access this endpoint.
Project Structure
pfaendungsrechner.php– main plugin logiccomposer.json/composer.lock– dependency definitionvendor/– bundled Composer dependencies.gitignore– repo exclusions
Security Notes
- AJAX requests are nonce-protected.
- Inputs are validated/sanitized before processing.
- Plugin exits early if
ABSPATHis not defined.
License
Private/client project by default unless explicitly licensed otherwise.