Version Description
Download this release
Release Info
Developer | tareq1988 |
Plugin | Dokan – Best WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy |
Version | 3.1.2 |
Comparing to | |
See all releases |
Code changes from version 3.1.1 to 3.1.2
- dokan.php +2 -2
- includes/Admin/LimitedTimePromotion.php +15 -8
- includes/REST/StoreController.php +1 -0
- includes/Vendor/Manager.php +19 -12
- includes/functions.php +1 -1
- languages/dokan-lite.pot +17 -17
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
dokan.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Dokan
|
4 |
* Plugin URI: https://wordpress.org/plugins/dokan-lite/
|
5 |
* Description: An e-commerce marketplace plugin for WordPress. Powered by WooCommerce and weDevs.
|
6 |
-
* Version: 3.1.
|
7 |
* Author: weDevs
|
8 |
* Author URI: https://wedevs.com/
|
9 |
* Text Domain: dokan-lite
|
@@ -56,7 +56,7 @@ final class WeDevs_Dokan {
|
|
56 |
*
|
57 |
* @var string
|
58 |
*/
|
59 |
-
public $version = '3.1.
|
60 |
|
61 |
/**
|
62 |
* Instance of self
|
3 |
* Plugin Name: Dokan
|
4 |
* Plugin URI: https://wordpress.org/plugins/dokan-lite/
|
5 |
* Description: An e-commerce marketplace plugin for WordPress. Powered by WooCommerce and weDevs.
|
6 |
+
* Version: 3.1.2
|
7 |
* Author: weDevs
|
8 |
* Author URI: https://wedevs.com/
|
9 |
* Text Domain: dokan-lite
|
56 |
*
|
57 |
* @var string
|
58 |
*/
|
59 |
+
public $version = '3.1.2';
|
60 |
|
61 |
/**
|
62 |
* Instance of self
|
includes/Admin/LimitedTimePromotion.php
CHANGED
@@ -39,12 +39,13 @@ class LimitedTimePromotion {
|
|
39 |
|
40 |
$notices = [
|
41 |
[
|
42 |
-
'
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
|
|
48 |
],
|
49 |
];
|
50 |
|
@@ -71,12 +72,18 @@ class LimitedTimePromotion {
|
|
71 |
return;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
?>
|
75 |
-
<div class="notice dokan-limited-time-promotional-notice">
|
76 |
<div class="content">
|
77 |
<h2><?php echo esc_html( $notice['title'] ); ?></h2>
|
78 |
-
<p><?php echo
|
|
|
79 |
<a href="<?php echo esc_url( $notice['link'] ); ?>" class="button button-primary promo-btn" target="_blank"><?php echo esc_html__( 'Get Deals →', 'dokan-lite' ); ?></a>
|
|
|
80 |
</div>
|
81 |
<span class="prmotion-close-icon dashicons dashicons-no-alt" data-key="<?php echo esc_attr( $notice['key'] ); ?>"></span>
|
82 |
<div class="clear"></div>
|
39 |
|
40 |
$notices = [
|
41 |
[
|
42 |
+
'pro' => true,
|
43 |
+
'key' => 'dokan-pro-changes',
|
44 |
+
'start_date' => '2021-01-10 09:00:00 EST',
|
45 |
+
'end_date' => '2021-02-28 23:59:00 EST',
|
46 |
+
'title' => 'Dokan Pro Upcoming Changes',
|
47 |
+
'content' => '<p><b>PayPal Adaptive Payment</b> module will be shutdown from Dokan Pro <code>v3.1.5</code></p><p><b>Vendor Subscription Product</b> module will be renamed as <b>Product Subscription</b> starting from Dokan Pro <code>v3.1.5</code></p>',
|
48 |
+
'link' => '',
|
49 |
],
|
50 |
];
|
51 |
|
72 |
return;
|
73 |
}
|
74 |
|
75 |
+
if ( $notice['pro'] && ! dokan()->is_pro_exists() ) {
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
?>
|
80 |
+
<div class="notice notice-error dokan-limited-time-promotional-notice">
|
81 |
<div class="content">
|
82 |
<h2><?php echo esc_html( $notice['title'] ); ?></h2>
|
83 |
+
<p><?php echo wp_kses_post( $notice['content'] ); ?></p>
|
84 |
+
<?php if( ! empty( $notice['link'] ) ): ?>
|
85 |
<a href="<?php echo esc_url( $notice['link'] ); ?>" class="button button-primary promo-btn" target="_blank"><?php echo esc_html__( 'Get Deals →', 'dokan-lite' ); ?></a>
|
86 |
+
<?php endif ?>
|
87 |
</div>
|
88 |
<span class="prmotion-close-icon dashicons dashicons-no-alt" data-key="<?php echo esc_attr( $notice['key'] ); ?>"></span>
|
89 |
<div class="clear"></div>
|
includes/REST/StoreController.php
CHANGED
@@ -213,6 +213,7 @@ class StoreController extends WP_REST_Controller {
|
|
213 |
$args = [
|
214 |
'number' => (int) $params['per_page'],
|
215 |
'offset' => (int) ( $params['page'] - 1 ) * $params['per_page'],
|
|
|
216 |
];
|
217 |
|
218 |
if ( ! empty( $params['search'] ) ) {
|
213 |
$args = [
|
214 |
'number' => (int) $params['per_page'],
|
215 |
'offset' => (int) ( $params['page'] - 1 ) * $params['per_page'],
|
216 |
+
'status' => 'all'
|
217 |
];
|
218 |
|
219 |
if ( ! empty( $params['search'] ) ) {
|
includes/Vendor/Manager.php
CHANGED
@@ -49,28 +49,35 @@ class Manager {
|
|
49 |
'offset' => 0,
|
50 |
'orderby' => 'registered',
|
51 |
'order' => 'ASC',
|
52 |
-
'status' => [ 'approved'
|
53 |
'featured' => '', // yes or no
|
54 |
'meta_query' => [],
|
55 |
];
|
56 |
|
57 |
-
$args
|
58 |
-
$status = $args['status'];
|
59 |
|
60 |
-
|
61 |
-
if ( 'approved' != $args['status'] && current_user_can( 'manage_woocommerce' ) ) {
|
62 |
-
$status = $args['status'];
|
63 |
-
}
|
64 |
|
65 |
-
|
66 |
-
$operator = ( $status == 'approved' ) ? '=' : '!=';
|
67 |
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
'key' => 'dokan_enable_selling',
|
70 |
-
'value' => 'yes',
|
71 |
-
'compare' =>
|
72 |
];
|
73 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
// if featured
|
76 |
if ( 'yes' == $args['featured'] ) {
|
49 |
'offset' => 0,
|
50 |
'orderby' => 'registered',
|
51 |
'order' => 'ASC',
|
52 |
+
'status' => [ 'approved' ],
|
53 |
'featured' => '', // yes or no
|
54 |
'meta_query' => [],
|
55 |
];
|
56 |
|
57 |
+
$args = wp_parse_args( $args, $defaults );
|
|
|
58 |
|
59 |
+
$status = (array) $args['status'];
|
|
|
|
|
|
|
60 |
|
61 |
+
$meta_query = [ 'relation' => 'OR' ];
|
|
|
62 |
|
63 |
+
foreach ( $status as $stat ) {
|
64 |
+
if ( $stat === 'all' ) {
|
65 |
+
continue;
|
66 |
+
}
|
67 |
+
|
68 |
+
$meta_query[] = [
|
69 |
'key' => 'dokan_enable_selling',
|
70 |
+
'value' => ( $stat == 'approved' ) ? 'yes' : 'no',
|
71 |
+
'compare' => '=',
|
72 |
];
|
73 |
}
|
74 |
+
|
75 |
+
if ( ! empty( $args['meta_query'] ) ) {
|
76 |
+
$args['meta_query']['relation'] = 'AND';
|
77 |
+
$args['meta_query'][] = $meta_query;
|
78 |
+
} else {
|
79 |
+
$args['meta_query'] = $meta_query;
|
80 |
+
}
|
81 |
|
82 |
// if featured
|
83 |
if ( 'yes' == $args['featured'] ) {
|
includes/functions.php
CHANGED
@@ -3970,7 +3970,7 @@ function dokan_wp_timezone_string() {
|
|
3970 |
* @throws Exception
|
3971 |
* @return string|false The date, translated if locale specifies it. False on invalid timestamp input.
|
3972 |
*/
|
3973 |
-
function dokan_format_date( $date, $format = false ) {
|
3974 |
// if date is empty, get current datetime timestamp
|
3975 |
if ( empty( $date ) ) {
|
3976 |
$date = dokan_current_datetime()->getTimestamp();
|
3970 |
* @throws Exception
|
3971 |
* @return string|false The date, translated if locale specifies it. False on invalid timestamp input.
|
3972 |
*/
|
3973 |
+
function dokan_format_date( $date = '', $format = false ) {
|
3974 |
// if date is empty, get current datetime timestamp
|
3975 |
if ( empty( $date ) ) {
|
3976 |
$date = dokan_current_datetime()->getTimestamp();
|
languages/dokan-lite.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Dokan 3.1.
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
-
"POT-Creation-Date: 2021-01-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -77,12 +77,12 @@ msgid "Learn More →"
|
|
77 |
msgstr ""
|
78 |
|
79 |
#: includes/Abstracts/DokanPromotion.php:186
|
80 |
-
#: includes/Admin/LimitedTimePromotion.php:
|
81 |
msgid "You have no permission to do that"
|
82 |
msgstr ""
|
83 |
|
84 |
#: includes/Abstracts/DokanPromotion.php:190
|
85 |
-
#: includes/Admin/LimitedTimePromotion.php:
|
86 |
#: includes/Admin/Settings.php:100
|
87 |
msgid "Invalid nonce"
|
88 |
msgstr ""
|
@@ -179,7 +179,7 @@ msgstr ""
|
|
179 |
msgid "Toggle Sub-orders"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: includes/Admin/LimitedTimePromotion.php:
|
183 |
msgid "Get Deals →"
|
184 |
msgstr ""
|
185 |
|
@@ -1182,7 +1182,7 @@ msgstr ""
|
|
1182 |
msgid "Something went wrong!"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
-
#: includes/Ajax.php:350 includes/REST/StoreController.php:
|
1186 |
msgid "Email sent successfully!"
|
1187 |
msgstr ""
|
1188 |
|
@@ -3784,36 +3784,36 @@ msgstr ""
|
|
3784 |
msgid "Status for the store object."
|
3785 |
msgstr ""
|
3786 |
|
3787 |
-
#: includes/REST/StoreController.php:
|
3788 |
-
#: includes/REST/StoreController.php:
|
3789 |
msgid "No store found"
|
3790 |
msgstr ""
|
3791 |
|
3792 |
-
#: includes/REST/StoreController.php:
|
3793 |
msgid "No vendor found for updating status"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
-
#: includes/REST/StoreController.php:
|
3797 |
msgid "Invalid user ID for reassignment."
|
3798 |
msgstr ""
|
3799 |
|
3800 |
-
#: includes/REST/StoreController.php:
|
3801 |
msgid "No reviews found"
|
3802 |
msgstr ""
|
3803 |
|
3804 |
-
#: includes/REST/StoreController.php:
|
3805 |
msgid "This email address is not valid"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
-
#: includes/REST/StoreController.php:
|
3809 |
msgid "No vendor is found to be send an email."
|
3810 |
msgstr ""
|
3811 |
|
3812 |
-
#: includes/REST/StoreController.php:
|
3813 |
msgid "Status parameter must be active or inactive"
|
3814 |
msgstr ""
|
3815 |
|
3816 |
-
#: includes/REST/StoreController.php:
|
3817 |
msgid "No items found for bulk updating"
|
3818 |
msgstr ""
|
3819 |
|
@@ -3941,11 +3941,11 @@ msgstr ""
|
|
3941 |
msgid "Upgrading db fields error: "
|
3942 |
msgstr ""
|
3943 |
|
3944 |
-
#: includes/Vendor/Manager.php:
|
3945 |
msgid "Unable to create vendor"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
-
#: includes/Vendor/Manager.php:
|
3949 |
msgid "Email is not valid"
|
3950 |
msgstr ""
|
3951 |
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Dokan 3.1.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
+
"POT-Creation-Date: 2021-01-12 12:20:58+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
77 |
msgstr ""
|
78 |
|
79 |
#: includes/Abstracts/DokanPromotion.php:186
|
80 |
+
#: includes/Admin/LimitedTimePromotion.php:171
|
81 |
msgid "You have no permission to do that"
|
82 |
msgstr ""
|
83 |
|
84 |
#: includes/Abstracts/DokanPromotion.php:190
|
85 |
+
#: includes/Admin/LimitedTimePromotion.php:175 includes/Admin/Settings.php:72
|
86 |
#: includes/Admin/Settings.php:100
|
87 |
msgid "Invalid nonce"
|
88 |
msgstr ""
|
179 |
msgid "Toggle Sub-orders"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/Admin/LimitedTimePromotion.php:85
|
183 |
msgid "Get Deals →"
|
184 |
msgstr ""
|
185 |
|
1182 |
msgid "Something went wrong!"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: includes/Ajax.php:350 includes/REST/StoreController.php:810
|
1186 |
msgid "Email sent successfully!"
|
1187 |
msgstr ""
|
1188 |
|
3784 |
msgid "Status for the store object."
|
3785 |
msgstr ""
|
3786 |
|
3787 |
+
#: includes/REST/StoreController.php:288 includes/REST/StoreController.php:359
|
3788 |
+
#: includes/REST/StoreController.php:517
|
3789 |
msgid "No store found"
|
3790 |
msgstr ""
|
3791 |
|
3792 |
+
#: includes/REST/StoreController.php:311 includes/REST/StoreController.php:835
|
3793 |
msgid "No vendor found for updating status"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
+
#: includes/REST/StoreController.php:316
|
3797 |
msgid "Invalid user ID for reassignment."
|
3798 |
msgstr ""
|
3799 |
|
3800 |
+
#: includes/REST/StoreController.php:535 includes/REST/StoreController.php:554
|
3801 |
msgid "No reviews found"
|
3802 |
msgstr ""
|
3803 |
|
3804 |
+
#: includes/REST/StoreController.php:739
|
3805 |
msgid "This email address is not valid"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
+
#: includes/REST/StoreController.php:782
|
3809 |
msgid "No vendor is found to be send an email."
|
3810 |
msgstr ""
|
3811 |
|
3812 |
+
#: includes/REST/StoreController.php:829
|
3813 |
msgid "Status parameter must be active or inactive"
|
3814 |
msgstr ""
|
3815 |
|
3816 |
+
#: includes/REST/StoreController.php:863
|
3817 |
msgid "No items found for bulk updating"
|
3818 |
msgstr ""
|
3819 |
|
3941 |
msgid "Upgrading db fields error: "
|
3942 |
msgstr ""
|
3943 |
|
3944 |
+
#: includes/Vendor/Manager.php:189
|
3945 |
msgid "Unable to create vendor"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
+
#: includes/Vendor/Manager.php:273
|
3949 |
msgid "Email is not valid"
|
3950 |
msgstr ""
|
3951 |
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tested up to: 5.6
|
|
7 |
WC requires at least: 3.0
|
8 |
WC tested up to: 4.8.0
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable tag: 3.1.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -292,6 +292,11 @@ A. Just install and activate the PRO version without deleting the free plugin. A
|
|
292 |
|
293 |
== Changelog ==
|
294 |
|
|
|
|
|
|
|
|
|
|
|
295 |
= v3.1.1 ( January 11, 2021 ) =
|
296 |
|
297 |
- **feat:** Added searching feature for Dokan admin settings
|
7 |
WC requires at least: 3.0
|
8 |
WC tested up to: 4.8.0
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable tag: 3.1.2
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
292 |
|
293 |
== Changelog ==
|
294 |
|
295 |
+
= v3.1.2 ( January 12, 2021 ) =
|
296 |
+
|
297 |
+
- **fix:** Store listing page displaying disabled vendors
|
298 |
+
- **notice:** Added Paypal adaptive modules removal notice
|
299 |
+
|
300 |
= v3.1.1 ( January 11, 2021 ) =
|
301 |
|
302 |
- **feat:** Added searching feature for Dokan admin settings
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitef920bb6f2ebb0436c54ef5312c46fdd::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit3dbd134ccde0989426f65f1495d503c2
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitef920bb6f2ebb0436c54ef5312c46fdd
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitef920bb6f2ebb0436c54ef5312c46fdd', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitef920bb6f2ebb0436c54ef5312c46fdd', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitef920bb6f2ebb0436c54ef5312c46fdd::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
@@ -177,9 +177,9 @@ class ComposerStaticInit3dbd134ccde0989426f65f1495d503c2
|
|
177 |
public static function getInitializer(ClassLoader $loader)
|
178 |
{
|
179 |
return \Closure::bind(function () use ($loader) {
|
180 |
-
$loader->prefixLengthsPsr4 =
|
181 |
-
$loader->prefixDirsPsr4 =
|
182 |
-
$loader->classMap =
|
183 |
|
184 |
}, null, ClassLoader::class);
|
185 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitef920bb6f2ebb0436c54ef5312c46fdd
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
177 |
public static function getInitializer(ClassLoader $loader)
|
178 |
{
|
179 |
return \Closure::bind(function () use ($loader) {
|
180 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitef920bb6f2ebb0436c54ef5312c46fdd::$prefixLengthsPsr4;
|
181 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitef920bb6f2ebb0436c54ef5312c46fdd::$prefixDirsPsr4;
|
182 |
+
$loader->classMap = ComposerStaticInitef920bb6f2ebb0436c54ef5312c46fdd::$classMap;
|
183 |
|
184 |
}, null, ClassLoader::class);
|
185 |
}
|