Dokan – Best WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy - Version 3.4.3

Version Description

Download this release

Release Info

Developer tareq1988
Plugin Icon wp plugin Dokan – Best WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy
Version 3.4.3
Comparing to
See all releases

Code changes from version 3.4.2 to 3.4.3

assets/css/style.css CHANGED
@@ -2357,6 +2357,161 @@ div.media-sidebar a.edit-attachment {
2357
  width: 100%;
2358
  height: 300px;
2359
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2360
  .dokan-dashboard .dokan-dashboard-content .edit-account fieldset {
2361
  margin-top: 30px;
2362
  }
2357
  width: 100%;
2358
  height: 300px;
2359
  }
2360
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary #vendor-dashboard-payment-settings-error {
2361
+ padding: 25px;
2362
+ display: none;
2363
+ background-color: palevioletred;
2364
+ }
2365
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header {
2366
+ display: flex;
2367
+ justify-content: space-between;
2368
+ align-items: center;
2369
+ padding: 10px;
2370
+ background-color: #EEEEEE;
2371
+ }
2372
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header > h2 {
2373
+ margin: 5px 0;
2374
+ flex-grow: 1;
2375
+ }
2376
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown {
2377
+ flex-grow: 2;
2378
+ text-align: right;
2379
+ }
2380
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down-wrapper {
2381
+ position: relative;
2382
+ }
2383
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down {
2384
+ display: none;
2385
+ max-height: 200px;
2386
+ border: 1px black solid;
2387
+ position: absolute;
2388
+ top: 0;
2389
+ right: 0;
2390
+ background-color: white;
2391
+ }
2392
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down ul {
2393
+ list-style: none;
2394
+ margin: 0;
2395
+ max-height: 200px;
2396
+ overflow-y: scroll;
2397
+ overflow-x: hidden;
2398
+ }
2399
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down ul li {
2400
+ border-bottom: 1px #dddddd solid;
2401
+ }
2402
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down ul li div {
2403
+ white-space: nowrap;
2404
+ display: flex;
2405
+ align-items: center;
2406
+ padding: 10px 10px;
2407
+ }
2408
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down ul li div img {
2409
+ width: calc(12px + 1.5vw);
2410
+ border: 1px solid lightgray;
2411
+ border-radius: 50%;
2412
+ }
2413
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down ul li div span {
2414
+ margin-left: 10px;
2415
+ color: #333333;
2416
+ }
2417
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown #vendor-payment-method-drop-down .no-content {
2418
+ padding: 20px;
2419
+ }
2420
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary div.payment-methods-listing-header #vendor-dashboard-payment-settings-toggle-dropdown:hover #vendor-payment-method-drop-down {
2421
+ display: block;
2422
+ }
2423
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul {
2424
+ list-style: none;
2425
+ min-height: 200px;
2426
+ margin-left: 0;
2427
+ }
2428
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div {
2429
+ display: flex;
2430
+ justify-content: space-between;
2431
+ align-items: center;
2432
+ padding: 10px;
2433
+ border-bottom: #CCCCCC solid 1px;
2434
+ }
2435
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div > div {
2436
+ display: flex;
2437
+ align-items: center;
2438
+ }
2439
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div > div img {
2440
+ width: calc(12px + 3vw);
2441
+ border: 1px solid grey;
2442
+ border-radius: 50%;
2443
+ }
2444
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div > div span {
2445
+ margin-left: 10px;
2446
+ color: #333333;
2447
+ }
2448
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div > div button {
2449
+ margin-bottom: 3px !important;
2450
+ min-height: 30px !important;
2451
+ }
2452
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > ul li > div > div a button {
2453
+ margin-left: 3px !important;
2454
+ }
2455
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area .dokan-payment-settings-summary > .no-content {
2456
+ min-height: 200px;
2457
+ padding: 20px;
2458
+ }
2459
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div {
2460
+ background-color: white;
2461
+ box-shadow: 0 0 5px #bbbbbb;
2462
+ margin-right: 10px;
2463
+ padding: 20px;
2464
+ }
2465
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.dokan-form-group > div {
2466
+ text-align: left;
2467
+ }
2468
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.dokan-form-group > div label {
2469
+ color: black;
2470
+ font-weight: bold;
2471
+ }
2472
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.dokan-form-group > div select {
2473
+ padding: 10px 15px;
2474
+ border-radius: 5px;
2475
+ min-height: 50px;
2476
+ }
2477
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.data-warning {
2478
+ display: flex;
2479
+ box-shadow: 0 0 5px #AAAAAA;
2480
+ padding: 10px;
2481
+ margin-bottom: 10px;
2482
+ }
2483
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.data-warning div.left-icon-container {
2484
+ display: flex;
2485
+ flex-direction: column;
2486
+ justify-content: center;
2487
+ padding: 5px;
2488
+ }
2489
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.data-warning div.left-icon-container i {
2490
+ color: orange;
2491
+ }
2492
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div div.data-warning div.vr-separator {
2493
+ margin: 0 10px;
2494
+ border-left: 1px #dddddd solid;
2495
+ }
2496
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div .bottom-note {
2497
+ text-align: left;
2498
+ margin-bottom: 2em;
2499
+ }
2500
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div .bottom-actions {
2501
+ background-color: #EEEEEE;
2502
+ text-align: left;
2503
+ border-top: 1px #cccccc solid;
2504
+ padding: 20px;
2505
+ margin: -20px;
2506
+ }
2507
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form .payment-field-bank > div.dokan-form-group > div .bottom-actions a {
2508
+ margin-left: 10px;
2509
+ text-decoration: none;
2510
+ color: #2B78E4;
2511
+ }
2512
+ .dokan-dashboard .dokan-dashboard-content article.dokan-settings-area #payment-form > div.dokan-form-group > div.ajax_prev.dokan-w4 {
2513
+ margin-left: 24%;
2514
+ }
2515
  .dokan-dashboard .dokan-dashboard-content .edit-account fieldset {
2516
  margin-top: 30px;
2517
  }
