From 46f27fae918dbad1624c55eb85d199d25f69d0d2 Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Tue, 30 Apr 2024 16:04:34 +0600 Subject: [PATCH 1/7] Vendor can switch old and new dashboard --- includes/REST/VendorDashboardController.php | 36 +++++++++++++++++++++ includes/functions-dashboard-navigation.php | 34 ++++++++++++++++--- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/includes/REST/VendorDashboardController.php b/includes/REST/VendorDashboardController.php index 3bd3c11d0b..dd132e5701 100644 --- a/includes/REST/VendorDashboardController.php +++ b/includes/REST/VendorDashboardController.php @@ -123,6 +123,25 @@ public function register_routes() { ], ] ); + register_rest_route( + $this->namespace, '/' . $this->base . '/ui-switch', [ + [ + 'methods' => WP_REST_Server::EDITABLE, + 'callback' => [ $this, 'set_ui_switching' ], + 'args' => [ + 'status' => [ + 'required' => true, + 'description' => __( 'If on vendor dashboard ui will active, if false ui will be de activated', 'dokan-lite' ), + 'type' => 'string', + 'enum' => [ 'on', 'off' ], + 'context' => [ 'view', 'edit' ], + 'default' => 'on', + ], + ], + 'permission_callback' => 'is_user_logged_in', + ], + ] + ); } /** @@ -579,4 +598,21 @@ public function get_collection_params() { return $query_params; } + + /** + * Updates vendor switching data. + * + * @since DOKAN_SINCE + * + * @param WP_REST_Request $request + * + * @return void + */ + public function set_ui_switching( $request ) { + $status = $request->get_param( 'status' ); + + update_user_meta( dokan_get_current_user_id(), 'dokan_vendor_dashboard_ui_switching', $status ); + + return $status; + } } diff --git a/includes/functions-dashboard-navigation.php b/includes/functions-dashboard-navigation.php index a9cdd1e460..36d0c3d51e 100644 --- a/includes/functions-dashboard-navigation.php +++ b/includes/functions-dashboard-navigation.php @@ -287,11 +287,35 @@ function dokan_dashboard_nav( $active_menu = '' ) { ); } - $common_links = ''; + $common_links_items = apply_filters( 'dokan_dashboard_nav_common_link_items', + [ + [ + 'tip' => __( 'Visit Store', 'dokan-lite' ), + 'link' => dokan_get_store_url( dokan_get_current_user_id() ), + 'icon' => '', + 'class' => '', + ], + [ + 'tip' => __( 'Edit Account', 'dokan-lite' ), + 'link' => dokan_get_navigation_url( 'edit-account' ), + 'icon' => '', + 'class' => '', + ], + [ + 'tip' => __( 'Log out', 'dokan-lite' ), + 'link' => wp_logout_url( home_url() ), + 'icon' => '', + 'class' => '', + ], + ] + ); + + $links_text = ''; + foreach ( $common_links_items as $item ) { + $links_text .= '' . $item['icon'] . ''; + } + + $common_links = ''; $menu .= apply_filters( 'dokan_dashboard_nav_common_link', $common_links ); From f769742f22cc89053648cdcd836a3079145ff6ee Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Mon, 6 May 2024 09:43:56 +0600 Subject: [PATCH 2/7] Fix link markups --- includes/functions-dashboard-navigation.php | 34 +++------------------ 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/includes/functions-dashboard-navigation.php b/includes/functions-dashboard-navigation.php index 36d0c3d51e..a9cdd1e460 100644 --- a/includes/functions-dashboard-navigation.php +++ b/includes/functions-dashboard-navigation.php @@ -287,35 +287,11 @@ function dokan_dashboard_nav( $active_menu = '' ) { ); } - $common_links_items = apply_filters( 'dokan_dashboard_nav_common_link_items', - [ - [ - 'tip' => __( 'Visit Store', 'dokan-lite' ), - 'link' => dokan_get_store_url( dokan_get_current_user_id() ), - 'icon' => '', - 'class' => '', - ], - [ - 'tip' => __( 'Edit Account', 'dokan-lite' ), - 'link' => dokan_get_navigation_url( 'edit-account' ), - 'icon' => '', - 'class' => '', - ], - [ - 'tip' => __( 'Log out', 'dokan-lite' ), - 'link' => wp_logout_url( home_url() ), - 'icon' => '', - 'class' => '', - ], - ] - ); - - $links_text = ''; - foreach ( $common_links_items as $item ) { - $links_text .= '' . $item['icon'] . ''; - } - - $common_links = ''; + $common_links = ''; $menu .= apply_filters( 'dokan_dashboard_nav_common_link', $common_links ); From f7136d25b77a3eadde7d0a99b77b972353f1ed1c Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Mon, 6 May 2024 10:37:10 +0600 Subject: [PATCH 3/7] Add hook for nav links --- templates/global/dashboard-nav.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/global/dashboard-nav.php b/templates/global/dashboard-nav.php index e4562c0f80..75eaf69b0e 100755 --- a/templates/global/dashboard-nav.php +++ b/templates/global/dashboard-nav.php @@ -17,5 +17,7 @@ } echo wp_kses( dokan_dashboard_nav( $active_menu ), $allowedposttags ); + + do_action( 'dokan_dash_sidebar' ); ?> From bf9751f71911b945094f6783c35fb128d4e22003 Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Mon, 13 May 2024 14:33:46 +0600 Subject: [PATCH 4/7] Move switching api to vendor dashboard --- includes/REST/VendorDashboardController.php | 36 --------------------- 1 file changed, 36 deletions(-) diff --git a/includes/REST/VendorDashboardController.php b/includes/REST/VendorDashboardController.php index dd132e5701..3bd3c11d0b 100644 --- a/includes/REST/VendorDashboardController.php +++ b/includes/REST/VendorDashboardController.php @@ -123,25 +123,6 @@ public function register_routes() { ], ] ); - register_rest_route( - $this->namespace, '/' . $this->base . '/ui-switch', [ - [ - 'methods' => WP_REST_Server::EDITABLE, - 'callback' => [ $this, 'set_ui_switching' ], - 'args' => [ - 'status' => [ - 'required' => true, - 'description' => __( 'If on vendor dashboard ui will active, if false ui will be de activated', 'dokan-lite' ), - 'type' => 'string', - 'enum' => [ 'on', 'off' ], - 'context' => [ 'view', 'edit' ], - 'default' => 'on', - ], - ], - 'permission_callback' => 'is_user_logged_in', - ], - ] - ); } /** @@ -598,21 +579,4 @@ public function get_collection_params() { return $query_params; } - - /** - * Updates vendor switching data. - * - * @since DOKAN_SINCE - * - * @param WP_REST_Request $request - * - * @return void - */ - public function set_ui_switching( $request ) { - $status = $request->get_param( 'status' ); - - update_user_meta( dokan_get_current_user_id(), 'dokan_vendor_dashboard_ui_switching', $status ); - - return $status; - } } From 85ef91aa69065ef8a83fff890795210727f1888a Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Mon, 13 May 2024 14:36:04 +0600 Subject: [PATCH 5/7] Update nav hooks --- templates/global/dashboard-nav.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/global/dashboard-nav.php b/templates/global/dashboard-nav.php index 75eaf69b0e..393160b763 100755 --- a/templates/global/dashboard-nav.php +++ b/templates/global/dashboard-nav.php @@ -6,6 +6,7 @@
From 31a8d4c29484508d8a13c60b8247e699a605156a Mon Sep 17 00:00:00 2001 From: Raad Date: Mon, 13 May 2024 18:53:36 +0600 Subject: [PATCH 6/7] Update readme.txt (#2266) Updated a link --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 2dabb24361..1555754782 100644 --- a/readme.txt +++ b/readme.txt @@ -69,7 +69,7 @@ Here is how you can build your multivendor marketplace with Dokan. ๐Ÿ‘ โ€œBest investment we made last year.โ€ -๐Ÿ‘ [โ€œExcellent product. Ease of use. Saved hundreds of work hours with lots of additional benefits.โ€] (https://www.capterra.com/p/168004/Dokan-Multivendor-Marketplace/reviews/543139/) +๐Ÿ‘ โ€œ[Excellent product. Ease of use. Saved hundreds of work hours with lots of additional benefits] (https://www.capterra.com/p/168004/Dokan-Multivendor-Marketplace/reviews/543139/)โ€ = SUCCESS STORIES WE ARE PROUD TO BE A PART OF = From 728455e29de42bfcce5f462dd3e13f15acfdff58 Mon Sep 17 00:00:00 2001 From: Shazahanul Islam Shohag Date: Thu, 16 May 2024 13:53:03 +0600 Subject: [PATCH 7/7] chore: Release Version 3.11.1 --- README.md | 9 +++++++-- dokan.php | 4 ++-- languages/dokan-lite.pot | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 7 ++++++- templates/whats-new.php | 16 ++++++++++++++++ 7 files changed, 36 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1131b92b17..dc20c1a859 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ **WC requires at least:** 8.0.0 **WC tested up to:** 8.8.3 **Requires PHP:** 7.4 -**Stable tag:** 3.11.0 +**Stable tag:** 3.11.1 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -69,7 +69,7 @@ Here is how you can build your multivendor marketplace with Dokan. ๐Ÿ‘ โ€œBest investment we made last year.โ€ -๐Ÿ‘ [โ€œExcellent product. Ease of use. Saved hundreds of work hours with lots of additional benefits.โ€] (https://www.capterra.com/p/168004/Dokan-Multivendor-Marketplace/reviews/543139/) +๐Ÿ‘ โ€œ[Excellent product. Ease of use. Saved hundreds of work hours with lots of additional benefits] (https://www.capterra.com/p/168004/Dokan-Multivendor-Marketplace/reviews/543139/)โ€ ### SUCCESS STORIES WE ARE PROUD TO BE A PART OF ### @@ -347,6 +347,11 @@ A. Just install and activate the PRO version without deleting the free plugin. A ## Changelog ## +### v3.11.1 ( May 16, 2024 ) ### + +- **new:** Action hook `dokan_dashboard_sidebar_start` added. +- **new:** Action hook `dokan_dashboard_sidebar_end` added. + ### v3.11.0 ( May 10, 2024 ) ### - **fix:** The status of sub-orders does not update to completed if it contains only virtual products. diff --git a/dokan.php b/dokan.php index c5b447369a..b6af94480f 100755 --- a/dokan.php +++ b/dokan.php @@ -3,7 +3,7 @@ * Plugin Name: Dokan * Plugin URI: https://dokan.co/wordpress/ * Description: An e-commerce marketplace plugin for WordPress. Powered by WooCommerce and weDevs. - * Version: 3.11.0 + * Version: 3.11.1 * Author: weDevs * Author URI: https://dokan.co/ * Text Domain: dokan-lite @@ -66,7 +66,7 @@ final class WeDevs_Dokan { * * @var string */ - public $version = '3.11.0'; + public $version = '3.11.1'; /** * Instance of self diff --git a/languages/dokan-lite.pot b/languages/dokan-lite.pot index 08176006f0..c04b3ab5b6 100644 --- a/languages/dokan-lite.pot +++ b/languages/dokan-lite.pot @@ -1,14 +1,14 @@ # Copyright (c) 2024 weDevs Pte. Ltd. All Rights Reserved. msgid "" msgstr "" -"Project-Id-Version: Dokan 3.11.0\n" +"Project-Id-Version: Dokan 3.11.1\n" "Report-Msgid-Bugs-To: https://dokan.co/contact/\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-05-10T03:34:27+00:00\n" +"POT-Creation-Date: 2024-05-16T07:51:11+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.9.0\n" "X-Domain: dokan-lite\n" diff --git a/package-lock.json b/package-lock.json index 8d92b6b0ad..18b77788c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dokan", - "version": "3.11.0", + "version": "3.11.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dokan", - "version": "3.11.0", + "version": "3.11.1", "license": "GPL", "devDependencies": { "@wordpress/scripts": "^26.18.0", diff --git a/package.json b/package.json index 4d96dcf6fb..80820dc7bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dokan", - "version": "3.11.0", + "version": "3.11.1", "description": "A WordPress marketplace plugin", "author": "weDevs", "license": "GPL", diff --git a/readme.txt b/readme.txt index 1555754782..8b5f2a9288 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Tested up to: 6.5.3 WC requires at least: 8.0.0 WC tested up to: 8.8.3 Requires PHP: 7.4 -Stable tag: 3.11.0 +Stable tag: 3.11.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -347,6 +347,11 @@ A. Just install and activate the PRO version without deleting the free plugin. A == Changelog == += v3.11.1 ( May 16, 2024 ) = + +- **new:** Action hook `dokan_dashboard_sidebar_start` added. +- **new:** Action hook `dokan_dashboard_sidebar_end` added. + = v3.11.0 ( May 10, 2024 ) = - **fix:** The status of sub-orders does not update to completed if it contains only virtual products. diff --git a/templates/whats-new.php b/templates/whats-new.php index d87497d633..18eb3dd7c7 100644 --- a/templates/whats-new.php +++ b/templates/whats-new.php @@ -3,6 +3,22 @@ * When you are adding new version please follow this sequence for changes: New Feature, New, Improvement, Fix... */ $changelog = [ + [ + 'version' => 'Version 3.11.1', + 'released' => '2024-05-16', + 'changes' => [ + 'New' => [ + [ + 'title' => 'Action hook `dokan_dashboard_sidebar_start` added.', + 'description' => '', + ], + [ + 'title' => 'Action hook `dokan_dashboard_sidebar_end` added.', + 'description' => '', + ], + ], + ], + ], [ 'version' => 'Version 3.11.0', 'released' => '2024-05-10',