Version Description
- Tested OK with 5.3.2
- Content Update.
Download this release
Release Info
Developer | webtoffee |
Plugin | Product Import Export for WooCommerce |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
includes/class-wf-prodimpexp-plugin-uninstall-feedback.php
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!class_exists('WT_ProdImpExp_Uninstall_Feedback')) :
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Uninstall feedback class
|
6 |
+
*/
|
7 |
+
class WT_ProdImpExp_Uninstall_Feedback {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
add_action('admin_footer', array($this, 'deactivate_scripts'));
|
11 |
+
add_action('wp_ajax_pipe_submit_uninstall_reason', array($this, "send_uninstall_reason"));
|
12 |
+
}
|
13 |
+
|
14 |
+
public function deactivate_scripts() {
|
15 |
+
|
16 |
+
global $pagenow;
|
17 |
+
if ('plugins.php' != $pagenow) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
$reasons = $this->get_uninstall_reasons();
|
21 |
+
?>
|
22 |
+
<div class="pipe-modal" id="pipe-pipe-modal">
|
23 |
+
<div class="pipe-modal-wrap">
|
24 |
+
<div class="pipe-modal-header">
|
25 |
+
<h3><?php _e('If you have a moment, please let us know why you are deactivating:', 'product-import-export-for-woo'); ?></h3>
|
26 |
+
</div>
|
27 |
+
<div class="pipe-modal-body">
|
28 |
+
<ul class="reasons">
|
29 |
+
<?php foreach ($reasons as $reason) { ?>
|
30 |
+
<li data-type="<?php echo esc_attr($reason['type']); ?>" data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
|
31 |
+
<label><input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> <?php echo $reason['text']; ?></label>
|
32 |
+
</li>
|
33 |
+
<?php } ?>
|
34 |
+
</ul>
|
35 |
+
</div>
|
36 |
+
<div class="pipe-modal-footer">
|
37 |
+
<a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'product-import-export-for-woo'); ?></a>
|
38 |
+
<button class="button-primary pipe-model-submit"><?php _e('Submit & Deactivate', 'product-import-export-for-woo'); ?></button>
|
39 |
+
<button class="button-secondary pipe-model-cancel"><?php _e('Cancel', 'product-import-export-for-woo'); ?></button>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<style type="text/css">
|
45 |
+
.pipe-modal {
|
46 |
+
position: fixed;
|
47 |
+
z-index: 99999;
|
48 |
+
top: 0;
|
49 |
+
right: 0;
|
50 |
+
bottom: 0;
|
51 |
+
left: 0;
|
52 |
+
background: rgba(0,0,0,0.5);
|
53 |
+
display: none;
|
54 |
+
}
|
55 |
+
.pipe-modal.modal-active {display: block;}
|
56 |
+
.pipe-modal-wrap {
|
57 |
+
width: 50%;
|
58 |
+
position: relative;
|
59 |
+
margin: 10% auto;
|
60 |
+
background: #fff;
|
61 |
+
}
|
62 |
+
.pipe-modal-header {
|
63 |
+
border-bottom: 1px solid #eee;
|
64 |
+
padding: 8px 20px;
|
65 |
+
}
|
66 |
+
.pipe-modal-header h3 {
|
67 |
+
line-height: 150%;
|
68 |
+
margin: 0;
|
69 |
+
}
|
70 |
+
.pipe-modal-body {padding: 5px 20px 20px 20px;}
|
71 |
+
.pipe-modal-body .input-text,.pipe-modal-body textarea {width:75%;}
|
72 |
+
.pipe-modal-body .reason-input {
|
73 |
+
margin-top: 5px;
|
74 |
+
margin-left: 20px;
|
75 |
+
}
|
76 |
+
.pipe-modal-footer {
|
77 |
+
border-top: 1px solid #eee;
|
78 |
+
padding: 12px 20px;
|
79 |
+
text-align: right;
|
80 |
+
}
|
81 |
+
.reviewlink{
|
82 |
+
padding:10px 0px 0px 35px !important;
|
83 |
+
font-size: 15px;
|
84 |
+
}
|
85 |
+
.review-and-deactivate{
|
86 |
+
padding:5px;
|
87 |
+
}
|
88 |
+
</style>
|
89 |
+
<script type="text/javascript">
|
90 |
+
(function ($) {
|
91 |
+
$(function () {
|
92 |
+
var modal = $('#pipe-pipe-modal');
|
93 |
+
var deactivateLink = '';
|
94 |
+
|
95 |
+
|
96 |
+
$('#the-list').on('click', 'a.pipe-deactivate-link', function (e) {
|
97 |
+
e.preventDefault();
|
98 |
+
modal.addClass('modal-active');
|
99 |
+
deactivateLink = $(this).attr('href');
|
100 |
+
modal.find('a.dont-bother-me').attr('href', deactivateLink).css('float', 'left');
|
101 |
+
});
|
102 |
+
|
103 |
+
$('#pipe-pipe-modal').on('click', 'a.review-and-deactivate', function (e) {
|
104 |
+
e.preventDefault();
|
105 |
+
window.open("https://wordpress.org/support/plugin/product-import-export-for-woo/reviews/#new-post");
|
106 |
+
window.location.href = deactivateLink;
|
107 |
+
});
|
108 |
+
modal.on('click', 'button.pipe-model-cancel', function (e) {
|
109 |
+
e.preventDefault();
|
110 |
+
modal.removeClass('modal-active');
|
111 |
+
});
|
112 |
+
modal.on('click', 'input[type="radio"]', function () {
|
113 |
+
var parent = $(this).parents('li:first');
|
114 |
+
modal.find('.reason-input').remove();
|
115 |
+
var inputType = parent.data('type'),
|
116 |
+
inputPlaceholder = parent.data('placeholder');
|
117 |
+
if ('reviewhtml' === inputType) {
|
118 |
+
var reasonInputHtml = '<div class="reviewlink"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'product-import-export-for-woo'); ?> <span class="xa-pipe-rating-link"> ★★★★★ </span></a></div>';
|
119 |
+
} else {
|
120 |
+
var reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
|
121 |
+
}
|
122 |
+
if (inputType !== '') {
|
123 |
+
parent.append($(reasonInputHtml));
|
124 |
+
parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
125 |
+
}
|
126 |
+
});
|
127 |
+
|
128 |
+
modal.on('click', 'button.pipe-model-submit', function (e) {
|
129 |
+
e.preventDefault();
|
130 |
+
var button = $(this);
|
131 |
+
if (button.hasClass('disabled')) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
var $radio = $('input[type="radio"]:checked', modal);
|
135 |
+
var $selected_reason = $radio.parents('li:first'),
|
136 |
+
$input = $selected_reason.find('textarea, input[type="text"]');
|
137 |
+
|
138 |
+
$.ajax({
|
139 |
+
url: ajaxurl,
|
140 |
+
type: 'POST',
|
141 |
+
data: {
|
142 |
+
action: 'pipe_submit_uninstall_reason',
|
143 |
+
reason_id: (0 === $radio.length) ? 'none' : $radio.val(),
|
144 |
+
reason_info: (0 !== $input.length) ? $input.val().trim() : ''
|
145 |
+
},
|
146 |
+
beforeSend: function () {
|
147 |
+
button.addClass('disabled');
|
148 |
+
button.text('Processing...');
|
149 |
+
},
|
150 |
+
complete: function () {
|
151 |
+
window.location.href = deactivateLink;
|
152 |
+
}
|
153 |
+
});
|
154 |
+
});
|
155 |
+
});
|
156 |
+
}(jQuery));
|
157 |
+
</script>
|
158 |
+
<?php
|
159 |
+
}
|
160 |
+
|
161 |
+
public function send_uninstall_reason() {
|
162 |
+
|
163 |
+
global $wpdb;
|
164 |
+
|
165 |
+
if (!isset($_POST['reason_id'])) {
|
166 |
+
wp_send_json_error();
|
167 |
+
}
|
168 |
+
|
169 |
+
|
170 |
+
|
171 |
+
$data = array(
|
172 |
+
'reason_id' => sanitize_text_field($_POST['reason_id']),
|
173 |
+
'plugin' => "wfpipe",
|
174 |
+
'auth' => 'wfpipe_uninstall_1234#',
|
175 |
+
'date' => gmdate("M d, Y h:i:s A"),
|
176 |
+
'url' => '',
|
177 |
+
'user_email' => '',
|
178 |
+
'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',
|
179 |
+
'software' => $_SERVER['SERVER_SOFTWARE'],
|
180 |
+
'php_version' => phpversion(),
|
181 |
+
'mysql_version' => $wpdb->db_version(),
|
182 |
+
'wp_version' => get_bloginfo('version'),
|
183 |
+
'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
|
184 |
+
'locale' => get_locale(),
|
185 |
+
'multisite' => is_multisite() ? 'Yes' : 'No',
|
186 |
+
'wfpipe_version' => WF_PIPE_CURRENT_VERSION
|
187 |
+
);
|
188 |
+
// Write an action/hook here in webtoffe to recieve the data
|
189 |
+
$resp = wp_remote_post('https://feedback.webtoffee.com/wp-json/wfpipe/v1/uninstall', array(
|
190 |
+
'method' => 'POST',
|
191 |
+
'timeout' => 45,
|
192 |
+
'redirection' => 5,
|
193 |
+
'httpversion' => '1.0',
|
194 |
+
'blocking' => false,
|
195 |
+
'body' => $data,
|
196 |
+
'cookies' => array()
|
197 |
+
)
|
198 |
+
);
|
199 |
+
wp_send_json_success($resp);
|
200 |
+
}
|
201 |
+
|
202 |
+
private function get_uninstall_reasons() {
|
203 |
+
|
204 |
+
$reasons = array(
|
205 |
+
array(
|
206 |
+
'id' => 'used-it',
|
207 |
+
'text' => __('Used it successfully. Don\'t need anymore.', 'product-import-export-for-woo'),
|
208 |
+
'type' => 'reviewhtml',
|
209 |
+
'placeholder' => __('Have used it successfully and aint in need of it anymore', 'product-import-export-for-woo')
|
210 |
+
),
|
211 |
+
array(
|
212 |
+
'id' => 'could-not-understand',
|
213 |
+
'text' => __('I couldn\'t understand how to make it work', 'product-import-export-for-woo'),
|
214 |
+
'type' => 'textarea',
|
215 |
+
'placeholder' => __('Would you like us to assist you?', 'product-import-export-for-woo')
|
216 |
+
),
|
217 |
+
array(
|
218 |
+
'id' => 'found-better-plugin',
|
219 |
+
'text' => __('I found a better plugin', 'product-import-export-for-woo'),
|
220 |
+
'type' => 'text',
|
221 |
+
'placeholder' => __('Which plugin?', 'product-import-export-for-woo')
|
222 |
+
),
|
223 |
+
array(
|
224 |
+
'id' => 'not-have-that-feature',
|
225 |
+
'text' => __('The plugin is great, but I need specific feature that you don\'t support', 'product-import-export-for-woo'),
|
226 |
+
'type' => 'textarea',
|
227 |
+
'placeholder' => __('Could you tell us more about that feature?', 'product-import-export-for-woo')
|
228 |
+
),
|
229 |
+
array(
|
230 |
+
'id' => 'is-not-working',
|
231 |
+
'text' => __('The plugin is not working', 'product-import-export-for-woo'),
|
232 |
+
'type' => 'textarea',
|
233 |
+
'placeholder' => __('Could you tell us a bit more whats not working?', 'product-import-export-for-woo')
|
234 |
+
),
|
235 |
+
array(
|
236 |
+
'id' => 'looking-for-other',
|
237 |
+
'text' => __('It\'s not what I was looking for', 'product-import-export-for-woo'),
|
238 |
+
'type' => 'textarea',
|
239 |
+
'placeholder' => __('Could you tell us a bit more?', 'product-import-export-for-woo')
|
240 |
+
),
|
241 |
+
array(
|
242 |
+
'id' => 'did-not-work-as-expected',
|
243 |
+
'text' => __('The plugin didn\'t work as expected', 'product-import-export-for-woo'),
|
244 |
+
'type' => 'textarea',
|
245 |
+
'placeholder' => __('What did you expect?', 'product-import-export-for-woo')
|
246 |
+
),
|
247 |
+
array(
|
248 |
+
'id' => 'other',
|
249 |
+
'text' => __('Other', 'product-import-export-for-woo'),
|
250 |
+
'type' => 'textarea',
|
251 |
+
'placeholder' => __('Could you tell us a bit more?', 'product-import-export-for-woo')
|
252 |
+
),
|
253 |
+
);
|
254 |
+
|
255 |
+
return $reasons;
|
256 |
+
}
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
new WT_ProdImpExp_Uninstall_Feedback();
|
261 |
+
|
262 |
+
endif;
|
263 |
+
|
product-import-export-for-woo.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Import and Export Products From and To your WooCommerce Store.
|
6 |
Author: WebToffee
|
7 |
Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
|
8 |
-
Version: 1.7.
|
9 |
WC tested up to: 3.8.1
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -18,7 +18,7 @@ if (!defined('ABSPATH') || !is_admin()) {
|
|
18 |
|
19 |
|
20 |
if (!defined('WF_PIPE_CURRENT_VERSION')) {
|
21 |
-
define("WF_PIPE_CURRENT_VERSION", "1.7.
|
22 |
}
|
23 |
if (!defined('WF_PROD_IMP_EXP_ID')) {
|
24 |
define("WF_PROD_IMP_EXP_ID", "wf_prod_imp_exp");
|
@@ -56,10 +56,6 @@ if (!defined('WF_WOOCOMMERCE_CSV_IM_EX')) {
|
|
56 |
add_action('init', array($this, 'catch_export_request'), 20);
|
57 |
add_action('admin_init', array($this, 'register_importers'));
|
58 |
|
59 |
-
add_action('admin_footer', array($this, 'deactivate_scripts'));
|
60 |
-
add_action('wp_ajax_pipe_submit_uninstall_reason', array($this, "send_uninstall_reason"));
|
61 |
-
|
62 |
-
|
63 |
add_filter('admin_footer_text', array($this, 'WT_admin_footer_text'), 100);
|
64 |
add_action('wp_ajax_pipe_wt_review_plugin', array($this, "review_plugin"));
|
65 |
|
@@ -76,6 +72,9 @@ if (!defined('WF_WOOCOMMERCE_CSV_IM_EX')) {
|
|
76 |
if (defined('DOING_AJAX')) {
|
77 |
include_once( 'includes/class-wf-prodimpexpcsv-ajax-handler.php' );
|
78 |
}
|
|
|
|
|
|
|
79 |
}
|
80 |
|
81 |
public function wf_plugin_action_links($links) {
|
@@ -149,250 +148,6 @@ if (!defined('WF_WOOCOMMERCE_CSV_IM_EX')) {
|
|
149 |
return $user_ok;
|
150 |
}
|
151 |
|
152 |
-
private function get_uninstall_reasons() {
|
153 |
-
|
154 |
-
$reasons = array(
|
155 |
-
array(
|
156 |
-
'id' => 'used-it',
|
157 |
-
'text' => __('Used it successfully. Don\'t need anymore.', 'product-import-export-for-woo'),
|
158 |
-
'type' => 'reviewhtml',
|
159 |
-
'placeholder' => __('Have used it successfully and aint in need of it anymore', 'product-import-export-for-woo')
|
160 |
-
),
|
161 |
-
array(
|
162 |
-
'id' => 'could-not-understand',
|
163 |
-
'text' => __('I couldn\'t understand how to make it work', 'product-import-export-for-woo'),
|
164 |
-
'type' => 'textarea',
|
165 |
-
'placeholder' => __('Would you like us to assist you?', 'product-import-export-for-woo')
|
166 |
-
),
|
167 |
-
array(
|
168 |
-
'id' => 'found-better-plugin',
|
169 |
-
'text' => __('I found a better plugin', 'product-import-export-for-woo'),
|
170 |
-
'type' => 'text',
|
171 |
-
'placeholder' => __('Which plugin?', 'product-import-export-for-woo')
|
172 |
-
),
|
173 |
-
array(
|
174 |
-
'id' => 'not-have-that-feature',
|
175 |
-
'text' => __('The plugin is great, but I need specific feature that you don\'t support', 'product-import-export-for-woo'),
|
176 |
-
'type' => 'textarea',
|
177 |
-
'placeholder' => __('Could you tell us more about that feature?', 'product-import-export-for-woo')
|
178 |
-
),
|
179 |
-
array(
|
180 |
-
'id' => 'is-not-working',
|
181 |
-
'text' => __('The plugin is not working', 'product-import-export-for-woo'),
|
182 |
-
'type' => 'textarea',
|
183 |
-
'placeholder' => __('Could you tell us a bit more whats not working?', 'product-import-export-for-woo')
|
184 |
-
),
|
185 |
-
array(
|
186 |
-
'id' => 'looking-for-other',
|
187 |
-
'text' => __('It\'s not what I was looking for', 'product-import-export-for-woo'),
|
188 |
-
'type' => 'textarea',
|
189 |
-
'placeholder' => __('Could you tell us a bit more?', 'product-import-export-for-woo')
|
190 |
-
),
|
191 |
-
array(
|
192 |
-
'id' => 'did-not-work-as-expected',
|
193 |
-
'text' => __('The plugin didn\'t work as expected', 'product-import-export-for-woo'),
|
194 |
-
'type' => 'textarea',
|
195 |
-
'placeholder' => __('What did you expect?', 'product-import-export-for-woo')
|
196 |
-
),
|
197 |
-
array(
|
198 |
-
'id' => 'other',
|
199 |
-
'text' => __('Other', 'product-import-export-for-woo'),
|
200 |
-
'type' => 'textarea',
|
201 |
-
'placeholder' => __('Could you tell us a bit more?', 'product-import-export-for-woo')
|
202 |
-
),
|
203 |
-
);
|
204 |
-
|
205 |
-
return $reasons;
|
206 |
-
}
|
207 |
-
|
208 |
-
public function deactivate_scripts() {
|
209 |
-
|
210 |
-
global $pagenow;
|
211 |
-
if ('plugins.php' != $pagenow) {
|
212 |
-
return;
|
213 |
-
}
|
214 |
-
$reasons = $this->get_uninstall_reasons();
|
215 |
-
?>
|
216 |
-
<div class="pipe-modal" id="pipe-pipe-modal">
|
217 |
-
<div class="pipe-modal-wrap">
|
218 |
-
<div class="pipe-modal-header">
|
219 |
-
<h3><?php _e('If you have a moment, please let us know why you are deactivating:', 'product-import-export-for-woo'); ?></h3>
|
220 |
-
</div>
|
221 |
-
<div class="pipe-modal-body">
|
222 |
-
<ul class="reasons">
|
223 |
-
<?php foreach ($reasons as $reason) { ?>
|
224 |
-
<li data-type="<?php echo esc_attr($reason['type']); ?>" data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
|
225 |
-
<label><input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> <?php echo $reason['text']; ?></label>
|
226 |
-
</li>
|
227 |
-
<?php } ?>
|
228 |
-
</ul>
|
229 |
-
</div>
|
230 |
-
<div class="pipe-modal-footer">
|
231 |
-
<a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'product-import-export-for-woo'); ?></a>
|
232 |
-
<button class="button-primary pipe-model-submit"><?php _e('Submit & Deactivate', 'product-import-export-for-woo'); ?></button>
|
233 |
-
<button class="button-secondary pipe-model-cancel"><?php _e('Cancel', 'product-import-export-for-woo'); ?></button>
|
234 |
-
</div>
|
235 |
-
</div>
|
236 |
-
</div>
|
237 |
-
|
238 |
-
<style type="text/css">
|
239 |
-
.pipe-modal {
|
240 |
-
position: fixed;
|
241 |
-
z-index: 99999;
|
242 |
-
top: 0;
|
243 |
-
right: 0;
|
244 |
-
bottom: 0;
|
245 |
-
left: 0;
|
246 |
-
background: rgba(0,0,0,0.5);
|
247 |
-
display: none;
|
248 |
-
}
|
249 |
-
.pipe-modal.modal-active {display: block;}
|
250 |
-
.pipe-modal-wrap {
|
251 |
-
width: 50%;
|
252 |
-
position: relative;
|
253 |
-
margin: 10% auto;
|
254 |
-
background: #fff;
|
255 |
-
}
|
256 |
-
.pipe-modal-header {
|
257 |
-
border-bottom: 1px solid #eee;
|
258 |
-
padding: 8px 20px;
|
259 |
-
}
|
260 |
-
.pipe-modal-header h3 {
|
261 |
-
line-height: 150%;
|
262 |
-
margin: 0;
|
263 |
-
}
|
264 |
-
.pipe-modal-body {padding: 5px 20px 20px 20px;}
|
265 |
-
.pipe-modal-body .input-text,.pipe-modal-body textarea {width:75%;}
|
266 |
-
.pipe-modal-body .reason-input {
|
267 |
-
margin-top: 5px;
|
268 |
-
margin-left: 20px;
|
269 |
-
}
|
270 |
-
.pipe-modal-footer {
|
271 |
-
border-top: 1px solid #eee;
|
272 |
-
padding: 12px 20px;
|
273 |
-
text-align: right;
|
274 |
-
}
|
275 |
-
.reviewlink{
|
276 |
-
padding:10px 0px 0px 35px !important;
|
277 |
-
font-size: 15px;
|
278 |
-
}
|
279 |
-
.review-and-deactivate{
|
280 |
-
padding:5px;
|
281 |
-
}
|
282 |
-
</style>
|
283 |
-
<script type="text/javascript">
|
284 |
-
(function ($) {
|
285 |
-
$(function () {
|
286 |
-
var modal = $('#pipe-pipe-modal');
|
287 |
-
var deactivateLink = '';
|
288 |
-
|
289 |
-
|
290 |
-
$('#the-list').on('click', 'a.pipe-deactivate-link', function (e) {
|
291 |
-
e.preventDefault();
|
292 |
-
modal.addClass('modal-active');
|
293 |
-
deactivateLink = $(this).attr('href');
|
294 |
-
modal.find('a.dont-bother-me').attr('href', deactivateLink).css('float', 'left');
|
295 |
-
});
|
296 |
-
|
297 |
-
$('#pipe-pipe-modal').on('click', 'a.review-and-deactivate', function (e) {
|
298 |
-
e.preventDefault();
|
299 |
-
window.open("https://wordpress.org/support/plugin/product-import-export-for-woo/reviews/#new-post");
|
300 |
-
window.location.href = deactivateLink;
|
301 |
-
});
|
302 |
-
modal.on('click', 'button.pipe-model-cancel', function (e) {
|
303 |
-
e.preventDefault();
|
304 |
-
modal.removeClass('modal-active');
|
305 |
-
});
|
306 |
-
modal.on('click', 'input[type="radio"]', function () {
|
307 |
-
var parent = $(this).parents('li:first');
|
308 |
-
modal.find('.reason-input').remove();
|
309 |
-
var inputType = parent.data('type'),
|
310 |
-
inputPlaceholder = parent.data('placeholder');
|
311 |
-
if ('reviewhtml' === inputType) {
|
312 |
-
var reasonInputHtml = '<div class="reviewlink"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'product-import-export-for-woo'); ?> <span class="xa-pipe-rating-link"> ★★★★★ </span></a></div>';
|
313 |
-
} else {
|
314 |
-
var reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
|
315 |
-
}
|
316 |
-
if (inputType !== '') {
|
317 |
-
parent.append($(reasonInputHtml));
|
318 |
-
parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
|
319 |
-
}
|
320 |
-
});
|
321 |
-
|
322 |
-
modal.on('click', 'button.pipe-model-submit', function (e) {
|
323 |
-
e.preventDefault();
|
324 |
-
var button = $(this);
|
325 |
-
if (button.hasClass('disabled')) {
|
326 |
-
return;
|
327 |
-
}
|
328 |
-
var $radio = $('input[type="radio"]:checked', modal);
|
329 |
-
var $selected_reason = $radio.parents('li:first'),
|
330 |
-
$input = $selected_reason.find('textarea, input[type="text"]');
|
331 |
-
|
332 |
-
$.ajax({
|
333 |
-
url: ajaxurl,
|
334 |
-
type: 'POST',
|
335 |
-
data: {
|
336 |
-
action: 'pipe_submit_uninstall_reason',
|
337 |
-
reason_id: (0 === $radio.length) ? 'none' : $radio.val(),
|
338 |
-
reason_info: (0 !== $input.length) ? $input.val().trim() : ''
|
339 |
-
},
|
340 |
-
beforeSend: function () {
|
341 |
-
button.addClass('disabled');
|
342 |
-
button.text('Processing...');
|
343 |
-
},
|
344 |
-
complete: function () {
|
345 |
-
window.location.href = deactivateLink;
|
346 |
-
}
|
347 |
-
});
|
348 |
-
});
|
349 |
-
});
|
350 |
-
}(jQuery));
|
351 |
-
</script>
|
352 |
-
<?php
|
353 |
-
}
|
354 |
-
|
355 |
-
public function send_uninstall_reason() {
|
356 |
-
|
357 |
-
global $wpdb;
|
358 |
-
|
359 |
-
if (!isset($_POST['reason_id'])) {
|
360 |
-
wp_send_json_error();
|
361 |
-
}
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
$data = array(
|
366 |
-
'reason_id' => sanitize_text_field($_POST['reason_id']),
|
367 |
-
'plugin' => "productimportexort",
|
368 |
-
'auth' => 'wfpipe_uninstall_1234#',
|
369 |
-
'date' => gmdate("M d, Y h:i:s A"),
|
370 |
-
'url' => '',
|
371 |
-
'user_email' => '',
|
372 |
-
'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',
|
373 |
-
'software' => $_SERVER['SERVER_SOFTWARE'],
|
374 |
-
'php_version' => phpversion(),
|
375 |
-
'mysql_version' => $wpdb->db_version(),
|
376 |
-
'wp_version' => get_bloginfo('version'),
|
377 |
-
'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
|
378 |
-
'locale' => get_locale(),
|
379 |
-
'multisite' => is_multisite() ? 'Yes' : 'No',
|
380 |
-
'wfpipe_version' => WF_PIPE_CURRENT_VERSION
|
381 |
-
);
|
382 |
-
// Write an action/hook here in webtoffe to recieve the data
|
383 |
-
$resp = wp_remote_post('http://feedback.webtoffee.com/wp-json/wfpipe/v1/uninstall', array(
|
384 |
-
'method' => 'POST',
|
385 |
-
'timeout' => 45,
|
386 |
-
'redirection' => 5,
|
387 |
-
'httpversion' => '1.0',
|
388 |
-
'blocking' => false,
|
389 |
-
'body' => $data,
|
390 |
-
'cookies' => array()
|
391 |
-
)
|
392 |
-
);
|
393 |
-
wp_send_json_success($resp);
|
394 |
-
}
|
395 |
-
|
396 |
function webtoffee_storefrog_admin_notices() {
|
397 |
if (apply_filters('webtoffee_storefrog_suppress_admin_notices', false)) {
|
398 |
return;
|
5 |
Description: Import and Export Products From and To your WooCommerce Store.
|
6 |
Author: WebToffee
|
7 |
Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
|
8 |
+
Version: 1.7.2
|
9 |
WC tested up to: 3.8.1
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
18 |
|
19 |
|
20 |
if (!defined('WF_PIPE_CURRENT_VERSION')) {
|
21 |
+
define("WF_PIPE_CURRENT_VERSION", "1.7.2");
|
22 |
}
|
23 |
if (!defined('WF_PROD_IMP_EXP_ID')) {
|
24 |
define("WF_PROD_IMP_EXP_ID", "wf_prod_imp_exp");
|
56 |
add_action('init', array($this, 'catch_export_request'), 20);
|
57 |
add_action('admin_init', array($this, 'register_importers'));
|
58 |
|
|
|
|
|
|
|
|
|
59 |
add_filter('admin_footer_text', array($this, 'WT_admin_footer_text'), 100);
|
60 |
add_action('wp_ajax_pipe_wt_review_plugin', array($this, "review_plugin"));
|
61 |
|
72 |
if (defined('DOING_AJAX')) {
|
73 |
include_once( 'includes/class-wf-prodimpexpcsv-ajax-handler.php' );
|
74 |
}
|
75 |
+
|
76 |
+
// uninstall feedback catch
|
77 |
+
include_once 'includes/class-wf-prodimpexp-plugin-uninstall-feedback.php';
|
78 |
}
|
79 |
|
80 |
public function wf_plugin_action_links($links) {
|
148 |
return $user_ok;
|
149 |
}
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
function webtoffee_storefrog_admin_notices() {
|
152 |
if (apply_filters('webtoffee_storefrog_suppress_admin_notices', false)) {
|
153 |
return;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: webtoffee
|
|
3 |
Donate link: https://www.webtoffee.com/plugins/
|
4 |
Tags: woocommerce product import, woocommerce import products, woocommerce export products, export woocommerce products, import products into woocommerce ,product, export, import, woocommerce ,csv
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 5.3
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,10 @@ By default, admin and store manager are given access to export orders from your
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
156 |
= 1.7.1 =
|
157 |
* Tested OK with WC 3.8.1 and WP 5.3
|
158 |
* provision to export for Super Admin user.
|
3 |
Donate link: https://www.webtoffee.com/plugins/
|
4 |
Tags: woocommerce product import, woocommerce import products, woocommerce export products, export woocommerce products, import products into woocommerce ,product, export, import, woocommerce ,csv
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.7.2
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 1.7.2 =
|
157 |
+
* Tested OK with 5.3.2
|
158 |
+
* Content Update.
|
159 |
+
|
160 |
= 1.7.1 =
|
161 |
* Tested OK with WC 3.8.1 and WP 5.3
|
162 |
* provision to export for Super Admin user.
|