Skip to content

Commit

Permalink
Merge branch 'release/3.11.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
shohag121 committed Jul 10, 2024
2 parents 9c63566 + 16103d3 commit 2c72731
Show file tree
Hide file tree
Showing 52 changed files with 3,410 additions and 3,371 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
**Donate Link:** http://tareq.co/donate/
**Tags:** WooCommerce multivendor marketplace, multivendor marketplace, multivendor, multi seller, multi vendor, WooCommerce marketplace, WooCommerce product vendors
**Requires at least:** 6.4
**Tested up to:** 6.5.4
**Tested up to:** 6.5.5
**WC requires at least:** 8.0.0
**WC tested up to:** 8.9.2
**WC tested up to:** 9.0.2
**Requires PHP:** 7.4
**Stable tag:** 3.11.3
**Stable tag:** 3.11.4
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Transform your WooCommerce site into a multivendor marketplace with Dokan - a powerful and advanced WooCommerce multivendor marketplace solution

## Description ##

### THE BEST MULTIVENDOR MARKETPLACE PLUGIN FOR WORDPRESS – POWERED BY WOOCOMMERCE ###
### POWERFUL MULTIVENDOR MARKETPLACE PLUGIN FOR WORDPRESS – POWERED BY WOOCOMMERCE ###


[Dokan](https://dokan.co/wordpress/?utm_campaign=dokan-wordpress-org-visitor&utm_medium=learn_more_about_dokan&utm_source=WordPress.org) is the best frontend multivendor marketplace plugin for WordPress, powered by WooCommerce. It helps you build your own multivendor marketplace similar to Amazon, Shopify, eBay, and Magento in under 30 minutes.
[Dokan](https://dokan.co/wordpress/?utm_campaign=dokan-wordpress-org-visitor&utm_medium=learn_more_about_dokan&utm_source=WordPress.org) is the ultimate frontend multivendor marketplace plugin for WordPress, powered by WooCommerce. It helps you build your own multivendor marketplace similar to Amazon, Shopify, eBay, and Magento in under 30 minutes.

Moreover, Plus, with Dokan, you don't need any coding skills to create a thriving WooCommerce multivendor marketplace. Trusted by over 60,000 entrepreneurs globally for more than a decade, Dokan makes multivendor marketplace setup effortless and accessible to all.
Dokan is the fastest way to launch an eCommerce business and earn through commissions for products ranging from digital and physical to variable products.
Expand Down Expand Up @@ -81,7 +81,7 @@ Here is how you can build your multivendor marketplace with Dokan.
[youtube https://www.youtube.com/watch?v=4id-EwbfUko]


### THE BEST FRONTEND USER INTERFACE ###
### HIGHLY USER-FRIENDLY FRONTEND INTERFACE ###

To provide a comprehensive frontend experience, every vendor has a [personalized customizable dashboard](https://dokan.co/wordpress/features/?utm_campaign=dokan-wordpress-org-visitor&utm_medium=learn_more_about_dokan&utm_source=WordPress.org) on the store frontend. They can easily navigate and control every aspect of their marketplace from there. Backend access is restricted to only the admin, which sets Dokan apart from other marketplace plugins. However, all Dokan [modules](https://dokan.co/wordpress/modules/) are frontend compatible so that both the admin and vendors can enjoy the benefits and advanced features of Dokan.

Expand Down Expand Up @@ -347,6 +347,13 @@ A. Just install and activate the PRO version without deleting the free plugin. A

## Changelog ##

### v3.11.4 ( Jul 10, 2024 ) ###

- **update:** Direct links to the relevant settings from vendor progress bar added.
- **fix:** Some deprecation warning resolved.
- **fix:** Shop URL rendered double slash when using WPML on vendor registration.
- **fix:** Fatal error in block editor on adding and editing page with customer-migration shortcode.

### v3.11.3 ( Jun 10, 2024 ) ###

- **fix:** Responsive issue on vendor dashboard tabs preview.
Expand Down
8 changes: 8 additions & 0 deletions assets/css/dokan-tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
::backdrop {
--tw-border-spacing-x: 0;
Expand Down Expand Up @@ -95,6 +99,10 @@
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
.container {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/dokan-promo-notice.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/dokan.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/js/page-views.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/vue-admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vue-bootstrap.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vue-frontend.js

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions assets/src/js/page-views.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* global dokanPageViewsParams */

jQuery( document ).ready( function( $ ) {
if( ! localStorage ) {
return;
}

if ( ! window.dokanPageViewsParams ) {
return;
}

// Get today's date in the format of YYYY-MM-DD
let newDate = new Date().toISOString().slice(0, 10);
let dokanPageViewCount = JSON.parse(localStorage.getItem("dokan_pageview_count"));

// If there is no data in local storage or today's date is not same as the date in local storage.
if ( dokanPageViewCount === null || ( dokanPageViewCount.today && dokanPageViewCount.today !== newDate ) ) {
dokanPageViewCount = { "today": newDate, "post_ids": [] };
}

// If the post id is not in the local storage, then send the ajax request.
if ( ! dokanPageViewCount.post_ids.includes( window.dokanPageViewsParams.post_id ) ) {
$.post( window.dokanPageViewsParams.ajax_url, {
action: "dokan_pageview",
_ajax_nonce: window.dokanPageViewsParams.nonce,
post_id: window.dokanPageViewsParams.post_id,
} );

// Add the post id to the local storage.
dokanPageViewCount.post_ids.push( window.dokanPageViewsParams.post_id );
localStorage.setItem( "dokan_pageview_count", JSON.stringify( dokanPageViewCount ) );
}
} );
6 changes: 3 additions & 3 deletions dokan.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* 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.3
* Version: 3.11.4
* Author: weDevs
* Author URI: https://dokan.co/
* Text Domain: dokan-lite
* Requires Plugins: woocommerce
* WC requires at least: 8.0.0
* WC tested up to: 8.9.2
* WC tested up to: 9.0.2
* Domain Path: /languages/
* License: GPL2
*/
Expand Down Expand Up @@ -66,7 +66,7 @@ final class WeDevs_Dokan {
*
* @var string
*/
public $version = '3.11.3';
public $version = '3.11.4';

/**
* Instance of self
Expand Down
6 changes: 3 additions & 3 deletions includes/Admin/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class="dokan_product_author_override"
data-minimum_input_length="0"
data-data='<?php echo wp_json_encode( $user ); ?>'
>
</select> <?php echo wc_help_tip( __( 'You can search vendors and assign them.', 'dokan-lite' ) ); ?>
</select> <?php echo wp_kses( wc_help_tip( esc_html__( 'You can search vendors and assign them.', 'dokan-lite' ) ), wp_kses_allowed_html( 'user_description' ) ); ?>
<?php
}

Expand Down Expand Up @@ -165,9 +165,9 @@ public function search_vendors() {
*
* @return void
*/
public function override_product_author_by_admin( $product_id, $post ) {
public function override_product_author_by_admin( $product_id ) {
$product = wc_get_product( $product_id );
$posted_vendor_id = ! empty( $_POST['dokan_product_author_override'] ) ? intval( wp_unslash( $_POST['dokan_product_author_override'] ) ) : 0; // phpcs:ignore
$posted_vendor_id = ! empty( $_POST['dokan_product_author_override'] ) ? (int) sanitize_key( wp_unslash( $_POST['dokan_product_author_override'] ) ) : 0; // phpcs:ignore WordPress.Security.NonceVerification.Missing

if ( ! $posted_vendor_id ) {
return;
Expand Down
10 changes: 8 additions & 2 deletions includes/Admin/SetupWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public function dokan_setup_withdraw() {
<div class="wc-wizard-service-description">
<?php
// translators: %s: withdraw method name
printf( esc_html__( 'Enable %s for your vendor as a withdraw method', 'dokan-lite' ), dokan_withdraw_get_method_title( $key ) );
printf( esc_html__( 'Enable %s for your vendor as a withdraw method', 'dokan-lite' ), esc_html( dokan_withdraw_get_method_title( $key ) ) );
?>
</div>
<div class="dokan-wizard-service-enable">
Expand Down Expand Up @@ -732,9 +732,15 @@ public function dokan_setup_withdraw_save() {

$options = get_option( 'dokan_withdraw', [] );
$options['withdraw_methods'] = ! empty( $_POST['withdraw_methods'] ) ? wc_clean( wp_unslash( $_POST['withdraw_methods'] ) ) : [];
$options['withdraw_limit'] = ! empty( $_POST['withdraw_limit'] ) ? (float) wc_format_decimal( sanitize_text_field( wp_unslash( $_POST['withdraw_limit'] ) ) ) < 0 ? 0 : wc_format_decimal( sanitize_text_field( wp_unslash( $_POST['withdraw_limit'] ) ) ) : 0;
$options['withdraw_order_status'] = ! empty( $_POST['withdraw_order_status'] ) ? wc_clean( wp_unslash( $_POST['withdraw_order_status'] ) ) : [];

if ( ! empty( $_POST['withdraw_limit'] ) ) {
$input_limit = sanitize_text_field( wp_unslash( $_POST['withdraw_limit'] ) );
$options['withdraw_limit'] = is_numeric( $input_limit ) && $input_limit >= 0 ? wc_format_decimal( $input_limit ) : 0;
} else {
$options['withdraw_limit'] = 0;
}

/**
* Filter dokan_withdraw options before saving in setup wizard
*
Expand Down
2 changes: 1 addition & 1 deletion includes/Admin/SetupWizardNoWC.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function install_woocommerce() {
delete_transient( '_wc_activation_redirect' );

if ( is_wp_error( $installed ) ) {
wp_die( $installed->get_error_message(), __( 'Error installing WooCommerce plugin', 'dokan-lite' ) );
wp_die( esc_html( $installed->get_error_message() ), esc_html__( 'Error installing WooCommerce plugin', 'dokan-lite' ) );
}

set_transient( 'dokan_setup_wizard_no_wc', true, 15 * MINUTE_IN_SECONDS );
Expand Down
11 changes: 6 additions & 5 deletions includes/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ public function grant_access_to_download() {

include dirname( __DIR__ ) . '/templates/orders/order-download-permission-html.php';

$loop ++;
$file_count ++;
++$loop;
++$file_count;
}
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ public function add_order_note() {
echo 'customer-note';
}
echo '"><div class="note_content">';
echo wpautop( wptexturize( $note ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
echo wp_kses_post( wpautop( wptexturize( $note ) ) );
echo '</div><p class="meta"><a href="#" class="delete_note">' . esc_html__( 'Delete note', 'dokan-lite' ) . '</a></p>';
echo '</li>';
}
Expand Down Expand Up @@ -484,7 +484,7 @@ public function add_shipping_tracking_info() {
echo '<li rel="' . esc_attr( $comment_id ) . '" class="note ';
echo 'customer-note';
echo '"><div class="note_content">';
echo wpautop( wptexturize( $ship_info ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
echo wp_kses_post( wpautop( wptexturize( $ship_info ) ) );
echo '</div><p class="meta"><a href="#" class="delete_note">' . esc_html__( 'Delete', 'dokan-lite' ) . '</a></p>';
echo '</li>';

Expand Down Expand Up @@ -692,6 +692,7 @@ public function dokan_json_search_products_tags() {

$drop_down_tags = apply_filters(
'dokan_search_product_tags_for_vendor_products', [
'taxonomy' => 'product_tag',
'name__like' => $name,
'hide_empty' => 0,
'orderby' => 'name',
Expand All @@ -701,7 +702,7 @@ public function dokan_json_search_products_tags() {
]
);

$product_tags = get_terms( 'product_tag', $drop_down_tags );
$product_tags = get_terms( $drop_down_tags );

if ( $product_tags ) {
foreach ( $product_tags as $pro_term ) {
Expand Down
4 changes: 3 additions & 1 deletion includes/Customizer/HeadingControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ protected function render_content() {
<?php } ?>

<?php if ( ! empty( $this->description ) ) { ?>
<span class="description customize-control-description"><?php echo $this->description; ?></span>
<span class="description customize-control-description">
<?php echo wp_kses_post( $this->description ); ?>
</span>
<?php } ?>
<?php
}
Expand Down
2 changes: 1 addition & 1 deletion includes/Customizer/RadioImageControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function render_content() {
<label for="<?php echo esc_attr( $this->id ) . esc_attr( $value ); ?>">
<?php
if ( isset( $label['svg'] ) ) {
echo $label['svg'];
echo $label['svg']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
?>
<img src="<?php echo esc_html( $label['src'] ); ?>" alt="<?php echo esc_attr( $label['label'] ); ?>" title="<?php echo esc_attr( $label['label'] ); ?>">
Expand Down
6 changes: 5 additions & 1 deletion includes/Frontend/MyAccount/BecomeAVendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ public function load_customer_to_vendor_update_template() {
$user_id = get_current_user_id();
$error_message = '';

if ( is_admin() ) {
return;
}

if ( ! $user_id ) {
$error_message = __( 'You need to login before applying for vendor.', 'dokan-lite' );
} elseif ( $user_id && dokan_is_user_seller( $user_id ) ) {
Expand All @@ -167,7 +171,7 @@ public function load_customer_to_vendor_update_template() {
}

if ( $error_message ) {
if ( function_exists( 'wc_add_notice' ) && function_exists( 'wc_print_notices' ) ) {
if ( WC()->session && function_exists( 'wc_add_notice' ) && function_exists( 'wc_print_notices' ) ) {
wc_add_notice( $error_message, 'error' );
// print error message
wc_print_notices();
Expand Down
8 changes: 4 additions & 4 deletions includes/Order/Admin/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function shop_order_custom_columns( $col, $post_id ) {
}

if ( ! empty( $output ) ) {
echo apply_filters( "dokan_manage_shop_order_custom_columns_{$col}", $output, $order );
echo wp_kses_post( apply_filters( "dokan_manage_shop_order_custom_columns_{$col}", $output, $order ) );
}
}

Expand All @@ -168,15 +168,15 @@ public function shop_order_custom_columns( $col, $post_id ) {
* @since 3.8.0 Moved from includes/Admin/Hooks.php file
* @since 3.8.0 Rewritten for HPOS
*
* @param string[] $classes An array of post class names.
* @param string[] $class An array of additional class names added to the post.
* @param string[] $classes An array of post class names.
* @param string[] $css_class An array of additional class names added to the post.
* @param int $post_id The post ID.
*
* @global WP_Post $post
*
* @return array
*/
public function admin_shop_order_row_classes( $classes, $class, $post_id ) {
public function admin_shop_order_row_classes( $classes, $css_class, $post_id ) {
if ( ! OrderUtil::is_order( $post_id ) ) {
return $classes;
}
Expand Down
Loading

0 comments on commit 2c72731

Please sign in to comment.