Version Description
Release Date - 26 June 2018
- Added an option to redirect directly to the checkout page when product(s) added to cart from a wishlist
- Added is_wishlist() conditional function that returns true on a wishlist page
- Added hooks for different events:
-
tinvwl_wishlist_created
- triggering when a wishlist created -
tinvwl_product_added
- triggering when product added to a wishlist -
tinvwl_product_removed
- triggering when product removed from a wishlist -
tinvwl_product_added_to_cart
- triggering when product added to cart from a wishlist -
tinvwl_product_purchased
- triggering when product purchased from a wishlist
-
Download this release
Release Info
Developer | templateinvaders |
Plugin | WooCommerce Wishlist Plugin |
Version | 1.7.4 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.4
- admin/settings/general.class.php +8 -0
- includes/product.helper.php +15 -5
- includes/wishlist.class.php +6 -0
- languages/ti-woocommerce-wishlist.pot +101 -97
- public/cart.class.php +372 -315
- public/wishlist/view.class.php +1 -1
- readme.txt +14 -1
- ti-woocommerce-wishlist.php +2 -2
- tinv-wishlists-function.php +12 -0
admin/settings/general.class.php
CHANGED
@@ -102,6 +102,12 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
102 |
'std' => true,
|
103 |
'extra' => array( 'tiwl-show' => '.tiwl-processing-autoremove-anyone' ),
|
104 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
array(
|
106 |
'type' => 'checkboxonoff',
|
107 |
'name' => 'processing_autoremove_anyone',
|
@@ -707,6 +713,7 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
707 |
$data['general']['page_wishlist'] = $data['page']['wishlist'];
|
708 |
$data['general']['processing_autoremove'] = $data['processing']['autoremove'];
|
709 |
$data['general']['processing_autoremove_anyone'] = $data['processing']['autoremove_anyone'];
|
|
|
710 |
|
711 |
return $data;
|
712 |
}
|
@@ -724,6 +731,7 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection {
|
|
724 |
tinv_update_option( 'page', 'wishlist', $data['general']['page_wishlist'] );
|
725 |
tinv_update_option( 'processing', 'autoremove', $data['general']['processing_autoremove'] );
|
726 |
tinv_update_option( 'processing', 'autoremove_anyone', $data['general']['processing_autoremove_anyone'] );
|
|
|
727 |
tinv_update_option( 'processing', 'autoremove_status', 'tinvwl-addcart' );
|
728 |
if ( filter_input( INPUT_POST, 'save_buttons-setting_reset' ) ) {
|
729 |
foreach ( $data as $key => $value ) {
|
102 |
'std' => true,
|
103 |
'extra' => array( 'tiwl-show' => '.tiwl-processing-autoremove-anyone' ),
|
104 |
),
|
105 |
+
array(
|
106 |
+
'type' => 'checkboxonoff',
|
107 |
+
'name' => 'processing_redirect_checkout',
|
108 |
+
'text' => __( 'Redirect to the checkout page from Wishlist if added to cart', 'ti-woocommerce-wishlist' ),
|
109 |
+
'std' => false,
|
110 |
+
),
|
111 |
array(
|
112 |
'type' => 'checkboxonoff',
|
113 |
'name' => 'processing_autoremove_anyone',
|
713 |
$data['general']['page_wishlist'] = $data['page']['wishlist'];
|
714 |
$data['general']['processing_autoremove'] = $data['processing']['autoremove'];
|
715 |
$data['general']['processing_autoremove_anyone'] = $data['processing']['autoremove_anyone'];
|
716 |
+
$data['general']['processing_redirect_checkout'] = $data['processing']['redirect_checkout'];
|
717 |
|
718 |
return $data;
|
719 |
}
|
731 |
tinv_update_option( 'page', 'wishlist', $data['general']['page_wishlist'] );
|
732 |
tinv_update_option( 'processing', 'autoremove', $data['general']['processing_autoremove'] );
|
733 |
tinv_update_option( 'processing', 'autoremove_anyone', $data['general']['processing_autoremove_anyone'] );
|
734 |
+
tinv_update_option( 'processing', 'redirect_checkout', $data['general']['processing_redirect_checkout'] );
|
735 |
tinv_update_option( 'processing', 'autoremove_status', 'tinvwl-addcart' );
|
736 |
if ( filter_input( INPUT_POST, 'save_buttons-setting_reset' ) ) {
|
737 |
foreach ( $data as $key => $value ) {
|
includes/product.helper.php
CHANGED
@@ -183,6 +183,12 @@ class TInvWL_Product {
|
|
183 |
if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
|
184 |
$id = $wpdb->insert_id;
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
return $id;
|
187 |
}
|
188 |
|
@@ -542,19 +548,23 @@ class TInvWL_Product {
|
|
542 |
*
|
543 |
* @global wpdb $wpdb
|
544 |
*
|
545 |
-
* @param
|
546 |
*
|
547 |
* @return boolean
|
548 |
*/
|
549 |
-
function remove( $
|
550 |
-
if ( empty( $
|
551 |
return false;
|
552 |
}
|
553 |
|
554 |
global $wpdb;
|
555 |
-
$result = false !== $wpdb->delete( $this->table, array( 'ID' => $
|
556 |
if ( $result ) {
|
557 |
-
|
|
|
|
|
|
|
|
|
558 |
}
|
559 |
|
560 |
return $result;
|
183 |
if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
|
184 |
$id = $wpdb->insert_id;
|
185 |
|
186 |
+
/* Run a 3rd party code when product added to a wishlist.
|
187 |
+
*
|
188 |
+
* @param array $data product data including author and wishlist IDs.
|
189 |
+
* */
|
190 |
+
do_action( 'tinvwl_product_added', $data );
|
191 |
+
|
192 |
return $id;
|
193 |
}
|
194 |
|
548 |
*
|
549 |
* @global wpdb $wpdb
|
550 |
*
|
551 |
+
* @param array $data Product data.
|
552 |
*
|
553 |
* @return boolean
|
554 |
*/
|
555 |
+
function remove( $data ) {
|
556 |
+
if ( ! isset( $data['ID'] ) || empty( $data['ID'] ) ) {
|
557 |
return false;
|
558 |
}
|
559 |
|
560 |
global $wpdb;
|
561 |
+
$result = false !== $wpdb->delete( $this->table, array( 'ID' => $data['ID'] ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
|
562 |
if ( $result ) {
|
563 |
+
/* Run a 3rd party code when product removed from a wishlist.
|
564 |
+
*
|
565 |
+
* @param array $data product data including author and wishlist IDs.
|
566 |
+
* */
|
567 |
+
do_action( 'tinvwl_product_removed', $data );
|
568 |
}
|
569 |
|
570 |
return $result;
|
includes/wishlist.class.php
CHANGED
@@ -195,6 +195,12 @@ class TInvWL_Wishlist {
|
|
195 |
if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
|
196 |
$data['ID'] = $wpdb->insert_id;
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
return $data;
|
199 |
}
|
200 |
|
195 |
if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
|
196 |
$data['ID'] = $wpdb->insert_id;
|
197 |
|
198 |
+
/* Run a 3rd party code when a new wishlist created.
|
199 |
+
*
|
200 |
+
* @param array $data A wishlist data.
|
201 |
+
* */
|
202 |
+
do_action( 'tinvwl_wishlist_created', $data );
|
203 |
+
|
204 |
return $data;
|
205 |
}
|
206 |
|
languages/ti-woocommerce-wishlist.pot
CHANGED
@@ -3,7 +3,7 @@ msgid ""
|
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: WooCommerce Wishlist Plugin\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"POT-Creation-Date: 2018-06-
|
7 |
"POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
|
8 |
"sommartid)\n"
|
9 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
@@ -40,15 +40,15 @@ msgstr ""
|
|
40 |
msgid "Template Custom CSS"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: admin/basestyle.helper.php:114 admin/settings/general.class.php:
|
44 |
msgid "Save Settings"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: admin/basestyle.helper.php:120 admin/settings/general.class.php:
|
48 |
msgid "Reset"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: admin/basestyle.helper.php:126 admin/settings/general.class.php:
|
52 |
msgid "Save"
|
53 |
msgstr ""
|
54 |
|
@@ -105,215 +105,219 @@ msgstr ""
|
|
105 |
msgid "Remove Product from Wishlist if added to cart"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: admin/settings/general.class.php:108
|
|
|
|
|
|
|
|
|
109 |
msgid "Remove by anyone"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin/settings/general.class.php:
|
113 |
msgid "Remove product from Wishlist on second click"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: admin/settings/general.class.php:
|
117 |
msgid "Show successful notice in popup"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: admin/settings/general.class.php:
|
121 |
msgid ""
|
122 |
"This option allows to show/hide a popup with successful or error notices "
|
123 |
"after addition or removing products from a Wishlist."
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: admin/settings/general.class.php:
|
127 |
msgid "\"View Wishlist\" button Text"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: admin/settings/general.class.php:
|
131 |
msgid "Redirect to Wishlist"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: admin/settings/general.class.php:
|
135 |
msgid ""
|
136 |
"If enabled, user will be redirected to wishlist page after 5 sec from adding "
|
137 |
"product to wishlist."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: admin/settings/general.class.php:
|
141 |
msgid "\"Product added to Wishlist\" Text"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: admin/settings/general.class.php:
|
145 |
msgid "\"Product already in Wishlist\" Text"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: admin/settings/general.class.php:
|
149 |
msgid ""
|
150 |
"This notification will be shown if user will try to add a product that is "
|
151 |
"already in the wishlist."
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: admin/settings/general.class.php:
|
155 |
msgid "\"Product removed from Wishlist\" Text"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: admin/settings/general.class.php:
|
159 |
msgid ""
|
160 |
"This notification will be shown once the product is removed from Wishlist on "
|
161 |
"a single or a catalog page."
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: admin/settings/general.class.php:
|
165 |
msgid "Wishlist Page Options"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: admin/settings/general.class.php:
|
169 |
msgid "Coming soon"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: admin/settings/general.class.php:
|
173 |
msgid "My Wishlist"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: admin/settings/general.class.php:
|
177 |
msgid "Wishlist Processing Options"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: admin/settings/general.class.php:
|
181 |
msgid "Automatic removal"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: admin/settings/general.class.php:
|
185 |
msgid "Remove condition"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: admin/settings/general.class.php:
|
189 |
msgid "Add to Cart"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: admin/settings/general.class.php:
|
193 |
msgid "Product page \"Add to Wishlist\" Button Settings"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: admin/settings/general.class.php:
|
197 |
#: views/wizard/step-button.php:32
|
198 |
msgid "Button position"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: admin/settings/general.class.php:
|
202 |
msgid ""
|
203 |
"Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on "
|
204 |
"product page, if you have chosen custom position for product button. You "
|
205 |
"will have to do this for each product."
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: admin/settings/general.class.php:
|
209 |
#: includes/wizard.class.php:407
|
210 |
msgid "After \"Add to Cart\" button"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: admin/settings/general.class.php:
|
214 |
#: includes/wizard.class.php:408
|
215 |
msgid "Before \"Add to Cart\" button"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: admin/settings/general.class.php:
|
219 |
#: includes/wizard.class.php:409
|
220 |
msgid "Custom position with code"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/settings/general.class.php:
|
224 |
msgid "Button type"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/settings/general.class.php:
|
228 |
msgid "Link"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: admin/settings/general.class.php:
|
232 |
#: includes/wizard.class.php:396
|
233 |
msgid "Button"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: admin/settings/general.class.php:
|
237 |
msgid "\"Add to Wishlist\" Icon"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: admin/settings/general.class.php:
|
241 |
msgid ""
|
242 |
"You can choose from our predefined icons or upload your custom icon. Custom "
|
243 |
"icon size is limited to 16x16 px."
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: admin/settings/general.class.php:
|
247 |
-
#: admin/settings/general.class.php:
|
248 |
msgid "None"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: admin/settings/general.class.php:
|
252 |
-
#: admin/settings/general.class.php:
|
253 |
msgid "Heart"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: admin/settings/general.class.php:
|
257 |
-
#: admin/settings/general.class.php:
|
258 |
msgid "Heart+"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: admin/settings/general.class.php:
|
262 |
-
#: admin/settings/general.class.php:
|
263 |
msgid "Custom"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: admin/settings/general.class.php:
|
267 |
-
#: admin/settings/general.class.php:
|
268 |
msgid "Upload"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: admin/settings/general.class.php:
|
272 |
msgid "\"Add to Wishlist\" Icon Color"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: admin/settings/general.class.php:
|
276 |
-
#: admin/settings/general.class.php:
|
277 |
msgid "Black"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: admin/settings/general.class.php:
|
281 |
-
#: admin/settings/general.class.php:
|
282 |
msgid "White"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: admin/settings/general.class.php:
|
286 |
msgid "Show button text"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: admin/settings/general.class.php:
|
290 |
msgid "\"Add to Wishlist\" button Text"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: admin/settings/general.class.php:
|
294 |
msgid "\"Remove from Wishlist\" Button Text"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: admin/settings/general.class.php:
|
298 |
msgid "Product listing Button Settings"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: admin/settings/general.class.php:
|
302 |
msgid ""
|
303 |
"These are separate settings for the \"Add to Wishlist\" button on a product "
|
304 |
"listing (Shop page, categories, etc.). You can also adjust button and text "
|
305 |
"colors, size, etc. in a <code>TI Wishlist > Style Options.</code>"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: admin/settings/general.class.php:
|
309 |
msgid "Show in Product Listing"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: admin/settings/general.class.php:
|
313 |
msgid "Above Thumbnail"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: admin/settings/general.class.php:
|
317 |
msgid ""
|
318 |
"Note: if \"Custom position with code\" option is applied, the \"Add to "
|
319 |
"Wishlist\" button should be added into template using <code>do_shortcode()</"
|
@@ -321,79 +325,79 @@ msgid ""
|
|
321 |
"><code>do_shortcode(\"[ti_wishlists_addtowishlist loop=yes]\")</code>"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: admin/settings/general.class.php:
|
325 |
msgid "\"Add to Wishlist\" Text"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: admin/settings/general.class.php:
|
329 |
msgid "Wishlist Product Settings"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: admin/settings/general.class.php:
|
333 |
msgid ""
|
334 |
"Following options allows you to choose what information/functionality to "
|
335 |
"show/enable in wishlist table on wishlist page."
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: admin/settings/general.class.php:
|
339 |
msgid "Show \"Add to Cart\" button"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: admin/settings/general.class.php:
|
343 |
msgid "\"Add to Cart\" Text"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: admin/settings/general.class.php:
|
347 |
msgid "Show Unit price"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: admin/settings/general.class.php:
|
351 |
msgid "Show Stock status"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: admin/settings/general.class.php:
|
355 |
msgid "Show Date of addition"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: admin/settings/general.class.php:
|
359 |
msgid "Wishlist Table Settings"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: admin/settings/general.class.php:
|
363 |
msgid ""
|
364 |
"Following options will help user to manage and add products to cart from "
|
365 |
"wishlist table in bulk."
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: admin/settings/general.class.php:
|
369 |
msgid "Show Checkboxes"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: admin/settings/general.class.php:
|
373 |
msgid "Show Actions button"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: admin/settings/general.class.php:
|
377 |
msgid "Bulk actions drop down at the bottom of wishlist table"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: admin/settings/general.class.php:
|
381 |
msgid "Show \"Add Selected to Cart\" button"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: admin/settings/general.class.php:
|
385 |
msgid "\"Add Selected to Cart\" Button Text"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: admin/settings/general.class.php:
|
389 |
msgid "Show \"Add All to Cart\" button"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: admin/settings/general.class.php:
|
393 |
msgid "\"Add All to Cart\" Button Text"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: admin/settings/general.class.php:
|
397 |
msgid ""
|
398 |
"Following options enable/disable Social share icons below wishlist table on "
|
399 |
"wishlist page. Wishlist owner can easily share their wishlists using this "
|
@@ -401,47 +405,47 @@ msgid ""
|
|
401 |
"shared status, private wishlists can't be shared."
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: admin/settings/general.class.php:
|
405 |
msgid "Social Networks Sharing Options"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: admin/settings/general.class.php:
|
409 |
msgid "Show \"Facebook\" Button"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: admin/settings/general.class.php:
|
413 |
msgid "Show \"Twitter\" Button"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: admin/settings/general.class.php:
|
417 |
msgid "Show \"Pinterest\" Button"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: admin/settings/general.class.php:
|
421 |
msgid "Show \"Google+\" Button"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: admin/settings/general.class.php:
|
425 |
msgid "Show \"Share by Email\" Button"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: admin/settings/general.class.php:
|
429 |
msgid "\"Share on\" Text"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: admin/settings/general.class.php:
|
433 |
msgid "Social Icons Color"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: admin/settings/general.class.php:
|
437 |
msgid "Dark"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: admin/settings/general.class.php:
|
441 |
msgid "Wishlist Products Counter"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: admin/settings/general.class.php:
|
445 |
#, php-format
|
446 |
msgid ""
|
447 |
"Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into "
|
@@ -450,23 +454,23 @@ msgid ""
|
|
450 |
"\">Appearance -> Widgets</a> section."
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: admin/settings/general.class.php:
|
454 |
msgid "\"Wishlist\" Icon"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: admin/settings/general.class.php:
|
458 |
msgid "\"Wishlist\" Icon Color"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: admin/settings/general.class.php:
|
462 |
msgid "Show counter text"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: admin/settings/general.class.php:
|
466 |
msgid "Counter Text"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: admin/settings/general.class.php:
|
470 |
msgid "Wishlist - "
|
471 |
msgstr ""
|
472 |
|
@@ -1131,7 +1135,7 @@ msgstr ""
|
|
1131 |
msgid "Remove"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: public/wishlist/buttons.class.php:437 public/wishlist/view.class.php:
|
1135 |
#, php-format
|
1136 |
msgid "“%s”"
|
1137 |
msgstr ""
|
@@ -1143,25 +1147,25 @@ msgid_plural "%s have been successfully removed from wishlist."
|
|
1143 |
msgstr[0] ""
|
1144 |
msgstr[1] ""
|
1145 |
|
1146 |
-
#: public/wishlist/view.class.php:
|
1147 |
#, php-format
|
1148 |
msgid "%s has been removed from wishlist."
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: public/wishlist/view.class.php:
|
1152 |
#, php-format
|
1153 |
msgid "%s has not been removed from wishlist."
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: public/wishlist/view.class.php:
|
1157 |
msgid "Return to Wishlist"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
-
#: public/wishlist/view.class.php:
|
1161 |
msgid "Previous Page"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
-
#: public/wishlist/view.class.php:
|
1165 |
msgid "Next Page"
|
1166 |
msgstr ""
|
1167 |
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: WooCommerce Wishlist Plugin\n"
|
5 |
"Report-Msgid-Bugs-To: \n"
|
6 |
+
"POT-Creation-Date: 2018-06-27 00:30+0700\n"
|
7 |
"POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
|
8 |
"sommartid)\n"
|
9 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
40 |
msgid "Template Custom CSS"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: admin/basestyle.helper.php:114 admin/settings/general.class.php:685
|
44 |
msgid "Save Settings"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: admin/basestyle.helper.php:120 admin/settings/general.class.php:691
|
48 |
msgid "Reset"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/basestyle.helper.php:126 admin/settings/general.class.php:697
|
52 |
msgid "Save"
|
53 |
msgstr ""
|
54 |
|
105 |
msgid "Remove Product from Wishlist if added to cart"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: admin/settings/general.class.php:108
|
109 |
+
msgid "Redirect to the checkout page from Wishlist if added to cart"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: admin/settings/general.class.php:114 admin/settings/general.class.php:227
|
113 |
msgid "Remove by anyone"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: admin/settings/general.class.php:121
|
117 |
msgid "Remove product from Wishlist on second click"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: admin/settings/general.class.php:135
|
121 |
msgid "Show successful notice in popup"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: admin/settings/general.class.php:136
|
125 |
msgid ""
|
126 |
"This option allows to show/hide a popup with successful or error notices "
|
127 |
"after addition or removing products from a Wishlist."
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: admin/settings/general.class.php:146
|
131 |
msgid "\"View Wishlist\" button Text"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: admin/settings/general.class.php:153
|
135 |
msgid "Redirect to Wishlist"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: admin/settings/general.class.php:154
|
139 |
msgid ""
|
140 |
"If enabled, user will be redirected to wishlist page after 5 sec from adding "
|
141 |
"product to wishlist."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: admin/settings/general.class.php:161
|
145 |
msgid "\"Product added to Wishlist\" Text"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: admin/settings/general.class.php:168
|
149 |
msgid "\"Product already in Wishlist\" Text"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: admin/settings/general.class.php:169
|
153 |
msgid ""
|
154 |
"This notification will be shown if user will try to add a product that is "
|
155 |
"already in the wishlist."
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: admin/settings/general.class.php:176
|
159 |
msgid "\"Product removed from Wishlist\" Text"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: admin/settings/general.class.php:177
|
163 |
msgid ""
|
164 |
"This notification will be shown once the product is removed from Wishlist on "
|
165 |
"a single or a catalog page."
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: admin/settings/general.class.php:185
|
169 |
msgid "Wishlist Page Options"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: admin/settings/general.class.php:186 admin/settings/general.class.php:203
|
173 |
msgid "Coming soon"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: admin/settings/general.class.php:193 views/wizard/step-page.php:36
|
177 |
msgid "My Wishlist"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: admin/settings/general.class.php:202
|
181 |
msgid "Wishlist Processing Options"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: admin/settings/general.class.php:210
|
185 |
msgid "Automatic removal"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: admin/settings/general.class.php:217
|
189 |
msgid "Remove condition"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: admin/settings/general.class.php:220
|
193 |
msgid "Add to Cart"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: admin/settings/general.class.php:235
|
197 |
msgid "Product page \"Add to Wishlist\" Button Settings"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: admin/settings/general.class.php:241 admin/settings/general.class.php:357
|
201 |
#: views/wizard/step-button.php:32
|
202 |
msgid "Button position"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: admin/settings/general.class.php:242
|
206 |
msgid ""
|
207 |
"Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on "
|
208 |
"product page, if you have chosen custom position for product button. You "
|
209 |
"will have to do this for each product."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: admin/settings/general.class.php:245 admin/settings/general.class.php:360
|
213 |
#: includes/wizard.class.php:407
|
214 |
msgid "After \"Add to Cart\" button"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: admin/settings/general.class.php:246 admin/settings/general.class.php:361
|
218 |
#: includes/wizard.class.php:408
|
219 |
msgid "Before \"Add to Cart\" button"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: admin/settings/general.class.php:247 admin/settings/general.class.php:363
|
223 |
#: includes/wizard.class.php:409
|
224 |
msgid "Custom position with code"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: admin/settings/general.class.php:253 admin/settings/general.class.php:370
|
228 |
msgid "Button type"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: admin/settings/general.class.php:256 admin/settings/general.class.php:373
|
232 |
msgid "Link"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/settings/general.class.php:257 admin/settings/general.class.php:374
|
236 |
#: includes/wizard.class.php:396
|
237 |
msgid "Button"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: admin/settings/general.class.php:263 admin/settings/general.class.php:380
|
241 |
msgid "\"Add to Wishlist\" Icon"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: admin/settings/general.class.php:264 admin/settings/general.class.php:628
|
245 |
msgid ""
|
246 |
"You can choose from our predefined icons or upload your custom icon. Custom "
|
247 |
"icon size is limited to 16x16 px."
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: admin/settings/general.class.php:267 admin/settings/general.class.php:383
|
251 |
+
#: admin/settings/general.class.php:623
|
252 |
msgid "None"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: admin/settings/general.class.php:268 admin/settings/general.class.php:384
|
256 |
+
#: admin/settings/general.class.php:624
|
257 |
msgid "Heart"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: admin/settings/general.class.php:269 admin/settings/general.class.php:385
|
261 |
+
#: admin/settings/general.class.php:625
|
262 |
msgid "Heart+"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: admin/settings/general.class.php:270 admin/settings/general.class.php:386
|
266 |
+
#: admin/settings/general.class.php:626
|
267 |
msgid "Custom"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: admin/settings/general.class.php:287 admin/settings/general.class.php:402
|
271 |
+
#: admin/settings/general.class.php:643
|
272 |
msgid "Upload"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: admin/settings/general.class.php:296 admin/settings/general.class.php:411
|
276 |
msgid "\"Add to Wishlist\" Icon Color"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: admin/settings/general.class.php:298 admin/settings/general.class.php:413
|
280 |
+
#: admin/settings/general.class.php:654
|
281 |
msgid "Black"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: admin/settings/general.class.php:299 admin/settings/general.class.php:414
|
285 |
+
#: admin/settings/general.class.php:605 admin/settings/general.class.php:655
|
286 |
msgid "White"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: admin/settings/general.class.php:306 admin/settings/general.class.php:421
|
290 |
msgid "Show button text"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: admin/settings/general.class.php:321
|
294 |
msgid "\"Add to Wishlist\" button Text"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: admin/settings/general.class.php:327 admin/settings/general.class.php:442
|
298 |
msgid "\"Remove from Wishlist\" Button Text"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: admin/settings/general.class.php:335
|
302 |
msgid "Product listing Button Settings"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: admin/settings/general.class.php:336
|
306 |
msgid ""
|
307 |
"These are separate settings for the \"Add to Wishlist\" button on a product "
|
308 |
"listing (Shop page, categories, etc.). You can also adjust button and text "
|
309 |
"colors, size, etc. in a <code>TI Wishlist > Style Options.</code>"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: admin/settings/general.class.php:342
|
313 |
msgid "Show in Product Listing"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: admin/settings/general.class.php:362
|
317 |
msgid "Above Thumbnail"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: admin/settings/general.class.php:365
|
321 |
msgid ""
|
322 |
"Note: if \"Custom position with code\" option is applied, the \"Add to "
|
323 |
"Wishlist\" button should be added into template using <code>do_shortcode()</"
|
325 |
"><code>do_shortcode(\"[ti_wishlists_addtowishlist loop=yes]\")</code>"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: admin/settings/general.class.php:436 views/wizard/step-button.php:41
|
329 |
msgid "\"Add to Wishlist\" Text"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: admin/settings/general.class.php:450
|
333 |
msgid "Wishlist Product Settings"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: admin/settings/general.class.php:451
|
337 |
msgid ""
|
338 |
"Following options allows you to choose what information/functionality to "
|
339 |
"show/enable in wishlist table on wishlist page."
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: admin/settings/general.class.php:457
|
343 |
msgid "Show \"Add to Cart\" button"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: admin/settings/general.class.php:464
|
347 |
msgid "\"Add to Cart\" Text"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: admin/settings/general.class.php:471
|
351 |
msgid "Show Unit price"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: admin/settings/general.class.php:477
|
355 |
msgid "Show Stock status"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: admin/settings/general.class.php:483
|
359 |
msgid "Show Date of addition"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: admin/settings/general.class.php:490
|
363 |
msgid "Wishlist Table Settings"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: admin/settings/general.class.php:491
|
367 |
msgid ""
|
368 |
"Following options will help user to manage and add products to cart from "
|
369 |
"wishlist table in bulk."
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: admin/settings/general.class.php:497
|
373 |
msgid "Show Checkboxes"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: admin/settings/general.class.php:509
|
377 |
msgid "Show Actions button"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: admin/settings/general.class.php:510
|
381 |
msgid "Bulk actions drop down at the bottom of wishlist table"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: admin/settings/general.class.php:516
|
385 |
msgid "Show \"Add Selected to Cart\" button"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: admin/settings/general.class.php:523
|
389 |
msgid "\"Add Selected to Cart\" Button Text"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: admin/settings/general.class.php:534
|
393 |
msgid "Show \"Add All to Cart\" button"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: admin/settings/general.class.php:541
|
397 |
msgid "\"Add All to Cart\" Button Text"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: admin/settings/general.class.php:554
|
401 |
msgid ""
|
402 |
"Following options enable/disable Social share icons below wishlist table on "
|
403 |
"wishlist page. Wishlist owner can easily share their wishlists using this "
|
405 |
"shared status, private wishlists can't be shared."
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: admin/settings/general.class.php:560
|
409 |
msgid "Social Networks Sharing Options"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: admin/settings/general.class.php:566 views/wizard/step-social.php:26
|
413 |
msgid "Show \"Facebook\" Button"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: admin/settings/general.class.php:572 views/wizard/step-social.php:35
|
417 |
msgid "Show \"Twitter\" Button"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: admin/settings/general.class.php:578 views/wizard/step-social.php:44
|
421 |
msgid "Show \"Pinterest\" Button"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: admin/settings/general.class.php:584 views/wizard/step-social.php:53
|
425 |
msgid "Show \"Google+\" Button"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: admin/settings/general.class.php:590 views/wizard/step-social.php:62
|
429 |
msgid "Show \"Share by Email\" Button"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: admin/settings/general.class.php:596
|
433 |
msgid "\"Share on\" Text"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: admin/settings/general.class.php:602
|
437 |
msgid "Social Icons Color"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: admin/settings/general.class.php:604
|
441 |
msgid "Dark"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: admin/settings/general.class.php:613
|
445 |
msgid "Wishlist Products Counter"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: admin/settings/general.class.php:614
|
449 |
#, php-format
|
450 |
msgid ""
|
451 |
"Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into "
|
454 |
"\">Appearance -> Widgets</a> section."
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: admin/settings/general.class.php:620
|
458 |
msgid "\"Wishlist\" Icon"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: admin/settings/general.class.php:652
|
462 |
msgid "\"Wishlist\" Icon Color"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: admin/settings/general.class.php:662 public/widget/topwishlist.class.php:36
|
466 |
msgid "Show counter text"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: admin/settings/general.class.php:671 public/widget/topwishlist.class.php:41
|
470 |
msgid "Counter Text"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: admin/settings/general.class.php:672
|
474 |
msgid "Wishlist - "
|
475 |
msgstr ""
|
476 |
|
1135 |
msgid "Remove"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: public/wishlist/buttons.class.php:437 public/wishlist/view.class.php:276
|
1139 |
#, php-format
|
1140 |
msgid "“%s”"
|
1141 |
msgstr ""
|
1147 |
msgstr[0] ""
|
1148 |
msgstr[1] ""
|
1149 |
|
1150 |
+
#: public/wishlist/view.class.php:278
|
1151 |
#, php-format
|
1152 |
msgid "%s has been removed from wishlist."
|
1153 |
msgstr ""
|
1154 |
|
1155 |
+
#: public/wishlist/view.class.php:280
|
1156 |
#, php-format
|
1157 |
msgid "%s has not been removed from wishlist."
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: public/wishlist/view.class.php:371
|
1161 |
msgid "Return to Wishlist"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: public/wishlist/view.class.php:466
|
1165 |
msgid "Previous Page"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: public/wishlist/view.class.php:475
|
1169 |
msgid "Next Page"
|
1170 |
msgstr ""
|
1171 |
|
public/cart.class.php
CHANGED
@@ -1,315 +1,372 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Cart action for wishlists
|
4 |
-
*
|
5 |
-
* @since 1.0.0
|
6 |
-
* @package TInvWishlist\Public
|
7 |
-
*/
|
8 |
-
|
9 |
-
// If this file is called directly, abort.
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
die;
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Cart action for wishlists
|
16 |
-
*/
|
17 |
-
class TInvWL_Public_Cart {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Plugin name
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
static $_n;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Default post object.
|
28 |
-
*
|
29 |
-
* @var array
|
30 |
-
*/
|
31 |
-
static $_request;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Default post object.
|
35 |
-
*
|
36 |
-
* @var array
|
37 |
-
*/
|
38 |
-
static $_post;
|
39 |
-
/**
|
40 |
-
* This class
|
41 |
-
*
|
42 |
-
* @var \TInvWL_Public_Cart
|
43 |
-
*/
|
44 |
-
protected static $_instance = null;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get this class object
|
48 |
-
*
|
49 |
-
* @param string $plugin_name Plugin name.
|
50 |
-
*
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
*
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
add_action( '
|
79 |
-
}
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
*
|
86 |
-
*
|
87 |
-
* @param
|
88 |
-
* @
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
$
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
if ( empty( $product
|
106 |
-
return false;
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
$
|
115 |
-
$
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
*
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
*
|
198 |
-
*
|
199 |
-
* @
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
*
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
if (
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
if (
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
}
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
) )
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Cart action for wishlists
|
4 |
+
*
|
5 |
+
* @since 1.0.0
|
6 |
+
* @package TInvWishlist\Public
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Cart action for wishlists
|
16 |
+
*/
|
17 |
+
class TInvWL_Public_Cart {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Plugin name
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
static $_n;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Default post object.
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
static $_request;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Default post object.
|
35 |
+
*
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
static $_post;
|
39 |
+
/**
|
40 |
+
* This class
|
41 |
+
*
|
42 |
+
* @var \TInvWL_Public_Cart
|
43 |
+
*/
|
44 |
+
protected static $_instance = null;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get this class object
|
48 |
+
*
|
49 |
+
* @param string $plugin_name Plugin name.
|
50 |
+
*
|
51 |
+
* @return \TInvWL_Public_Cart
|
52 |
+
*/
|
53 |
+
public static function instance( $plugin_name = TINVWL_PREFIX ) {
|
54 |
+
if ( is_null( self::$_instance ) ) {
|
55 |
+
self::$_instance = new self( $plugin_name );
|
56 |
+
}
|
57 |
+
|
58 |
+
return self::$_instance;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Constructor
|
63 |
+
*
|
64 |
+
* @param string $plugin_name Plugin name.
|
65 |
+
*/
|
66 |
+
function __construct( $plugin_name ) {
|
67 |
+
self::$_n = $plugin_name;
|
68 |
+
$this->define_hooks();
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Define hooks
|
73 |
+
*/
|
74 |
+
function define_hooks() {
|
75 |
+
add_action( 'woocommerce_before_cart_item_quantity_zero', array( __CLASS__, 'remove_item_data' ) );
|
76 |
+
add_action( 'woocommerce_cart_emptied', array( __CLASS__, 'remove_item_data' ) );
|
77 |
+
if ( version_compare( WC_VERSION, '3.0.0', '<' ) ) {
|
78 |
+
add_action( 'woocommerce_add_order_item_meta', array( $this, 'add_order_item_meta' ), 10, 3 );
|
79 |
+
} else {
|
80 |
+
add_action( 'woocommerce_checkout_create_order', array( $this, 'add_order_item_meta_v3' ) );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Add product to cart from wishlist
|
86 |
+
*
|
87 |
+
* @param array $wishlist Wishlist object.
|
88 |
+
* @param integer $wl_product Wishlist product id.
|
89 |
+
* @param integer $wl_quantity Product quantity.
|
90 |
+
*
|
91 |
+
* @return boolean
|
92 |
+
*/
|
93 |
+
public static function add( $wishlist = null, $wl_product = 0, $wl_quantity = 1 ) {
|
94 |
+
if ( empty( $wishlist ) ) {
|
95 |
+
$wishlist = tinv_wishlist_get();
|
96 |
+
}
|
97 |
+
$wlp = null;
|
98 |
+
if ( 0 === $wishlist['ID'] ) {
|
99 |
+
$wlp = TInvWL_Product_Local::instance();
|
100 |
+
} else {
|
101 |
+
$wlp = new TInvWL_Product( $wishlist );
|
102 |
+
}
|
103 |
+
$product = $wlp->get_wishlist( array( 'ID' => $wl_product ) );
|
104 |
+
$product = array_shift( $product );
|
105 |
+
if ( empty( $product ) ) {
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
if ( empty( $product['data'] ) ) {
|
109 |
+
return false;
|
110 |
+
}
|
111 |
+
|
112 |
+
self::prepare_post( $product );
|
113 |
+
|
114 |
+
$product = apply_filters( 'tinvwl_addproduct_tocart', $product );
|
115 |
+
$product_id = apply_filters( 'woocommerce_add_to_cart_product_id', absint( $product['product_id'] ) );
|
116 |
+
$quantity = empty( $wl_quantity ) ? 1 : wc_stock_amount( $wl_quantity );
|
117 |
+
$variation_id = $product['variation_id'];
|
118 |
+
$variations = ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product['data']->variation_data : ( $product['data']->is_type( 'variation' ) ? wc_get_product_variation_attributes( $product['data']->get_id() ) : array() ) );
|
119 |
+
|
120 |
+
if ( ! empty( $variation_id ) && is_array( $variations ) ) {
|
121 |
+
foreach ( $variations as $name => $value ) {
|
122 |
+
if ( '' === $value ) {
|
123 |
+
// Could be any value that saved to a custom meta.
|
124 |
+
if ( array_key_exists( 'meta', $product ) && array_key_exists( $name, $product['meta'] ) ) {
|
125 |
+
$variations[ $name ] = $product['meta'][ $name ];
|
126 |
+
} else {
|
127 |
+
continue;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
$passed_validation = $product['data']->is_purchasable() && ( $product['data']->is_in_stock() || $product['data']->backorders_allowed() ) && 'external' !== ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product['data']->product_type : $product['data']->get_type() );
|
134 |
+
$passed_validation = apply_filters( 'woocommerce_add_to_cart_validation', $passed_validation, $product_id, $quantity, $variation_id, $variations );
|
135 |
+
if ( $passed_validation ) {
|
136 |
+
$cart_item_key = WC()->cart->add_to_cart( $product_id, $quantity, $variation_id, $variations );
|
137 |
+
if ( $cart_item_key ) {
|
138 |
+
|
139 |
+
/* Run a 3rd party code when product added to a cart from a wishlist.
|
140 |
+
*
|
141 |
+
* @param string $cart_item_key cart product unique key.
|
142 |
+
* @param integer $quantity Product quantity.
|
143 |
+
* @param array $product product data.
|
144 |
+
* */
|
145 |
+
do_action( 'tinvwl_product_added_to_cart', $cart_item_key, $quantity, $product );
|
146 |
+
if ( ( 'private' !== $wishlist['status'] && tinv_get_option( 'processing', 'autoremove_anyone' ) ) || $wishlist['is_owner'] && 'tinvwl-addcart' === tinv_get_option( 'processing', 'autoremove_status' ) ) {
|
147 |
+
self::ar_f_wl( $wishlist, $product_id, $quantity, $variation_id, $product['meta'] );
|
148 |
+
}
|
149 |
+
self::set_item_data( $cart_item_key, $wishlist['share_key'], $quantity );
|
150 |
+
self::unprepare_post();
|
151 |
+
|
152 |
+
if ( tinv_get_option( 'processing', 'redirect_checkout' ) ) {
|
153 |
+
wp_safe_redirect( wc_get_checkout_url() );
|
154 |
+
}
|
155 |
+
|
156 |
+
if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
|
157 |
+
wp_safe_redirect( wc_get_cart_url() );
|
158 |
+
}
|
159 |
+
|
160 |
+
return array( $product_id => $quantity );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
self::unprepare_post();
|
164 |
+
|
165 |
+
return false;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Prepare _POST data
|
170 |
+
*
|
171 |
+
* @param array $product Wishlist Product.
|
172 |
+
*/
|
173 |
+
public static function prepare_post( $product ) {
|
174 |
+
self::$_post = $_POST; // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
|
175 |
+
self::$_request = $_REQUEST;
|
176 |
+
if ( array_key_exists( 'meta', $product ) && ! empty( $product['meta'] ) ) {
|
177 |
+
$_POST = $product['meta']; // May be a conflict there will be no GET attributes.
|
178 |
+
$_REQUEST = $product['meta'];
|
179 |
+
} else {
|
180 |
+
$_POST = array();
|
181 |
+
$_REQUEST = array();
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Unrepare _POST data
|
187 |
+
*/
|
188 |
+
public static function unprepare_post() {
|
189 |
+
$_POST = self::$_post;
|
190 |
+
$_REQUEST = self::$_request;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Get product added from wishlist
|
195 |
+
*
|
196 |
+
* @param string $cart_item_key Cart product key.
|
197 |
+
* @param array $wishlist Wishlist object.
|
198 |
+
*
|
199 |
+
* @return array
|
200 |
+
*/
|
201 |
+
public static function get_item_data( $cart_item_key, $wishlist = null ) {
|
202 |
+
$data = (array) WC()->session->get( 'tinvwl_wishlist_cart', array() );
|
203 |
+
if ( empty( $data[ $cart_item_key ] ) ) {
|
204 |
+
$data[ $cart_item_key ] = array();
|
205 |
+
}
|
206 |
+
|
207 |
+
if ( empty( $wishlist ) ) {
|
208 |
+
return $data[ $cart_item_key ];
|
209 |
+
} else {
|
210 |
+
return empty( $data[ $cart_item_key ][ $wishlist ] ) ? 0 : $data[ $cart_item_key ][ $wishlist ];
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Set product added from wishlist
|
216 |
+
*
|
217 |
+
* @param string $cart_item_key Cart product key.
|
218 |
+
* @param array $wishlist Wishlist object.
|
219 |
+
* @param integer $quantity Product quantity.
|
220 |
+
*
|
221 |
+
* @return boolean
|
222 |
+
*/
|
223 |
+
public static function set_item_data( $cart_item_key, $wishlist, $quantity = 1 ) {
|
224 |
+
$data = (array) WC()->session->get( 'tinvwl_wishlist_cart', array() );
|
225 |
+
if ( empty( $data[ $cart_item_key ] ) ) {
|
226 |
+
$data[ $cart_item_key ] = array();
|
227 |
+
}
|
228 |
+
|
229 |
+
if ( array_key_exists( $wishlist, $data[ $cart_item_key ] ) ) {
|
230 |
+
$data[ $cart_item_key ][ $wishlist ] += $quantity;
|
231 |
+
} else {
|
232 |
+
$data[ $cart_item_key ][ $wishlist ] = $quantity;
|
233 |
+
}
|
234 |
+
|
235 |
+
WC()->session->set( 'tinvwl_wishlist_cart', $data );
|
236 |
+
|
237 |
+
return true;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Remove product added from wishlist
|
242 |
+
*
|
243 |
+
* @param string $cart_item_key Cart product key.
|
244 |
+
* @param array $wishlist Wishlist object.
|
245 |
+
*
|
246 |
+
* @return boolean
|
247 |
+
*/
|
248 |
+
public static function remove_item_data( $cart_item_key = null, $wishlist = null ) {
|
249 |
+
$data = (array) WC()->session->get( 'tinvwl_wishlist_cart', array() );
|
250 |
+
if ( empty( $cart_item_key ) ) {
|
251 |
+
WC()->session->set( 'tinvwl_wishlist_cart', array() );
|
252 |
+
|
253 |
+
return true;
|
254 |
+
}
|
255 |
+
if ( ! array_key_exists( $cart_item_key, $data ) ) {
|
256 |
+
return false;
|
257 |
+
}
|
258 |
+
if ( empty( $wishlist ) ) {
|
259 |
+
unset( $data[ $cart_item_key ] );
|
260 |
+
} else {
|
261 |
+
if ( ! array_key_exists( $wishlist, $data[ $cart_item_key ] ) ) {
|
262 |
+
return false;
|
263 |
+
}
|
264 |
+
unset( $data[ $cart_item_key ][ $wishlist ] );
|
265 |
+
}
|
266 |
+
WC()->session->set( 'tinvwl_wishlist_cart', $data );
|
267 |
+
|
268 |
+
return true;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Add meta data for product when created order
|
273 |
+
*
|
274 |
+
* @param string $item_id Order item id.
|
275 |
+
* @param array $values order item data.
|
276 |
+
* @param string $cart_item_key Cart product key.
|
277 |
+
*/
|
278 |
+
public function add_order_item_meta( $item_id, $values, $cart_item_key ) {
|
279 |
+
$data = self::get_item_data( $cart_item_key );
|
280 |
+
$data = apply_filters( 'tinvwl_addproduct_toorder', $data, $cart_item_key, $values );
|
281 |
+
if ( ! empty( $data ) ) {
|
282 |
+
wc_add_order_item_meta( $item_id, '_tinvwl_wishlist_cart', $data );
|
283 |
+
|
284 |
+
$wishlist = null;
|
285 |
+
|
286 |
+
reset( $data );
|
287 |
+
$share_key = key( $data );
|
288 |
+
|
289 |
+
$wl = new TInvWL_Wishlist();
|
290 |
+
$wishlist = $wl->get_by_share_key( $share_key );
|
291 |
+
/* Run a 3rd party code when product purchased from wishlist.
|
292 |
+
*
|
293 |
+
* @param string $item_id Order item id.
|
294 |
+
* @param array $values order item data.
|
295 |
+
* @param array $wishlist A wishlist data where product added from.
|
296 |
+
* */
|
297 |
+
do_action( 'tinvwl_product_purchased', $item_id, $values, $wishlist );
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Add meta data for product when created order
|
303 |
+
*
|
304 |
+
* @param \WC_Order $order Order object.
|
305 |
+
*/
|
306 |
+
public function add_order_item_meta_v3( $order ) {
|
307 |
+
foreach ( $order->get_items() as $item ) {
|
308 |
+
$data = self::get_item_data( $item->legacy_cart_item_key );
|
309 |
+
$data = apply_filters( 'tinvwl_addproduct_toorder', $data, $item->legacy_cart_item_key, $item->legacy_values );
|
310 |
+
if ( ! empty( $data ) ) {
|
311 |
+
$item->update_meta_data( '_tinvwl_wishlist_cart', $data );
|
312 |
+
|
313 |
+
$wishlist = null;
|
314 |
+
|
315 |
+
reset( $data );
|
316 |
+
$share_key = key( $data );
|
317 |
+
|
318 |
+
$wl = new TInvWL_Wishlist();
|
319 |
+
$wishlist = $wl->get_by_share_key( $share_key );
|
320 |
+
/* Run a 3rd party code when product purchased from wishlist.
|
321 |
+
*
|
322 |
+
* @param WC_order $order Order object.
|
323 |
+
* @param WC_Order_Item_Product $item Order item product object.
|
324 |
+
* @param array $wishlist A wishlist data where product added from.
|
325 |
+
* */
|
326 |
+
do_action( 'tinvwl_product_purchased', $order, $item, $wishlist );
|
327 |
+
}
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Autoremove product from wishlist
|
333 |
+
*
|
334 |
+
* @param array $wishlist Wishlist object.
|
335 |
+
* @param integer $product_id Product id.
|
336 |
+
* @param integer $quantity Quantity product.
|
337 |
+
* @param integer $variation_id Variation product id.
|
338 |
+
* @param array $meta Meta array for post form.
|
339 |
+
*
|
340 |
+
* @return integer
|
341 |
+
*/
|
342 |
+
private static function ar_f_wl( $wishlist, $product_id, $quantity = 1, $variation_id = 0, $meta = array() ) {
|
343 |
+
$product_id = absint( $product_id );
|
344 |
+
$quantity = absint( $quantity );
|
345 |
+
$variation_id = absint( $variation_id );
|
346 |
+
if ( ! tinv_get_option( 'processing', 'autoremove' ) || empty( $wishlist ) || empty( $product_id ) || empty( $quantity ) ) {
|
347 |
+
return $quantity;
|
348 |
+
}
|
349 |
+
$wlp = null;
|
350 |
+
if ( 0 === $wishlist['ID'] ) {
|
351 |
+
$wlp = TInvWL_Product_Local::instance();
|
352 |
+
} else {
|
353 |
+
$wlp = new TInvWL_Product( $wishlist, self::$_n );
|
354 |
+
}
|
355 |
+
if ( empty( $wlp ) ) {
|
356 |
+
return 0;
|
357 |
+
}
|
358 |
+
$products = $wlp->get_wishlist( array(
|
359 |
+
'product_id' => $product_id,
|
360 |
+
'variation_id' => $variation_id,
|
361 |
+
'meta' => $meta,
|
362 |
+
'external' => false,
|
363 |
+
) );
|
364 |
+
$product = array_shift( $products );
|
365 |
+
if ( empty( $product ) ) {
|
366 |
+
return $quantity;
|
367 |
+
}
|
368 |
+
$wlp->remove_product_from_wl( 0, $product_id, $variation_id, $product['meta'] );
|
369 |
+
|
370 |
+
return 0;
|
371 |
+
}
|
372 |
+
}
|
public/wishlist/view.class.php
CHANGED
@@ -274,7 +274,7 @@ class TInvWL_Public_Wishlist_View {
|
|
274 |
return false;
|
275 |
}
|
276 |
$title = sprintf( __( '“%s”', 'ti-woocommerce-wishlist' ), $product_data['data']->get_title() );
|
277 |
-
if ( $wlp->remove(
|
278 |
wc_add_notice( sprintf( __( '%s has been removed from wishlist.', 'ti-woocommerce-wishlist' ), $title ) );
|
279 |
} else {
|
280 |
wc_add_notice( sprintf( __( '%s has not been removed from wishlist.', 'ti-woocommerce-wishlist' ), $title ), 'error' );
|
274 |
return false;
|
275 |
}
|
276 |
$title = sprintf( __( '“%s”', 'ti-woocommerce-wishlist' ), $product_data['data']->get_title() );
|
277 |
+
if ( $wlp->remove($product_data ) ) {
|
278 |
wc_add_notice( sprintf( __( '%s has been removed from wishlist.', 'ti-woocommerce-wishlist' ), $title ) );
|
279 |
} else {
|
280 |
wc_add_notice( sprintf( __( '%s has not been removed from wishlist.', 'ti-woocommerce-wishlist' ), $title ), 'error' );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://templateinvaders.com/?utm_source=wordpressorg&utm_content=d
|
|
4 |
Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, shop, ecommerce wishlist, shop wishlist, wishlist for Woocommerce
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -131,6 +131,19 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
|
|
131 |
|
132 |
== Changelog ==
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
= 1.7.3 =
|
135 |
*Release Date - 22 June 2018*
|
136 |
|
4 |
Tags: wishlist, woocommerce, woocommerce wishlist, e-commerce, shop, ecommerce wishlist, shop wishlist, wishlist for Woocommerce
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.7.4
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
= 1.7.4 =
|
135 |
+
*Release Date - 26 June 2018*
|
136 |
+
|
137 |
+
* Added an option to redirect directly to the checkout page when product(s) added to cart from a wishlist
|
138 |
+
* Added is_wishlist() conditional function that returns true on a wishlist page
|
139 |
+
* Added hooks for different events:
|
140 |
+
* `tinvwl_wishlist_created` - triggering when a wishlist created
|
141 |
+
* `tinvwl_product_added` - triggering when product added to a wishlist
|
142 |
+
* `tinvwl_product_removed` - triggering when product removed from a wishlist
|
143 |
+
* `tinvwl_product_added_to_cart` - triggering when product added to cart from a wishlist
|
144 |
+
* `tinvwl_product_purchased` - triggering when product purchased from a wishlist
|
145 |
+
|
146 |
+
|
147 |
= 1.7.3 =
|
148 |
*Release Date - 22 June 2018*
|
149 |
|
ti-woocommerce-wishlist.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WooCommerce Wishlist Plugin
|
5 |
* Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
6 |
* Description: Wishlist functionality for your WooCommerce store.
|
7 |
-
* Version: 1.7.
|
8 |
* Requires at least: 4.5
|
9 |
* Tested up to: 4.9
|
10 |
* WC requires at least: 2.6
|
@@ -41,7 +41,7 @@ if ( ! defined( 'TINVWL_DOMAIN' ) ) {
|
|
41 |
}
|
42 |
|
43 |
if ( ! defined( 'TINVWL_FVERSION' ) ) {
|
44 |
-
define( 'TINVWL_FVERSION', '1.7.
|
45 |
}
|
46 |
|
47 |
if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
|
4 |
* Plugin Name: WooCommerce Wishlist Plugin
|
5 |
* Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
|
6 |
* Description: Wishlist functionality for your WooCommerce store.
|
7 |
+
* Version: 1.7.4
|
8 |
* Requires at least: 4.5
|
9 |
* Tested up to: 4.9
|
10 |
* WC requires at least: 2.6
|
41 |
}
|
42 |
|
43 |
if ( ! defined( 'TINVWL_FVERSION' ) ) {
|
44 |
+
define( 'TINVWL_FVERSION', '1.7.4' );
|
45 |
}
|
46 |
|
47 |
if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
|
tinv-wishlists-function.php
CHANGED
@@ -1013,3 +1013,15 @@ if ( ! function_exists( 'tinvwl_set_utm' ) ) {
|
|
1013 |
define( 'TINVWL_UTM_CAMPAIGN', $campaign );
|
1014 |
}
|
1015 |
} // End if().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1013 |
define( 'TINVWL_UTM_CAMPAIGN', $campaign );
|
1014 |
}
|
1015 |
} // End if().
|
1016 |
+
|
1017 |
+
if ( ! function_exists( 'is_wishlist' ) ) {
|
1018 |
+
|
1019 |
+
/**
|
1020 |
+
* is_wishlist - Returns true when viewing the wishlist page.
|
1021 |
+
*
|
1022 |
+
* @return bool
|
1023 |
+
*/
|
1024 |
+
function is_wishlist() {
|
1025 |
+
return ( is_page( apply_filters( 'wpml_object_id', tinv_get_option( 'page', 'wishlist' ), 'page', true ) ) );
|
1026 |
+
}
|
1027 |
+
}
|