Customize the License Validation Ping
Filters the complete payload the plugin POSTs to the license server once a day, including the nested telemetry sub-array. Use it to remove or adjust a field before it’s sent — dropping an opt-in analytics value you don’t want reported, for example. Do not use it to try to change subscriber_count, plugin_version, wp_version, php_version, telemetry.show_count, or telemetry.active_bridge_slugs — those six are re-asserted to their freshly-computed values immediately after this filter runs, because the license server relies on them for tier upgrade/downgrade detection and environment fingerprinting. Any other key can be removed or changed freely; adding a new key has no effect, because the license server only records the fields it already knows about.
⚠ A callback that returns anything other than an array is discarded entirely — the unfiltered payload is sent as-is, rather than risking a malformed or empty body reaching the license server.
Code
<?php
add_filter( 'benecaster_telemetry_payload', function ( array $payload ): array {
// Does not error, but has no effect either — the license server
// only records fields it already knows about, so an unrecognized
// key like this one is simply dropped on arrival.
$payload['my_addon_active_workflows'] = my_addon_count_active_workflows();
// This is the case the filter is actually useful for: removing a
// non-enforcement key you don't want sent.
unset( $payload['telemetry']['web_player_plays'] );
// NOT safe — this line has no effect. subscriber_count is restored
// to its real value right after this filter returns.
$payload['subscriber_count'] = 0;
return $payload;
} );
Hooks Used
Need this built rather than just documented? See our services →