Skip to content

Commit

Permalink
Merge branch 'release/v2.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
rafsuntaskin committed Jun 22, 2017
2 parents d161016 + 37ce1ec commit b79c058
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 74 deletions.
2 changes: 1 addition & 1 deletion assets/js/dokan.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jQuery(function($) {

$('.tips').tooltip();
$('select.grant_access_id').chosen();
//$('select.grant_access_id').chosen();

$('ul.order-status').on('click', 'a.dokan-edit-status', function(e) {
$(this).addClass('dokan-hide').closest('li').next('li').removeClass('dokan-hide');
Expand Down
2 changes: 1 addition & 1 deletion assets/src/js/orders.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jQuery(function($) {

$('.tips').tooltip();
$('select.grant_access_id').chosen();
//$('select.grant_access_id').chosen();

$('ul.order-status').on('click', 'a.dokan-edit-status', function(e) {
$(this).addClass('dokan-hide').closest('li').next('li').removeClass('dokan-hide');
Expand Down
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
v2.6.4 -> June 22, 2017
---------------------
- [fix] Store page product loop pagination not showing
- [fix] Order exporting not working properly
- [fix] Earning calculation date range issue
- [tweak] Banner upload is now available in store settings for all appearances
- [tweak] Profile completion progress custom values logic updated
- [tweak] Downloadable product section performance tweaks

v2.6.3 -> June 08, 2017
---------------------
- [fix] Missing text domains updated
Expand Down
4 changes: 2 additions & 2 deletions classes/template-orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function handle_order_export() {
$customer_phone = esc_html( get_post_meta( $order->order_id, '_billing_phone', true ) );
$customer_ip = esc_html( get_post_meta( $order->order_id, '_customer_ip_address', true ) );
} else {
$customer_name = get_post_meta( dokan_get_prop( $order, 'id' ), '_billing_first_name', true ). ' '. get_post_meta( dokan_get_prop( $order, 'id' ), '_billing_last_name', true ).'(Guest)';
$customer_name = get_post_meta( $order->order_id, '_billing_first_name', true ). ' '. get_post_meta( $order->order_id, '_billing_last_name', true ).'(Guest)';
$customer_email = esc_html( get_post_meta( $order->order_id, '_billing_email', true ) );
$customer_phone = esc_html( get_post_meta( $order->order_id, '_billing_phone', true ) );
$customer_ip = esc_html( get_post_meta( $order->order_id, '_customer_ip_address', true ) );
Expand All @@ -149,7 +149,7 @@ function handle_order_export() {
'order_shipping_cost' => $the_order->get_total_shipping(),
'order_payment_method' => get_post_meta( $order->order_id, '_payment_method_title', true ),
'order_total' => $the_order->get_total(),
'order_status' => $statuses[dokan_get_prop( $the_order, 'status' )],
'order_status' => $statuses['wc-' . dokan_get_prop( $the_order, 'status' )],
'order_date' => dokan_get_date_created( $the_order ),
'customer_name' => $customer_name,
'customer_email' => $customer_email,
Expand Down
22 changes: 11 additions & 11 deletions classes/template-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
extract( $progress_values );

//settings wise completeness section
if( isset( $dokan_settings['gravatar'] ) ):
if ( isset( $profile_picture_val ) && isset( $dokan_settings['gravatar'] ) ):
if ( $dokan_settings['gravatar'] != 0 ) {
$profile_val = $profile_val + $profile_picture_val;
$track_val['gravatar'] = $profile_picture_val;
Expand All @@ -569,7 +569,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

// Calculate Social profiles
if( isset( $dokan_settings['social'] ) ):
if ( isset( $social_val ) && isset( $dokan_settings['social'] ) ):

foreach ( $dokan_settings['social'] as $key => $value ) {

Expand All @@ -590,7 +590,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

//calculate completeness for phone
if( isset( $dokan_settings['phone'] ) ):
if ( isset( $phone_val ) && isset( $dokan_settings['phone'] ) ):

if ( strlen( trim( $dokan_settings['phone'] ) ) != 0 ) {
$profile_val = $profile_val + $phone_val;
Expand All @@ -604,7 +604,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

//calculate completeness for banner
if( isset( $dokan_settings['banner'] ) ):
if ( isset( $banner_val ) && isset( $dokan_settings['banner'] ) ):

if ( $dokan_settings['banner'] != 0 ) {
$profile_val = $profile_val + $banner_val;
Expand All @@ -616,7 +616,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

//calculate completeness for store name
if( isset( $dokan_settings['store_name'] ) ):
if ( isset( $store_name_val ) && isset( $dokan_settings['store_name'] ) ):
if ( isset( $dokan_settings['store_name'] ) ) {
$profile_val = $profile_val + $store_name_val;
$track_val['store_name'] = $store_name_val;
Expand All @@ -628,7 +628,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

//calculate completeness for address
if( isset( $dokan_settings['address'] ) ):
if ( isset( $address_val ) && isset( $dokan_settings['address'] ) ):
if ( !empty($dokan_settings['address']['street_1']) ) {
$profile_val = $profile_val + $address_val;
$track_val['address'] = $address_val;
Expand All @@ -640,7 +640,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
endif;

// Calculate Payment method val for Bank
if ( isset( $dokan_settings['payment']['bank'] ) ) {
if ( isset( $dokan_settings['payment'] ) && isset( $dokan_settings['payment']['bank'] ) ) {
$count_bank = true;

// if any of the values for bank details are blank, check_bank will be set as false
Expand All @@ -659,7 +659,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
}

// Calculate Payment method val for Paypal
if ( isset( $dokan_settings['payment']['paypal'] ) ) {
if ( isset( $dokan_settings['payment'] ) && isset( $dokan_settings['payment']['paypal'] ) ) {
$p_email = isset($dokan_settings['payment']['paypal']['email']) ? $dokan_settings['payment']['paypal']['email'] : false;
if ( $p_email != false ) {

Expand All @@ -670,7 +670,7 @@ function calculate_profile_completeness_value( $dokan_settings ) {
}

// Calculate Payment method val for skrill
if ( isset( $dokan_settings['payment']['skrill'] ) ) {
if ( isset( $dokan_settings['payment'] ) && isset( $dokan_settings['payment']['skrill'] ) ) {

$s_email = isset( $dokan_settings['payment']['skrill']['email'] ) ? $dokan_settings['payment']['skrill']['email'] : false;
if ( $s_email != false ) {
Expand All @@ -696,8 +696,8 @@ function calculate_profile_completeness_value( $dokan_settings ) {

$track_val['next_todo'] = $next_add;
$track_val['progress'] = $profile_val;

return $track_val;
return apply_filters( 'dokan_profile_completion_progress_value', $track_val ) ;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions dokan.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Dokan (Lite) - Multi-vendor Marketplace
Plugin URI: https://wordpress.org/plugins/dokan-lite/
Description: An e-commerce marketplace plugin for WordPress. Powered by WooCommerce and weDevs.
Version: 2.6.3
Version: 2.6.4
Author: Tareq Hasan
Author URI: http://tareq.co/
Text Domain: dokan-lite
Expand Down Expand Up @@ -45,7 +45,7 @@
define( '__DIR__', dirname( __FILE__ ) );
}

define( 'DOKAN_PLUGIN_VERSION', '2.6.3' );
define( 'DOKAN_PLUGIN_VERSION', '2.6.4' );
define( 'DOKAN_FILE', __FILE__ );
define( 'DOKAN_DIR', __DIR__ );
define( 'DOKAN_INC_DIR', __DIR__ . '/includes' );
Expand Down
10 changes: 5 additions & 5 deletions includes/order-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
$order_total = $order->get_total();
$order_shipping = $order->get_total_shipping();
$order_tax = $order->get_total_tax();
$extra_cost = $order_shipping + $order_tax;
$extra_cost = (float) $order_shipping + (float) $order_tax;

$commission_recipient = dokan_get_option( 'extra_fee_recipient', 'dokan_general', 'seller' );

Expand Down Expand Up @@ -89,7 +89,7 @@ function dokan_get_seller_orders_by_date( $start_date, $end_date, $seller_id = f
global $wpdb;

$seller_id = ! $seller_id ? get_current_user_id() : intval( $seller_id );

$end_date = date( 'Y-m-d 00:00:00', strtotime( $end_date ) );
$end_date = date( 'Y-m-d h:i:s', strtotime( $end_date . '-1 minute' ) );
$start_date = date( 'Y-m-d', strtotime( $start_date ) );
Expand Down Expand Up @@ -373,7 +373,7 @@ function dokan_sync_insert_order( $order_id ) {
$net_amount = apply_filters( 'dokan_order_net_amount', $net_amount, $order );

dokan_delete_sync_duplicate_order( $order_id, $seller_id );

// make sure order status contains "wc-" prefix
if ( stripos( $order_status, 'wc-' ) === false ) {
$order_status = 'wc-' . $order_status;
Expand Down Expand Up @@ -576,12 +576,12 @@ function dokan_sync_order_table( $order_id ) {
$admin_commission = dokan_get_admin_commission_by( $order, $seller_id );
$net_amount = $order_total - $admin_commission;
$net_amount = apply_filters( 'dokan_sync_order_net_amount', $net_amount, $order );

// make sure order status contains "wc-" prefix
if ( stripos( $order_status, 'wc-' ) === false ) {
$order_status = 'wc-' . $order_status;
}

$wpdb->insert( $wpdb->prefix . 'dokan_orders',
array(
'order_id' => $order_id,
Expand Down
2 changes: 1 addition & 1 deletion includes/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function dokan_content_nav( $nav_id, $query = null ) {
</ul>


<?php if ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
<?php if ( $wp_query->max_num_pages > 1 && ( dokan_is_store_page() || is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
<?php dokan_page_navi( '', '', $wp_query ); ?>
<?php endif; ?>

Expand Down
8 changes: 4 additions & 4 deletions includes/wc-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function dokan_seller_displayname ( $display_name ) {
* @return \WP_Query
*/
function dokan_get_featured_products( $per_page = 9) {


$args = array(
'posts_per_page' => $per_page,
Expand Down Expand Up @@ -635,7 +635,7 @@ function dokan_get_latest_products( $per_page = 9 , $seller_id = '' ) {
);

if ( version_compare( WC_VERSION, '2.7', '>' ) ) {

$product_visibility_term_ids = wc_get_product_visibility_term_ids();

$args['tax_query'] = array(
Expand Down Expand Up @@ -683,7 +683,7 @@ function dokan_get_best_selling_products( $per_page = 8, $seller_id = '' ) {
);

if ( version_compare( WC_VERSION, '2.7', '>' ) ) {

$product_visibility_term_ids = wc_get_product_visibility_term_ids();
$args['tax_query'] = array(
'taxonomy' => 'product_visibility',
Expand Down Expand Up @@ -877,7 +877,7 @@ function dokan_get_seller_earnings( $seller_id, $start_date = '', $end_date = ''
}

if ( empty( $end_date ) ) {
$end_date = date( 'Y-m-d', strtotime( 'midnight', current_time( 'timestamp' ) ) );
$end_date = date( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ) );
}

$all_orders = dokan_get_seller_orders_by_date( $start_date, $end_date, $seller_id, dokan_withdraw_get_active_order_status() );
Expand Down
48 changes: 24 additions & 24 deletions languages/dokan-lite.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL2.
msgid ""
msgstr ""
"Project-Id-Version: Dokan (Lite) - Multi-vendor Marketplace 2.6.3\n"
"Project-Id-Version: Dokan (Lite) - Multi-vendor Marketplace 2.6.4\n"
"Report-Msgid-Bugs-To: http://wedevs.com/support/forum/theme-support/dokan/\n"
"POT-Creation-Date: 2017-06-08 08:00:05+00:00\n"
"POT-Creation-Date: 2017-06-22 05:37:03+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -41,7 +41,7 @@ msgstr ""
msgid "Banner"
msgstr ""

#: classes/admin-user-profile.php:97 templates/settings/store-form.php:68
#: classes/admin-user-profile.php:97 templates/settings/store-form.php:67
msgid "Upload banner"
msgstr ""

Expand Down Expand Up @@ -507,7 +507,7 @@ msgstr ""
msgid "Store Setup"
msgstr ""

#: classes/seller-setup-wizard.php:240 templates/settings/store-form.php:119
#: classes/seller-setup-wizard.php:240 templates/settings/store-form.php:117
msgid "Store Product Per Page"
msgstr ""

Expand Down Expand Up @@ -535,11 +535,11 @@ msgstr ""
msgid "State Name"
msgstr ""

#: classes/seller-setup-wizard.php:281 templates/settings/store-form.php:149
#: classes/seller-setup-wizard.php:281 templates/settings/store-form.php:147
msgid "Email"
msgstr ""

#: classes/seller-setup-wizard.php:284 templates/settings/store-form.php:154
#: classes/seller-setup-wizard.php:284 templates/settings/store-form.php:152
msgid "Show email address in store"
msgstr ""

Expand Down Expand Up @@ -1161,7 +1161,7 @@ msgid "Define the seller store URL (%s<strong>[this-text]</strong>/[seller-name]
msgstr ""

#: includes/admin/admin.php:312 includes/functions.php:997
#: templates/settings/store-form.php:196
#: templates/settings/store-form.php:194
msgid "Terms and Conditions"
msgstr ""

Expand Down Expand Up @@ -2602,11 +2602,11 @@ msgstr ""
msgid "Add Tracking Details"
msgstr ""

#: templates/orders/downloadable.php:39
#: templates/orders/downloadable.php:38
msgid "Choose a downloadable product&hellip;"
msgstr ""

#: templates/orders/downloadable.php:72
#: templates/orders/downloadable.php:68
msgid "Grant Access"
msgstr ""

Expand Down Expand Up @@ -3150,63 +3150,63 @@ msgstr ""
msgid "State "
msgstr ""

#: templates/settings/payment.php:39 templates/settings/store-form.php:228
#: templates/settings/payment.php:39 templates/settings/store-form.php:226
msgid "Update Settings"
msgstr ""

#: templates/settings/store-form.php:81
#: templates/settings/store-form.php:80
msgid "Upload a banner for your store. Banner size is (%sx%s) pixels."
msgstr ""

#: templates/settings/store-form.php:95
#: templates/settings/store-form.php:93
msgid "Profile Picture"
msgstr ""

#: templates/settings/store-form.php:105
#: templates/settings/store-form.php:103
msgid "Upload Photo"
msgstr ""

#: templates/settings/store-form.php:111
#: templates/settings/store-form.php:109
msgid "Store Name"
msgstr ""

#: templates/settings/store-form.php:114
#: templates/settings/store-form.php:112
msgid "store name"
msgstr ""

#: templates/settings/store-form.php:142
#: templates/settings/store-form.php:140
msgid "Phone No"
msgstr ""

#: templates/settings/store-form.php:144
#: templates/settings/store-form.php:142
msgid "+123456.."
msgstr ""

#: templates/settings/store-form.php:161
#: templates/settings/store-form.php:159
msgid "More product"
msgstr ""

#: templates/settings/store-form.php:166
#: templates/settings/store-form.php:164
msgid "Enable tab on product single page view"
msgstr ""

#: templates/settings/store-form.php:174
#: templates/settings/store-form.php:172
msgid "Map"
msgstr ""

#: templates/settings/store-form.php:181
#: templates/settings/store-form.php:179
msgid "Type an address to find"
msgstr ""

#: templates/settings/store-form.php:182
#: templates/settings/store-form.php:180
msgid "Find Address"
msgstr ""

#: templates/settings/store-form.php:200
#: templates/settings/store-form.php:198
msgid "Show terms and conditions in store page"
msgstr ""

#: templates/settings/store-form.php:206
#: templates/settings/store-form.php:204
msgid "TOC Details"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dokan",
"version": "2.6.3",
"version": "2.6.4",
"description": "A WordPress marketplace plugin",
"author": "Tareq Hasan",
"license": "GPL",
Expand Down
Loading

0 comments on commit b79c058

Please sign in to comment.