PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | classes/Tracking/McpTrackingSubscriber.php +7 -1 2.3.0 → trunk View file →
@@ -55,9 +55,15 @@
55 55 * @param array $input_params Raw input params passed to execute().
56 56 * @return void
57 57 */
58 58 public function on_ability_executed( string $ability_id, string $ability_name, $result, float $start_time, array $input_params ): void {
59 - $this->mcp_tracking->track_ability_executed( $ability_id, $ability_name, $start_time );
59 + $is_preview = is_array( $result ) && in_array(
60 + $result['status'] ?? '',
61 + [ 'confirmation_required', 'insufficient_quota', 'invalid_api_key' ],
62 + true
63 + );
64 +
65 + $this->mcp_tracking->track_ability_executed( $ability_id, $ability_name, $start_time, $is_preview );
60 66
61 67 if ( 'imagify/optimize-media' === $ability_id && is_array( $result ) ) {
62 68 $this->mcp_tracking->track_media_optimized( $ability_id, $result, $start_time, $input_params );
63 69 }