Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
!.gitignore

!.php-cs-fixer.php
.php-cs-fixer.cache

# Eslint
!.eslintrc
Expand Down Expand Up @@ -64,6 +65,7 @@ Thumbs.db
*.log
*.sql
*.sqlite
pg-log-*.json

# ignore compiled files
*.com
Expand Down
40 changes: 35 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

## Description

Prefill GravityForms fields, based on the dutch BSN number. Retrieve personal information and place these values in the corrensponding fields.
Prefill GravityForms fields, based on the Dutch BSN number. Retrieve personal information and place these values in the corrensponding fields.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misschien wat miereneukerig 😶 :
Retrieves personal information and places these values in the corrensponding fields.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altijd blijven mierenneuken 🐜


## Dependencies

In order to use this plug-in there are two required plug-ins:
To use this plug-in, the following dependencies are required:

- GravityForms (premium)
- Yard | GravityForms DigiD (private repo, contact [Yard | Digital Agency](https://www.yard.nl/) for access)

See [here](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/main/config/core.php) for more details.
In addition, at least one of the following plug-ins must be installed to enable authentication by BSN:

- Yard | GravityForms DigiD (<https://github.com/yardinternet/owc-gravityforms-digid>)
- OWC Signicat OpenID (<https://github.com/yardinternet/plugin-owc-signicat-openid>)

## Features

Expand Down Expand Up @@ -46,7 +48,7 @@ See [here](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/m
2. Go to the form settings of the form you want to configure.
3. Scroll down and look for the 'iConnect' panel and configure the settings.

### 🔐 Cache Encryption
### Cache Encryption

To enable secure caching of sensitive data, you **must define an encryption key** in your `wp-config.php` file. This key is used to encrypt and decrypt the cached data and should be kept secret at all times.

Expand All @@ -66,3 +68,31 @@ Important:
## License

The source code is made available under the [EUPL 1.2 license](https://github.com/OpenWebconcept/plugin-prefill-gravity-forms/blob/main/LICENSE.md). Some of the dependencies are licensed differently, with the BSD or MIT license, for example.

## Logging

Enable logging to monitor errors during communication with the BRP suppliers.

- Logs are written daily to `pg-log{-date}.json` in the WordPress webroot directory.
- A rotating file handler keeps up to 7 log files by default, deleting the oldest as needed.
- You can change the maximum number of log files using the filter described below.

## Hooks

### Change the maximum number of log files

Use the following filter to alter the rotating file handler's max files setting:

```php
apply_filters('pg::logger/rotating_filer_handler_max_files', PG_LOGGER_DEFAULT_MAX_FILES)
```

### Intercept exceptions for custom handling

You can intercept exceptions caught by the plugin for additional processing or custom logging using this filter:

```php
do_action('pg::exception/intercept', $exception, $method)
```

The `$exception` parameter contains the caught exception object.
4 changes: 3 additions & 1 deletion build/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return ['dependencies' => ['react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'], 'version' => 'e0a9481f8d532339066b'];
<?php

return ['dependencies' => ['react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'], 'version' => '33b24b2f8a8b7ff4f915'];
4 changes: 3 additions & 1 deletion build/icons.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return ['dependencies' => [], 'version' => '02fa92c9250ff7f119f3'];
<?php

return ['dependencies' => [], 'version' => '12341f29470476729a0c'];
4 changes: 3 additions & 1 deletion build/style.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<?php return ['dependencies' => [], 'version' => 'd63fd4982613309d5c57'];
<?php

return ['dependencies' => [], 'version' => 'd63fd4982613309d5c57'];
89 changes: 44 additions & 45 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
{
"name": "plugin/prefill-gravity-forms",
"description": "Prefill GravityForms Plugin",
"authors": [
{
"name": "Yard | Digital Agency",
"email": "info@yard.nl",
"homepage": "https://www.yard.nl"
}
],
"type": "wordpress-plugin",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"name": "plugin/prefill-gravity-forms",
"description": "Prefill GravityForms Plugin",
"authors": [
{
"name": "Yard | Digital Agency",
"email": "info@yard.nl",
"homepage": "https://www.yard.nl"
}
],
"type": "wordpress-plugin",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "vcs",
"url": "git@github.com:OpenWebconcept/idp-userdata"
}
],
"require": {
"php": ">=7.0",
"php-di/php-di": "^6.0",
"owc/idp-userdata": "^1.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.0",
"10up/wp_mock": "^0.5.0",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^0.12",
"szepeviktor/phpstan-wordpress": "^0.6.0"
},
"autoload": {
"psr-4": {
"OWC\\PrefillGravityForms\\": "./src/PrefillGravityForms"
}
},
"autoload-dev": {
"psr-4": {
"OWC\\PrefillGravityForms\\Tests\\": "./tests/Unit"
}
},
"scripts": {
"test": "clear && ./vendor/bin/phpunit --testsuite 'Unit Test Suite' --colors=always",
"format": "vendor/bin/php-cs-fixer fix",
"phpstan": "./vendor/bin/phpstan analyse"
}
],
"require": {
"php": "^8.0",
"php-di/php-di": "^7.0",
"owc/idp-userdata": "^1.0"
},
"require-dev": {
"10up/wp_mock": "^0.5.0",
"friendsofphp/php-cs-fixer": "^3.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.0",
"szepeviktor/phpstan-wordpress": "^1.0"
},
"autoload": {
"psr-4": {
"OWC\\PrefillGravityForms\\": "./src/PrefillGravityForms"
}
},
"autoload-dev": {
"psr-4": {
"OWC\\PrefillGravityForms\\Tests\\": "./tests/Unit"
}
},
"scripts": {
"test": "clear && ./vendor/bin/phpunit --testsuite 'Unit Test Suite' --colors=always",
"format": "vendor/bin/php-cs-fixer fix",
"phpstan": "./vendor/bin/phpstan analyse"
}
}
Loading