← All changes
|
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
+15
-0
4.2.9
→
trunk
View file →
| @@ -700,8 +700,9 @@ | ||
| 700 | 700 | sprintf( Loader::$labels['uninstall']['disclosure']['version'], '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ), |
| 701 | 701 | sprintf( Loader::$labels['uninstall']['disclosure']['website'], '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ), |
| 702 | 702 | sprintf( Loader::$labels['uninstall']['disclosure']['usage'], '<strong>', '</strong>', '<code>', ( time() - $this->product->get_install_time() ), 's</code>' ), |
| 703 | 703 | sprintf( Loader::$labels['uninstall']['disclosure']['reason'], '<strong>', '</strong>', '<i>', '</i>' ), |
| 704 | + sprintf( Loader::$labels['uninstall']['disclosure']['diagnostics'], '<strong>', '</strong>' ), | |
| 704 | 705 | ], |
| 705 | 706 | ], |
| 706 | 707 | $disclosure_new_labels |
| 707 | 708 | ); |
| @@ -785,8 +786,22 @@ | ||
| 785 | 786 | $attributes['slug'] = $slug; |
| 786 | 787 | $attributes['version'] = $version; |
| 787 | 788 | $attributes['url'] = get_site_url(); |
| 788 | 789 | $attributes['active_time'] = ( time() - $this->product->get_install_time() ); |
| 790 | + | |
| 791 | + /** | |
| 792 | + * Piggyback the compact crash summary on the same request, regardless | |
| 793 | + * of the logging consent — disclosed in the survey data collection | |
| 794 | + * notice. Only crashes attributed to this product are ever stored. | |
| 795 | + */ | |
| 796 | + if ( class_exists( 'ThemeisleSDK\Modules\Crash_Reporter' ) ) { | |
| 797 | + $crashes = Crash_Reporter::get_uninstall_summary( $this->product ); | |
| 798 | + if ( ! empty( $crashes ) ) { | |
| 799 | + $attributes['crashes'] = wp_json_encode( $crashes ); | |
| 800 | + } | |
| 801 | + } | |
| 802 | + | |
| 803 | + $attributes = apply_filters( 'themeisle_sdk_uninstall_feedback_data', $attributes, $this->product ); | |
| 789 | 804 | |
| 790 | 805 | $response = wp_remote_post( |
| 791 | 806 | self::FEEDBACK_ENDPOINT, |
| 792 | 807 | array( |