'is-not-working', 'text' => __('Does not display the related products in product page.', 'wt-woocommerce-related-products'), 'type' => 'custom_msg', 'placeholder' => __('Please mention the name of the theme', 'wt-woocommerce-related-products') ), array( 'id' => 'could-not-understand', 'text' => __('Couldn\'t understand how to configure', 'wt-woocommerce-related-products'), 'type' => 'doc_link', 'placeholder' => __('Would you like us to assist you?', 'wt-woocommerce-related-products') ), array( 'id' => 'looking-for-other', 'text' => __('Lack of customization options', 'wt-woocommerce-related-products'), 'type' => 'textarea', 'placeholder' => __('Tell us about what you are looking for','wt-woocommerce-related-products') ), array( 'id' => 'did-not-work-as-expected', 'text' => __('The plugin didn\'t work as expected', 'wt-woocommerce-related-products'), 'type' => 'textarea', 'placeholder' => __('Please share your expected workflow', 'wt-woocommerce-related-products') ), array( 'id' => 'temporary-deactivation', 'text' => __( 'Temporary deactivation for debugging', 'wt-woocommerce-related-products' ), ), array( 'id' => 'found-better-plugin', 'text' => __('Found a better plugin', 'wt-woocommerce-related-products'), 'type' => 'text', 'placeholder' => __('Please mention the name of the plugin', 'wt-woocommerce-related-products') ), array( 'id' => 'not-have-that-feature', 'text' => __('Suggest a missing feature', 'wt-woocommerce-related-products'), 'type' => 'textarea', 'placeholder' => __('We are listening. Please share your suggestion.', 'wt-woocommerce-related-products') ), array( 'id' => 'other', 'text' => __('Other', 'wt-woocommerce-related-products'), 'type' => 'textarea', 'placeholder' => __('Could you tell us a bit more?', 'wt-woocommerce-related-products') ), ); return $reasons; } public function deactivate_scripts() { global $pagenow; if ('plugins.php' != $pagenow) { return; } $reasons = $this->get_uninstall_reasons(); ?>

sanitize_text_field($_POST['reason_id']), 'plugin' => "relatedproducts", 'auth' => 'relatedproducts_uninstall_1234#', 'date' => gmdate("M d, Y h:i:s A"), 'url' => '', 'user_email' => '', 'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '', 'software' => $_SERVER['SERVER_SOFTWARE'], 'php_version' => phpversion(), 'mysql_version' => $wpdb->db_version(), 'wp_version' => get_bloginfo('version'), 'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION, 'locale' => get_locale(), 'languages' => implode( ",", get_available_languages() ), 'theme' => wp_get_theme()->get('Name'), 'multisite' => is_multisite() ? 'Yes' : 'No', 'relatedproducts_version' => WT_RELATED_PRODUCTS_VERSION, ); // Write an action/hook here in webtoffe to recieve the data $resp = wp_remote_post('https://feedback.webtoffee.com/wp-json/relatedproducts/v1/uninstall', array( 'method' => 'POST', 'timeout' => 45, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => false, 'body' => $data, 'cookies' => array() ) ); wp_send_json_success(); } } new RelatedProducts_Uninstall_Feedback(); endif;