Fix missing result prop in `wcadmin_install_plugin_error` track (#37466)

* Fix missing result prop in install_plugin_error track

* Add changelog
This commit is contained in:
Chi-Hsuan Huang 2023-03-30 09:51:44 +08:00 committed by GitHub
parent 51af048c28
commit be9f09f217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix missing result prop in wcadmin_install_plugin_error track

View File

@ -234,7 +234,7 @@ class PluginsHelper {
'api_version' => $api->version, 'api_version' => $api->version,
'api_download_link' => $api->download_link, 'api_download_link' => $api->download_link,
'upgrader_skin_message' => implode( ',', $upgrader->skin->get_upgrade_messages() ), 'upgrader_skin_message' => implode( ',', $upgrader->skin->get_upgrade_messages() ),
'result' => $result, 'result' => is_wp_error( $result ) ? $result->get_error_message() : 'null',
); );
wc_admin_record_tracks_event( 'install_plugin_error', $properties ); wc_admin_record_tracks_event( 'install_plugin_error', $properties );