From f23b654f98ded150cef88aebc42d0b8b11d87ddc Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Date: Wed, 2 Aug 2017 12:26:01 +0600 Subject: [PATCH 1/5] Disable predefined attr which already set for product fixed #47 --- assets/js/dokan.js | 9 +++++++++ assets/src/js/product-editor.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/assets/js/dokan.js b/assets/js/dokan.js index 1eff5e53bb..78c6089b86 100644 --- a/assets/js/dokan.js +++ b/assets/js/dokan.js @@ -521,6 +521,7 @@ jQuery(function($) { $( 'body' ).on( 'click', '.product-container-footer input[type="submit"]', this.createNewProduct ); + this.attribute.disbalePredefinedAttribute(); }, saleSchedule: function() { @@ -900,6 +901,14 @@ jQuery(function($) { }); }); + }, + + disbalePredefinedAttribute: function() { + $( 'ul.dokan-attribute-option-list li.product-attribute-list' ).each( function( index, el ) { + if ( $( el ).css( 'display' ) !== 'none' && $( el ).is( '.taxonomy' ) ) { + $( 'select#predefined_attribute' ).find( 'option[value="' + $( el ).data( 'taxonomy' ) + '"]' ).attr( 'disabled', 'disabled' ); + } + }); } }, diff --git a/assets/src/js/product-editor.js b/assets/src/js/product-editor.js index 6af33e78bf..d04de1aebd 100755 --- a/assets/src/js/product-editor.js +++ b/assets/src/js/product-editor.js @@ -68,6 +68,7 @@ $( 'body' ).on( 'click', '.product-container-footer input[type="submit"]', this.createNewProduct ); + this.attribute.disbalePredefinedAttribute(); }, saleSchedule: function() { @@ -447,6 +448,14 @@ }); }); + }, + + disbalePredefinedAttribute: function() { + $( 'ul.dokan-attribute-option-list li.product-attribute-list' ).each( function( index, el ) { + if ( $( el ).css( 'display' ) !== 'none' && $( el ).is( '.taxonomy' ) ) { + $( 'select#predefined_attribute' ).find( 'option[value="' + $( el ).data( 'taxonomy' ) + '"]' ).attr( 'disabled', 'disabled' ); + } + }); } }, From 7e186579ea4a715d9016d53e563e4e3a5fe7bbc4 Mon Sep 17 00:00:00 2001 From: rafsuntaskin Date: Wed, 2 Aug 2017 15:02:07 +0600 Subject: [PATCH 2/5] fixed typo --- templates/orders/details.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/orders/details.php b/templates/orders/details.php index c1b0460269..ad01e28833 100755 --- a/templates/orders/details.php +++ b/templates/orders/details.php @@ -139,7 +139,7 @@
-
+
From 90c840a48145dd277c8fc2545742c106a5f03fb7 Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Date: Wed, 2 Aug 2017 15:04:29 +0600 Subject: [PATCH 3/5] Fix order creating issue for single seller --- includes/order-functions.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/includes/order-functions.php b/includes/order-functions.php index 06dc4b39cf..d6734a56af 100755 --- a/includes/order-functions.php +++ b/includes/order-functions.php @@ -360,8 +360,7 @@ function dokan_delete_sync_duplicate_order( $order_id, $seller_id ) { function dokan_sync_insert_order( $order_id ) { global $wpdb; - $order_post = get_post( $order_id ); - if ( get_post_meta( $order_id, 'has_sub_order', true ) == true || $order_post->post_parent == 0 ) { + if ( get_post_meta( $order_id, 'has_sub_order', true ) == true ) { return; } @@ -751,14 +750,14 @@ function dokan_get_admin_commission_by( $order, $seller_id ) { if ( ! function_exists( 'dokan_get_customer_orders_by_seller' ) ) : /** - * Get Customer Orders by Seller - * + * Get Customer Orders by Seller + * * @since 2.6.6 - * + * * @param int $customer_id - * + * * @param int $seller_id - * + * * @return Object $order */ function dokan_get_customer_orders_by_seller( $customer_id, $seller_id ) { From 440247a473b3c47480b1ff56f65d7e3c8508c426 Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Date: Thu, 3 Aug 2017 09:56:32 +0600 Subject: [PATCH 4/5] Order creating issue fixed --- includes/order-functions.php | 4 ++-- includes/wc-functions.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/order-functions.php b/includes/order-functions.php index d6734a56af..07364f7178 100755 --- a/includes/order-functions.php +++ b/includes/order-functions.php @@ -360,7 +360,7 @@ function dokan_delete_sync_duplicate_order( $order_id, $seller_id ) { function dokan_sync_insert_order( $order_id ) { global $wpdb; - if ( get_post_meta( $order_id, 'has_sub_order', true ) == true ) { + if ( get_post_meta( $order_id, 'has_sub_order', true ) == '1' ) { return; } @@ -397,7 +397,7 @@ function dokan_sync_insert_order( $order_id ) { ); } -add_action( 'woocommerce_checkout_update_order_meta', 'dokan_sync_insert_order' ); +add_action( 'woocommerce_checkout_update_order_meta', 'dokan_sync_insert_order', 20 ); add_action( 'dokan_checkout_update_order_meta', 'dokan_sync_insert_order' ); diff --git a/includes/wc-functions.php b/includes/wc-functions.php index ce106612f5..423d46dd4a 100755 --- a/includes/wc-functions.php +++ b/includes/wc-functions.php @@ -423,7 +423,7 @@ function dokan_process_product_file_download_paths( $product_id, $variation_id, } } -add_action( 'woocommerce_checkout_update_order_meta', 'dokan_create_sub_order' ); +add_action( 'woocommerce_checkout_update_order_meta', 'dokan_create_sub_order', 10 ); /** * Get discount coupon total from a order From 61966a3b9b696ff0a2399ad69f26ee6bd49fbf2f Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Date: Thu, 3 Aug 2017 10:13:01 +0600 Subject: [PATCH 5/5] Version bump, changelog added, generate pot file --- changelog.txt | 5 +++++ dokan.php | 4 ++-- languages/dokan-lite.pot | 18 +++++++++--------- package.json | 2 +- readme.txt | 5 +++++ 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/changelog.txt b/changelog.txt index fb70346bb6..53950e0de2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +v2.6.7 -> Aug 3, 2017 +--------------------- +- [fix] Fix multiple vendor order creating issue +- [fix] Disable pre defined attribute which already set with product + v2.6.6 -> July 31, 2017 --------------------- - [fix] Dokan Emails are not translating diff --git a/dokan.php b/dokan.php index a51391d6af..e3bd8ad5fe 100755 --- a/dokan.php +++ b/dokan.php @@ -3,7 +3,7 @@ Plugin Name: Dokan Plugin URI: https://wordpress.org/plugins/dokan-lite/ Description: An e-commerce marketplace plugin for WordPress. Powered by WooCommerce and weDevs. -Version: 2.6.6 +Version: 2.6.7 Author: weDevs Author URI: https://wedevs.com/ Text Domain: dokan-lite @@ -45,7 +45,7 @@ define( '__DIR__', dirname( __FILE__ ) ); } -define( 'DOKAN_PLUGIN_VERSION', '2.6.6' ); +define( 'DOKAN_PLUGIN_VERSION', '2.6.7' ); define( 'DOKAN_FILE', __FILE__ ); define( 'DOKAN_DIR', __DIR__ ); define( 'DOKAN_INC_DIR', __DIR__ . '/includes' ); diff --git a/languages/dokan-lite.pot b/languages/dokan-lite.pot index 258ea4d321..66460a35db 100644 --- a/languages/dokan-lite.pot +++ b/languages/dokan-lite.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL2. msgid "" msgstr "" -"Project-Id-Version: Dokan 2.6.6\n" +"Project-Id-Version: Dokan 2.6.7\n" "Report-Msgid-Bugs-To: http://wedevs.com/support/forum/theme-support/dokan/\n" -"POT-Creation-Date: 2017-07-31 18:47:23+00:00\n" +"POT-Creation-Date: 2017-08-03 04:10:07+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -1415,17 +1415,17 @@ msgstr "" msgid "Order Status for Withdraw" msgstr "" -#: includes/admin/setup-wizard.php:450 includes/order-functions.php:498 +#: includes/admin/setup-wizard.php:450 includes/order-functions.php:497 #: templates/dashboard/orders-widget.php:26 msgid "Completed" msgstr "" -#: includes/admin/setup-wizard.php:451 includes/order-functions.php:513 +#: includes/admin/setup-wizard.php:451 includes/order-functions.php:512 #: templates/dashboard/orders-widget.php:36 templates/orders/listing.php:96 msgid "Processing" msgstr "" -#: includes/admin/setup-wizard.php:452 includes/order-functions.php:508 +#: includes/admin/setup-wizard.php:452 includes/order-functions.php:507 msgid "On-hold" msgstr "" @@ -1526,7 +1526,7 @@ msgstr "" msgid "Approved" msgstr "" -#: includes/admin/withdraw.php:23 includes/order-functions.php:523 +#: includes/admin/withdraw.php:23 includes/order-functions.php:522 #: templates/dashboard/orders-widget.php:41 msgid "Cancelled" msgstr "" @@ -1776,15 +1776,15 @@ msgstr "" msgid "Mark parent order completed when all child orders are completed." msgstr "" -#: includes/order-functions.php:503 +#: includes/order-functions.php:502 msgid "Pending Payment" msgstr "" -#: includes/order-functions.php:518 templates/dashboard/orders-widget.php:46 +#: includes/order-functions.php:517 templates/dashboard/orders-widget.php:46 msgid "Refunded" msgstr "" -#: includes/order-functions.php:528 +#: includes/order-functions.php:527 msgid "Failed" msgstr "" diff --git a/package.json b/package.json index cecdf32734..609d40a11a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dokan", - "version": "2.6.6", + "version": "2.6.7", "description": "A WordPress marketplace plugin", "author": "weDevs", "license": "GPL", diff --git a/readme.txt b/readme.txt index 7d6879ff84..515170ead1 100644 --- a/readme.txt +++ b/readme.txt @@ -180,6 +180,11 @@ A. Just install and activate the PRO version without deleting the free plugin. A == Changelog == +v2.6.7 -> Aug 3, 2017 +--------------------- +- [fix] Fix multiple vendor order creating issue +- [fix] Disable pre defined attribute which already set with product + v2.6.6 -> July 31, 2017 --------------------- - [fix] Dokan Emails are not translating