Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/gorgeous-planes-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wpengine/wpgraphql-logging-wordpress-plugin": patch
---

chore: Various snags.
29 changes: 29 additions & 0 deletions plugins/wpgraphql-logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,35 @@ Once you have the composer repository setup, please run `composer req wpengine/w

Plugin should start logging data, once activated.

---

## Uninstallation and Data Cleanup

By default, WPGraphQL Logging preserves all logged data when the plugin is deactivated to prevent accidental data loss. If you want to completely remove all plugin data (including database tables) when deactivating the plugin, you must explicitly enable this behavior.

### Enabling Database Cleanup on Deactivation

To enable automatic database cleanup when the plugin is deactivated, add the following constant to your `wp-config.php` file or in a must-use plugin:

```php
define( 'WP_GRAPHQL_LOGGING_UNINSTALL_PLUGIN', true );
```

> [!WARNING]
> **Data Loss Warning**: When `WP_GRAPHQL_LOGGING_UNINSTALL_PLUGIN` is defined as `true`, deactivating the plugin will permanently delete all logged data and drop the plugin's database tables. This action is irreversible.

### Manual Data Cleanup

If you prefer to manually clean up data without defining the constant, you can:

1. Use the plugin's admin interface to clear logs (when available)
2. Manually drop the database table: `{$wpdb->prefix}wpgraphql_logging`
3. Remove plugin options from the WordPress options table

---

@TODO add more info once we have configuration setup.

@TODO add more info once we have configuration setup.


Expand Down
4 changes: 1 addition & 3 deletions plugins/wpgraphql-logging/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
"phpstan/phpstan-strict-rules": "^2.0",
"slevomat/coding-standard": "^8.0",
"szepeviktor/phpstan-wordpress": "^2.0",
"wp-cli/wp-cli-bundle": "^2.8.1",
"wp-graphql/wp-graphql": "^2.3",
"wp-graphql/wp-graphql-testcase": "^3.0.1"
"wp-cli/wp-cli-bundle": "^2.8.1"
},
"config": {
"allow-plugins": {
Expand Down
Loading