Skip to content

Commit 3b25a69

Browse files
v3.0.4
1 parent 3a02172 commit 3b25a69

9 files changed

+81
-52
lines changed

.distignore

-15
This file was deleted.

assets/js/algwcwishlistmodal.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* @summary Multiple wishlist modal of Wish list for WooCommerce plugin.
3+
*
4+
* Js responsible for creation and save of multiple wishlist.
5+
*
6+
* @version 3.0.4
7+
* @since 3.0.0
8+
* @requires jQuery.js
9+
*/
110
;( function( $, window, document, undefined ) {
211

312
'use strict';
@@ -43,10 +52,12 @@
4352

4453
var alg_wc_wl_delete_wishlist_multiple_item_data = function () {
4554
var wishlist_tab_id = $('.delete-customized-wishlist').attr('data-wishlist_tab_id');
55+
var wishlist_page = $('.delete-customized-wishlist').attr('data-page');
4656
var data = {
4757
action: alg_wc_wl_ajax.action_delete_multiple_wishlist,
4858
nonce: alg_wc_wl_ajax.toggle_nonce,
49-
wishlist_tab_id: wishlist_tab_id
59+
wishlist_tab_id: wishlist_tab_id,
60+
wishlist_page_id: wishlist_page
5061
};
5162
return data;
5263
}

assets/js/algwcwishlistmodal.min.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* @summary Multiple wishlist modal of Wish list for WooCommerce plugin.
3+
*
4+
* Js responsible for creation and save of multiple wishlist.
5+
*
6+
* @version 3.0.4
7+
* @since 3.0.0
8+
* @requires jQuery.js
9+
*/
110
;( function( $, window, document, undefined ) {
211

312
'use strict';
@@ -43,10 +52,12 @@
4352

4453
var alg_wc_wl_delete_wishlist_multiple_item_data = function () {
4554
var wishlist_tab_id = $('.delete-customized-wishlist').attr('data-wishlist_tab_id');
55+
var wishlist_page = $('.delete-customized-wishlist').attr('data-page');
4656
var data = {
4757
action: alg_wc_wl_ajax.action_delete_multiple_wishlist,
4858
nonce: alg_wc_wl_ajax.toggle_nonce,
49-
wishlist_tab_id: wishlist_tab_id
59+
wishlist_tab_id: wishlist_tab_id,
60+
wishlist_page_id: wishlist_page
5061
};
5162
return data;
5263
}

includes/class-alg-wc-wish-list-core.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Wish List for WooCommerce - Core Class.
44
*
5-
* @version 3.0.3
5+
* @version 3.0.4
66
* @since 1.0.0
77
* @author WPFactory.
88
*/
@@ -21,7 +21,7 @@ final class Alg_WC_Wish_List_Core {
2121
* @var string
2222
* @since 1.0.0
2323
*/
24-
public $version = '3.0.3';
24+
public $version = '3.0.4';
2525

2626
/**
2727
* @var Alg_WC_Wish_List_Core The single instance of the class

includes/free/class-alg-wc-wish-list-ajax.php

+18-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Wishlist for WooCommerce - Ajax.
44
*
5-
* @version 1.8.9
5+
* @version 3.0.4
66
* @since 1.0.0
77
* @author WPFactory
88
*/
@@ -343,7 +343,7 @@ public static function save_to_multiple_wishlist() {
343343
/**
344344
* Ajax method for delete multiple wishlist item.
345345
*
346-
* @version 2.0.5
346+
* @version 3.0.4
347347
* @since 2.0.5
348348
*/
349349
public static function delete_multiple_wishlist_item($item_id, $tab_id) {
@@ -413,6 +413,7 @@ public static function delete_multiple_wishlist() {
413413
) );
414414

415415
$wishlist_tab_id = $args['wishlist_tab_id'];
416+
$wishlist_page_id = $args['wishlist_page_id'];
416417

417418
if($wishlist_tab_id > 0) {
418419
$index = $wishlist_tab_id - 1;
@@ -444,6 +445,21 @@ public static function delete_multiple_wishlist() {
444445
$wish_list_page_id = Alg_WC_Wish_List_Page::get_wish_list_page_id();
445446
$wish_list_permalink = get_permalink( $wish_list_page_id );
446447

448+
449+
450+
if( !empty( $wishlist_page_id ) ){
451+
$myaccount_permalink = get_permalink( get_option('woocommerce_myaccount_page_id') );
452+
453+
$structure = get_option( 'permalink_structure', '' );
454+
if( $structure == '' ){
455+
$wish_list_permalink = untrailingslashit( $myaccount_permalink ) .'&' . $wishlist_page_id;
456+
457+
} else {
458+
$wish_list_permalink = untrailingslashit( $myaccount_permalink ) .'/' . $wishlist_page_id;
459+
460+
}
461+
}
462+
447463
$response = array('ok' => true, 'redirect_url' => $wish_list_permalink);
448464
wp_send_json_success( $response );
449465
}

langs/wish-list-for-woocommerce.pot

+27-27
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GNU General Public License v3.0.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: wish-list-for-woocommerce 3.0.3\n"
5+
"Project-Id-Version: wish-list-for-woocommerce 3.0.4\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wish-list-for-woocommerce\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <[email protected]>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2024-05-28T12:13:24+02:00\n"
12+
"POT-Creation-Date: 2024-06-17T15:27:16+02:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.9.0\n"
1515
"X-Domain: wish-list-for-woocommerce\n"
@@ -210,7 +210,7 @@ msgstr ""
210210

211211
#: includes/admin/class-alg-wc-wish-list-settings-admin.php:233
212212
#: includes/admin/class-alg-wc-wish-list-settings-list.php:155
213-
#: templates/wish-list.php:367
213+
#: templates/wish-list.php:370
214214
msgid "SKU"
215215
msgstr ""
216216

@@ -718,8 +718,8 @@ msgid "Show product stock"
718718
msgstr ""
719719

720720
#: includes/admin/class-alg-wc-wish-list-settings-list.php:141
721-
#: templates/wish-list.php:219
722-
#: templates/wish-list.php:331
721+
#: templates/wish-list.php:222
722+
#: templates/wish-list.php:334
723723
msgid "Price"
724724
msgstr ""
725725

@@ -740,7 +740,7 @@ msgid "Show product SKU"
740740
msgstr ""
741741

742742
#: includes/admin/class-alg-wc-wish-list-settings-list.php:162
743-
#: templates/wish-list.php:374
743+
#: templates/wish-list.php:377
744744
msgid "Quantity"
745745
msgstr ""
746746

@@ -749,7 +749,7 @@ msgid "Show product quantity"
749749
msgstr ""
750750

751751
#: includes/admin/class-alg-wc-wish-list-settings-list.php:169
752-
#: templates/wish-list.php:353
752+
#: templates/wish-list.php:356
753753
msgid "Description"
754754
msgstr ""
755755

@@ -788,7 +788,7 @@ msgstr ""
788788
#: includes/admin/class-alg-wc-wish-list-settings-list.php:192
789789
#: includes/admin/class-alg-wc-wish-list-settings-list.php:226
790790
#: templates/alg_wcwl-subtotal.php:1
791-
#: templates/wish-list.php:384
791+
#: templates/wish-list.php:387
792792
msgid "Subtotal"
793793
msgstr ""
794794

@@ -1735,7 +1735,7 @@ msgstr ""
17351735
#: includes/admin/class-alg-wc-wish-list-settings-texts.php:84
17361736
#: includes/admin/class-alg-wc-wish-list-settings-texts.php:87
17371737
#: includes/free/class-alg-wc-wish-list-ajax.php:376
1738-
#: includes/free/class-alg-wc-wish-list-ajax.php:530
1738+
#: includes/free/class-alg-wc-wish-list-ajax.php:546
17391739
#: includes/free/class-alg-wc-wish-list.php:179
17401740
msgid "See your wishlist"
17411741
msgstr ""
@@ -1791,7 +1791,7 @@ msgstr ""
17911791

17921792
#: includes/admin/class-alg-wc-wish-list-settings-texts.php:129
17931793
#: includes/free/class-alg-wc-wish-list-ajax.php:375
1794-
#: includes/free/class-alg-wc-wish-list-ajax.php:529
1794+
#: includes/free/class-alg-wc-wish-list-ajax.php:545
17951795
#: includes/free/class-alg-wc-wish-list.php:178
17961796
msgid "%s was successfully removed from wishlist"
17971797
msgstr ""
@@ -1961,7 +1961,7 @@ msgstr ""
19611961

19621962
#: includes/class-alg-wc-wish-list-core.php:977
19631963
#: includes/free/class-alg-wc-wish-list-ajax.php:377
1964-
#: includes/free/class-alg-wc-wish-list-ajax.php:531
1964+
#: includes/free/class-alg-wc-wish-list-ajax.php:547
19651965
#: includes/free/class-alg-wc-wish-list-email-sharing.php:196
19661966
#: includes/free/class-alg-wc-wish-list.php:180
19671967
msgid "Sorry, Some error occurred. Please, try again later."
@@ -1993,19 +1993,19 @@ msgid "Cancel"
19931993
msgstr ""
19941994

19951995
#: includes/free/class-alg-wc-wish-list-ajax.php:374
1996-
#: includes/free/class-alg-wc-wish-list-ajax.php:528
1996+
#: includes/free/class-alg-wc-wish-list-ajax.php:544
19971997
#: includes/free/class-alg-wc-wish-list.php:177
19981998
msgid "%s was successfully added to wishlist."
19991999
msgstr ""
20002000

20012001
#: includes/free/class-alg-wc-wish-list-ajax.php:378
2002-
#: includes/free/class-alg-wc-wish-list-ajax.php:532
2002+
#: includes/free/class-alg-wc-wish-list-ajax.php:548
20032003
#: includes/free/class-alg-wc-wish-list.php:181
20042004
msgid "Please <a class='alg-wc-wl-link' href=\"%s\">login</a> if you want to use the Wishlist"
20052005
msgstr ""
20062006

2007-
#: includes/free/class-alg-wc-wish-list-ajax.php:631
2008-
#: templates/wish-list.php:169
2007+
#: includes/free/class-alg-wc-wish-list-ajax.php:647
2008+
#: templates/wish-list.php:172
20092009
msgid "Default Wishlist"
20102010
msgstr ""
20112011

@@ -2063,8 +2063,8 @@ msgstr ""
20632063

20642064
#: includes/free/class-alg-wc-wish-list-stock-email.php:121
20652065
msgid ""
2066-
"Hello {username}, \n"
2067-
"\n"
2066+
"Hello {username}, \r\n"
2067+
"\r\n"
20682068
"{product_name} is in stock. Please, check it out on {site_title}"
20692069
msgstr ""
20702070

@@ -2183,33 +2183,33 @@ msgstr ""
21832183
msgid "Submit"
21842184
msgstr ""
21852185

2186-
#: templates/wish-list.php:193
2186+
#: templates/wish-list.php:196
21872187
msgid "Delete Wishlist"
21882188
msgstr ""
21892189

2190-
#: templates/wish-list.php:215
2191-
#: templates/wish-list.php:313
2190+
#: templates/wish-list.php:218
2191+
#: templates/wish-list.php:316
21922192
msgid "Product"
21932193
msgstr ""
21942194

2195-
#: templates/wish-list.php:224
2196-
#: templates/wish-list.php:338
2195+
#: templates/wish-list.php:227
2196+
#: templates/wish-list.php:341
21972197
msgid "Category"
21982198
msgstr ""
21992199

2200-
#: templates/wish-list.php:269
2201-
#: templates/wish-list.php:414
2200+
#: templates/wish-list.php:272
2201+
#: templates/wish-list.php:417
22022202
msgid "Remove"
22032203
msgstr ""
22042204

2205-
#: templates/wish-list.php:283
2205+
#: templates/wish-list.php:286
22062206
msgid "Drag and drop"
22072207
msgstr ""
22082208

2209-
#: templates/wish-list.php:289
2209+
#: templates/wish-list.php:292
22102210
msgid "Sort"
22112211
msgstr ""
22122212

2213-
#: templates/wish-list.php:301
2213+
#: templates/wish-list.php:304
22142214
msgid "Thumbnail"
22152215
msgstr ""

readme.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmu
33
Tags: woocommerce, wishlist, woocommerce wishlist, add to wishlist, product wishlist
44
Requires at least: 6.1
55
Tested up to: 6.5
6-
Stable tag: 3.0.3
6+
Stable tag: 3.0.4
77
Requires PHP: 5.6.0
88
License: GNU General Public License v3.0
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -258,6 +258,9 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S
258258

259259
== Changelog ==
260260

261+
= 3.0.4 - 17/06/2024 =
262+
* Fix - My account wishlist redirection after deletion multiple wishlist.
263+
261264
= 3.0.3 - 28/05/2024 =
262265
* Update readme.
263266

templates/wish-list.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Wish list template.
44
*
55
* @author WPFactory.
6-
* @version 3.0.2
6+
* @version 3.0.4
77
* @since 1.0.0
88
*/
99

@@ -67,6 +67,8 @@
6767

6868
$wl_tab_slug = get_option( 'alg_wc_wl_tab_slug', 'my-wish-list' );
6969
$query_string = '?';
70+
$page = '';
71+
7072
if( is_wc_endpoint_url( $wl_tab_slug ) ) {
7173
$structure = get_option( 'permalink_structure', '' );
7274
if( $structure == '' ){
@@ -76,6 +78,7 @@
7678
$wish_list_permalink = untrailingslashit( $wish_list_permalink ) .'/' . $wl_tab_slug;
7779
$query_string = '?';
7880
}
81+
$page = $wl_tab_slug;
7982
}
8083

8184
if ( is_user_logged_in() ) {
@@ -190,7 +193,7 @@
190193
<?php if( $current_tab_id > 0 ){ ?>
191194
<div class="alg-wc-delete-wishlist">
192195

193-
<a href="javascript:;" data-wishlist_tab_id="<?php echo $current_tab_id; ?>" class="button delete-customized-wishlist" title="Delete Wishlist" rel="nofollow"><?php _e( 'Delete Wishlist', 'wish-list-for-woocommerce' ); ?></a>
196+
<a href="javascript:;" data-page="<?php echo $page; ?>" data-wishlist_tab_id="<?php echo $current_tab_id; ?>" class="button delete-customized-wishlist" title="Delete Wishlist" rel="nofollow"><?php _e( 'Delete Wishlist', 'wish-list-for-woocommerce' ); ?></a>
194197

195198
</div>
196199
<?php } ?>

wish-list-for-woocommerce.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Wishlist for WooCommerce
44
Plugin URI: https://wpfactory.com/item/wish-list-woocommerce/
55
Description: Let your visitors show what products they like on your WooCommerce store with a <strong>Wishlist</strong>.
6-
Version: 3.0.3
6+
Version: 3.0.4
77
Author: WPFactory
88
Author URI: https://wpfactory.com/
99
Copyright: © 2023 WPFactory.

0 commit comments

Comments
 (0)