assets/images/withdraw-methods/bank-check.png ADDED
Binary file
assets/js/dokan.js CHANGED
@@ -2353,7 +2353,9 @@ jQuery(function($) {
2353
  label.removeClass('error');
2354
  label.remove();
2355
  },
2356
- submitHandler: async function(form) {
 
 
2357
  $(form).block({
2358
  message: null,
2359
  overlayCSS: {
2353
  label.removeClass('error');
2354
  label.remove();
2355
  },
2356
+ submitHandler: async function(form, event) {
2357
+ event.preventDefault();
2358
+
2359
  $(form).block({
2360
  message: null,
2361
  overlayCSS: {
dokan.php CHANGED
@@ -3,12 +3,12 @@
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.4.2
7
  * Author: weDevs
8
  * Author URI: https://wedevs.com/
9
  * Text Domain: dokan-lite
10
  * WC requires at least: 3.0
11
- * WC tested up to: 6.4.0
12
  * Domain Path: /languages/
13
  * License: GPL2
14
  */
@@ -56,7 +56,7 @@ final class WeDevs_Dokan {
56
  *
57
  * @var string
58
  */
59
- public $version = '3.4.2';
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.4.3
7
  * Author: weDevs
8
  * Author URI: https://wedevs.com/
9
  * Text Domain: dokan-lite
10
  * WC requires at least: 3.0
11
+ * WC tested up to: 6.4.1
12
  * Domain Path: /languages/
13
  * License: GPL2
14
  */
56
  *
57
  * @var string
58
  */
59
+ public $version = '3.4.3';
60
 
61
  /**
62
  * Instance of self
includes/Assets.php CHANGED
@@ -886,6 +886,7 @@ class Assets {
886
  'i18n_attribute_label' => __( 'Attribute Name', 'dokan-lite' ),
887
  'i18n_date_format' => get_option( 'date_format' ),
888
  'dokan_banner_added_alert_msg' => __( 'Are you sure? You have uploaded banner but didn\'t click the Update Settings button!', 'dokan-lite' ),
 
889
  ];
890
 
891
  $default_args = array_merge( $default_args, $custom_args );
886
  'i18n_attribute_label' => __( 'Attribute Name', 'dokan-lite' ),
887
  'i18n_date_format' => get_option( 'date_format' ),
888
  'dokan_banner_added_alert_msg' => __( 'Are you sure? You have uploaded banner but didn\'t click the Update Settings button!', 'dokan-lite' ),
889
+ 'update_settings' => __( 'Update Settings', 'dokan-lite' ),
890
  ];
891
 
892
  $default_args = array_merge( $default_args, $custom_args );
includes/Dashboard/Templates/Settings.php CHANGED
@@ -58,8 +58,10 @@ class Settings {
58
  if ( isset( $wp->query_vars['settings'] ) && $wp->query_vars['settings'] == 'store' ) {
59
  $heading = __( 'Settings', 'dokan-lite' );
60
  $is_store_setting = true;
61
- } elseif ( isset( $wp->query_vars['settings'] ) && $wp->query_vars['settings'] == 'payment' ) {
62
- $heading = __( 'Payment Settings', 'dokan-lite' );
 
 
63
  } else {
64
  $heading = apply_filters( 'dokan_dashboard_settings_heading_title', __( 'Settings', 'dokan-lite' ), $wp->query_vars['settings'] );
65
  }
@@ -147,14 +149,14 @@ class Settings {
147
  }
148
  }
149
 
150
- if ( isset( $wp->query_vars['settings'] ) && 'payment' == $wp->query_vars['settings'] ) {
151
  if ( ! current_user_can( 'dokan_view_store_payment_menu' ) ) {
152
  dokan_get_template_part('global/dokan-error', '', array(
153
  'deleted' => false,
154
  'message' => __( 'You have no permission to view this page', 'dokan-lite' )
155
  ) );
156
  } else {
157
- $this->load_payment_content();
158
  }
159
  }
160
 
@@ -186,18 +188,97 @@ class Settings {
186
  *
187
  * @since 2.4
188
  *
 
 
189
  * @return void
190
  */
191
- public function load_payment_content() {
192
- $methods = dokan_withdraw_get_active_methods();
 
 
 
 
 
 
193
  $currentuser = dokan_get_current_user_id();
194
  $profile_info = dokan_get_store_info( dokan_get_current_user_id() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
- dokan_get_template_part( 'settings/payment', '', array(
197
- 'methods' => $methods,
 
 
 
 
 
 
 
 
 
 
 
198
  'current_user' => $currentuser,
199
  'profile_info' => $profile_info,
200
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  }
202
 
203
  /**
@@ -257,10 +338,12 @@ class Settings {
257
 
258
  $ajax_validate = $this->payment_validate();
259
  break;
 
 
260
  }
261
 
262
  if ( is_wp_error( $ajax_validate ) ) {
263
- wp_send_json_error( $ajax_validate->get_error_message() );
264
  }
265
 
266
  // we are good to go
@@ -451,14 +534,46 @@ class Settings {
451
 
452
  $error = new WP_Error();
453
 
454
- if ( ! empty( $post_data['setting_paypal_email'] ) ) {
455
- $email = sanitize_email( $post_data['setting_paypal_email'] );
456
 
457
  if ( empty( $email ) ) {
458
  $error->add( 'dokan_email', __( 'Invalid email', 'dokan-lite' ) );
459
  }
460
  }
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  if ( $error->get_error_codes() ) {
463
  return $error;
464
  }
@@ -587,9 +702,9 @@ class Settings {
587
  } elseif ( wp_verify_nonce( sanitize_key( $post_data['_wpnonce'] ), 'dokan_payment_settings_nonce' ) ) {
588
 
589
  //update payment settings info
590
- $dokan_settings = [
591
- 'payment' => [],
592
- ];
593
 
594
  if ( isset( $post_data['settings']['bank'] ) ) {
595
  $bank = $post_data['settings']['bank'];
@@ -602,20 +717,16 @@ class Settings {
602
  'routing_number' => sanitize_text_field( $bank['routing_number'] ),
603
  'iban' => sanitize_text_field( $bank['iban'] ),
604
  'swift' => sanitize_text_field( $bank['swift'] ),
 
 
605
  ];
606
  }
607
 
608
- if ( isset( $post_data['settings']['paypal'] ) ) {
609
  $dokan_settings['payment']['paypal'] = [
610
  'email' => sanitize_email( $post_data['settings']['paypal']['email'] ),
611
  ];
612
  }
613
-
614
- if ( isset( $post_data['settings']['skrill'] ) ) {
615
- $dokan_settings['payment']['skrill'] = [
616
- 'email' => sanitize_email( $post_data['settings']['skrill']['email'] ),
617
- ];
618
- }
619
  }
620
 
621
  $dokan_settings = array_merge( $prev_dokan_settings, $dokan_settings );
@@ -647,4 +758,103 @@ class Settings {
647
 
648
  return apply_filters( 'dokan_category', $dokan_category );
649
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  }
58
  if ( isset( $wp->query_vars['settings'] ) && $wp->query_vars['settings'] == 'store' ) {
59
  $heading = __( 'Settings', 'dokan-lite' );
60
  $is_store_setting = true;
61
+ } elseif ( isset( $wp->query_vars['settings'] ) && 'payment' === substr( $wp->query_vars['settings'], 0, 7 ) ) {
62
+ $heading = __( 'Payment Method', 'dokan-lite' );
63
+ $slug = str_replace( 'payment/manage-', '', $wp->query_vars['settings'] );
64
+ $heading = $this->get_payment_heading( $slug, $heading );
65
  } else {
66
  $heading = apply_filters( 'dokan_dashboard_settings_heading_title', __( 'Settings', 'dokan-lite' ), $wp->query_vars['settings'] );
67
  }
149
  }
150
  }
151
 
152
+ if ( isset( $wp->query_vars['settings'] ) && 'payment' === substr( $wp->query_vars['settings'], 0, 7 ) ) {
153
  if ( ! current_user_can( 'dokan_view_store_payment_menu' ) ) {
154
  dokan_get_template_part('global/dokan-error', '', array(
155
  'deleted' => false,
156
  'message' => __( 'You have no permission to view this page', 'dokan-lite' )
157
  ) );
158
  } else {
159
+ $this->load_payment_content( substr( $wp->query_vars['settings'], 7 ) );
160
  }
161
  }
162
 
188
  *
189
  * @since 2.4
190
  *
191
+ * @param string $slug_suffix
192
+ *
193
  * @return void
194
  */
195
+ public function load_payment_content( $slug_suffix ) {
196
+ $methods = dokan_withdraw_get_active_methods();
197
+
198
+ if ( empty( $methods ) ) {
199
+ dokan_get_template_part( 'global/dokan-error', '', array( 'deleted' => false, 'message' => __( 'No withdraw method is available. Please contact site admin.', 'dokan-lite' ) ) );
200
+ return;
201
+ }
202
+
203
  $currentuser = dokan_get_current_user_id();
204
  $profile_info = dokan_get_store_info( dokan_get_current_user_id() );
205
+ $is_edit_mode = false;
206
+
207
+ /**
208
+ * This filter is only used if the Payment method has different key than the key used in meta value of
209
+ * meta key 'dokan_profile_settings' for that Payment method
210
+ *
211
+ * @since 3.4.3
212
+ */
213
+ $method_key_to_storage_key = apply_filters( 'dokan_payment_method_storage_key', [] );
214
+
215
+ $used_methods = $profile_info['payment'];
216
+
217
+ foreach ( $methods as $method_key => $method ) {
218
+ if ( empty( $method ) ) {
219
+ unset( $methods[ $method_key ] );
220
+
221
+ if ( isset( $used_methods[ $method_key ] ) ) {
222
+ unset( $used_methods[ $method_key ] );
223
+ } else if ( isset( $method_key_to_storage_key[ $method_key ] ) && isset( $used_methods[ $method_key_to_storage_key[ $method_key ] ] ) ) {
224
+ unset( $used_methods[ $method_key_to_storage_key[ $method_key ] ] );
225
+ }
226
+
227
+ if ( isset( $method_key_to_storage_key[ $method_key ] ) ) {
228
+ unset( $method_key_to_storage_key[ $method_key ] );
229
+ }
230
+ }
231
+ }
232
+
233
+ list( $used_method_keys, $unused_method_keys ) = $this->get_separated_method_keys( $methods, $used_methods, $method_key_to_storage_key );
234
+
235
+ $unused_methods = $this->get_payment_methods( $unused_method_keys );
236
+ $used_methods = $this->get_payment_methods( $used_method_keys );
237
 
238
+ $method_key = str_replace( '/manage-', '', $slug_suffix ); // if we are requesting a single payment method page(to edit or for first time setup) then we have the corresponding payment method key in the url
239
+
240
+ if ( stripos( $method_key, '/edit' ) !== false ) { // if payment method key has /edit suffix then we are trying to edit the method, otherwise we are doing a initial setup for that payment method
241
+ $is_edit_mode = true;
242
+ $method_key = str_replace( '/edit', '', $method_key ); // removing /edit suffix to get payment method key
243
+ }
244
+
245
+ if ( $is_edit_mode && 'bank' === $method_key ) {
246
+ $profile_info['is_edit_method'] = $is_edit_mode;
247
+ }
248
+
249
+ // template arguments
250
+ $args = [
251
  'current_user' => $currentuser,
252
  'profile_info' => $profile_info,
253
+ ];
254
+
255
+ if ( empty( $method_key ) ) { // payment method list page arguments
256
+ $args = array_merge(
257
+ $args,
258
+ [
259
+ 'methods' => $used_methods,
260
+ 'unused_methods' => $unused_methods,
261
+ ]
262
+ );
263
+
264
+ dokan_get_template_part( 'settings/payment', '', $args ); // show the payment method list template
265
+ } else { // single payment method edit page arguments
266
+ $method = dokan_withdraw_get_method( $method_key ); // get the single payment method for the $method_key
267
+ $args = array_merge(
268
+ $args,
269
+ [
270
+ 'method' => $method,
271
+ 'method_key' => $method_key,
272
+ ]
273
+ );
274
+
275
+ if ( empty( $method ) || ! isset( $method['callback'] ) || ! is_callable( $method['callback'] ) ) {
276
+ dokan_get_template_part( 'global/dokan-error', '', array( 'deleted' => false, 'message' => __( 'Invalid withdraw method. Please contact site admin', 'dokan-lite' ) ) );
277
+ return;
278
+ }
279
+
280
+ dokan_get_template_part( 'settings/payment', 'manage', $args ); // show the single payment method page
281
+ }
282
  }
283
 
284
  /**
338
 
339
  $ajax_validate = $this->payment_validate();
340
  break;
341
+ default:
342
+ $ajax_validate = new WP_Error( 'form_id_not_matched', __( 'Failed to process data, invalid submission', 'dokan-lite' ) );
343
  }
344
 
345
  if ( is_wp_error( $ajax_validate ) ) {
346
+ wp_send_json_error( $ajax_validate->get_error_messages() );
347
  }
348
 
349
  // we are good to go
534
 
535
  $error = new WP_Error();
536
 
537
+ if ( ! empty( $post_data['settings']['paypal'] ) && isset( $post_data['settings']['paypal']['email'] ) ) {
538
+ $email = sanitize_email( $post_data['settings']['paypal']['email'] );
539
 
540
  if ( empty( $email ) ) {
541
  $error->add( 'dokan_email', __( 'Invalid email', 'dokan-lite' ) );
542
  }
543
  }
544
 
545
+ if ( ! empty( $post_data['settings']['skrill'] ) && isset( $post_data['settings']['skrill']['email'] ) ) {
546
+ $email = sanitize_email( $post_data['settings']['skrill']['email'] );
547
+
548
+ if ( empty( $email ) ) {
549
+ $error->add( 'dokan_email', __( 'Invalid email', 'dokan-lite' ) );
550
+ }
551
+ }
552
+
553
+ if ( ! empty( $post_data['settings']['bank'] ) ) {
554
+ if ( empty( $post_data['settings']['bank']['ac_name'] ) ) {
555
+ $error->add( 'dokan_bank_ac_name', __( 'Account holder name is required', 'dokan-lite' ) );
556
+ }
557
+
558
+ if ( empty( $post_data['settings']['bank']['ac_number'] ) ) {
559
+ $error->add( 'dokan_bank_ac_number', __( 'Account number is required', 'dokan-lite' ) );
560
+ }
561
+
562
+ if ( empty( $post_data['settings']['bank']['routing_number'] ) ) {
563
+ $error->add( 'dokan_bank_ac_routing_number', __( 'Routing number is required', 'dokan-lite' ) );
564
+ }
565
+
566
+ if ( empty( $post_data['settings']['bank']['ac_type'] ) ) {
567
+ $error->add( 'dokan_bank_ac_type', __( 'Please select account type', 'dokan-lite' ) );
568
+ } else if ( ! in_array( $post_data['settings']['bank']['ac_type'], [ 'personal', 'business' ] ) ) {
569
+ $error->add( 'dokan_bank_ac_type', __( 'Invalid Account Type', 'dokan-lite' ) );
570
+ }
571
+
572
+ if ( empty( $post_data['settings']['bank']['declaration'] ) ) {
573
+ $error->add( 'dokan_bank_declaration', __( 'You must attest that the bank account is yours.', 'dokan-lite' ) );
574
+ }
575
+ }
576
+
577
  if ( $error->get_error_codes() ) {
578
  return $error;
579
  }
702
  } elseif ( wp_verify_nonce( sanitize_key( $post_data['_wpnonce'] ), 'dokan_payment_settings_nonce' ) ) {
703
 
704
  //update payment settings info
705
+ $dokan_settings = array(
706
+ 'payment' => $prev_dokan_settings['payment'],
707
+ );
708
 
709
  if ( isset( $post_data['settings']['bank'] ) ) {
710
  $bank = $post_data['settings']['bank'];
717
  'routing_number' => sanitize_text_field( $bank['routing_number'] ),
718
  'iban' => sanitize_text_field( $bank['iban'] ),
719
  'swift' => sanitize_text_field( $bank['swift'] ),
720
+ 'ac_type' => sanitize_text_field( $bank['ac_type'] ),
721
+ 'declaration' => sanitize_text_field( $bank['declaration'] ),
722
  ];
723
  }
724
 
725
+ if ( isset( $post_data['settings']['paypal']['email'] ) ) {
726
  $dokan_settings['payment']['paypal'] = [
727
  'email' => sanitize_email( $post_data['settings']['paypal']['email'] ),
728
  ];
729
  }
 
 
 
 
 
 
730
  }
731
 
732
  $dokan_settings = array_merge( $prev_dokan_settings, $dokan_settings );
758
 
759
  return apply_filters( 'dokan_category', $dokan_category );
760
  }
761
+
762
+ /**
763
+ * Get proper heading for payments of vendor dashboard payment settings
764
+ *
765
+ * @since 3.4.3
766
+ *
767
+ * @param string $slug
768
+ * @param string $heading
769
+ *
770
+ * @return string
771
+ */
772
+ private function get_payment_heading( $slug, $heading ) {
773
+ switch ( $slug ) {
774
+ case 'bank':
775
+ case 'bank/edit':
776
+ $heading = __( 'Bank Account Settings', 'dokan-lite' );
777
+ break;
778
+
779
+ case 'paypal':
780
+ case 'paypal/edit':
781
+ $heading = __( 'Paypal Settings', 'dokan-lite' );
782
+ break;
783
+ }
784
+
785
+ /**
786
+ * To allow new payment extension give their own heading
787
+ *
788
+ * @since 3.4.3
789
+ *
790
+ * @param string $heading previous heading
791
+ */
792
+ $heading = apply_filters( "dokan_withdraw_method_settings_title", $heading, $slug );
793
+
794
+ return $heading;
795
+ }
796
+
797
+ /**
798
+ * Separate the used and unused payment method keys by the current user
799
+ *
800
+ * @since 3.4.3
801
+ *
802
+ * @param array $all_methods All methods
803
+ * @param array $used_methods Used Methods
804
+ * @param array $method_key_mismatchs The list of methods which has different key and name but the name is substring of key
805
+ *
806
+ * @return array
807
+ */
808
+ private function get_separated_method_keys( $all_methods, $used_methods, $method_key_mismatchs ) {
809
+ $used_method_keys = [];
810
+
811
+ foreach ( $used_methods as $method_key => $method ) {
812
+ if ( ! empty( $method ) ) {
813
+ $used_method_keys[] = $method_key;
814
+ }
815
+ }
816
+
817
+ $all_method_keys = array_keys( $all_methods );
818
+
819
+ foreach ( $all_method_keys as $method ) {
820
+ if ( isset( $method_key_mismatchs[ $method ] ) && in_array( $method_key_mismatchs[ $method ], $used_method_keys, true ) ) {
821
+ array_push( $used_method_keys, $method );
822
+ }
823
+ }
824
+
825
+ foreach ( $method_key_mismatchs as $storage_key ) {
826
+ $index = array_search( $storage_key, $used_method_keys, true );
827
+
828
+ if ( $index ) {
829
+ unset( $used_method_keys[ $index ] );
830
+ }
831
+ }
832
+
833
+ $unused_method_keys = array_diff( $all_method_keys, $used_method_keys );
834
+
835
+ return [ $used_method_keys, $unused_method_keys ];
836
+ }
837
+
838
+ /**
839
+ * Get payment method details from the method keys
840
+ *
841
+ * @since 3.4.3
842
+ *
843
+ * @param $method_keys
844
+ *
845
+ * @return array
846
+ */
847
+ private function get_payment_methods( $method_keys ) {
848
+ $methods = [];
849
+
850
+ foreach ( $method_keys as $method_key ) {
851
+ $cur_method = dokan_withdraw_get_method( $method_key );
852
+
853
+ if ( ! empty( $cur_method ) ) {
854
+ $methods[ $method_key ] = $cur_method;
855
+ }
856
+ }
857
+
858
+ return $methods;
859
+ }
860
  }
includes/Emails/VendorCompletedOrder.php CHANGED
@@ -203,6 +203,6 @@ class VendorCompletedOrder extends WC_Email {
203
  return false;
204
  }
205
 
206
- return true;
207
  }
208
  }
203
  return false;
204
  }
205
 
206
+ return $bool;
207
  }
208
  }
includes/Emails/VendorNewOrder.php CHANGED
@@ -211,6 +211,6 @@ class VendorNewOrder extends WC_Email {
211
  return false;
212
  }
213
 
214
- return true;
215
  }
216
  }
211
  return false;
212
  }
213
 
214
+ return $bool;
215
  }
216
  }
includes/Withdraw/functions.php CHANGED
@@ -152,7 +152,7 @@ function dokan_withdraw_method_skrill( $store_settings ) {
152
  <div class="dokan-form-group">
153
  <div class="dokan-w8">
154
  <div class="dokan-input-group">
155
- <span class="dokan-input-group-addon"><?php esc_htmlt_e( 'E-mail', 'dokan-lite' ); ?></span>
156
  <input value="<?php echo esc_attr( $email ); ?>" name="settings[skrill][email]" class="dokan-form-control email" placeholder="you@domain.com" type="text">
157
  </div>
158
  </div>
@@ -168,56 +168,19 @@ function dokan_withdraw_method_skrill( $store_settings ) {
168
  * @param array $store_settings
169
  */
170
  function dokan_withdraw_method_bank( $store_settings ) {
171
- $account_name = isset( $store_settings['payment']['bank']['ac_name'] ) ? $store_settings['payment']['bank']['ac_name'] : '';
172
- $account_number = isset( $store_settings['payment']['bank']['ac_number'] ) ? $store_settings['payment']['bank']['ac_number'] : '';
173
- $bank_name = isset( $store_settings['payment']['bank']['bank_name'] ) ? $store_settings['payment']['bank']['bank_name'] : '';
174
- $bank_addr = isset( $store_settings['payment']['bank']['bank_addr'] ) ? $store_settings['payment']['bank']['bank_addr'] : '';
175
- $routing_number = isset( $store_settings['payment']['bank']['routing_number'] ) ? $store_settings['payment']['bank']['routing_number'] : '';
176
- $iban = isset( $store_settings['payment']['bank']['iban'] ) ? $store_settings['payment']['bank']['iban'] : '';
177
- $swift_code = isset( $store_settings['payment']['bank']['swift'] ) ? $store_settings['payment']['bank']['swift'] : '';
178
- ?>
179
- <div class="dokan-form-group">
180
- <div class="dokan-w8">
181
- <input name="settings[bank][ac_name]" value="<?php echo esc_attr( $account_name ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Your bank account name', 'dokan-lite' ); ?>" type="text">
182
- </div>
183
- </div>
184
-
185
- <div class="dokan-form-group">
186
- <div class="dokan-w8">
187
- <input name="settings[bank][ac_number]" value="<?php echo esc_attr( $account_number ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Your bank account number', 'dokan-lite' ); ?>" type="text">
188
- </div>
189
- </div>
190
-
191
- <div class="dokan-form-group">
192
- <div class="dokan-w8">
193
- <input name="settings[bank][bank_name]" value="<?php echo esc_attr( $bank_name ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Name of bank', 'dokan-lite' ); ?>" type="text">
194
- </div>
195
- </div>
196
-
197
- <div class="dokan-form-group">
198
- <div class="dokan-w8">
199
- <textarea name="settings[bank][bank_addr]" rows="5" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Address of your bank', 'dokan-lite' ); ?>"><?php echo esc_html( $bank_addr ); ?></textarea>
200
- </div>
201
- </div>
202
-
203
- <div class="dokan-form-group">
204
- <div class="dokan-w8">
205
- <input name="settings[bank][routing_number]" value="<?php echo esc_attr( $routing_number ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Routing number', 'dokan-lite' ); ?>" type="text">
206
- </div>
207
- </div>
208
-
209
- <div class="dokan-form-group">
210
- <div class="dokan-w8">
211
- <input name="settings[bank][iban]" value="<?php echo esc_attr( $iban ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'IBAN', 'dokan-lite' ); ?>" type="text">
212
- </div>
213
- </div>
214
 
215
- <div class="dokan-form-group">
216
- <div class="dokan-w8">
217
- <input value="<?php echo esc_attr( $swift_code ); ?>" name="settings[bank][swift]" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Swift code', 'dokan-lite' ); ?>" type="text">
218
- </div>
219
- </div> <!-- .dokan-form-group -->
220
- <?php
221
  }
222
 
223
  /**
@@ -300,7 +263,7 @@ function dokan_withdraw_get_active_order_status_in_comma() {
300
  /**
301
  * Get withdraw method formatted icon.
302
  *
303
- * @since 3.3.7
304
  *
305
  * @param string $method_key Withdraw Method key
306
  *
@@ -308,17 +271,15 @@ function dokan_withdraw_get_active_order_status_in_comma() {
308
  */
309
  function dokan_withdraw_get_method_icon( $method_key ) {
310
  $asset_path = DOKAN_PLUGIN_ASSEST . '/images/withdraw-methods/';
 
311
  switch ( $method_key ) {
312
  case 'paypal':
313
  $method_icon = $asset_path . 'paypal.svg';
314
  break;
315
- case 'skrill':
316
- $method_icon = $asset_path . 'skrill.svg';
317
- break;
318
- case 'bank':
319
  default:
320
  $method_icon = $asset_path . 'bank.svg';
321
  }
 
322
  return apply_filters( 'dokan_withdraw_method_icon', $method_icon, $method_key );
323
  }
324
 
152
  <div class="dokan-form-group">
153
  <div class="dokan-w8">
154
  <div class="dokan-input-group">
155
+ <span class="dokan-input-group-addon"><?php esc_html_e( 'E-mail', 'dokan-lite' ); ?></span>
156
  <input value="<?php echo esc_attr( $email ); ?>" name="settings[skrill][email]" class="dokan-form-control email" placeholder="you@domain.com" type="text">
157
  </div>
158
  </div>
168
  * @param array $store_settings
169
  */
170
  function dokan_withdraw_method_bank( $store_settings ) {
171
+ $args = [
172
+ 'account_name' => isset( $store_settings['payment']['bank']['ac_name'] ) ? $store_settings['payment']['bank']['ac_name'] : '',
173
+ 'account_number' => isset( $store_settings['payment']['bank']['ac_number'] ) ? $store_settings['payment']['bank']['ac_number'] : '',
174
+ 'bank_name' => isset( $store_settings['payment']['bank']['bank_name'] ) ? $store_settings['payment']['bank']['bank_name'] : '',
175
+ 'bank_addr' => isset( $store_settings['payment']['bank']['bank_addr'] ) ? $store_settings['payment']['bank']['bank_addr'] : '',
176
+ 'routing_number' => isset( $store_settings['payment']['bank']['routing_number'] ) ? $store_settings['payment']['bank']['routing_number'] : '',
177
+ 'iban' => isset( $store_settings['payment']['bank']['iban'] ) ? $store_settings['payment']['bank']['iban'] : '',
178
+ 'swift_code' => isset( $store_settings['payment']['bank']['swift'] ) ? $store_settings['payment']['bank']['swift'] : '',
179
+ 'account_type' => isset( $store_settings['payment']['bank']['ac_type'] ) ? $store_settings['payment']['bank']['ac_type'] : '',
180
+ 'save_or_add_btn_text' => isset( $store_settings['is_edit_method'] ) && $store_settings['is_edit_method'] ? __( 'Save', 'dokan-lite' ) : __( 'Add Account', 'dokan-lite' ),
181
+ ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
 
183
+ dokan_get_template_part( 'settings/bank-payment-method-settings', '', $args );
 
 
 
 
 
184
  }
185
 
186
  /**
263
  /**
264
  * Get withdraw method formatted icon.
265
  *
266
+ * @since 3.4.3
267
  *
268
  * @param string $method_key Withdraw Method key
269
  *
271
  */
272
  function dokan_withdraw_get_method_icon( $method_key ) {
273
  $asset_path = DOKAN_PLUGIN_ASSEST . '/images/withdraw-methods/';
274
+
275
  switch ( $method_key ) {
276
  case 'paypal':
277
  $method_icon = $asset_path . 'paypal.svg';
278
  break;
 
 
 
 
279
  default:
280
  $method_icon = $asset_path . 'bank.svg';
281
  }
282
+
283
  return apply_filters( 'dokan_withdraw_method_icon', $method_icon, $method_key );
284
  }
285
 
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.4.2\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
- "POT-Creation-Date: 2022-04-13 04:11:21+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -52,7 +52,7 @@ msgstr ""
52
 
53
  #: dokan.php:477 includes/Admin/AdminBar.php:81 includes/Admin/Menu.php:66
54
  #: includes/Dashboard/Templates/Settings.php:59
55
- #: includes/Dashboard/Templates/Settings.php:64 includes/template-tags.php:417
56
  #: src/admin/pages/Settings.vue:4
57
  msgid "Settings"
58
  msgstr ""
@@ -1364,15 +1364,15 @@ msgstr ""
1364
  msgid "Something wrong, please try again later"
1365
  msgstr ""
1366
 
1367
- #: includes/Ajax.php:108 includes/Dashboard/Templates/Settings.php:213
1368
- #: includes/Dashboard/Templates/Settings.php:217
1369
- #: includes/Dashboard/Templates/Settings.php:231
1370
- #: includes/Dashboard/Templates/Settings.php:243
1371
- #: includes/Dashboard/Templates/Settings.php:255
1372
- #: includes/Dashboard/Templates/Settings.php:292
1373
- #: includes/Dashboard/Templates/Settings.php:358
1374
- #: includes/Dashboard/Templates/Settings.php:399
1375
- #: includes/Dashboard/Templates/Settings.php:449
1376
  #: includes/Dashboard/Templates/Withdraw.php:117
1377
  #: includes/Dashboard/Templates/Withdraw.php:182
1378
  #: includes/Withdraw/Hooks.php:116 includes/Withdraw/Hooks.php:189
@@ -1786,33 +1786,33 @@ msgstr ""
1786
  msgid "Please insert value less than the regular price!"
1787
  msgstr ""
1788
 
1789
- #: includes/Assets.php:847 includes/Assets.php:1022
1790
  #. translators: %s: decimal
1791
  msgid "Please enter with one decimal point (%s) without thousand separators."
1792
  msgstr ""
1793
 
1794
- #: includes/Assets.php:849 includes/Assets.php:1024
1795
  #. translators: %s: price decimal separator
1796
  msgid ""
1797
  "Please enter with one monetary decimal point (%s) without thousand "
1798
  "separators and currency symbols."
1799
  msgstr ""
1800
 
1801
- #: includes/Assets.php:850 includes/Assets.php:1025
1802
  msgid "Please enter in country code with two capital letters."
1803
  msgstr ""
1804
 
1805
- #: includes/Assets.php:851 includes/Assets.php:1026
1806
  msgid "Please enter in a value less than the regular price."
1807
  msgstr ""
1808
 
1809
- #: includes/Assets.php:852 includes/Assets.php:1027
1810
  msgid ""
1811
  "This product has produced sales and may be linked to existing orders. Are "
1812
  "you sure you want to delete it?"
1813
  msgstr ""
1814
 
1815
- #: includes/Assets.php:853 includes/Assets.php:1028
1816
  msgid ""
1817
  "This action cannot be reversed. Are you sure you wish to erase personal "
1818
  "data from the selected orders?"
@@ -1900,6 +1900,7 @@ msgstr ""
1900
  #: templates/products/new-product-single.php:220
1901
  #: templates/products/new-product.php:169
1902
  #: templates/products/tmpl-add-product-popup.php:68
 
1903
  #: templates/store-lists-filter.php:83
1904
  #: templates/withdraw/pending-request-listing-dashboard.php:20
1905
  #: templates/withdraw/pending-request-listing-dashboard.php:37
@@ -1919,6 +1920,12 @@ msgid ""
1919
  "button!"
1920
  msgstr ""
1921
 
 
 
 
 
 
 
1922
  #: includes/Commission.php:98
1923
  #. translators: %s: Geteway fee
1924
  msgid "Payment gateway processing fee %s"
@@ -2058,8 +2065,8 @@ msgid "You have no permission to view this order"
2058
  msgstr ""
2059
 
2060
  #: includes/Dashboard/Templates/Products.php:196
2061
- #: includes/Dashboard/Templates/Settings.php:143
2062
- #: includes/Dashboard/Templates/Settings.php:154
2063
  #: includes/Shortcodes/Dashboard.php:29 templates/global/no-permission.php:53
2064
  msgid "You have no permission to view this page"
2065
  msgstr ""
@@ -2111,63 +2118,108 @@ msgid "You can only select %s tags"
2111
  msgstr ""
2112
 
2113
  #: includes/Dashboard/Templates/Settings.php:62
2114
- msgid "Payment Settings"
2115
  msgstr ""
2116
 
2117
- #: includes/Dashboard/Templates/Settings.php:83
2118
  msgid ""
2119
  "These are the withdraw methods available for you. Please update your "
2120
  "payment information below to submit withdraw requests and get your store "
2121
  "payments seamlessly."
2122
  msgstr ""
2123
 
2124
- #: includes/Dashboard/Templates/Settings.php:227
 
 
 
 
 
 
 
 
2125
  msgid "Pemission denied social"
2126
  msgstr ""
2127
 
2128
- #: includes/Dashboard/Templates/Settings.php:239
2129
- #: includes/Dashboard/Templates/Settings.php:251
2130
  msgid "Pemission denied"
2131
  msgstr ""
2132
 
2133
- #: includes/Dashboard/Templates/Settings.php:269
 
 
 
 
2134
  msgid "Your information has been saved successfully"
2135
  msgstr ""
2136
 
2137
- #: includes/Dashboard/Templates/Settings.php:300
2138
- #: includes/Dashboard/Templates/Settings.php:407
2139
  msgid "Store name required"
2140
  msgstr ""
2141
 
2142
- #: includes/Dashboard/Templates/Settings.php:306
2143
- #: includes/Dashboard/Templates/Settings.php:366
2144
- #: includes/Dashboard/Templates/Settings.php:413
2145
  msgid "Store type required"
2146
  msgstr ""
2147
 
2148
- #: includes/Dashboard/Templates/Settings.php:314
2149
- #: includes/Dashboard/Templates/Settings.php:374
2150
- #: includes/Dashboard/Templates/Settings.php:421
2151
- #: includes/Dashboard/Templates/Settings.php:458
 
2152
  msgid "Invalid email"
2153
  msgstr ""
2154
 
2155
- #: includes/Dashboard/Templates/Settings.php:333
2156
  msgid "Address field for %s is required"
2157
  msgstr ""
2158
 
2159
- #: includes/Dashboard/Templates/Settings.php:643
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2160
  msgid "Book"
2161
  msgstr ""
2162
 
2163
- #: includes/Dashboard/Templates/Settings.php:644
2164
  msgid "Dress"
2165
  msgstr ""
2166
 
2167
- #: includes/Dashboard/Templates/Settings.php:645
2168
  msgid "Electronic"
2169
  msgstr ""
2170
 
 
 
 
 
 
 
 
 
2171
  #: includes/Dashboard/Templates/Withdraw.php:125
2172
  msgid "Missing withdraw id."
2173
  msgstr ""
@@ -3040,16 +3092,18 @@ msgstr ""
3040
 
3041
  #: includes/Privacy.php:276 src/admin/pages/VendorPaymentFields.vue:20
3042
  #: src/admin/pages/VendorPaymentFields.vue:21
 
3043
  msgid "Bank Name"
3044
  msgstr ""
3045
 
3046
  #: includes/Privacy.php:277 src/admin/pages/VendorPaymentFields.vue:25
3047
  #: src/admin/pages/VendorPaymentFields.vue:26
 
3048
  msgid "Bank Address"
3049
  msgstr ""
3050
 
3051
- #: includes/Privacy.php:279 includes/Withdraw/functions.php:211
3052
- #: src/admin/pages/VendorPaymentFields.vue:35
3053
  msgid "IBAN"
3054
  msgstr ""
3055
 
@@ -4885,44 +4939,28 @@ msgstr ""
4885
  msgid "Bank Transfer"
4886
  msgstr ""
4887
 
4888
- #: includes/Withdraw/functions.php:132
4889
  msgid "E-mail"
4890
  msgstr ""
4891
 
4892
- #: includes/Withdraw/functions.php:181
4893
- msgid "Your bank account name"
4894
- msgstr ""
4895
-
4896
- #: includes/Withdraw/functions.php:187
4897
- msgid "Your bank account number"
4898
- msgstr ""
4899
-
4900
- #: includes/Withdraw/functions.php:193
4901
- msgid "Name of bank"
4902
  msgstr ""
4903
 
4904
- #: includes/Withdraw/functions.php:199
4905
- msgid "Address of your bank"
4906
  msgstr ""
4907
 
4908
- #: includes/Withdraw/functions.php:205
4909
- msgid "Routing number"
4910
- msgstr ""
4911
-
4912
- #: includes/Withdraw/functions.php:217
4913
- msgid "Swift code"
4914
- msgstr ""
4915
-
4916
- #: includes/Withdraw/functions.php:337
4917
  msgid "No information found."
4918
  msgstr ""
4919
 
4920
- #: includes/Withdraw/functions.php:343
4921
  #. translators: 1: Email address for withdraw method.
4922
  msgid "( %1$s )"
4923
  msgstr ""
4924
 
4925
- #: includes/Withdraw/functions.php:347
4926
  #. translators: 1: Bank account holder name. 2: Bank name. 1: Bank account
4927
  #. number
4928
  msgid "- %1$s - %2$s - ****%3$s"
@@ -7950,13 +7988,114 @@ msgstr ""
7950
  msgid "State "
7951
  msgstr ""
7952
 
7953
- #: templates/settings/header.php:20 templates/settings/payment.php:45
7954
- #: templates/settings/store-form.php:301
7955
- msgid "Update Settings"
7956
  msgstr ""
7957
 
7958
- #: templates/settings/payment.php:54
7959
- msgid "No withdraw method is available. Please contact site admin."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7960
  msgstr ""
7961
 
7962
  #: templates/settings/store-form.php:56 templates/store-lists-loop.php:43
@@ -8234,10 +8373,6 @@ msgstr ""
8234
  msgid "View Payments"
8235
  msgstr ""
8236
 
8237
- #: templates/withdraw/withdraw-dashboard.php:81
8238
- msgid "Payment Methods"
8239
- msgstr ""
8240
-
8241
  #: templates/withdraw/withdraw-dashboard.php:98
8242
  msgid "Default"
8243
  msgstr ""
2
  # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Dokan 3.4.3\n"
6
  "Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
7
+ "POT-Creation-Date: 2022-04-26 08:58:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
52
 
53
  #: dokan.php:477 includes/Admin/AdminBar.php:81 includes/Admin/Menu.php:66
54
  #: includes/Dashboard/Templates/Settings.php:59
55
+ #: includes/Dashboard/Templates/Settings.php:66 includes/template-tags.php:417
56
  #: src/admin/pages/Settings.vue:4
57
  msgid "Settings"
58
  msgstr ""
1364
  msgid "Something wrong, please try again later"
1365
  msgstr ""
1366
 
1367
+ #: includes/Ajax.php:108 includes/Dashboard/Templates/Settings.php:294
1368
+ #: includes/Dashboard/Templates/Settings.php:298
1369
+ #: includes/Dashboard/Templates/Settings.php:312
1370
+ #: includes/Dashboard/Templates/Settings.php:324
1371
+ #: includes/Dashboard/Templates/Settings.php:336
1372
+ #: includes/Dashboard/Templates/Settings.php:375
1373
+ #: includes/Dashboard/Templates/Settings.php:441
1374
+ #: includes/Dashboard/Templates/Settings.php:482
1375
+ #: includes/Dashboard/Templates/Settings.php:532
1376
  #: includes/Dashboard/Templates/Withdraw.php:117
1377
  #: includes/Dashboard/Templates/Withdraw.php:182
1378
  #: includes/Withdraw/Hooks.php:116 includes/Withdraw/Hooks.php:189
1786
  msgid "Please insert value less than the regular price!"
1787
  msgstr ""
1788
 
1789
+ #: includes/Assets.php:847 includes/Assets.php:1023
1790
  #. translators: %s: decimal
1791
  msgid "Please enter with one decimal point (%s) without thousand separators."
1792
  msgstr ""
1793
 
1794
+ #: includes/Assets.php:849 includes/Assets.php:1025
1795
  #. translators: %s: price decimal separator
1796
  msgid ""
1797
  "Please enter with one monetary decimal point (%s) without thousand "
1798
  "separators and currency symbols."
1799
  msgstr ""
1800
 
1801
+ #: includes/Assets.php:850 includes/Assets.php:1026
1802
  msgid "Please enter in country code with two capital letters."
1803
  msgstr ""
1804
 
1805
+ #: includes/Assets.php:851 includes/Assets.php:1027
1806
  msgid "Please enter in a value less than the regular price."
1807
  msgstr ""
1808
 
1809
+ #: includes/Assets.php:852 includes/Assets.php:1028
1810
  msgid ""
1811
  "This product has produced sales and may be linked to existing orders. Are "
1812
  "you sure you want to delete it?"
1813
  msgstr ""
1814
 
1815
+ #: includes/Assets.php:853 includes/Assets.php:1029
1816
  msgid ""
1817
  "This action cannot be reversed. Are you sure you wish to erase personal "
1818
  "data from the selected orders?"
1900
  #: templates/products/new-product-single.php:220
1901
  #: templates/products/new-product.php:169
1902
  #: templates/products/tmpl-add-product-popup.php:68
1903
+ #: templates/settings/bank-payment-method-settings.php:125
1904
  #: templates/store-lists-filter.php:83
1905
  #: templates/withdraw/pending-request-listing-dashboard.php:20
1906
  #: templates/withdraw/pending-request-listing-dashboard.php:37
1920
  "button!"
1921
  msgstr ""
1922
 
1923
+ #: includes/Assets.php:889 templates/settings/header.php:20
1924
+ #: templates/settings/payment-manage.php:35
1925
+ #: templates/settings/store-form.php:301
1926
+ msgid "Update Settings"
1927
+ msgstr ""
1928
+
1929
  #: includes/Commission.php:98
1930
  #. translators: %s: Geteway fee
1931
  msgid "Payment gateway processing fee %s"
2065
  msgstr ""
2066
 
2067
  #: includes/Dashboard/Templates/Products.php:196
2068
+ #: includes/Dashboard/Templates/Settings.php:145
2069
+ #: includes/Dashboard/Templates/Settings.php:156
2070
  #: includes/Shortcodes/Dashboard.php:29 templates/global/no-permission.php:53
2071
  msgid "You have no permission to view this page"
2072
  msgstr ""
2118
  msgstr ""
2119
 
2120
  #: includes/Dashboard/Templates/Settings.php:62
2121
+ msgid "Payment Method"
2122
  msgstr ""
2123
 
2124
+ #: includes/Dashboard/Templates/Settings.php:85
2125
  msgid ""
2126
  "These are the withdraw methods available for you. Please update your "
2127
  "payment information below to submit withdraw requests and get your store "
2128
  "payments seamlessly."
2129
  msgstr ""
2130
 
2131
+ #: includes/Dashboard/Templates/Settings.php:199
2132
+ msgid "No withdraw method is available. Please contact site admin."
2133
+ msgstr ""
2134
+
2135
+ #: includes/Dashboard/Templates/Settings.php:276
2136
+ msgid "Invalid withdraw method. Please contact site admin"
2137
+ msgstr ""
2138
+
2139
+ #: includes/Dashboard/Templates/Settings.php:308
2140
  msgid "Pemission denied social"
2141
  msgstr ""
2142
 
2143
+ #: includes/Dashboard/Templates/Settings.php:320
2144
+ #: includes/Dashboard/Templates/Settings.php:332
2145
  msgid "Pemission denied"
2146
  msgstr ""
2147
 
2148
+ #: includes/Dashboard/Templates/Settings.php:342
2149
+ msgid "Failed to process data, invalid submission"
2150
+ msgstr ""
2151
+
2152
+ #: includes/Dashboard/Templates/Settings.php:352
2153
  msgid "Your information has been saved successfully"
2154
  msgstr ""
2155
 
2156
+ #: includes/Dashboard/Templates/Settings.php:383
2157
+ #: includes/Dashboard/Templates/Settings.php:490
2158
  msgid "Store name required"
2159
  msgstr ""
2160
 
2161
+ #: includes/Dashboard/Templates/Settings.php:389
2162
+ #: includes/Dashboard/Templates/Settings.php:449
2163
+ #: includes/Dashboard/Templates/Settings.php:496
2164
  msgid "Store type required"
2165
  msgstr ""
2166
 
2167
+ #: includes/Dashboard/Templates/Settings.php:397
2168
+ #: includes/Dashboard/Templates/Settings.php:457
2169
+ #: includes/Dashboard/Templates/Settings.php:504
2170
+ #: includes/Dashboard/Templates/Settings.php:541
2171
+ #: includes/Dashboard/Templates/Settings.php:549
2172
  msgid "Invalid email"
2173
  msgstr ""
2174
 
2175
+ #: includes/Dashboard/Templates/Settings.php:416
2176
  msgid "Address field for %s is required"
2177
  msgstr ""
2178
 
2179
+ #: includes/Dashboard/Templates/Settings.php:555
2180
+ msgid "Account holder name is required"
2181
+ msgstr ""
2182
+
2183
+ #: includes/Dashboard/Templates/Settings.php:559
2184
+ msgid "Account number is required"
2185
+ msgstr ""
2186
+
2187
+ #: includes/Dashboard/Templates/Settings.php:563
2188
+ msgid "Routing number is required"
2189
+ msgstr ""
2190
+
2191
+ #: includes/Dashboard/Templates/Settings.php:567
2192
+ msgid "Please select account type"
2193
+ msgstr ""
2194
+
2195
+ #: includes/Dashboard/Templates/Settings.php:569
2196
+ msgid "Invalid Account Type"
2197
+ msgstr ""
2198
+
2199
+ #: includes/Dashboard/Templates/Settings.php:573
2200
+ msgid "You must attest that the bank account is yours."
2201
+ msgstr ""
2202
+
2203
+ #: includes/Dashboard/Templates/Settings.php:754
2204
  msgid "Book"
2205
  msgstr ""
2206
 
2207
+ #: includes/Dashboard/Templates/Settings.php:755
2208
  msgid "Dress"
2209
  msgstr ""
2210
 
2211
+ #: includes/Dashboard/Templates/Settings.php:756
2212
  msgid "Electronic"
2213
  msgstr ""
2214
 
2215
+ #: includes/Dashboard/Templates/Settings.php:776
2216
+ msgid "Bank Account Settings"
2217
+ msgstr ""
2218
+
2219
+ #: includes/Dashboard/Templates/Settings.php:781
2220
+ msgid "Paypal Settings"
2221
+ msgstr ""
2222
+
2223
  #: includes/Dashboard/Templates/Withdraw.php:125
2224
  msgid "Missing withdraw id."
2225
  msgstr ""
3092
 
3093
  #: includes/Privacy.php:276 src/admin/pages/VendorPaymentFields.vue:20
3094
  #: src/admin/pages/VendorPaymentFields.vue:21
3095
+ #: templates/settings/bank-payment-method-settings.php:55
3096
  msgid "Bank Name"
3097
  msgstr ""
3098
 
3099
  #: includes/Privacy.php:277 src/admin/pages/VendorPaymentFields.vue:25
3100
  #: src/admin/pages/VendorPaymentFields.vue:26
3101
+ #: templates/settings/bank-payment-method-settings.php:65
3102
  msgid "Bank Address"
3103
  msgstr ""
3104
 
3105
+ #: includes/Privacy.php:279 src/admin/pages/VendorPaymentFields.vue:35
3106
+ #: templates/settings/bank-payment-method-settings.php:79
3107
  msgid "IBAN"
3108
  msgstr ""
3109
 
4939
  msgid "Bank Transfer"
4940
  msgstr ""
4941
 
4942
+ #: includes/Withdraw/functions.php:132 includes/Withdraw/functions.php:155
4943
  msgid "E-mail"
4944
  msgstr ""
4945
 
4946
+ #: includes/Withdraw/functions.php:180
4947
+ msgid "Save"
 
 
 
 
 
 
 
 
4948
  msgstr ""
4949
 
4950
+ #: includes/Withdraw/functions.php:180
4951
+ msgid "Add Account"
4952
  msgstr ""
4953
 
4954
+ #: includes/Withdraw/functions.php:298
 
 
 
 
 
 
 
 
4955
  msgid "No information found."
4956
  msgstr ""
4957
 
4958
+ #: includes/Withdraw/functions.php:304
4959
  #. translators: 1: Email address for withdraw method.
4960
  msgid "( %1$s )"
4961
  msgstr ""
4962
 
4963
+ #: includes/Withdraw/functions.php:308
4964
  #. translators: 1: Bank account holder name. 2: Bank name. 1: Bank account
4965
  #. number
4966
  msgid "- %1$s - %2$s - ****%3$s"
7988
  msgid "State "
7989
  msgstr ""
7990
 
7991
+ #: templates/settings/bank-payment-method-settings.php:16
7992
+ msgid "Deposit earnings directly to your U.S. bank account free of charge"
 
7993
  msgstr ""
7994
 
7995
+ #: templates/settings/bank-payment-method-settings.php:20
7996
+ msgid "Account Holder"
7997
+ msgstr ""
7998
+
7999
+ #: templates/settings/bank-payment-method-settings.php:24
8000
+ msgid "Your bank account name"
8001
+ msgstr ""
8002
+
8003
+ #: templates/settings/bank-payment-method-settings.php:30
8004
+ msgid "Account Type"
8005
+ msgstr ""
8006
+
8007
+ #: templates/settings/bank-payment-method-settings.php:35
8008
+ msgid "Please Select..."
8009
+ msgstr ""
8010
+
8011
+ #: templates/settings/bank-payment-method-settings.php:36
8012
+ msgid "Personal"
8013
+ msgstr ""
8014
+
8015
+ #: templates/settings/bank-payment-method-settings.php:37
8016
+ msgid "Business"
8017
+ msgstr ""
8018
+
8019
+ #: templates/settings/bank-payment-method-settings.php:44
8020
+ msgid "Routing & Account Number"
8021
+ msgstr ""
8022
+
8023
+ #: templates/settings/bank-payment-method-settings.php:48
8024
+ msgid "Routing number"
8025
+ msgstr ""
8026
+
8027
+ #: templates/settings/bank-payment-method-settings.php:49
8028
+ msgid "Your bank account number"
8029
+ msgstr ""
8030
+
8031
+ #: templates/settings/bank-payment-method-settings.php:59
8032
+ msgid "Name of bank"
8033
+ msgstr ""
8034
+
8035
+ #: templates/settings/bank-payment-method-settings.php:69
8036
+ msgid "Address of your bank"
8037
+ msgstr ""
8038
+
8039
+ #: templates/settings/bank-payment-method-settings.php:75
8040
+ msgid "Bank IBAN"
8041
+ msgstr ""
8042
+
8043
+ #: templates/settings/bank-payment-method-settings.php:85
8044
+ msgid "Bank Swift Code"
8045
+ msgstr ""
8046
+
8047
+ #: templates/settings/bank-payment-method-settings.php:89
8048
+ msgid "Swift code"
8049
+ msgstr ""
8050
+
8051
+ #: templates/settings/bank-payment-method-settings.php:94
8052
+ msgid "bank check"
8053
+ msgstr ""
8054
+
8055
+ #: templates/settings/bank-payment-method-settings.php:100
8056
+ msgid ""
8057
+ "I attest that I am the owner and have full authorization to this bank "
8058
+ "account"
8059
+ msgstr ""
8060
+
8061
+ #: templates/settings/bank-payment-method-settings.php:112
8062
+ msgid "Please double-check your account information!"
8063
+ msgstr ""
8064
+
8065
+ #: templates/settings/bank-payment-method-settings.php:114
8066
+ msgid ""
8067
+ "Incorrect or mismatched account name and number can result in withdrawal "
8068
+ "delays and fees"
8069
+ msgstr ""
8070
+
8071
+ #: templates/settings/bank-payment-method-settings.php:118
8072
+ msgid "This Payment method will become available in 3 days."
8073
+ msgstr ""
8074
+
8075
+ #: templates/settings/payment.php:16
8076
+ #: templates/withdraw/withdraw-dashboard.php:81
8077
+ msgid "Payment Methods"
8078
+ msgstr ""
8079
+
8080
+ #: templates/settings/payment.php:18
8081
+ msgid "Add Payment Method"
8082
+ msgstr ""
8083
+
8084
+ #: templates/settings/payment.php:31
8085
+ #. translators: %s: payment method title
8086
+ msgid "Direct to %s"
8087
+ msgstr ""
8088
+
8089
+ #: templates/settings/payment.php:41
8090
+ msgid "There is no payment method to add."
8091
+ msgstr ""
8092
+
8093
+ #: templates/settings/payment.php:69
8094
+ msgid "Manage"
8095
+ msgstr ""
8096
+
8097
+ #: templates/settings/payment.php:78
8098
+ msgid "There is no payment method to show."
8099
  msgstr ""
8100
 
8101
  #: templates/settings/store-form.php:56 templates/store-lists-loop.php:43
8373
  msgid "View Payments"
8374
  msgstr ""
8375
 
 
 
 
 
8376
  #: templates/withdraw/withdraw-dashboard.php:98
8377
  msgid "Default"
8378
  msgstr ""
readme.txt CHANGED
@@ -5,9 +5,9 @@ Tags: WooCommerce multivendor marketplace, multi vendor marketplace, multi selle
5
  Requires at least: 4.4
6
  Tested up to: 5.9.3
7
  WC requires at least: 3.0
8
- WC tested up to: 6.4.0
9
  Requires PHP: 5.6
10
- Stable tag: 3.4.2
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -314,6 +314,14 @@ A. Just install and activate the PRO version without deleting the free plugin. A
314
 
315
  == Changelog ==
316
 
 
 
 
 
 
 
 
 
317
  = v3.4.2 ( Apr 13, 2022 ) =
318
 
319
  - **fix:** Fixed switching product type from variable to external doesn't remove product stock management options
5
  Requires at least: 4.4
6
  Tested up to: 5.9.3
7
  WC requires at least: 3.0
8
+ WC tested up to: 6.4.1
9
  Requires PHP: 5.6
10
+ Stable tag: 3.4.3
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
314
 
315
  == Changelog ==
316
 
317
+ = v3.4.3 ( Apr 26, 2022 ) =
318
+
319
+ - **fix:** Store Contact Form widget submits the contact form directly instead of ajax submission
320
+ - **fix:** Stop sending new order emails to selected recipients (including admin) when the New Order email is disabled in WooCommerce Settings
321
+ - **update:** Updated design for the payment settings page of vendor dashboard to separate the management of different payment methods
322
+ - **new:** Added option to select a default payment method
323
+ - **fix:** Fixed some validation logic under vendor dashboard payment settings page
324
+
325
  = v3.4.2 ( Apr 13, 2022 ) =
326
 
327
  - **fix:** Fixed switching product type from variable to external doesn't remove product stock management options
templates/settings/bank-payment-method-settings.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var string $account_name
4
+ * @var string $account_type
5
+ * @var string $routing_number
6
+ * @var string $account_number
7
+ * @var string $bank_name
8
+ * @var string $bank_addr
9
+ * @var string $iban
10
+ * @var string $swift_code
11
+ * @var string $save_or_add_btn_text
12
+ */
13
+ ?>
14
+
15
+ <div>
16
+ <p class="dokan-text-left"><?php esc_html_e( 'Deposit earnings directly to your U.S. bank account free of charge', 'dokan-lite' ); ?></p>
17
+
18
+ <div class="dokan-form-group">
19
+ <div>
20
+ <label for="ac_name"><?php esc_html_e( 'Account Holder', 'dokan-lite' ); ?> </label>
21
+ </div>
22
+
23
+ <div class="dokan-w10">
24
+ <input id='ac_name' name="settings[bank][ac_name]" value="<?php echo esc_attr( $account_name ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Your bank account name', 'dokan-lite' ); ?>" type="text" required>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="dokan-form-group">
29
+ <div>
30
+ <label for="ac_type"><?php esc_html_e( 'Account Type', 'dokan-lite' ); ?> </label>
31
+ </div>
32
+
33
+ <div class="dokan-w10">
34
+ <select id='ac_type' name="settings[bank][ac_type]" class="dokan-form-control" required>
35
+ <option value="" <?php selected( '', $account_type ); ?> > <?php esc_html_e( 'Please Select...', 'dokan-lite' ); ?> </option>
36
+ <option value="personal" <?php selected( 'personal', $account_type ); ?> > <?php esc_html_e( 'Personal', 'dokan-lite' ); ?> </option>
37
+ <option value="business" <?php selected( 'business', $account_type ); ?> > <?php esc_html_e( 'Business', 'dokan-lite' ); ?> </option>
38
+ </select>
39
+ </div>
40
+ </div>
41
+
42
+ <div class="dokan-form-group">
43
+ <div>
44
+ <label><?php esc_html_e( 'Routing & Account Number', 'dokan-lite' ); ?> </label>
45
+ </div>
46
+
47
+ <div class="dokan-w10">
48
+ <input name="settings[bank][routing_number]" value="<?php echo esc_attr( $routing_number ); ?>" class="dokan-form-control dokan-w4" placeholder="<?php esc_attr_e( 'Routing number', 'dokan-lite' ); ?>" type="text" required>
49
+ <input name="settings[bank][ac_number]" value="<?php echo esc_attr( $account_number ); ?>" class="dokan-form-control dokan-w7 dokan-right" placeholder="<?php esc_attr_e( 'Your bank account number', 'dokan-lite' ); ?>" type="text" required>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="dokan-form-group">
54
+ <div>
55
+ <label><?php esc_html_e( 'Bank Name', 'dokan-lite' ); ?> </label>
56
+ </div>
57
+
58
+ <div class="dokan-w10">
59
+ <input name="settings[bank][bank_name]" value="<?php echo esc_attr( $bank_name ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Name of bank', 'dokan-lite' ); ?>" type="text">
60
+ </div>
61
+ </div>
62
+
63
+ <div class="dokan-form-group">
64
+ <div>
65
+ <label><?php esc_html_e( 'Bank Address', 'dokan-lite' ); ?> </label>
66
+ </div>
67
+
68
+ <div class="dokan-w10">
69
+ <textarea name="settings[bank][bank_addr]" rows="5" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Address of your bank', 'dokan-lite' ); ?>"><?php echo esc_html( $bank_addr ); ?></textarea>
70
+ </div>
71
+ </div>
72
+
73
+ <div class="dokan-form-group">
74
+ <div>
75
+ <label><?php esc_html_e( 'Bank IBAN', 'dokan-lite' ); ?> </label>
76
+ </div>
77
+
78
+ <div class="dokan-w10">
79
+ <input name="settings[bank][iban]" value="<?php echo esc_attr( $iban ); ?>" class="dokan-form-control" placeholder="<?php esc_attr_e( 'IBAN', 'dokan-lite' ); ?>" type="text">
80
+ </div>
81
+ </div>
82
+
83
+ <div class="dokan-form-group">
84
+ <div>
85
+ <label><?php esc_html_e( 'Bank Swift Code', 'dokan-lite' ); ?> </label>
86
+ </div>
87
+
88
+ <div class="dokan-w10">
89
+ <input value="<?php echo esc_attr( $swift_code ); ?>" name="settings[bank][swift]" class="dokan-form-control" placeholder="<?php esc_attr_e( 'Swift code', 'dokan-lite' ); ?>" type="text">
90
+ </div>
91
+ </div>
92
+
93
+ <div class="dokan-form-group dokan-text-left">
94
+ <img alt="<?php esc_attr_e( 'bank check', 'dokan-lite' ); ?>" src="<?php echo esc_url( DOKAN_PLUGIN_ASSEST . '/images/withdraw-methods/bank-check.png' ); ?>"/>
95
+ </div>
96
+
97
+ <div class="dokan-form-group dokan-text-left">
98
+ <input id="declaration" name="settings[bank][declaration]" checked type="checkbox" required/>
99
+ <label for="declaration">
100
+ <?php esc_html_e( 'I attest that I am the owner and have full authorization to this bank account', 'dokan-lite' ); ?>
101
+ </label>
102
+ </div>
103
+
104
+ <div class="data-warning">
105
+ <div class="left-icon-container">
106
+ <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i>
107
+ </div>
108
+
109
+ <div class="vr-separator"></div>
110
+
111
+ <div class="dokan-text-left">
112
+ <span class="display-block"><b><?php esc_html_e( 'Please double-check your account information!', 'dokan-lite' ); ?></b></span>
113
+ <br/>
114
+ <span class="display-block"><?php esc_html_e( 'Incorrect or mismatched account name and number can result in withdrawal delays and fees', 'dokan-lite' ); ?></>
115
+ </div>
116
+ </div>
117
+
118
+ <p class="bottom-note"><?php esc_html_e( 'This Payment method will become available in 3 days.', 'dokan-lite' ); ?></p>
119
+
120
+ <div class="bottom-actions">
121
+ <button class="ajax_prev dokan-btn dokan-btn-theme" type="submit" name="dokan_update_payment_settings">
122
+ <?php echo esc_html( $save_or_add_btn_text ); ?>
123
+ </button>
124
+ <a href="<?php echo esc_url( home_url( '/dashboard/settings/payment/' ) ); ?>">
125
+ <?php esc_html_e( 'Cancel', 'dokan-lite' ); ?>
126
+ </a>
127
+ </div>
128
+ </div>
templates/settings/payment-manage.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Dokan Settings Payment Template
4
+ *
5
+ * @package dokan
6
+ */
7
+ ?>
8
+
9
+ <form method="post" id="payment-form" action="" class="dokan-form-horizontal">
10
+
11
+ <?php wp_nonce_field( 'dokan_payment_settings_nonce' ); ?>
12
+
13
+ <fieldset class="payment-field-<?php echo esc_attr( $method_key ); ?>">
14
+ <div class="dokan-form-group">
15
+ <?php if ( 'bank' === $method_key ) :
16
+ call_user_func( $method['callback'], $profile_info );
17
+ else : ?>
18
+ <label class="dokan-w3 dokan-control-label" for="dokan_setting"><?php echo esc_html( apply_filters( 'dokan_payment_method_title', $method['title'], $method ) ) ?></label>
19
+ <div class="dokan-w6">
20
+ <?php call_user_func( $method['callback'], $profile_info ); ?>
21
+ </div>
22
+ <?php endif; ?>
23
+ </div>
24
+ </fieldset>
25
+
26
+ <?php
27
+ /**
28
+ * @since DOKAN_LITE_SINCE Insert action on botton of payment settings form
29
+ */
30
+ do_action( 'dokan_payment_settings_form_bottom', $current_user, $profile_info );
31
+
32
+ if ( 'bank' !== $method_key ) : ?>
33
+ <div class="dokan-form-group">
34
+ <div class="dokan-w4 ajax_prev dokan-text-left">
35
+ <input type="submit" name="dokan_update_payment_settings" class="dokan-btn dokan-btn-danger dokan-btn-theme" value="<?php esc_attr_e( 'Update Settings', 'dokan-lite' ); ?>">
36
+ </div>
37
+ </div>
38
+ <?php endif; ?>
39
+ </form>
templates/settings/payment.php CHANGED
@@ -10,51 +10,75 @@ $has_methods = false;
10
 
11
  do_action( 'dokan_payment_settings_before_form', $current_user, $profile_info ); ?>
12
 
13
- <form method="post" id="payment-form" action="" class="dokan-form-horizontal">
14
-
15
- <?php wp_nonce_field( 'dokan_payment_settings_nonce' ); ?>
16
-
17
- <?php foreach ( $methods as $method_key ) {
18
- $method = dokan_withdraw_get_method( $method_key );
19
-
20
- if ( ! empty( $method ) ) {
21
- $has_methods = true;
22
- }
23
-
24
- if ( isset( $method['callback'] ) && is_callable( $method['callback'] ) ) {
25
- ?>
26
- <fieldset class="payment-field-<?php echo esc_attr( $method_key ); ?>">
27
- <div class="dokan-form-group">
28
- <label class="dokan-w3 dokan-control-label" for="dokan_setting"><?php echo esc_html( apply_filters( 'dokan_payment_method_title', $method['title'], $method ) ); ?></label>
29
- <div class="dokan-w6">
30
- <?php call_user_func( $method['callback'], $profile_info ); ?>
31
- </div> <!-- .dokan-w6 -->
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
- </fieldset>
34
- <?php } ?>
35
- <?php } ?>
36
- <?php
37
- /**
38
- * @since 2.2.2 Insert action on botton of payment settings form
39
- */
40
- do_action( 'dokan_payment_settings_form_bottom', $current_user, $profile_info ); ?>
41
-
42
- <?php if ( $has_methods ): ?>
43
- <div class="dokan-form-group">
44
- <div class="dokan-w4 ajax_prev dokan-text-left" style="margin-left:24%;">
45
- <input type="submit" name="dokan_update_payment_settings" class="dokan-btn dokan-btn-danger dokan-btn-theme" value="<?php esc_attr_e( 'Update Settings', 'dokan-lite' ); ?>">
46
  </div>
47
  </div>
48
- <?php endif ?>
49
-
50
- </form>
51
-
52
- <?php
53
- if ( ! $has_methods ) {
54
- dokan_get_template_part( 'global/dokan-error', '', array( 'deleted' => false, 'message' => __( 'No withdraw method is available. Please contact site admin.', 'dokan-lite' ) ) );
55
- }
56
- ?>
 
 
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  <?php
60
  /**
10
 
11
  do_action( 'dokan_payment_settings_before_form', $current_user, $profile_info ); ?>
12
 
13
+ <div class="dokan-payment-settings-summary">
14
+ <h2 id="vendor-dashboard-payment-settings-error"></h2>
15
+ <div class="payment-methods-listing-header">
16
+ <h2> <?php esc_html_e( 'Payment Methods', 'dokan-lite' ); ?></h2>
17
+ <div id="vendor-dashboard-payment-settings-toggle-dropdown">
18
+ <button id="toggle-vendor-payment-method-drop-down" class="dokan-btn dokan-btn-success"> <?php esc_html_e( 'Add Payment Method', 'dokan-lite' ); ?></button>
19
+ <div id="vendor-payment-method-drop-down-wrapper">
20
+ <div id="vendor-payment-method-drop-down">
21
+ <?php if ( is_array( $unused_methods ) && ! empty( $unused_methods ) ) : ?>
22
+ <ul>
23
+ <?php foreach ( $unused_methods as $method_key => $method ) :?>
24
+ <li>
25
+ <a href="<?php echo esc_url( home_url( "dashboard/settings/payment/manage-" . $method_key ) ); ?>">
26
+ <div>
27
+ <img src="<?php echo esc_url( dokan_withdraw_get_method_icon( $method_key ) ); ?>" alt="<?php echo esc_attr( $method_key ); ?>" />
28
+ <span>
29
+ <?php
30
+ //translators: %s: payment method title
31
+ printf( esc_html__( 'Direct to %s', 'dokan-lite' ), apply_filters( 'dokan_payment_method_title', $method['title'], $method ) );
32
+ ?>
33
+ </span>
34
+ </div>
35
+ </a>
36
+ </li>
37
+ <?php endforeach; ?>
38
+ </ul>
39
+ <?php else : ?>
40
+ <div class="no-content">
41
+ <?php esc_html_e( 'There is no payment method to add.', 'dokan-lite' ); ?>
42
+ </div>
43
+ <?php endif; ?>
44
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  </div>
46
  </div>
47
+ </div>
48
+ <?php if ( is_array( $methods ) && ! empty( $methods ) ) : ?>
49
+ <ul>
50
+ <?php foreach ( $methods as $method_key => $method ) : ?>
51
+ <li>
52
+ <div>
53
+ <div>
54
+ <img src="<?php echo esc_url( dokan_withdraw_get_method_icon( $method_key ) ); ?>" alt="<?php echo esc_attr( $method_key ); ?>" />
55
+ <span>
56
+ <?php
57
+ echo esc_html( apply_filters( 'dokan_payment_method_title', $method['title'], $method ) );
58
 
59
+ if ( isset( $profile_info['payment'][ $method_key ] ) && ! empty( dokan_withdraw_get_method_additional_info( $method_key ) ) ) {
60
+ ?>
61
+ <small><?php echo dokan_withdraw_get_method_additional_info( $method_key ); ?></small>
62
+ <?php
63
+ }
64
+ ?>
65
+ </span>
66
+ </div>
67
+ <div>
68
+ <a href="<?php echo esc_url( home_url( "dashboard/settings/payment/manage-" . $method_key . "/edit" ) ); ?>">
69
+ <button class="dokan-btn-theme dokan-btn-sm"><?php esc_html_e( 'Manage', 'dokan-lite' ); ?></button>
70
+ </a>
71
+ </div>
72
+ </div>
73
+ </li>
74
+ <?php endforeach; ?>
75
+ </ul>
76
+ <?php else: ?>
77
+ <div class="no-content">
78
+ <?php esc_html_e( 'There is no payment method to show.', 'dokan-lite' ); ?>
79
+ </div>
80
+ <?php endif; ?>
81
+ </div>
82
 
83
  <?php
84
  /**
templates/whats-new.php CHANGED
@@ -3,6 +3,38 @@
3
  * When you are adding new version please follow this sequence for changes: New Feature, New, Improvement, Fix...
4
  */
5
  $changelog = [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  [
7
  'version' => 'Version 3.4.2',
8
  'released' => '2022-04-13',
3
  * When you are adding new version please follow this sequence for changes: New Feature, New, Improvement, Fix...
4
  */
5
  $changelog = [
6
+ [
7
+ 'version' => 'Version 3.4.3',
8
+ 'released' => '2022-04-26',
9
+ 'changes' => [
10
+ 'New' => [
11
+ [
12
+ 'title' => 'Added option to select a default payment method',
13
+ 'description' => '',
14
+ ],
15
+ ],
16
+ 'Improvement' => [
17
+ [
18
+ 'title' => 'Updated design for the payment settings page of vendor dashboard to separate the management of different payment methods',
19
+ 'description' => '',
20
+ ],
21
+ ],
22
+ 'Fix' => [
23
+ [
24
+ 'title' => 'Store Contact Form widget submits the contact form directly instead of ajax submission',
25
+ 'description' => '',
26
+ ],
27
+ [
28
+ 'title' => 'Stop sending new order emails to selected recipients (including admin) when the New Order email is disabled in WooCommerce Settings',
29
+ 'description' => '',
30
+ ],
31
+ [
32
+ 'title' => 'Fixed some validation logic under vendor dashboard payment settings page',
33
+ 'description' => '',
34
+ ],
35
+ ],
36
+ ],
37
+ ],
38
  [
39
  'version' => 'Version 3.4.2',
40
  'released' => '2022-04-13',
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit7fbc1a3b652a4af458bfe82e49b2afd6::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
@@ -53,12 +53,12 @@ class ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
- $includeFiles = Composer\Autoload\ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
- composerRequire02f031035d9a5e8cd6d48c728da99c58($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
@@ -70,7 +70,7 @@ class ComposerAutoloaderInit02f031035d9a5e8cd6d48c728da99c58
70
  * @param string $file
71
  * @return void
72
  */
73
- function composerRequire02f031035d9a5e8cd6d48c728da99c58($fileIdentifier, $file)
74
  {
75
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit7fbc1a3b652a4af458bfe82e49b2afd6
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit7fbc1a3b652a4af458bfe82e49b2afd6', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit7fbc1a3b652a4af458bfe82e49b2afd6', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire7fbc1a3b652a4af458bfe82e49b2afd6($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
70
  * @param string $file
71
  * @return void
72
  */
73
+ function composerRequire7fbc1a3b652a4af458bfe82e49b2afd6($fileIdentifier, $file)
74
  {
75
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
@@ -212,9 +212,9 @@ class ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58
212
  public static function getInitializer(ClassLoader $loader)
213
  {
214
  return \Closure::bind(function () use ($loader) {
215
- $loader->prefixLengthsPsr4 = ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58::$prefixLengthsPsr4;
216
- $loader->prefixDirsPsr4 = ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58::$prefixDirsPsr4;
217
- $loader->classMap = ComposerStaticInit02f031035d9a5e8cd6d48c728da99c58::$classMap;
218
 
219
  }, null, ClassLoader::class);
220
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
212
  public static function getInitializer(ClassLoader $loader)
213
  {
214
  return \Closure::bind(function () use ($loader) {
215
+ $loader->prefixLengthsPsr4 = ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6::$prefixLengthsPsr4;
216
+ $loader->prefixDirsPsr4 = ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6::$prefixDirsPsr4;
217
+ $loader->classMap = ComposerStaticInit7fbc1a3b652a4af458bfe82e49b2afd6::$classMap;
218
 
219
  }, null, ClassLoader::class);
220
  }