Version Description
Important Update This update changes code structures for improving performance. Make sure to take backup and read the changlogs first before upgrade process.
Download this release
Release Info
Developer | tareq1988 |
Plugin | Dokan – Best WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.9.31 to 3.0.0
- assets/css/dokan-upgrade.css +2 -0
- assets/css/dokan-upgrade.css.map +1 -0
- assets/css/setup-no-wc.css +7 -0
- assets/css/style.css +165 -66
- assets/images/dokan-logo-small.svg +34 -0
- assets/images/dokan-notification-banner.svg +40 -0
- assets/js/dokan-upgrade.js +492 -0
- assets/js/dokan-wp.js +4 -4
- assets/js/dokan.js +20 -8
- assets/js/vue-admin.js +141 -139
- assets/js/vue-bootstrap.js +276 -275
- assets/js/vue-frontend.js +29 -29
- assets/js/vue-vendor.js +181 -180
- classes/admin-withdraw.php +0 -109
- classes/template-main.php +0 -65
- classes/upgrade.php +0 -152
- classes/withdraw.php +0 -231
- includes/traits/singleton.php → depricated/Singleton.php +0 -0
- depricated/class-abstract-class-dokan-background-processes.php +8 -0
- depricated/class-abstrct-dokan-rest-store-controller.php +5 -0
- depricated/class-dokan-email.php +12 -0
- depricated/class-dokan-rest-controller.php +5 -0
- depricated/class-dokan-rest-product-controller.php +8 -0
- depricated/class-dokan-rest-store-controller.php +5 -0
- depricated/class-dokan-seller-setup-wizard.php +4 -0
- depricated/class-dokan-store-category-walker.php +5 -0
- depricated/class-dokan-store-location-widget.php +3 -0
- depricated/class-dokan-taxonomy-walker.php +5 -0
- depricated/class-dokan-template-dashboard.php +5 -0
- depricated/class-dokan-template-products.php +5 -0
- depricated/class-dokan-template-settings.php +5 -0
- depricated/class-dokan-vendor.php +5 -0
- depricated/class-dokan-withdraw.php +5 -0
- depricated/depricated-classes.php +29 -0
- depricated/depricated-functions.php +74 -0
- depricated/depricated-hooks.php +37 -0
- dokan.php +90 -177
- includes/{background-processes/abstract-class-dokan-background-processes.php → Abstracts/DokanBackgroundProcesses.php} +40 -7
- includes/Abstracts/DokanModel.php +62 -0
- includes/Abstracts/DokanPromotion.php +258 -0
- includes/{api/admin/class-admin-controller.php → Abstracts/DokanRESTAdminController.php} +5 -1
- includes/{api/class-api-rest-controller.php → Abstracts/DokanRESTController.php} +10 -1
- includes/Abstracts/DokanShortcode.php +22 -0
- includes/Abstracts/DokanUpgrader.php +76 -0
- includes/Admin/AdminBar.php +79 -0
- includes/Admin/Hooks.php +464 -0
- includes/Admin/Menu.php +96 -0
- includes/{admin/class-admin-pointers.php → Admin/Pointers.php} +4 -6
- includes/{admin/promotion.php → Admin/Promotion.php} +4 -4
- includes/{admin/class-settings.php → Admin/Settings.php} +19 -46
- includes/{admin/setup-wizard.php → Admin/SetupWizard.php} +19 -12
- includes/{admin/setup-wizard-no-wc.php → Admin/SetupWizardNoWC.php} +20 -21
- includes/{admin/setup-wizard-wc-admin.php → Admin/SetupWizardWCAdmin.php} +6 -4
- classes/admin-user-profile.php → includes/Admin/UserProfile.php +4 -1
- includes/{admin-functions.php → Admin/functions.php} +26 -484
- classes/ajax.php → includes/Ajax.php +82 -59
- includes/{class-assets.php → Assets.php} +56 -50
- includes/{class-commission.php → Commission.php} +30 -25
- includes/{class-core.php → Core.php} +3 -1
- includes/Dashboard/Manager.php +22 -0
- classes/template-dashboard.php → includes/Dashboard/Templates/Dashboard.php +4 -16
- includes/Dashboard/Templates/Main.php +42 -0
- includes/Dashboard/Templates/Manager.php +32 -0
- classes/template-orders.php → includes/Dashboard/Templates/Orders.php +4 -16
- classes/template-products.php → includes/Dashboard/Templates/Products.php +66 -21
- classes/template-settings.php → includes/Dashboard/Templates/Settings.php +6 -18
- classes/template-withdraw.php → includes/Dashboard/Templates/Withdraw.php +249 -240
- includes/Emails/ContactSeller.php +166 -0
- includes/{class-email.php → Emails/Manager.php} +31 -47
- includes/Emails/NewProduct.php +201 -0
- includes/Emails/NewProductPending.php +193 -0
- includes/Emails/NewSeller.php +178 -0
- includes/Emails/ProductPublished.php +179 -0
- includes/{emails/class-dokan-vendor-withdraw-request.php → Emails/VendorWithdrawRequest.php} +6 -12
- includes/{emails/class-dokan-withdraw-approved.php → Emails/WithdrawApproved.php} +9 -16
- includes/Emails/WithdrawCancelled.php +174 -0
- includes/{exceptions/class-dokan-exception.php → Exceptions/DokanException.php} +12 -5
- classes/installer.php → includes/Install/Installer.php +15 -47
- includes/Order/Hooks.php +245 -0
- includes/{class-order-manager.php → Order/Manager.php} +110 -252
- includes/{order-functions.php → Order/functions.php} +38 -60
- classes/pageviews.php → includes/PageViews.php +3 -1
- includes/{class-dokan-privacy.php → Privacy.php} +7 -3
- includes/Product/Hooks.php +79 -0
- includes/Product/Manager.php +639 -0
- includes/{product-functions.php → Product/functions.php} +62 -169
- includes/{api/admin/class-dashboard-controller.php → REST/AdminDashboardController.php} +7 -1
- includes/{api/admin/class-misc-controller.php → REST/AdminMiscController.php} +7 -3
- includes/{api/admin/class-report-controller.php → REST/AdminReportController.php} +9 -4
- includes/{class-api-manager.php → REST/Manager.php} +16 -14
- includes/{api/class-order-controller.php → REST/OrderController.php} +8 -2
- includes/{api/class-product-attribute-controller.php → REST/ProductAttributeController.php} +6 -21
- includes/{api/class-product-attribute-terms-controller.php → REST/ProductAttributeTermsController.php} +6 -21
- includes/{api/class-product-controller.php → REST/ProductController.php} +12 -12
- includes/{api/class-store-controller.php → REST/StoreController.php} +12 -3
- includes/REST/WithdrawController.php +762 -0
- includes/{class-registration.php → Registration.php} +34 -33
- classes/rewrites.php → includes/Rewrites.php +3 -20
- includes/Shortcodes/BestSellingProduct.php +47 -0
- includes/Shortcodes/Dashboard.php +99 -0
- includes/Shortcodes/MyOrders.php +27 -0
- includes/Shortcodes/Shortcodes.php +44 -0
- includes/Shortcodes/Stores.php +87 -0
- includes/Shortcodes/TopRatedProduct.php +47 -0
- includes/Shortcodes/VendorRegistration.php +35 -0
- includes/{theme-support/class-divi.php → ThemeSupport/Divi.php} +3 -3
- includes/ThemeSupport/Electro.php +38 -0
- includes/ThemeSupport/Enfold.php +66 -0
- includes/{theme-support/class-flatsome.php → ThemeSupport/Flatsome.php} +5 -22
- includes/ThemeSupport/Manager.php +59 -0
- includes/ThemeSupport/Rehub.php +51 -0
- includes/ThemeSupport/Storefront.php +70 -0
- classes/tracker.php → includes/Tracker.php +4 -8
- includes/Traits/AjaxResponseError.php +35 -0
- includes/Traits/ChainableContainer.php +28 -0
- includes/Traits/RESTResponseError.php +38 -0
- includes/Traits/Singleton.php +39 -0
- includes/Upgrade/AdminNotice.php +71 -0
- includes/Upgrade/Hooks.php +22 -0
- includes/Upgrade/Manager.php +113 -0
- includes/Upgrade/Upgrades.php +104 -0
- includes/{upgrades/background-processes/class_dokan_update_2_8_3_vendor_balance.php → Upgrade/Upgrades/BackgroundProcesses/V_2_8_3_VendorBalance.php} +4 -11
- includes/{upgrades/background-processes/class_dokan_update_2_9_16_store_settings.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_16_StoreSettings.php} +4 -11
- includes/{upgrades/background-processes/class_dokan_update_2_9_23_store_name.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_23_StoreName.php} +4 -11
- includes/{upgrades/background-processes/class_dokan_update_2_9_4_order_post_author.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_4_OrderPostAuthor.php} +4 -11
- includes/Upgrade/Upgrades/V_1_2.php +12 -0
- includes/Upgrade/Upgrades/V_2_1.php +13 -0
- includes/Upgrade/Upgrades/V_2_3.php +87 -0
- includes/Upgrade/Upgrades/V_2_4_11.php +49 -0
- includes/Upgrade/Upgrades/V_2_4_12.php +29 -0
- includes/Upgrade/Upgrades/V_2_5_7.php +12 -0
- includes/Upgrade/Upgrades/V_2_6_9.php +83 -0
- includes/Upgrade/Upgrades/V_2_7_3.php +85 -0
- includes/Upgrade/Upgrades/V_2_7_6.php +62 -0
- includes/Upgrade/Upgrades/V_2_8_0.php +15 -0
- includes/Upgrade/Upgrades/V_2_8_3.php +26 -0
- includes/Upgrade/Upgrades/V_2_8_6.php +23 -0
- includes/Upgrade/Upgrades/V_2_9_13.php +35 -0
- includes/Upgrade/Upgrades/V_2_9_16.php +27 -0
- includes/Upgrade/Upgrades/V_2_9_19.php +58 -0
- includes/Upgrade/Upgrades/V_2_9_23.php +27 -0
- includes/Upgrade/Upgrades/V_2_9_4.php +48 -0
- includes/{class-vendor-manager.php → Vendor/Manager.php} +17 -7
- classes/seller-setup-wizard.php → includes/Vendor/SetupWizard.php +41 -15
- includes/{class-store-lists-filter.php → Vendor/StoreListsFilter.php} +3 -16
- includes/{class-vendor.php → Vendor/Vendor.php} +30 -2
- includes/Walkers/Category.php +56 -0
- includes/Walkers/CategoryDropdownSingle.php +52 -0
- includes/{widgets/store-menu-category.php → Walkers/StoreCategory.php} +7 -3
- includes/Walkers/TaxonomyDropdown.php +83 -0
- includes/{widgets/bestselling-product.php → Widgets/BestSellingProducts.php} +5 -3
- includes/Widgets/Manager.php +61 -0
- includes/{widgets/menu-category.php → Widgets/ProductCategoryMenu.php} +8 -67
- includes/{widgets/store-menu.php → Widgets/StoreCategoryMenu.php} +8 -9
- includes/{widgets/store-contact.php → Widgets/StoreContactForm.php} +5 -1
- includes/{widgets/store-location.php → Widgets/StoreLocation.php} +8 -4
- includes/{widgets/store-open-close.php → Widgets/StoreOpenClose.php} +8 -4
- includes/{widgets/top-rated-product.php → Widgets/TopratedProducts.php} +5 -2
- includes/Withdraw/Export/CSV.php +50 -0
- includes/Withdraw/Export/Manager.php +37 -0
- includes/Withdraw/Hooks.php +84 -0
- includes/Withdraw/Manager.php +437 -0
- includes/Withdraw/Withdraw.php +381 -0
- includes/Withdraw/Withdraws.php +194 -0
- includes/{withdraw-functions.php → Withdraw/functions.php} +35 -36
- includes/admin/class-admin.php +0 -378
- includes/admin/class-ajax.php +0 -59
- includes/api/class-settings-controller.php +0 -160
- includes/api/class-withdraw-controller.php +0 -790
- includes/background-processes/class-dokan-background-processes.php +0 -28
- includes/class-product-manager.php +0 -173
- includes/class-shortcodes.php +0 -281
- includes/class-theme-support.php +0 -80
- includes/emails/class-dokan-email-contact-seller.php +0 -172
- includes/emails/class-dokan-email-new-product-pending.php +0 -199
- includes/emails/class-dokan-email-new-product.php +0 -207
- includes/emails/class-dokan-email-new-seller-registered.php +0 -187
- includes/emails/class-dokan-email-product-published.php +0 -185
- includes/emails/class-dokan-withdraw-cancelled.php +0 -181
- includes/functions-depricated.php +0 -15
- includes/functions.php +59 -30
- includes/template-tags.php +1 -1
- includes/theme-support/class-electro.php +0 -53
- includes/theme-support/class-enfold.php +0 -91
- includes/theme-support/class-rehub.php +0 -28
- includes/theme-support/class-storefront.php +0 -100
- includes/upgrades/dokan-upgrade-1.2.php +0 -3
- includes/upgrades/dokan-upgrade-2.1.php +0 -5
- includes/upgrades/dokan-upgrade-2.3.php +0 -83
- includes/upgrades/dokan-upgrade-2.4.11.php +0 -44
- includes/upgrades/dokan-upgrade-2.4.12.php +0 -23
- includes/upgrades/dokan-upgrade-2.5.7.php +0 -7
- includes/upgrades/dokan-upgrade-2.6.9.php +0 -77
- includes/upgrades/dokan-upgrade-2.7.3.php +0 -82
- includes/upgrades/dokan-upgrade-2.7.6.php +0 -58
- includes/upgrades/dokan-upgrade-2.8.0.php +0 -10
- includes/upgrades/dokan-upgrade-2.8.3.php +0 -23
- includes/upgrades/dokan-upgrade-2.8.6.php +0 -19
- includes/upgrades/dokan-upgrade-2.9.13.php +0 -30
- includes/upgrades/dokan-upgrade-2.9.16.php +0 -25
- includes/upgrades/dokan-upgrade-2.9.19.php +0 -53
- includes/upgrades/dokan-upgrade-2.9.23.php +0 -25
- includes/upgrades/dokan-upgrade-2.9.4.php +0 -53
- languages/dokan-lite.php +9 -0
- languages/dokan-lite.pot +2143 -2008
assets/css/dokan-upgrade.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.text-danger{color:#dc3232}#dokan-upgrade-notice{box-sizing:border-box;background-repeat:no-repeat;background-position:100% 100%;transition:all .5s}#dokan-upgrade-notice:after{content:"";display:table;clear:both}#dokan-upgrade-notice *{box-sizing:border-box}#dokan-upgrade-notice-icon{width:65px;float:left;padding:12px 12px 12px 0}#dokan-upgrade-notice-icon img{width:100%}#dokan-upgrade-notice-message{float:left;width:calc(100% - 65px)}#dokan-upgrade-notice-title{padding-top:12px;font-size:15px;font-weight:600}#dokan-upgrade-notice-buttons{padding-bottom:12px}
|
2 |
+
/*# sourceMappingURL=dokan-upgrade.css.map */
|
assets/css/dokan-upgrade.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["dokan-upgrade.css"],"names":[],"mappings":"AACA,aACE,aAAe,CAChB,AACD,sBACE,sBAAuB,AACvB,4BAA6B,AAC7B,8BAAkC,AAClC,kBAAqB,CACtB,AACD,4BACE,WAAY,AACZ,cAAe,AACf,UAAY,CACb,AACD,wBACE,qBAAuB,CACxB,AACD,2BACE,WAAY,AACZ,WAAY,AACZ,wBAA0B,CAC3B,AACD,+BACE,UAAY,CACb,AACD,8BACE,WAAY,AACZ,uBAAyB,CAC1B,AACD,4BACE,iBAAkB,AAClB,eAAgB,AAChB,eAAiB,CAClB,AACD,8BACE,mBAAqB,CACtB","file":"dokan-upgrade.css","sourcesContent":["\n.text-danger {\n color: #dc3232;\n}\n#dokan-upgrade-notice {\n box-sizing: border-box;\n background-repeat: no-repeat;\n background-position: bottom right;\n transition: all 0.5s;\n}\n#dokan-upgrade-notice:after {\n content: \"\";\n display: table;\n clear: both;\n}\n#dokan-upgrade-notice * {\n box-sizing: border-box;\n}\n#dokan-upgrade-notice-icon {\n width: 65px;\n float: left;\n padding: 12px 12px 12px 0;\n}\n#dokan-upgrade-notice-icon img {\n width: 100%;\n}\n#dokan-upgrade-notice-message {\n float: left;\n width: calc(100% - 65px);\n}\n#dokan-upgrade-notice-title {\n padding-top: 12px;\n font-size: 15px;\n font-weight: 600;\n}\n#dokan-upgrade-notice-buttons {\n padding-bottom: 12px;\n}\n"]}
|
assets/css/setup-no-wc.css
CHANGED
@@ -43,11 +43,18 @@ body {
|
|
43 |
}
|
44 |
.wc-setup-content a {
|
45 |
color: #a16696;
|
|
|
46 |
}
|
47 |
.wc-setup-content a:hover,
|
48 |
.wc-setup-content a:focus {
|
49 |
color: #111;
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
.wc-setup .wc-setup-actions {
|
52 |
overflow: hidden;
|
53 |
margin: 20px 0 0;
|
43 |
}
|
44 |
.wc-setup-content a {
|
45 |
color: #a16696;
|
46 |
+
text-decoration: none;
|
47 |
}
|
48 |
.wc-setup-content a:hover,
|
49 |
.wc-setup-content a:focus {
|
50 |
color: #111;
|
51 |
}
|
52 |
+
.wc-setup-content .dokan-no-wc-warning {
|
53 |
+
border: 1px solid #f1f1f1;
|
54 |
+
padding: 10px 12px;
|
55 |
+
border-left-width: 4px;
|
56 |
+
border-left-color: #dc3232;
|
57 |
+
}
|
58 |
.wc-setup .wc-setup-actions {
|
59 |
overflow: hidden;
|
60 |
margin: 20px 0 0;
|
assets/css/style.css
CHANGED
@@ -3696,6 +3696,11 @@ div.media-sidebar a.edit-attachment {
|
|
3696 |
width: 100%;
|
3697 |
height: auto;
|
3698 |
}
|
|
|
|
|
|
|
|
|
|
|
3699 |
.dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper {
|
3700 |
position: absolute;
|
3701 |
top: 0;
|
@@ -4488,22 +4493,105 @@ div.media-sidebar a.edit-attachment {
|
|
4488 |
.dokan-popup-content .dokan-popup-error.has-error {
|
4489 |
display: block;
|
4490 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4491 |
#dokan-store-listing-filter-wrap {
|
4492 |
-
background: #ffffff;
|
4493 |
padding: 20px;
|
4494 |
box-shadow: 1px 1px 20px 0px #E9E9E9;
|
4495 |
display: flex;
|
4496 |
justify-content: space-between;
|
|
|
4497 |
flex-wrap: wrap;
|
4498 |
}
|
4499 |
-
#dokan-store-listing-filter-wrap .left .store-count {
|
4500 |
-
margin-top: 10px;
|
4501 |
-
}
|
4502 |
#dokan-store-listing-filter-wrap .right {
|
4503 |
display: flex;
|
|
|
4504 |
}
|
4505 |
#dokan-store-listing-filter-wrap .right .item {
|
4506 |
position: relative;
|
|
|
|
|
|
|
|
|
4507 |
}
|
4508 |
#dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {
|
4509 |
border-radius: 3px;
|
@@ -4511,8 +4599,12 @@ div.media-sidebar a.edit-attachment {
|
|
4511 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons {
|
4512 |
position: absolute;
|
4513 |
left: 14%;
|
4514 |
-
top:
|
4515 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
4516 |
}
|
4517 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons .dokan-icon-div {
|
4518 |
background: #fff;
|
@@ -4528,9 +4620,6 @@ div.media-sidebar a.edit-attachment {
|
|
4528 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons .dokan-icon-div:nth-child(3) {
|
4529 |
width: 4px;
|
4530 |
}
|
4531 |
-
#dokan-store-listing-filter-wrap .right .item:not(:first-child) {
|
4532 |
-
padding-left: 40px;
|
4533 |
-
}
|
4534 |
#dokan-store-listing-filter-wrap .right .item button {
|
4535 |
padding-top: 8px;
|
4536 |
padding-bottom: 8px;
|
@@ -4542,7 +4631,7 @@ div.media-sidebar a.edit-attachment {
|
|
4542 |
}
|
4543 |
#dokan-store-listing-filter-wrap .right .item select {
|
4544 |
background: #ffffff;
|
4545 |
-
border
|
4546 |
-webkit-appearance: none;
|
4547 |
-moz-appearance: none;
|
4548 |
appearance: none;
|
@@ -4555,7 +4644,10 @@ div.media-sidebar a.edit-attachment {
|
|
4555 |
outline: none;
|
4556 |
}
|
4557 |
#dokan-store-listing-filter-wrap .right .toggle-view {
|
4558 |
-
margin
|
|
|
|
|
|
|
4559 |
}
|
4560 |
#dokan-store-listing-filter-wrap .right .toggle-view .dashicons {
|
4561 |
font-size: 22px;
|
@@ -4566,29 +4658,32 @@ div.media-sidebar a.edit-attachment {
|
|
4566 |
}
|
4567 |
#dokan-store-listing-filter-form-wrap {
|
4568 |
background: #ffffff;
|
4569 |
-
margin-top:
|
4570 |
-
padding: 20px;
|
4571 |
box-shadow: 1px 1px 20px 0px #E9E9E9;
|
|
|
|
|
|
|
|
|
|
|
4572 |
}
|
4573 |
#dokan-store-listing-filter-form-wrap:before {
|
4574 |
content: "\f142";
|
4575 |
-
|
4576 |
-
top: -
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
-
font-family: 'dashicons';
|
4582 |
-
vertical-align: top;
|
4583 |
font-size: 60px;
|
4584 |
-
color: #
|
4585 |
font-weight: bold;
|
|
|
4586 |
}
|
4587 |
#dokan-store-listing-filter-form-wrap .store-search .store-search-input {
|
4588 |
width: 100%;
|
4589 |
padding: 10px 20px;
|
4590 |
border-radius: 3px;
|
4591 |
-
margin-top: -11px;
|
4592 |
border: 1px solid #cccccc;
|
4593 |
}
|
4594 |
#dokan-store-listing-filter-form-wrap .store-search .store-search-input:placeholder {
|
@@ -4608,7 +4703,7 @@ div.media-sidebar a.edit-attachment {
|
|
4608 |
border-radius: 3px;
|
4609 |
background: #fff !important;
|
4610 |
color: #000 !important;
|
4611 |
-
border
|
4612 |
margin-right: 20px;
|
4613 |
display: none;
|
4614 |
}
|
@@ -4625,6 +4720,17 @@ div.media-sidebar a.edit-attachment {
|
|
4625 |
.site-content .entry-header .entry-title[class] {
|
4626 |
border: none;
|
4627 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4628 |
#dokan-seller-listing-wrap.grid-view .store-wrapper {
|
4629 |
position: relative;
|
4630 |
}
|
@@ -4649,7 +4755,9 @@ div.media-sidebar a.edit-attachment {
|
|
4649 |
top: 10px;
|
4650 |
}
|
4651 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .featured-favourite .featured-label {
|
4652 |
-
width:
|
|
|
|
|
4653 |
padding: 2px 10px;
|
4654 |
background: #2d54a3;
|
4655 |
color: #fff;
|
@@ -4659,29 +4767,26 @@ div.media-sidebar a.edit-attachment {
|
|
4659 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a {
|
4660 |
color: #fff;
|
4661 |
text-shadow: rgba(0, 0, 0, 0.8) 0 1px 0;
|
|
|
|
|
|
|
|
|
4662 |
}
|
4663 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a:active,
|
4664 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a:focus {
|
4665 |
text-decoration: none;
|
4666 |
outline: none;
|
4667 |
}
|
4668 |
-
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .
|
4669 |
-
float: none;
|
4670 |
-
margin: 12px 0px 10px;
|
4671 |
-
}
|
4672 |
-
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .star-rating:before {
|
4673 |
-
font-family: star;
|
4674 |
-
}
|
4675 |
-
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .star-rating span:before {
|
4676 |
-
font-family: star;
|
4677 |
-
color: #fa9a00;
|
4678 |
-
}
|
4679 |
-
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .star-rating p.rating {
|
4680 |
display: none !important;
|
4681 |
}
|
4682 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .store-address {
|
|
|
4683 |
line-height: 23px;
|
4684 |
}
|
|
|
|
|
|
|
4685 |
#dokan-seller-listing-wrap.grid-view .store-footer {
|
4686 |
background: #fff;
|
4687 |
position: relative;
|
@@ -4719,26 +4824,26 @@ div.media-sidebar a.edit-attachment {
|
|
4719 |
display: flex;
|
4720 |
flex-wrap: wrap;
|
4721 |
align-items: center;
|
4722 |
-
padding: 0px 50px 0px 0px;
|
4723 |
background: #fff;
|
4724 |
border-radius: 3px;
|
|
|
4725 |
}
|
4726 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header .store-banner {
|
4727 |
min-height: 140px;
|
4728 |
}
|
4729 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header .store-banner img {
|
4730 |
-
margin-left: -15px;
|
4731 |
border-top-left-radius: 3px;
|
4732 |
border-bottom-left-radius: 3px;
|
4733 |
}
|
4734 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .featured-favourite .featured-label {
|
4735 |
-
|
4736 |
-
padding: 0px 5px;
|
4737 |
background: #2d54a3;
|
4738 |
color: #fff;
|
4739 |
border-radius: 3px;
|
4740 |
box-shadow: 0px 0px 25px -5px #afafaf;
|
4741 |
-
|
|
|
|
|
4742 |
}
|
4743 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 {
|
4744 |
margin-top: 0;
|
@@ -4746,6 +4851,7 @@ div.media-sidebar a.edit-attachment {
|
|
4746 |
}
|
4747 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a {
|
4748 |
color: #000;
|
|
|
4749 |
}
|
4750 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a:active,
|
4751 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a:focus {
|
@@ -4754,15 +4860,14 @@ div.media-sidebar a.edit-attachment {
|
|
4754 |
}
|
4755 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class] {
|
4756 |
overflow: visible;
|
4757 |
-
left: 25%;
|
4758 |
z-index: 1;
|
4759 |
-
top: -10px;
|
4760 |
min-width: 85px;
|
4761 |
font-family: 'Open Sans', sans-serif;
|
4762 |
color: gray;
|
4763 |
-
|
4764 |
-
|
4765 |
-
|
|
|
4766 |
}
|
4767 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class]:before {
|
4768 |
font-family: star;
|
@@ -4791,17 +4896,17 @@ div.media-sidebar a.edit-attachment {
|
|
4791 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .store-phone {
|
4792 |
display: none;
|
4793 |
}
|
4794 |
-
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper >
|
4795 |
-
flex-basis:
|
4796 |
-
|
4797 |
-
padding: 0 15px;
|
4798 |
}
|
4799 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header {
|
4800 |
-
flex-basis:
|
4801 |
}
|
4802 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-footer[class] {
|
4803 |
display: flex;
|
4804 |
flex-direction: row-reverse;
|
|
|
4805 |
border: none;
|
4806 |
text-align: right;
|
4807 |
background: #fff;
|
@@ -4849,11 +4954,15 @@ div.media-sidebar a.edit-attachment {
|
|
4849 |
}
|
4850 |
}
|
4851 |
@media (max-width: 767px) {
|
4852 |
-
#dokan-store-listing-filter-wrap
|
4853 |
-
|
|
|
|
|
|
|
|
|
4854 |
}
|
4855 |
-
#dokan-store-listing-filter-wrap .right .item
|
4856 |
-
|
4857 |
}
|
4858 |
#dokan-store-listing-filter-wrap .toggle-view {
|
4859 |
display: none;
|
@@ -4963,11 +5072,7 @@ div.media-sidebar a.edit-attachment {
|
|
4963 |
}
|
4964 |
@media (max-width: 430px) {
|
4965 |
#dokan-store-listing-filter-form-wrap:before {
|
4966 |
-
left:
|
4967 |
-
}
|
4968 |
-
#dokan-store-listing-filter-form-wrap .right .item:not(:first-child) {
|
4969 |
-
padding: 0;
|
4970 |
-
margin-left: 50px;
|
4971 |
}
|
4972 |
.apply-filter {
|
4973 |
margin-top: 20px;
|
@@ -5105,17 +5210,11 @@ div.media-sidebar a.edit-attachment {
|
|
5105 |
.dokan-order-filter-serach form:first-child .dokan-form-group {
|
5106 |
display: flex;
|
5107 |
}
|
5108 |
-
#dokan-store-listing-filter-wrap .right .item:not(:first-child) {
|
5109 |
-
padding-left: 35px;
|
5110 |
-
}
|
5111 |
#dokan-store-listing-filter-wrap .right .item #stores_orderby {
|
5112 |
padding: 8px 0px 8px 16px;
|
5113 |
}
|
5114 |
}
|
5115 |
@media (max-width: 360px) {
|
5116 |
-
#dokan-store-listing-filter-wrap .right .item:not(:first-child) {
|
5117 |
-
padding-left: 20px;
|
5118 |
-
}
|
5119 |
.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info {
|
5120 |
max-width: 200px;
|
5121 |
}
|
3696 |
width: 100%;
|
3697 |
height: auto;
|
3698 |
}
|
3699 |
+
.dokan-single-store .profile-frame .profile-info-box .profile-info-img.dummy-image {
|
3700 |
+
background-image: url(../images/default-store-banner.png);
|
3701 |
+
background-size: 100% 100%;
|
3702 |
+
background-repeat: no-repeat;
|
3703 |
+
}
|
3704 |
.dokan-single-store .profile-frame .profile-info-box .profile-info-summery-wrapper {
|
3705 |
position: absolute;
|
3706 |
top: 0;
|
4493 |
.dokan-popup-content .dokan-popup-error.has-error {
|
4494 |
display: block;
|
4495 |
}
|
4496 |
+
#dokan-seller-listing-wrap button {
|
4497 |
+
margin: unset;
|
4498 |
+
padding: 6px 12px;
|
4499 |
+
}
|
4500 |
+
#dokan-store-listing-filter-wrap .left,
|
4501 |
+
.store-lists-other-filter-wrap .left,
|
4502 |
+
#dokan-store-listing-filter-wrap .right,
|
4503 |
+
.store-lists-other-filter-wrap .right,
|
4504 |
+
#dokan-store-listing-filter-wrap .item,
|
4505 |
+
.store-lists-other-filter-wrap .item {
|
4506 |
+
display: unset;
|
4507 |
+
overflow: unset;
|
4508 |
+
z-index: unset;
|
4509 |
+
position: unset;
|
4510 |
+
height: unset;
|
4511 |
+
width: unset;
|
4512 |
+
margin: unset;
|
4513 |
+
padding: unset;
|
4514 |
+
border: unset;
|
4515 |
+
}
|
4516 |
+
#dokan-store-listing-filter-wrap,
|
4517 |
+
#dokan-store-listing-filter-wrap form,
|
4518 |
+
#dokan-store-listing-filter-form-wrap * {
|
4519 |
+
padding: unset;
|
4520 |
+
margin: unset;
|
4521 |
+
box-sizing: border-box;
|
4522 |
+
}
|
4523 |
+
#dokan-store-listing-filter-wrap ul,
|
4524 |
+
#dokan-store-listing-filter-wrap form ul,
|
4525 |
+
#dokan-store-listing-filter-form-wrap * ul,
|
4526 |
+
#dokan-store-listing-filter-wrap ul li,
|
4527 |
+
#dokan-store-listing-filter-wrap form ul li,
|
4528 |
+
#dokan-store-listing-filter-form-wrap * ul li {
|
4529 |
+
margin: unset;
|
4530 |
+
padding: unset;
|
4531 |
+
}
|
4532 |
+
#dokan-store-listing-filter-wrap div p,
|
4533 |
+
#dokan-store-listing-filter-wrap form div p,
|
4534 |
+
#dokan-store-listing-filter-form-wrap * div p {
|
4535 |
+
margin: unset;
|
4536 |
+
padding: unset;
|
4537 |
+
line-height: unset;
|
4538 |
+
}
|
4539 |
+
#dokan-store-listing-filter-wrap label,
|
4540 |
+
#dokan-store-listing-filter-wrap form label,
|
4541 |
+
#dokan-store-listing-filter-form-wrap * label,
|
4542 |
+
#dokan-store-listing-filter-wrap input,
|
4543 |
+
#dokan-store-listing-filter-wrap form input,
|
4544 |
+
#dokan-store-listing-filter-form-wrap * input,
|
4545 |
+
#dokan-store-listing-filter-wrap select,
|
4546 |
+
#dokan-store-listing-filter-wrap form select,
|
4547 |
+
#dokan-store-listing-filter-form-wrap * select,
|
4548 |
+
#dokan-store-listing-filter-wrap button,
|
4549 |
+
#dokan-store-listing-filter-wrap form button,
|
4550 |
+
#dokan-store-listing-filter-form-wrap * button,
|
4551 |
+
#dokan-store-listing-filter-wrap a,
|
4552 |
+
#dokan-store-listing-filter-wrap form a,
|
4553 |
+
#dokan-store-listing-filter-form-wrap * a,
|
4554 |
+
#dokan-store-listing-filter-wrap i,
|
4555 |
+
#dokan-store-listing-filter-wrap form i,
|
4556 |
+
#dokan-store-listing-filter-form-wrap * i,
|
4557 |
+
#dokan-store-listing-filter-wrap span,
|
4558 |
+
#dokan-store-listing-filter-wrap form span,
|
4559 |
+
#dokan-store-listing-filter-form-wrap * span,
|
4560 |
+
#dokan-store-listing-filter-wrap textarea,
|
4561 |
+
#dokan-store-listing-filter-wrap form textarea,
|
4562 |
+
#dokan-store-listing-filter-form-wrap * textarea {
|
4563 |
+
width: unset;
|
4564 |
+
border: unset;
|
4565 |
+
padding: unset;
|
4566 |
+
margin: unset;
|
4567 |
+
display: unset;
|
4568 |
+
text-transform: unset;
|
4569 |
+
font-weight: unset;
|
4570 |
+
line-height: unset;
|
4571 |
+
font-size: unset;
|
4572 |
+
letter-spacing: unset;
|
4573 |
+
box-shadow: unset;
|
4574 |
+
box-sizing: border-box;
|
4575 |
+
}
|
4576 |
#dokan-store-listing-filter-wrap {
|
4577 |
+
background-color: #ffffff;
|
4578 |
padding: 20px;
|
4579 |
box-shadow: 1px 1px 20px 0px #E9E9E9;
|
4580 |
display: flex;
|
4581 |
justify-content: space-between;
|
4582 |
+
align-items: center;
|
4583 |
flex-wrap: wrap;
|
4584 |
}
|
|
|
|
|
|
|
4585 |
#dokan-store-listing-filter-wrap .right {
|
4586 |
display: flex;
|
4587 |
+
align-items: center;
|
4588 |
}
|
4589 |
#dokan-store-listing-filter-wrap .right .item {
|
4590 |
position: relative;
|
4591 |
+
white-space: nowrap;
|
4592 |
+
}
|
4593 |
+
#dokan-store-listing-filter-wrap .right .item.sort-by {
|
4594 |
+
margin: 0px 30px;
|
4595 |
}
|
4596 |
#dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {
|
4597 |
border-radius: 3px;
|
4599 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons {
|
4600 |
position: absolute;
|
4601 |
left: 14%;
|
4602 |
+
top: 50%;
|
4603 |
cursor: pointer;
|
4604 |
+
margin: 0;
|
4605 |
+
padding: 0;
|
4606 |
+
transform: translate(0, -50%);
|
4607 |
+
z-index: 999;
|
4608 |
}
|
4609 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons .dokan-icon-div {
|
4610 |
background: #fff;
|
4620 |
#dokan-store-listing-filter-wrap .right .item .dokan-icons .dokan-icon-div:nth-child(3) {
|
4621 |
width: 4px;
|
4622 |
}
|
|
|
|
|
|
|
4623 |
#dokan-store-listing-filter-wrap .right .item button {
|
4624 |
padding-top: 8px;
|
4625 |
padding-bottom: 8px;
|
4631 |
}
|
4632 |
#dokan-store-listing-filter-wrap .right .item select {
|
4633 |
background: #ffffff;
|
4634 |
+
border: 1px solid #edecec;
|
4635 |
-webkit-appearance: none;
|
4636 |
-moz-appearance: none;
|
4637 |
appearance: none;
|
4644 |
outline: none;
|
4645 |
}
|
4646 |
#dokan-store-listing-filter-wrap .right .toggle-view {
|
4647 |
+
margin: 0;
|
4648 |
+
padding: 0;
|
4649 |
+
line-height: 0;
|
4650 |
+
height: 0;
|
4651 |
}
|
4652 |
#dokan-store-listing-filter-wrap .right .toggle-view .dashicons {
|
4653 |
font-size: 22px;
|
4658 |
}
|
4659 |
#dokan-store-listing-filter-form-wrap {
|
4660 |
background: #ffffff;
|
4661 |
+
margin-top: 32px;
|
4662 |
+
padding: 32px 20px 20px 20px;
|
4663 |
box-shadow: 1px 1px 20px 0px #E9E9E9;
|
4664 |
+
position: relative;
|
4665 |
+
}
|
4666 |
+
#dokan-store-listing-filter-form-wrap div {
|
4667 |
+
margin: 0;
|
4668 |
+
padding: 0;
|
4669 |
}
|
4670 |
#dokan-store-listing-filter-form-wrap:before {
|
4671 |
content: "\f142";
|
4672 |
+
height: 0 !important;
|
4673 |
+
top: -8px;
|
4674 |
+
left: 50%;
|
4675 |
+
position: absolute;
|
4676 |
+
transform: translate(0, -50%);
|
4677 |
+
font-family: dashicons;
|
|
|
|
|
4678 |
font-size: 60px;
|
4679 |
+
color: #fff;
|
4680 |
font-weight: bold;
|
4681 |
+
line-height: 0 !important;
|
4682 |
}
|
4683 |
#dokan-store-listing-filter-form-wrap .store-search .store-search-input {
|
4684 |
width: 100%;
|
4685 |
padding: 10px 20px;
|
4686 |
border-radius: 3px;
|
|
|
4687 |
border: 1px solid #cccccc;
|
4688 |
}
|
4689 |
#dokan-store-listing-filter-form-wrap .store-search .store-search-input:placeholder {
|
4703 |
border-radius: 3px;
|
4704 |
background: #fff !important;
|
4705 |
color: #000 !important;
|
4706 |
+
border: 1px solid #edecec !important;
|
4707 |
margin-right: 20px;
|
4708 |
display: none;
|
4709 |
}
|
4720 |
.site-content .entry-header .entry-title[class] {
|
4721 |
border: none;
|
4722 |
}
|
4723 |
+
#dokan-seller-listing-wrap .seller-listing-content .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-data h2 {
|
4724 |
+
padding: 0 !important;
|
4725 |
+
}
|
4726 |
+
#dokan-seller-listing-wrap .seller-listing-content .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-data .dokan-seller-rating i.dashicons {
|
4727 |
+
width: 15px;
|
4728 |
+
font-size: 17px;
|
4729 |
+
}
|
4730 |
+
#dokan-seller-listing-wrap .seller-listing-content .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-data .dokan-seller-rating i.dashicons.dashicons-star-filled,
|
4731 |
+
#dokan-seller-listing-wrap .seller-listing-content .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-data .dokan-seller-rating i.dashicons.dashicons-star-half {
|
4732 |
+
color: #fa9a00;
|
4733 |
+
}
|
4734 |
#dokan-seller-listing-wrap.grid-view .store-wrapper {
|
4735 |
position: relative;
|
4736 |
}
|
4755 |
top: 10px;
|
4756 |
}
|
4757 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .featured-favourite .featured-label {
|
4758 |
+
width: max-content;
|
4759 |
+
width: -moz-max-content;
|
4760 |
+
width: -webkit-max-content;
|
4761 |
padding: 2px 10px;
|
4762 |
background: #2d54a3;
|
4763 |
color: #fff;
|
4767 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a {
|
4768 |
color: #fff;
|
4769 |
text-shadow: rgba(0, 0, 0, 0.8) 0 1px 0;
|
4770 |
+
font-size: 25px;
|
4771 |
+
padding: 0;
|
4772 |
+
margin: 0;
|
4773 |
+
text-decoration: none;
|
4774 |
}
|
4775 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a:active,
|
4776 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data h2 a:focus {
|
4777 |
text-decoration: none;
|
4778 |
outline: none;
|
4779 |
}
|
4780 |
+
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .dokan-seller-rating p.rating {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4781 |
display: none !important;
|
4782 |
}
|
4783 |
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .store-address {
|
4784 |
+
margin: 0 0 5px 0;
|
4785 |
line-height: 23px;
|
4786 |
}
|
4787 |
+
#dokan-seller-listing-wrap.grid-view .store-content .store-data-container .store-data .store-phone {
|
4788 |
+
margin: 0 0 5px 0;
|
4789 |
+
}
|
4790 |
#dokan-seller-listing-wrap.grid-view .store-footer {
|
4791 |
background: #fff;
|
4792 |
position: relative;
|
4824 |
display: flex;
|
4825 |
flex-wrap: wrap;
|
4826 |
align-items: center;
|
|
|
4827 |
background: #fff;
|
4828 |
border-radius: 3px;
|
4829 |
+
position: relative;
|
4830 |
}
|
4831 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header .store-banner {
|
4832 |
min-height: 140px;
|
4833 |
}
|
4834 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header .store-banner img {
|
|
|
4835 |
border-top-left-radius: 3px;
|
4836 |
border-bottom-left-radius: 3px;
|
4837 |
}
|
4838 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .featured-favourite .featured-label {
|
4839 |
+
padding: 2px 10px;
|
|
|
4840 |
background: #2d54a3;
|
4841 |
color: #fff;
|
4842 |
border-radius: 3px;
|
4843 |
box-shadow: 0px 0px 25px -5px #afafaf;
|
4844 |
+
position: absolute;
|
4845 |
+
left: 8px;
|
4846 |
+
top: 10px;
|
4847 |
}
|
4848 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 {
|
4849 |
margin-top: 0;
|
4851 |
}
|
4852 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a {
|
4853 |
color: #000;
|
4854 |
+
text-decoration: none;
|
4855 |
}
|
4856 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a:active,
|
4857 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data h2 a:focus {
|
4860 |
}
|
4861 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class] {
|
4862 |
overflow: visible;
|
|
|
4863 |
z-index: 1;
|
|
|
4864 |
min-width: 85px;
|
4865 |
font-family: 'Open Sans', sans-serif;
|
4866 |
color: gray;
|
4867 |
+
float: right;
|
4868 |
+
position: relative;
|
4869 |
+
top: -15px;
|
4870 |
+
left: 25%;
|
4871 |
}
|
4872 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class]:before {
|
4873 |
font-family: star;
|
4896 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .store-phone {
|
4897 |
display: none;
|
4898 |
}
|
4899 |
+
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper > .store-content {
|
4900 |
+
flex-basis: 43%;
|
4901 |
+
padding-left: 4%;
|
|
|
4902 |
}
|
4903 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-header {
|
4904 |
+
flex-basis: 20%;
|
4905 |
}
|
4906 |
#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-footer[class] {
|
4907 |
display: flex;
|
4908 |
flex-direction: row-reverse;
|
4909 |
+
flex-basis: 33%;
|
4910 |
border: none;
|
4911 |
text-align: right;
|
4912 |
background: #fff;
|
4954 |
}
|
4955 |
}
|
4956 |
@media (max-width: 767px) {
|
4957 |
+
#dokan-store-listing-filter-wrap {
|
4958 |
+
display: block;
|
4959 |
+
}
|
4960 |
+
#dokan-store-listing-filter-wrap .right {
|
4961 |
+
justify-content: space-between;
|
4962 |
+
margin-top: 15px;
|
4963 |
}
|
4964 |
+
#dokan-store-listing-filter-wrap .right .item.sort-by {
|
4965 |
+
margin: 0;
|
4966 |
}
|
4967 |
#dokan-store-listing-filter-wrap .toggle-view {
|
4968 |
display: none;
|
5072 |
}
|
5073 |
@media (max-width: 430px) {
|
5074 |
#dokan-store-listing-filter-form-wrap:before {
|
5075 |
+
left: 10%;
|
|
|
|
|
|
|
|
|
5076 |
}
|
5077 |
.apply-filter {
|
5078 |
margin-top: 20px;
|
5210 |
.dokan-order-filter-serach form:first-child .dokan-form-group {
|
5211 |
display: flex;
|
5212 |
}
|
|
|
|
|
|
|
5213 |
#dokan-store-listing-filter-wrap .right .item #stores_orderby {
|
5214 |
padding: 8px 0px 8px 16px;
|
5215 |
}
|
5216 |
}
|
5217 |
@media (max-width: 360px) {
|
|
|
|
|
|
|
5218 |
.dokan-single-store .profile-frame .profile-info-box.profile-layout-layout1 .profile-info-summery-wrapper .profile-info-summery .profile-info .dokan-store-info {
|
5219 |
max-width: 200px;
|
5220 |
}
|
assets/images/dokan-logo-small.svg
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="90px" height="93px" viewBox="0 0 90 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: Sketch 53 (72520) - https://sketchapp.com -->
|
4 |
+
<title>Group 54</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs>
|
7 |
+
<linearGradient x1="50%" y1="100%" x2="50%" y2="0%" id="linearGradient-1">
|
8 |
+
<stop stop-color="#FE5196" offset="0%"></stop>
|
9 |
+
<stop stop-color="#F77062" offset="100%"></stop>
|
10 |
+
</linearGradient>
|
11 |
+
<linearGradient x1="-36.3522522%" y1="-38.1200007%" x2="211.980564%" y2="212.525742%" id="linearGradient-2">
|
12 |
+
<stop stop-color="#FF954A" offset="0%"></stop>
|
13 |
+
<stop stop-color="#FF4CC7" offset="100%"></stop>
|
14 |
+
</linearGradient>
|
15 |
+
<path d="M30.8108108,0 L59.1891892,0 C76.2055301,-3.12585112e-15 90,13.7944699 90,30.8108108 L90,62.1891892 C90,79.2055301 76.2055301,93 59.1891892,93 L30.8108108,93 C13.7944699,93 2.08390075e-15,79.2055301 0,62.1891892 L0,30.8108108 C-2.08390075e-15,13.7944699 13.7944699,1.02312785e-14 30.8108108,7.10542736e-15 Z" id="path-3"></path>
|
16 |
+
</defs>
|
17 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
18 |
+
<g id="Home-Page-Design-for-Dokan" transform="translate(-448.000000, -7898.000000)">
|
19 |
+
<g id="Footer" transform="translate(-172.000000, 7729.000000)">
|
20 |
+
<g id="Dokan-CTA" transform="translate(560.000000, 127.000000)">
|
21 |
+
<g id="Group-17" transform="translate(60.000000, 42.000000)">
|
22 |
+
<g id="Group-54">
|
23 |
+
<g id="Rectangle-2-Copy-10">
|
24 |
+
<use fill="url(#linearGradient-1)" xlink:href="#path-3"></use>
|
25 |
+
<use fill-opacity="0.38" fill="url(#linearGradient-2)" xlink:href="#path-3"></use>
|
26 |
+
</g>
|
27 |
+
<path d="M30.8108108,26.8842894 C35.9540866,23.7565856 62.4324324,19.8690059 62.4324324,46.8853104 C62.4324324,73.9016149 41.6688375,68.7385291 41.6688375,68.7385291 C46.6610337,67.5240845 52.3560786,63.6704278 52.3560786,44.4564212 C52.3560786,25.2424145 30.8108108,26.8842894 30.8108108,26.8842894 Z M49.5410129,59.3295229 C49.5410129,59.3295229 47.3670005,66.4616695 40.7830453,67.3629135 C34.19909,68.2641575 32.974488,64.899081 28.3994303,65.1324967 C28.2940069,64.2081185 28.5874731,63.282621 29.2137731,62.5643224 C29.8400732,61.8460238 30.7465789,61.395283 31.7292468,61.3135564 C35.4374515,60.8402412 42.3860354,61.7609365 47.0023719,59.0118182 C47.0023719,59.0118182 49.7542863,57.6631941 50.2702703,57.0083333 L49.5410129,59.3295229 Z M30.8108108,28.7195694 C36.9103582,28.6324233 42.8774014,30.5095617 47.8378378,34.0760057 C46.3437707,33.2836717 44.5844884,33.167949 43.0003143,33.7578015 C41.0157765,34.5345156 39.6231969,36.351976 39.3837209,38.4778296 C39.1593338,41.9979628 39.3837209,45.5976471 39.3837209,49.1244096 L39.3837209,59.7312142 C37.9582024,59.8637993 36.5458831,59.9168333 35.2259585,59.9168333 C33.9716975,59.9129699 32.7181439,59.9771461 31.4707731,60.1090816 C31.2485461,60.1411709 31.0282303,60.1854319 30.8108108,60.2416667 L30.8108108,37.755241 L30.8108108,28.7195694 Z" id="Combined-Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
|
28 |
+
</g>
|
29 |
+
</g>
|
30 |
+
</g>
|
31 |
+
</g>
|
32 |
+
</g>
|
33 |
+
</g>
|
34 |
+
</svg>
|
assets/images/dokan-notification-banner.svg
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<svg width="617px" height="103px" viewBox="0 0 617 103" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3 |
+
<!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->
|
4 |
+
<title>Dokan data update required (1)</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs>
|
7 |
+
<rect id="path-1" x="0" y="0" width="617" height="103"></rect>
|
8 |
+
<linearGradient x1="109.152945%" y1="48.1909776%" x2="-2.91361133%" y2="40.5199955%" id="linearGradient-3">
|
9 |
+
<stop stop-color="#FEFEFE" offset="0%"></stop>
|
10 |
+
<stop stop-color="#FCEFEF" offset="100%"></stop>
|
11 |
+
</linearGradient>
|
12 |
+
<linearGradient x1="50%" y1="114.949133%" x2="50%" y2="0%" id="linearGradient-4">
|
13 |
+
<stop stop-color="#F99C83" stop-opacity="0" offset="0%"></stop>
|
14 |
+
<stop stop-color="#F1634C" offset="100%"></stop>
|
15 |
+
</linearGradient>
|
16 |
+
</defs>
|
17 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
18 |
+
<g id="Dokan-data-update-required-(1)">
|
19 |
+
<g id="Group-4">
|
20 |
+
<g id="Mask" fill="#FFFFFF" fill-rule="nonzero">
|
21 |
+
<rect id="path-1" x="0" y="0" width="617" height="103"></rect>
|
22 |
+
</g>
|
23 |
+
<g id="Clipped">
|
24 |
+
<mask id="mask-2" fill="white">
|
25 |
+
<use xlink:href="#path-1"></use>
|
26 |
+
</mask>
|
27 |
+
<g id="path-1"></g>
|
28 |
+
<g id="Group" mask="url(#mask-2)">
|
29 |
+
<g transform="translate(47.000000, 6.000000)">
|
30 |
+
<g id="Group-3" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(302.500000, 125.500000) scale(-1, 1) translate(-302.500000, -125.500000) ">
|
31 |
+
<path d="M0.589139584,70.1449694 C0.589139584,70.1449694 114.694276,-44.2011554 252.50014,20.3530378 C390.306005,84.9072311 460.585436,29.8632283 532.281676,49.5562001 C592.451945,66.0829275 602.575815,96.1826129 604.275832,105.434272 C604.601527,107.206735 604.618032,250.306108 604.618032,250.306108 L0.589139584,250.306108 L0.589139584,70.1449694 Z" id="BG" fill="url(#linearGradient-3)" fill-rule="nonzero"></path>
|
32 |
+
</g>
|
33 |
+
<path d="M443.093476,33.511663 C459.854772,23.3107173 546.144408,10.6314507 546.144408,98.7446088 C546.144408,186.857767 478.478434,170.018462 478.478434,170.018462 C494.747381,166.057574 513.306824,153.488947 513.306824,90.8228331 C513.306824,28.1567197 443.093476,33.511663 443.093476,33.511663 Z M500.278109,140.024742 C500.278109,140.024742 493.517416,164.342492 473.042785,167.415371 C452.568154,170.48825 448.759915,159.014694 434.532507,159.810547 C434.204664,156.65879 435.117278,153.503216 437.064931,151.054106 C439.012585,148.604997 441.831615,147.068153 444.887493,146.789498 C456.419182,145.175683 478.027726,148.314884 492.383502,138.941497 C492.383502,138.941497 500.941342,134.343231 502.545937,132.11042 L500.278109,140.024742 Z M442.394035,37.8580944 C462.104662,37.566944 481.387103,43.8383657 497.416705,55.7536691 C492.588641,53.1065224 486.903538,52.7198992 481.784295,54.6905657 C475.371281,57.2855271 470.871173,63.3575675 470.097309,70.4599335 C469.372204,82.2205154 470.097309,94.2468732 470.097309,106.029603 L470.097309,141.466385 C465.49076,141.909344 460.926864,142.086528 456.661541,142.086528 C452.608409,142.073621 448.557563,142.28803 444.526697,142.72882 C443.808572,142.836029 443.096624,142.983902 442.394035,143.17178 L442.394035,68.0458028 L442.394035,37.8580944 Z" id="Combined-Shape" fill="url(#linearGradient-4)" fill-rule="nonzero" opacity="0.07"></path>
|
34 |
+
</g>
|
35 |
+
</g>
|
36 |
+
</g>
|
37 |
+
</g>
|
38 |
+
</g>
|
39 |
+
</g>
|
40 |
+
</svg>
|
assets/js/dokan-upgrade.js
ADDED
@@ -0,0 +1,492 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
dokanWebpack([3],{
|
2 |
+
|
3 |
+
/***/ 15:
|
4 |
+
/***/ (function(module, exports) {
|
5 |
+
|
6 |
+
module.exports = jQuery;
|
7 |
+
|
8 |
+
/***/ }),
|
9 |
+
|
10 |
+
/***/ 213:
|
11 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12 |
+
|
13 |
+
"use strict";
|
14 |
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
15 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__App_vue__ = __webpack_require__(214);
|
16 |
+
|
17 |
+
var Vue = dokan_get_lib('Vue');
|
18 |
+
new Vue({
|
19 |
+
el: '#dokan-upgrade-notice',
|
20 |
+
render: function render(h) {
|
21 |
+
return h(__WEBPACK_IMPORTED_MODULE_0__App_vue__["a" /* default */]);
|
22 |
+
},
|
23 |
+
created: function created() {
|
24 |
+
this.setLocaleData(dokan.i18n['dokan-lite']);
|
25 |
+
}
|
26 |
+
});
|
27 |
+
|
28 |
+
/***/ }),
|
29 |
+
|
30 |
+
/***/ 214:
|
31 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
32 |
+
|
33 |
+
"use strict";
|
34 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(82);
|
35 |
+
/* unused harmony namespace reexport */
|
36 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_46238d45_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(216);
|
37 |
+
var disposed = false
|
38 |
+
function injectStyle (ssrContext) {
|
39 |
+
if (disposed) return
|
40 |
+
__webpack_require__(215)
|
41 |
+
}
|
42 |
+
var normalizeComponent = __webpack_require__(0)
|
43 |
+
/* script */
|
44 |
+
|
45 |
+
|
46 |
+
/* template */
|
47 |
+
|
48 |
+
/* template functional */
|
49 |
+
var __vue_template_functional__ = false
|
50 |
+
/* styles */
|
51 |
+
var __vue_styles__ = injectStyle
|
52 |
+
/* scopeId */
|
53 |
+
var __vue_scopeId__ = null
|
54 |
+
/* moduleIdentifier (server only) */
|
55 |
+
var __vue_module_identifier__ = null
|
56 |
+
var Component = normalizeComponent(
|
57 |
+
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__["a" /* default */],
|
58 |
+
__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_46238d45_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__["a" /* default */],
|
59 |
+
__vue_template_functional__,
|
60 |
+
__vue_styles__,
|
61 |
+
__vue_scopeId__,
|
62 |
+
__vue_module_identifier__
|
63 |
+
)
|
64 |
+
Component.options.__file = "src/upgrade/App.vue"
|
65 |
+
|
66 |
+
/* hot reload */
|
67 |
+
if (false) {(function () {
|
68 |
+
var hotAPI = require("vue-hot-reload-api")
|
69 |
+
hotAPI.install(require("vue"), false)
|
70 |
+
if (!hotAPI.compatible) return
|
71 |
+
module.hot.accept()
|
72 |
+
if (!module.hot.data) {
|
73 |
+
hotAPI.createRecord("data-v-46238d45", Component.options)
|
74 |
+
} else {
|
75 |
+
hotAPI.reload("data-v-46238d45", Component.options)
|
76 |
+
}
|
77 |
+
module.hot.dispose(function (data) {
|
78 |
+
disposed = true
|
79 |
+
})
|
80 |
+
})()}
|
81 |
+
|
82 |
+
/* harmony default export */ __webpack_exports__["a"] = (Component.exports);
|
83 |
+
|
84 |
+
|
85 |
+
/***/ }),
|
86 |
+
|
87 |
+
/***/ 215:
|
88 |
+
/***/ (function(module, exports) {
|
89 |
+
|
90 |
+
// removed by extract-text-webpack-plugin
|
91 |
+
|
92 |
+
/***/ }),
|
93 |
+
|
94 |
+
/***/ 216:
|
95 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
96 |
+
|
97 |
+
"use strict";
|
98 |
+
var render = function() {
|
99 |
+
var _vm = this
|
100 |
+
var _h = _vm.$createElement
|
101 |
+
var _c = _vm._self._c || _h
|
102 |
+
return _c(
|
103 |
+
"div",
|
104 |
+
{
|
105 |
+
class: [
|
106 |
+
"wp-clearfix notice",
|
107 |
+
!_vm.updateCompleted ? "notice-info" : "updated"
|
108 |
+
],
|
109 |
+
style: _vm.containerStyle,
|
110 |
+
attrs: { id: "dokan-upgrade-notice" }
|
111 |
+
},
|
112 |
+
[
|
113 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-icon" } }, [
|
114 |
+
_c("img", {
|
115 |
+
attrs: { src: _vm.dokanLogo, alt: _vm.__("Dokan Logo", "dokan-lite") }
|
116 |
+
})
|
117 |
+
]),
|
118 |
+
_vm._v(" "),
|
119 |
+
_c(
|
120 |
+
"div",
|
121 |
+
{ attrs: { id: "dokan-upgrade-notice-message" } },
|
122 |
+
[
|
123 |
+
!_vm.updateCompleted
|
124 |
+
? [
|
125 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-title" } }, [
|
126 |
+
_vm._v(
|
127 |
+
"\n " +
|
128 |
+
_vm._s(
|
129 |
+
_vm.__("Dokan Data Update Required", "dokan-lite")
|
130 |
+
) +
|
131 |
+
"\n "
|
132 |
+
)
|
133 |
+
]),
|
134 |
+
_vm._v(" "),
|
135 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-content" } }, [
|
136 |
+
!_vm.showConfirmation
|
137 |
+
? _c("p", [
|
138 |
+
_vm._v(
|
139 |
+
_vm._s(
|
140 |
+
_vm.__(
|
141 |
+
"We need to update your install to the latest version",
|
142 |
+
"dokan-lite"
|
143 |
+
)
|
144 |
+
)
|
145 |
+
)
|
146 |
+
])
|
147 |
+
: _c("p", { staticClass: "text-danger" }, [
|
148 |
+
_vm._v(
|
149 |
+
_vm._s(
|
150 |
+
_vm.__(
|
151 |
+
"It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?",
|
152 |
+
"dokan-lite"
|
153 |
+
)
|
154 |
+
)
|
155 |
+
)
|
156 |
+
])
|
157 |
+
]),
|
158 |
+
_vm._v(" "),
|
159 |
+
_c(
|
160 |
+
"div",
|
161 |
+
{ attrs: { id: "dokan-upgrade-notice-buttons" } },
|
162 |
+
[
|
163 |
+
!_vm.isUpgrading && !_vm.showConfirmation
|
164 |
+
? _c("button", {
|
165 |
+
staticClass: "button button-primary",
|
166 |
+
domProps: {
|
167 |
+
textContent: _vm._s(_vm.__("Update", "dokan-lite"))
|
168 |
+
},
|
169 |
+
on: {
|
170 |
+
click: function($event) {
|
171 |
+
_vm.showConfirmation = true
|
172 |
+
}
|
173 |
+
}
|
174 |
+
})
|
175 |
+
: [
|
176 |
+
_c("button", {
|
177 |
+
staticClass: "button button-primary",
|
178 |
+
attrs: { disabled: _vm.isUpgrading },
|
179 |
+
domProps: {
|
180 |
+
textContent: _vm._s(
|
181 |
+
_vm.__("Yes, Update Now", "dokan-lite")
|
182 |
+
)
|
183 |
+
},
|
184 |
+
on: { click: _vm.doUpgrade }
|
185 |
+
}),
|
186 |
+
_vm._v(" "),
|
187 |
+
_c("button", {
|
188 |
+
staticClass: "button",
|
189 |
+
attrs: { disabled: _vm.isUpgrading },
|
190 |
+
domProps: {
|
191 |
+
textContent: _vm._s(
|
192 |
+
_vm.__("No, Cancel", "dokan-lite")
|
193 |
+
)
|
194 |
+
},
|
195 |
+
on: {
|
196 |
+
click: function($event) {
|
197 |
+
_vm.showConfirmation = false
|
198 |
+
}
|
199 |
+
}
|
200 |
+
})
|
201 |
+
]
|
202 |
+
],
|
203 |
+
2
|
204 |
+
)
|
205 |
+
]
|
206 |
+
: [
|
207 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-title" } }, [
|
208 |
+
_vm._v(
|
209 |
+
"\n " +
|
210 |
+
_vm._s(
|
211 |
+
_vm.__("Dokan Data Updated Successfully!", "dokan-lite")
|
212 |
+
) +
|
213 |
+
"\n "
|
214 |
+
)
|
215 |
+
]),
|
216 |
+
_vm._v(" "),
|
217 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-content" } }, [
|
218 |
+
_c("p", [
|
219 |
+
_vm._v(
|
220 |
+
_vm._s(
|
221 |
+
_vm.__(
|
222 |
+
"All data updated successfully. Thank you for using Dokan.",
|
223 |
+
"dokan-lite"
|
224 |
+
)
|
225 |
+
)
|
226 |
+
)
|
227 |
+
])
|
228 |
+
]),
|
229 |
+
_vm._v(" "),
|
230 |
+
_c("div", { attrs: { id: "dokan-upgrade-notice-buttons" } }, [
|
231 |
+
_c("button", {
|
232 |
+
staticClass: "button",
|
233 |
+
domProps: {
|
234 |
+
textContent: _vm._s(_vm.__("Close", "dokan-lite"))
|
235 |
+
},
|
236 |
+
on: { click: _vm.refreshPage }
|
237 |
+
})
|
238 |
+
])
|
239 |
+
]
|
240 |
+
],
|
241 |
+
2
|
242 |
+
)
|
243 |
+
]
|
244 |
+
)
|
245 |
+
}
|
246 |
+
var staticRenderFns = []
|
247 |
+
render._withStripped = true
|
248 |
+
var esExports = { render: render, staticRenderFns: staticRenderFns }
|
249 |
+
/* harmony default export */ __webpack_exports__["a"] = (esExports);
|
250 |
+
if (false) {
|
251 |
+
module.hot.accept()
|
252 |
+
if (module.hot.data) {
|
253 |
+
require("vue-hot-reload-api") .rerender("data-v-46238d45", esExports)
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
/***/ }),
|
258 |
+
|
259 |
+
/***/ 38:
|
260 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
261 |
+
|
262 |
+
"use strict";
|
263 |
+
/* harmony export (immutable) */ __webpack_exports__["c"] = setLocaleData;
|
264 |
+
/* unused harmony export getI18n */
|
265 |
+
/* harmony export (immutable) */ __webpack_exports__["a"] = __;
|
266 |
+
/* unused harmony export _x */
|
267 |
+
/* unused harmony export _n */
|
268 |
+
/* harmony export (immutable) */ __webpack_exports__["b"] = _nx;
|
269 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return sprintf; });
|
270 |
+
/**
|
271 |
+
* External dependencies
|
272 |
+
*/
|
273 |
+
var i18n = {};
|
274 |
+
/**
|
275 |
+
* Creates a new Jed instance with specified locale data configuration.
|
276 |
+
*
|
277 |
+
* @see http://messageformat.github.io/Jed/
|
278 |
+
*
|
279 |
+
* @param {Object} data Locale data configuration.
|
280 |
+
*/
|
281 |
+
|
282 |
+
function setLocaleData(data) {
|
283 |
+
var jed = new Jed(data);
|
284 |
+
i18n[jed._textdomain] = jed;
|
285 |
+
}
|
286 |
+
/**
|
287 |
+
* Returns the current Jed instance, initializing with a default configuration
|
288 |
+
* if not already assigned.
|
289 |
+
*
|
290 |
+
* @return {Jed} Jed instance.
|
291 |
+
*/
|
292 |
+
|
293 |
+
function getI18n() {
|
294 |
+
var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
295 |
+
|
296 |
+
if (!i18n[domain]) {
|
297 |
+
setLocaleData({
|
298 |
+
'': {}
|
299 |
+
});
|
300 |
+
}
|
301 |
+
|
302 |
+
return i18n[domain];
|
303 |
+
}
|
304 |
+
/**
|
305 |
+
* Retrieve the translation of text.
|
306 |
+
*
|
307 |
+
* @see https://developer.wordpress.org/reference/functions/__/
|
308 |
+
*
|
309 |
+
* @param {string} text Text to translate.
|
310 |
+
* @param {string} domain Domain to retrieve the translated text.
|
311 |
+
*
|
312 |
+
* @return {string} Translated text.
|
313 |
+
*/
|
314 |
+
|
315 |
+
function __(text, domain) {
|
316 |
+
return getI18n(domain) ? getI18n(domain).dgettext(domain, text) : text;
|
317 |
+
}
|
318 |
+
/**
|
319 |
+
* Retrieve translated string with gettext context.
|
320 |
+
*
|
321 |
+
* @see https://developer.wordpress.org/reference/functions/_x/
|
322 |
+
*
|
323 |
+
* @param {string} text Text to translate.
|
324 |
+
* @param {string} context Context information for the translators.
|
325 |
+
* @param {string} domain Domain to retrieve the translated text.
|
326 |
+
*
|
327 |
+
* @return {string} Translated context string without pipe.
|
328 |
+
*/
|
329 |
+
|
330 |
+
function _x(text, context, domain) {
|
331 |
+
return getI18n(domain).dpgettext(domain, context, text);
|
332 |
+
}
|
333 |
+
/**
|
334 |
+
* Translates and retrieves the singular or plural form based on the supplied
|
335 |
+
* number.
|
336 |
+
*
|
337 |
+
* @see https://developer.wordpress.org/reference/functions/_n/
|
338 |
+
*
|
339 |
+
* @param {string} single The text to be used if the number is singular.
|
340 |
+
* @param {string} plural The text to be used if the number is plural.
|
341 |
+
* @param {number} number The number to compare against to use either the
|
342 |
+
* singular or plural form.
|
343 |
+
* @param {string} domain Domain to retrieve the translated text.
|
344 |
+
*
|
345 |
+
* @return {string} The translated singular or plural form.
|
346 |
+
*/
|
347 |
+
|
348 |
+
function _n(single, plural, number, domain) {
|
349 |
+
return getI18n(domain).dngettext(domain, single, plural, number);
|
350 |
+
}
|
351 |
+
/**
|
352 |
+
* Translates and retrieves the singular or plural form based on the supplied
|
353 |
+
* number, with gettext context.
|
354 |
+
*
|
355 |
+
* @see https://developer.wordpress.org/reference/functions/_nx/
|
356 |
+
*
|
357 |
+
* @param {string} single The text to be used if the number is singular.
|
358 |
+
* @param {string} plural The text to be used if the number is plural.
|
359 |
+
* @param {number} number The number to compare against to use either the
|
360 |
+
* singular or plural form.
|
361 |
+
* @param {string} context Context information for the translators.
|
362 |
+
* @param {string} domain Domain to retrieve the translated text.
|
363 |
+
*
|
364 |
+
* @return {string} The translated singular or plural form.
|
365 |
+
*/
|
366 |
+
|
367 |
+
function _nx(single, plural, number, context, domain) {
|
368 |
+
return getI18n(domain).dnpgettext(domain, context, single, plural, number);
|
369 |
+
}
|
370 |
+
/**
|
371 |
+
* Returns a formatted string.
|
372 |
+
*
|
373 |
+
* @see http://www.diveintojavascript.com/projects/javascript-sprintf
|
374 |
+
*
|
375 |
+
* @type {string}
|
376 |
+
*/
|
377 |
+
|
378 |
+
var sprintf = Jed.sprintf;
|
379 |
+
|
380 |
+
/***/ }),
|
381 |
+
|
382 |
+
/***/ 82:
|
383 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
384 |
+
|
385 |
+
"use strict";
|
386 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(15);
|
387 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
388 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_i18n__ = __webpack_require__(38);
|
389 |
+
//
|
390 |
+
//
|
391 |
+
//
|
392 |
+
//
|
393 |
+
//
|
394 |
+
//
|
395 |
+
//
|
396 |
+
//
|
397 |
+
//
|
398 |
+
//
|
399 |
+
//
|
400 |
+
//
|
401 |
+
//
|
402 |
+
//
|
403 |
+
//
|
404 |
+
//
|
405 |
+
//
|
406 |
+
//
|
407 |
+
//
|
408 |
+
//
|
409 |
+
//
|
410 |
+
//
|
411 |
+
//
|
412 |
+
//
|
413 |
+
//
|
414 |
+
//
|
415 |
+
//
|
416 |
+
//
|
417 |
+
//
|
418 |
+
//
|
419 |
+
//
|
420 |
+
//
|
421 |
+
//
|
422 |
+
//
|
423 |
+
//
|
424 |
+
//
|
425 |
+
//
|
426 |
+
//
|
427 |
+
//
|
428 |
+
//
|
429 |
+
//
|
430 |
+
//
|
431 |
+
//
|
432 |
+
//
|
433 |
+
//
|
434 |
+
//
|
435 |
+
//
|
436 |
+
//
|
437 |
+
//
|
438 |
+
//
|
439 |
+
//
|
440 |
+
//
|
441 |
+
//
|
442 |
+
//
|
443 |
+
//
|
444 |
+
//
|
445 |
+
|
446 |
+
|
447 |
+
/* harmony default export */ __webpack_exports__["a"] = ({
|
448 |
+
data: function data() {
|
449 |
+
return {
|
450 |
+
isUpgrading: false,
|
451 |
+
showConfirmation: false,
|
452 |
+
updateCompleted: false
|
453 |
+
};
|
454 |
+
},
|
455 |
+
computed: {
|
456 |
+
dokanLogo: function dokanLogo() {
|
457 |
+
return "".concat(dokan.urls.assetsUrl, "/images/dokan-logo-small.svg");
|
458 |
+
},
|
459 |
+
containerStyle: function containerStyle() {
|
460 |
+
return {
|
461 |
+
backgroundImage: "url(".concat(dokan.urls.assetsUrl, "/images/dokan-notification-banner.svg)")
|
462 |
+
};
|
463 |
+
}
|
464 |
+
},
|
465 |
+
methods: {
|
466 |
+
doUpgrade: function doUpgrade() {
|
467 |
+
var _this = this;
|
468 |
+
|
469 |
+
this.isUpgrading = true;
|
470 |
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.ajax({
|
471 |
+
url: dokan.ajaxurl,
|
472 |
+
method: 'post',
|
473 |
+
dataType: 'json',
|
474 |
+
data: {
|
475 |
+
action: 'dokan_do_upgrade',
|
476 |
+
_wpnonce: dokan.nonce
|
477 |
+
}
|
478 |
+
}).always(function () {
|
479 |
+
_this.isUpgrading = false;
|
480 |
+
}).done(function () {
|
481 |
+
_this.updateCompleted = true;
|
482 |
+
});
|
483 |
+
},
|
484 |
+
refreshPage: function refreshPage() {
|
485 |
+
window.location.reload();
|
486 |
+
}
|
487 |
+
}
|
488 |
+
});
|
489 |
+
|
490 |
+
/***/ })
|
491 |
+
|
492 |
+
},[213]);
|
assets/js/dokan-wp.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
dokanWebpack([
|
2 |
|
3 |
-
/***/
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
8 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_hooks__ = __webpack_require__(
|
9 |
|
10 |
dokan.wpPackages = {
|
11 |
hooks: Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_hooks__["a" /* createHooks */])()
|
@@ -13,4 +13,4 @@ dokan.wpPackages = {
|
|
13 |
|
14 |
/***/ })
|
15 |
|
16 |
-
},[
|
1 |
+
dokanWebpack([4],{
|
2 |
|
3 |
+
/***/ 204:
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
8 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_hooks__ = __webpack_require__(39);
|
9 |
|
10 |
dokan.wpPackages = {
|
11 |
hooks: Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_hooks__["a" /* createHooks */])()
|
13 |
|
14 |
/***/ })
|
15 |
|
16 |
+
},[204]);
|
assets/js/dokan.js
CHANGED
@@ -384,14 +384,26 @@ jQuery(function($) {
|
|
384 |
};
|
385 |
|
386 |
$.post( dokan_refund.ajax_url, data, function( response ) {
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
-
|
|
|
|
|
|
|
395 |
} else {
|
396 |
dokan_seller_meta_boxes_order_items.unblock();
|
397 |
}
|
@@ -2427,4 +2439,4 @@ jQuery(function($) {
|
|
2427 |
window.dokan.storeLists.init();
|
2428 |
}
|
2429 |
|
2430 |
-
})(jQuery);
|
384 |
};
|
385 |
|
386 |
$.post( dokan_refund.ajax_url, data, function( response ) {
|
387 |
+
response.data.message ? window.alert( response.data.message ) : null;
|
388 |
+
dokan_seller_meta_boxes_order_items.reload_items();
|
389 |
+
}).fail( function ( jqXHR ) {
|
390 |
+
var message = [];
|
391 |
+
|
392 |
+
if ( jqXHR.responseJSON.data ) {
|
393 |
+
var data = jqXHR.responseJSON.data;
|
394 |
+
|
395 |
+
if ( $.isArray( data ) ) {
|
396 |
+
message = jqXHR.responseJSON.data.map( function ( item ) {
|
397 |
+
return item.message;
|
398 |
+
} );
|
399 |
+
} else {
|
400 |
+
message.push( data );
|
401 |
+
}
|
402 |
}
|
403 |
+
|
404 |
+
window.alert( message.join( ' ' ) );
|
405 |
+
dokan_seller_meta_boxes_order_items.unblock();
|
406 |
+
} );
|
407 |
} else {
|
408 |
dokan_seller_meta_boxes_order_items.unblock();
|
409 |
}
|
2439 |
window.dokan.storeLists.init();
|
2440 |
}
|
2441 |
|
2442 |
+
})(jQuery);
|
assets/js/vue-admin.js
CHANGED
@@ -8,11 +8,11 @@ dokanWebpack([1],[
|
|
8 |
"use strict";
|
9 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Switches_vue__ = __webpack_require__(9);
|
10 |
/* unused harmony namespace reexport */
|
11 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_aa8ad7dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Switches_vue__ = __webpack_require__(
|
12 |
var disposed = false
|
13 |
function injectStyle (ssrContext) {
|
14 |
if (disposed) return
|
15 |
-
__webpack_require__(
|
16 |
}
|
17 |
var normalizeComponent = __webpack_require__(0)
|
18 |
/* script */
|
@@ -139,7 +139,7 @@ if (false) {(function () {
|
|
139 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
140 |
|
141 |
"use strict";
|
142 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_color_src_components_Sketch_vue__ = __webpack_require__(
|
143 |
//
|
144 |
//
|
145 |
//
|
@@ -255,8 +255,8 @@ if (false) {(function () {
|
|
255 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce__ = __webpack_require__(2);
|
256 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_debounce__);
|
257 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_components_Switches_vue__ = __webpack_require__(3);
|
258 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_UploadImage_vue__ = __webpack_require__(
|
259 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_components_PasswordGenerator_vue__ = __webpack_require__(
|
260 |
//
|
261 |
//
|
262 |
//
|
@@ -1362,16 +1362,22 @@ if (false) {(function () {
|
|
1362 |
/***/ }),
|
1363 |
/* 14 */,
|
1364 |
/* 15 */
|
|
|
|
|
|
|
|
|
|
|
|
|
1365 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1366 |
|
1367 |
"use strict";
|
1368 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_UploadImage_vue__ = __webpack_require__(10);
|
1369 |
/* unused harmony namespace reexport */
|
1370 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40b3524c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_UploadImage_vue__ = __webpack_require__(
|
1371 |
var disposed = false
|
1372 |
function injectStyle (ssrContext) {
|
1373 |
if (disposed) return
|
1374 |
-
__webpack_require__(
|
1375 |
}
|
1376 |
var normalizeComponent = __webpack_require__(0)
|
1377 |
/* script */
|
@@ -1417,13 +1423,13 @@ if (false) {(function () {
|
|
1417 |
|
1418 |
|
1419 |
/***/ }),
|
1420 |
-
/*
|
1421 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1422 |
|
1423 |
"use strict";
|
1424 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PasswordGenerator_vue__ = __webpack_require__(11);
|
1425 |
/* unused harmony namespace reexport */
|
1426 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4084a478_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PasswordGenerator_vue__ = __webpack_require__(
|
1427 |
var disposed = false
|
1428 |
var normalizeComponent = __webpack_require__(0)
|
1429 |
/* script */
|
@@ -1469,10 +1475,10 @@ if (false) {(function () {
|
|
1469 |
|
1470 |
|
1471 |
/***/ }),
|
1472 |
-
/* 17 */,
|
1473 |
/* 18 */,
|
1474 |
/* 19 */,
|
1475 |
-
/* 20
|
|
|
1476 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1477 |
|
1478 |
"use strict";
|
@@ -1523,18 +1529,18 @@ if (false) {(function () {
|
|
1523 |
|
1524 |
|
1525 |
/***/ }),
|
1526 |
-
/*
|
1527 |
-
/*
|
1528 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1529 |
|
1530 |
"use strict";
|
1531 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ColorPicker_vue__ = __webpack_require__(7);
|
1532 |
/* unused harmony namespace reexport */
|
1533 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01dc0d51_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ColorPicker_vue__ = __webpack_require__(
|
1534 |
var disposed = false
|
1535 |
function injectStyle (ssrContext) {
|
1536 |
if (disposed) return
|
1537 |
-
__webpack_require__(
|
1538 |
}
|
1539 |
var normalizeComponent = __webpack_require__(0)
|
1540 |
/* script */
|
@@ -1580,13 +1586,13 @@ if (false) {(function () {
|
|
1580 |
|
1581 |
|
1582 |
/***/ }),
|
1583 |
-
/*
|
1584 |
/***/ (function(module, exports) {
|
1585 |
|
1586 |
// removed by extract-text-webpack-plugin
|
1587 |
|
1588 |
/***/ }),
|
1589 |
-
/*
|
1590 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1591 |
|
1592 |
"use strict";
|
@@ -1677,13 +1683,13 @@ if (false) {
|
|
1677 |
}
|
1678 |
|
1679 |
/***/ }),
|
1680 |
-
/*
|
1681 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1682 |
|
1683 |
"use strict";
|
1684 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAccountFields_vue__ = __webpack_require__(8);
|
1685 |
/* unused harmony namespace reexport */
|
1686 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2b13daea_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAccountFields_vue__ = __webpack_require__(
|
1687 |
var disposed = false
|
1688 |
var normalizeComponent = __webpack_require__(0)
|
1689 |
/* script */
|
@@ -1729,13 +1735,13 @@ if (false) {(function () {
|
|
1729 |
|
1730 |
|
1731 |
/***/ }),
|
1732 |
-
/*
|
1733 |
/***/ (function(module, exports) {
|
1734 |
|
1735 |
// removed by extract-text-webpack-plugin
|
1736 |
|
1737 |
/***/ }),
|
1738 |
-
/*
|
1739 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1740 |
|
1741 |
"use strict";
|
@@ -1766,13 +1772,13 @@ if (false) {
|
|
1766 |
}
|
1767 |
|
1768 |
/***/ }),
|
1769 |
-
/*
|
1770 |
/***/ (function(module, exports) {
|
1771 |
|
1772 |
// removed by extract-text-webpack-plugin
|
1773 |
|
1774 |
/***/ }),
|
1775 |
-
/*
|
1776 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1777 |
|
1778 |
"use strict";
|
@@ -1817,7 +1823,7 @@ if (false) {
|
|
1817 |
}
|
1818 |
|
1819 |
/***/ }),
|
1820 |
-
/*
|
1821 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1822 |
|
1823 |
"use strict";
|
@@ -1890,7 +1896,7 @@ if (false) {
|
|
1890 |
}
|
1891 |
|
1892 |
/***/ }),
|
1893 |
-
/*
|
1894 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1895 |
|
1896 |
"use strict";
|
@@ -2376,13 +2382,13 @@ if (false) {
|
|
2376 |
}
|
2377 |
|
2378 |
/***/ }),
|
2379 |
-
/*
|
2380 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2381 |
|
2382 |
"use strict";
|
2383 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAddressFields_vue__ = __webpack_require__(12);
|
2384 |
/* unused harmony namespace reexport */
|
2385 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9504c01e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAddressFields_vue__ = __webpack_require__(
|
2386 |
var disposed = false
|
2387 |
var normalizeComponent = __webpack_require__(0)
|
2388 |
/* script */
|
@@ -2428,7 +2434,7 @@ if (false) {(function () {
|
|
2428 |
|
2429 |
|
2430 |
/***/ }),
|
2431 |
-
/*
|
2432 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2433 |
|
2434 |
"use strict";
|
@@ -2693,17 +2699,17 @@ if (false) {
|
|
2693 |
}
|
2694 |
|
2695 |
/***/ }),
|
2696 |
-
/*
|
2697 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2698 |
|
2699 |
"use strict";
|
2700 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorPaymentFields_vue__ = __webpack_require__(13);
|
2701 |
/* unused harmony namespace reexport */
|
2702 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ed34783_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorPaymentFields_vue__ = __webpack_require__(
|
2703 |
var disposed = false
|
2704 |
function injectStyle (ssrContext) {
|
2705 |
if (disposed) return
|
2706 |
-
__webpack_require__(
|
2707 |
}
|
2708 |
var normalizeComponent = __webpack_require__(0)
|
2709 |
/* script */
|
@@ -2749,13 +2755,13 @@ if (false) {(function () {
|
|
2749 |
|
2750 |
|
2751 |
/***/ }),
|
2752 |
-
/*
|
2753 |
/***/ (function(module, exports) {
|
2754 |
|
2755 |
// removed by extract-text-webpack-plugin
|
2756 |
|
2757 |
/***/ }),
|
2758 |
-
/*
|
2759 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2760 |
|
2761 |
"use strict";
|
@@ -3326,12 +3332,13 @@ if (false) {
|
|
3326 |
}
|
3327 |
|
3328 |
/***/ }),
|
3329 |
-
/* 37 */,
|
3330 |
/* 38 */,
|
3331 |
/* 39 */,
|
3332 |
/* 40 */,
|
3333 |
/* 41 */,
|
3334 |
-
/* 42
|
|
|
|
|
3335 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3336 |
|
3337 |
"use strict";
|
@@ -3347,11 +3354,11 @@ if (false) {
|
|
3347 |
});
|
3348 |
|
3349 |
/***/ }),
|
3350 |
-
/*
|
3351 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3352 |
|
3353 |
"use strict";
|
3354 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_admin_components_Chart_vue__ = __webpack_require__(
|
3355 |
//
|
3356 |
//
|
3357 |
//
|
@@ -3551,7 +3558,7 @@ var Currency = dokan_get_lib('Currency');
|
|
3551 |
});
|
3552 |
|
3553 |
/***/ }),
|
3554 |
-
/*
|
3555 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3556 |
|
3557 |
"use strict";
|
@@ -3985,7 +3992,7 @@ var Currency = dokan_get_lib('Currency');
|
|
3985 |
|
3986 |
this.showModal = false;
|
3987 |
this.loading = true;
|
3988 |
-
dokan.api.put('/withdraw/' + this.editing.id
|
3989 |
note: this.editing.note
|
3990 |
}).done(function (response) {
|
3991 |
_this5.loading = false;
|
@@ -4002,13 +4009,13 @@ var Currency = dokan_get_lib('Currency');
|
|
4002 |
});
|
4003 |
|
4004 |
/***/ }),
|
4005 |
-
/*
|
4006 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4007 |
|
4008 |
"use strict";
|
4009 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css__ = __webpack_require__(
|
4010 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css__);
|
4011 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_slick__ = __webpack_require__(
|
4012 |
//
|
4013 |
//
|
4014 |
//
|
@@ -4880,14 +4887,8 @@ var Currency = dokan_get_lib('Currency');
|
|
4880 |
});
|
4881 |
|
4882 |
/***/ }),
|
4883 |
-
/*
|
4884 |
-
/*
|
4885 |
-
/***/ (function(module, exports) {
|
4886 |
-
|
4887 |
-
module.exports = jQuery;
|
4888 |
-
|
4889 |
-
/***/ }),
|
4890 |
-
/* 48 */
|
4891 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4892 |
|
4893 |
"use strict";
|
@@ -4939,11 +4940,11 @@ var Loading = dokan_get_lib('Loading');
|
|
4939 |
});
|
4940 |
|
4941 |
/***/ }),
|
4942 |
-
/*
|
4943 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4944 |
|
4945 |
"use strict";
|
4946 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_admin_components_Fields_vue__ = __webpack_require__(
|
4947 |
//
|
4948 |
//
|
4949 |
//
|
@@ -5233,15 +5234,15 @@ var Loading = dokan_get_lib('Loading');
|
|
5233 |
});
|
5234 |
|
5235 |
/***/ }),
|
5236 |
-
/*
|
5237 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5238 |
|
5239 |
"use strict";
|
5240 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty__ = __webpack_require__(
|
5241 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty__);
|
5242 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray__ = __webpack_require__(
|
5243 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray__);
|
5244 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_ColorPicker_vue__ = __webpack_require__(
|
5245 |
|
5246 |
|
5247 |
|
@@ -5722,7 +5723,6 @@ var Mapbox = dokan_get_lib('Mapbox');
|
|
5722 |
});
|
5723 |
|
5724 |
/***/ }),
|
5725 |
-
/* 51 */,
|
5726 |
/* 52 */,
|
5727 |
/* 53 */,
|
5728 |
/* 54 */,
|
@@ -5730,11 +5730,12 @@ var Mapbox = dokan_get_lib('Mapbox');
|
|
5730 |
/* 56 */,
|
5731 |
/* 57 */,
|
5732 |
/* 58 */,
|
5733 |
-
/* 59
|
|
|
5734 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5735 |
|
5736 |
"use strict";
|
5737 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AddVendor_vue__ = __webpack_require__(
|
5738 |
//
|
5739 |
//
|
5740 |
//
|
@@ -6075,13 +6076,13 @@ var Search = dokan_get_lib('Search');
|
|
6075 |
});
|
6076 |
|
6077 |
/***/ }),
|
6078 |
-
/*
|
6079 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6080 |
|
6081 |
"use strict";
|
6082 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__VendorAccountFields_vue__ = __webpack_require__(
|
6083 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__VendorAddressFields_vue__ = __webpack_require__(
|
6084 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__VendorPaymentFields_vue__ = __webpack_require__(
|
6085 |
//
|
6086 |
//
|
6087 |
//
|
@@ -6307,7 +6308,6 @@ var Loading = dokan_get_lib('Loading');
|
|
6307 |
});
|
6308 |
|
6309 |
/***/ }),
|
6310 |
-
/* 61 */,
|
6311 |
/* 62 */,
|
6312 |
/* 63 */,
|
6313 |
/* 64 */,
|
@@ -6340,14 +6340,16 @@ var Loading = dokan_get_lib('Loading');
|
|
6340 |
/* 91 */,
|
6341 |
/* 92 */,
|
6342 |
/* 93 */,
|
6343 |
-
/* 94
|
|
|
|
|
6344 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6345 |
|
6346 |
"use strict";
|
6347 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
6348 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__App_vue__ = __webpack_require__(
|
6349 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__router__ = __webpack_require__(
|
6350 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_admin_menu_fix__ = __webpack_require__(
|
6351 |
|
6352 |
|
6353 |
|
@@ -6368,17 +6370,17 @@ new Vue({
|
|
6368 |
Object(__WEBPACK_IMPORTED_MODULE_2__utils_admin_menu_fix__["a" /* default */])('dokan');
|
6369 |
|
6370 |
/***/ }),
|
6371 |
-
/*
|
6372 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6373 |
|
6374 |
"use strict";
|
6375 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(
|
6376 |
/* unused harmony namespace reexport */
|
6377 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a030f38_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(
|
6378 |
var disposed = false
|
6379 |
function injectStyle (ssrContext) {
|
6380 |
if (disposed) return
|
6381 |
-
__webpack_require__(
|
6382 |
}
|
6383 |
var normalizeComponent = __webpack_require__(0)
|
6384 |
/* script */
|
@@ -6424,13 +6426,13 @@ if (false) {(function () {
|
|
6424 |
|
6425 |
|
6426 |
/***/ }),
|
6427 |
-
/*
|
6428 |
/***/ (function(module, exports) {
|
6429 |
|
6430 |
// removed by extract-text-webpack-plugin
|
6431 |
|
6432 |
/***/ }),
|
6433 |
-
/*
|
6434 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6435 |
|
6436 |
"use strict";
|
@@ -6461,18 +6463,18 @@ if (false) {
|
|
6461 |
}
|
6462 |
|
6463 |
/***/ }),
|
6464 |
-
/*
|
6465 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6466 |
|
6467 |
"use strict";
|
6468 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__ = __webpack_require__(
|
6469 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__);
|
6470 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_pages_Dashboard_vue__ = __webpack_require__(
|
6471 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_pages_Withdraw_vue__ = __webpack_require__(
|
6472 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_pages_Premium_vue__ = __webpack_require__(
|
6473 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_admin_pages_Help_vue__ = __webpack_require__(
|
6474 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_admin_pages_Settings_vue__ = __webpack_require__(
|
6475 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_admin_pages_vendors_vue__ = __webpack_require__(
|
6476 |
|
6477 |
|
6478 |
|
@@ -6526,18 +6528,18 @@ parseRouteComponent(dokan.routes);
|
|
6526 |
}));
|
6527 |
|
6528 |
/***/ }),
|
6529 |
-
/*
|
6530 |
-
/*
|
6531 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6532 |
|
6533 |
"use strict";
|
6534 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Dashboard_vue__ = __webpack_require__(
|
6535 |
/* unused harmony namespace reexport */
|
6536 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_219ffca0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Dashboard_vue__ = __webpack_require__(
|
6537 |
var disposed = false
|
6538 |
function injectStyle (ssrContext) {
|
6539 |
if (disposed) return
|
6540 |
-
__webpack_require__(
|
6541 |
}
|
6542 |
var normalizeComponent = __webpack_require__(0)
|
6543 |
/* script */
|
@@ -6583,16 +6585,16 @@ if (false) {(function () {
|
|
6583 |
|
6584 |
|
6585 |
/***/ }),
|
6586 |
-
/*
|
6587 |
/***/ (function(module, exports) {
|
6588 |
|
6589 |
// removed by extract-text-webpack-plugin
|
6590 |
|
6591 |
/***/ }),
|
6592 |
-
/* 102 */,
|
6593 |
-
/* 103 */,
|
6594 |
/* 104 */,
|
6595 |
-
/* 105
|
|
|
|
|
6596 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6597 |
|
6598 |
"use strict";
|
@@ -7067,17 +7069,17 @@ if (false) {
|
|
7067 |
}
|
7068 |
|
7069 |
/***/ }),
|
7070 |
-
/*
|
7071 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7072 |
|
7073 |
"use strict";
|
7074 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Withdraw_vue__ = __webpack_require__(
|
7075 |
/* unused harmony namespace reexport */
|
7076 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_62373ea4_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Withdraw_vue__ = __webpack_require__(
|
7077 |
var disposed = false
|
7078 |
function injectStyle (ssrContext) {
|
7079 |
if (disposed) return
|
7080 |
-
__webpack_require__(
|
7081 |
}
|
7082 |
var normalizeComponent = __webpack_require__(0)
|
7083 |
/* script */
|
@@ -7123,13 +7125,13 @@ if (false) {(function () {
|
|
7123 |
|
7124 |
|
7125 |
/***/ }),
|
7126 |
-
/*
|
7127 |
/***/ (function(module, exports) {
|
7128 |
|
7129 |
// removed by extract-text-webpack-plugin
|
7130 |
|
7131 |
/***/ }),
|
7132 |
-
/*
|
7133 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7134 |
|
7135 |
"use strict";
|
@@ -7511,17 +7513,17 @@ if (false) {
|
|
7511 |
}
|
7512 |
|
7513 |
/***/ }),
|
7514 |
-
/*
|
7515 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7516 |
|
7517 |
"use strict";
|
7518 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Premium_vue__ = __webpack_require__(
|
7519 |
/* unused harmony namespace reexport */
|
7520 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_b38fd83a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Premium_vue__ = __webpack_require__(
|
7521 |
var disposed = false
|
7522 |
function injectStyle (ssrContext) {
|
7523 |
if (disposed) return
|
7524 |
-
__webpack_require__(
|
7525 |
}
|
7526 |
var normalizeComponent = __webpack_require__(0)
|
7527 |
/* script */
|
@@ -7567,19 +7569,19 @@ if (false) {(function () {
|
|
7567 |
|
7568 |
|
7569 |
/***/ }),
|
7570 |
-
/*
|
7571 |
/***/ (function(module, exports) {
|
7572 |
|
7573 |
// removed by extract-text-webpack-plugin
|
7574 |
|
7575 |
/***/ }),
|
7576 |
-
/* 111 */,
|
7577 |
-
/* 112 */,
|
7578 |
/* 113 */,
|
7579 |
/* 114 */,
|
7580 |
/* 115 */,
|
7581 |
/* 116 */,
|
7582 |
-
/* 117
|
|
|
|
|
7583 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7584 |
|
7585 |
"use strict";
|
@@ -8156,17 +8158,17 @@ if (false) {
|
|
8156 |
}
|
8157 |
|
8158 |
/***/ }),
|
8159 |
-
/*
|
8160 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8161 |
|
8162 |
"use strict";
|
8163 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Help_vue__ = __webpack_require__(
|
8164 |
/* unused harmony namespace reexport */
|
8165 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_c289d136_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Help_vue__ = __webpack_require__(
|
8166 |
var disposed = false
|
8167 |
function injectStyle (ssrContext) {
|
8168 |
if (disposed) return
|
8169 |
-
__webpack_require__(
|
8170 |
}
|
8171 |
var normalizeComponent = __webpack_require__(0)
|
8172 |
/* script */
|
@@ -8212,13 +8214,13 @@ if (false) {(function () {
|
|
8212 |
|
8213 |
|
8214 |
/***/ }),
|
8215 |
-
/*
|
8216 |
/***/ (function(module, exports) {
|
8217 |
|
8218 |
// removed by extract-text-webpack-plugin
|
8219 |
|
8220 |
/***/ }),
|
8221 |
-
/*
|
8222 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8223 |
|
8224 |
"use strict";
|
@@ -8280,17 +8282,17 @@ if (false) {
|
|
8280 |
}
|
8281 |
|
8282 |
/***/ }),
|
8283 |
-
/*
|
8284 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8285 |
|
8286 |
"use strict";
|
8287 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Settings_vue__ = __webpack_require__(
|
8288 |
/* unused harmony namespace reexport */
|
8289 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_e4dc4572_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Settings_vue__ = __webpack_require__(
|
8290 |
var disposed = false
|
8291 |
function injectStyle (ssrContext) {
|
8292 |
if (disposed) return
|
8293 |
-
__webpack_require__(
|
8294 |
}
|
8295 |
var normalizeComponent = __webpack_require__(0)
|
8296 |
/* script */
|
@@ -8336,23 +8338,23 @@ if (false) {(function () {
|
|
8336 |
|
8337 |
|
8338 |
/***/ }),
|
8339 |
-
/*
|
8340 |
/***/ (function(module, exports) {
|
8341 |
|
8342 |
// removed by extract-text-webpack-plugin
|
8343 |
|
8344 |
/***/ }),
|
8345 |
-
/*
|
8346 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8347 |
|
8348 |
"use strict";
|
8349 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Fields_vue__ = __webpack_require__(
|
8350 |
/* unused harmony namespace reexport */
|
8351 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_a96ce32e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Fields_vue__ = __webpack_require__(
|
8352 |
var disposed = false
|
8353 |
function injectStyle (ssrContext) {
|
8354 |
if (disposed) return
|
8355 |
-
__webpack_require__(
|
8356 |
}
|
8357 |
var normalizeComponent = __webpack_require__(0)
|
8358 |
/* script */
|
@@ -8398,14 +8400,12 @@ if (false) {(function () {
|
|
8398 |
|
8399 |
|
8400 |
/***/ }),
|
8401 |
-
/*
|
8402 |
/***/ (function(module, exports) {
|
8403 |
|
8404 |
// removed by extract-text-webpack-plugin
|
8405 |
|
8406 |
/***/ }),
|
8407 |
-
/* 125 */,
|
8408 |
-
/* 126 */,
|
8409 |
/* 127 */,
|
8410 |
/* 128 */,
|
8411 |
/* 129 */,
|
@@ -8428,7 +8428,9 @@ if (false) {(function () {
|
|
8428 |
/* 146 */,
|
8429 |
/* 147 */,
|
8430 |
/* 148 */,
|
8431 |
-
/* 149
|
|
|
|
|
8432 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8433 |
|
8434 |
"use strict";
|
@@ -9872,7 +9874,7 @@ if (false) {
|
|
9872 |
}
|
9873 |
|
9874 |
/***/ }),
|
9875 |
-
/*
|
9876 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9877 |
|
9878 |
"use strict";
|
@@ -10086,17 +10088,17 @@ if (false) {
|
|
10086 |
}
|
10087 |
|
10088 |
/***/ }),
|
10089 |
-
/*
|
10090 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10091 |
|
10092 |
"use strict";
|
10093 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_vendors_vue__ = __webpack_require__(
|
10094 |
/* unused harmony namespace reexport */
|
10095 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_208897d7_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_vendors_vue__ = __webpack_require__(
|
10096 |
var disposed = false
|
10097 |
function injectStyle (ssrContext) {
|
10098 |
if (disposed) return
|
10099 |
-
__webpack_require__(
|
10100 |
}
|
10101 |
var normalizeComponent = __webpack_require__(0)
|
10102 |
/* script */
|
@@ -10142,23 +10144,23 @@ if (false) {(function () {
|
|
10142 |
|
10143 |
|
10144 |
/***/ }),
|
10145 |
-
/*
|
10146 |
/***/ (function(module, exports) {
|
10147 |
|
10148 |
// removed by extract-text-webpack-plugin
|
10149 |
|
10150 |
/***/ }),
|
10151 |
-
/*
|
10152 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10153 |
|
10154 |
"use strict";
|
10155 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_AddVendor_vue__ = __webpack_require__(
|
10156 |
/* unused harmony namespace reexport */
|
10157 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_75e0fcd5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_AddVendor_vue__ = __webpack_require__(
|
10158 |
var disposed = false
|
10159 |
function injectStyle (ssrContext) {
|
10160 |
if (disposed) return
|
10161 |
-
__webpack_require__(
|
10162 |
}
|
10163 |
var normalizeComponent = __webpack_require__(0)
|
10164 |
/* script */
|
@@ -10204,13 +10206,13 @@ if (false) {(function () {
|
|
10204 |
|
10205 |
|
10206 |
/***/ }),
|
10207 |
-
/*
|
10208 |
/***/ (function(module, exports) {
|
10209 |
|
10210 |
// removed by extract-text-webpack-plugin
|
10211 |
|
10212 |
/***/ }),
|
10213 |
-
/*
|
10214 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10215 |
|
10216 |
"use strict";
|
@@ -10349,7 +10351,7 @@ if (false) {
|
|
10349 |
}
|
10350 |
|
10351 |
/***/ }),
|
10352 |
-
/*
|
10353 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10354 |
|
10355 |
"use strict";
|
@@ -10663,7 +10665,7 @@ if (false) {
|
|
10663 |
}
|
10664 |
|
10665 |
/***/ }),
|
10666 |
-
/*
|
10667 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10668 |
|
10669 |
"use strict";
|
@@ -10699,4 +10701,4 @@ function menuFix(slug) {
|
|
10699 |
/* harmony default export */ __webpack_exports__["a"] = (menuFix);
|
10700 |
|
10701 |
/***/ })
|
10702 |
-
],[
|
8 |
"use strict";
|
9 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Switches_vue__ = __webpack_require__(9);
|
10 |
/* unused harmony namespace reexport */
|
11 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_aa8ad7dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Switches_vue__ = __webpack_require__(28);
|
12 |
var disposed = false
|
13 |
function injectStyle (ssrContext) {
|
14 |
if (disposed) return
|
15 |
+
__webpack_require__(27)
|
16 |
}
|
17 |
var normalizeComponent = __webpack_require__(0)
|
18 |
/* script */
|
139 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
140 |
|
141 |
"use strict";
|
142 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_color_src_components_Sketch_vue__ = __webpack_require__(52);
|
143 |
//
|
144 |
//
|
145 |
//
|
255 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce__ = __webpack_require__(2);
|
256 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_debounce__);
|
257 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_components_Switches_vue__ = __webpack_require__(3);
|
258 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_UploadImage_vue__ = __webpack_require__(16);
|
259 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_components_PasswordGenerator_vue__ = __webpack_require__(17);
|
260 |
//
|
261 |
//
|
262 |
//
|
1362 |
/***/ }),
|
1363 |
/* 14 */,
|
1364 |
/* 15 */
|
1365 |
+
/***/ (function(module, exports) {
|
1366 |
+
|
1367 |
+
module.exports = jQuery;
|
1368 |
+
|
1369 |
+
/***/ }),
|
1370 |
+
/* 16 */
|
1371 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1372 |
|
1373 |
"use strict";
|
1374 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_UploadImage_vue__ = __webpack_require__(10);
|
1375 |
/* unused harmony namespace reexport */
|
1376 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40b3524c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_UploadImage_vue__ = __webpack_require__(30);
|
1377 |
var disposed = false
|
1378 |
function injectStyle (ssrContext) {
|
1379 |
if (disposed) return
|
1380 |
+
__webpack_require__(29)
|
1381 |
}
|
1382 |
var normalizeComponent = __webpack_require__(0)
|
1383 |
/* script */
|
1423 |
|
1424 |
|
1425 |
/***/ }),
|
1426 |
+
/* 17 */
|
1427 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1428 |
|
1429 |
"use strict";
|
1430 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PasswordGenerator_vue__ = __webpack_require__(11);
|
1431 |
/* unused harmony namespace reexport */
|
1432 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4084a478_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PasswordGenerator_vue__ = __webpack_require__(31);
|
1433 |
var disposed = false
|
1434 |
var normalizeComponent = __webpack_require__(0)
|
1435 |
/* script */
|
1475 |
|
1476 |
|
1477 |
/***/ }),
|
|
|
1478 |
/* 18 */,
|
1479 |
/* 19 */,
|
1480 |
+
/* 20 */,
|
1481 |
+
/* 21 */
|
1482 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1483 |
|
1484 |
"use strict";
|
1529 |
|
1530 |
|
1531 |
/***/ }),
|
1532 |
+
/* 22 */,
|
1533 |
+
/* 23 */
|
1534 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1535 |
|
1536 |
"use strict";
|
1537 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ColorPicker_vue__ = __webpack_require__(7);
|
1538 |
/* unused harmony namespace reexport */
|
1539 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01dc0d51_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ColorPicker_vue__ = __webpack_require__(25);
|
1540 |
var disposed = false
|
1541 |
function injectStyle (ssrContext) {
|
1542 |
if (disposed) return
|
1543 |
+
__webpack_require__(24)
|
1544 |
}
|
1545 |
var normalizeComponent = __webpack_require__(0)
|
1546 |
/* script */
|
1586 |
|
1587 |
|
1588 |
/***/ }),
|
1589 |
+
/* 24 */
|
1590 |
/***/ (function(module, exports) {
|
1591 |
|
1592 |
// removed by extract-text-webpack-plugin
|
1593 |
|
1594 |
/***/ }),
|
1595 |
+
/* 25 */
|
1596 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1597 |
|
1598 |
"use strict";
|
1683 |
}
|
1684 |
|
1685 |
/***/ }),
|
1686 |
+
/* 26 */
|
1687 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1688 |
|
1689 |
"use strict";
|
1690 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAccountFields_vue__ = __webpack_require__(8);
|
1691 |
/* unused harmony namespace reexport */
|
1692 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2b13daea_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAccountFields_vue__ = __webpack_require__(32);
|
1693 |
var disposed = false
|
1694 |
var normalizeComponent = __webpack_require__(0)
|
1695 |
/* script */
|
1735 |
|
1736 |
|
1737 |
/***/ }),
|
1738 |
+
/* 27 */
|
1739 |
/***/ (function(module, exports) {
|
1740 |
|
1741 |
// removed by extract-text-webpack-plugin
|
1742 |
|
1743 |
/***/ }),
|
1744 |
+
/* 28 */
|
1745 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1746 |
|
1747 |
"use strict";
|
1772 |
}
|
1773 |
|
1774 |
/***/ }),
|
1775 |
+
/* 29 */
|
1776 |
/***/ (function(module, exports) {
|
1777 |
|
1778 |
// removed by extract-text-webpack-plugin
|
1779 |
|
1780 |
/***/ }),
|
1781 |
+
/* 30 */
|
1782 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1783 |
|
1784 |
"use strict";
|
1823 |
}
|
1824 |
|
1825 |
/***/ }),
|
1826 |
+
/* 31 */
|
1827 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1828 |
|
1829 |
"use strict";
|
1896 |
}
|
1897 |
|
1898 |
/***/ }),
|
1899 |
+
/* 32 */
|
1900 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1901 |
|
1902 |
"use strict";
|
2382 |
}
|
2383 |
|
2384 |
/***/ }),
|
2385 |
+
/* 33 */
|
2386 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2387 |
|
2388 |
"use strict";
|
2389 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAddressFields_vue__ = __webpack_require__(12);
|
2390 |
/* unused harmony namespace reexport */
|
2391 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9504c01e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAddressFields_vue__ = __webpack_require__(34);
|
2392 |
var disposed = false
|
2393 |
var normalizeComponent = __webpack_require__(0)
|
2394 |
/* script */
|
2434 |
|
2435 |
|
2436 |
/***/ }),
|
2437 |
+
/* 34 */
|
2438 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2439 |
|
2440 |
"use strict";
|
2699 |
}
|
2700 |
|
2701 |
/***/ }),
|
2702 |
+
/* 35 */
|
2703 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2704 |
|
2705 |
"use strict";
|
2706 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorPaymentFields_vue__ = __webpack_require__(13);
|
2707 |
/* unused harmony namespace reexport */
|
2708 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ed34783_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorPaymentFields_vue__ = __webpack_require__(37);
|
2709 |
var disposed = false
|
2710 |
function injectStyle (ssrContext) {
|
2711 |
if (disposed) return
|
2712 |
+
__webpack_require__(36)
|
2713 |
}
|
2714 |
var normalizeComponent = __webpack_require__(0)
|
2715 |
/* script */
|
2755 |
|
2756 |
|
2757 |
/***/ }),
|
2758 |
+
/* 36 */
|
2759 |
/***/ (function(module, exports) {
|
2760 |
|
2761 |
// removed by extract-text-webpack-plugin
|
2762 |
|
2763 |
/***/ }),
|
2764 |
+
/* 37 */
|
2765 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2766 |
|
2767 |
"use strict";
|
3332 |
}
|
3333 |
|
3334 |
/***/ }),
|
|
|
3335 |
/* 38 */,
|
3336 |
/* 39 */,
|
3337 |
/* 40 */,
|
3338 |
/* 41 */,
|
3339 |
+
/* 42 */,
|
3340 |
+
/* 43 */,
|
3341 |
+
/* 44 */
|
3342 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3343 |
|
3344 |
"use strict";
|
3354 |
});
|
3355 |
|
3356 |
/***/ }),
|
3357 |
+
/* 45 */
|
3358 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3359 |
|
3360 |
"use strict";
|
3361 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_admin_components_Chart_vue__ = __webpack_require__(21);
|
3362 |
//
|
3363 |
//
|
3364 |
//
|
3558 |
});
|
3559 |
|
3560 |
/***/ }),
|
3561 |
+
/* 46 */
|
3562 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3563 |
|
3564 |
"use strict";
|
3992 |
|
3993 |
this.showModal = false;
|
3994 |
this.loading = true;
|
3995 |
+
dokan.api.put('/withdraw/' + this.editing.id, {
|
3996 |
note: this.editing.note
|
3997 |
}).done(function (response) {
|
3998 |
_this5.loading = false;
|
4009 |
});
|
4010 |
|
4011 |
/***/ }),
|
4012 |
+
/* 47 */
|
4013 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4014 |
|
4015 |
"use strict";
|
4016 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css__ = __webpack_require__(113);
|
4017 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_slick_carousel_slick_slick_css__);
|
4018 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_slick__ = __webpack_require__(116);
|
4019 |
//
|
4020 |
//
|
4021 |
//
|
4887 |
});
|
4888 |
|
4889 |
/***/ }),
|
4890 |
+
/* 48 */,
|
4891 |
+
/* 49 */
|
|
|
|
|
|
|
|
|
|
|
|
|
4892 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4893 |
|
4894 |
"use strict";
|
4940 |
});
|
4941 |
|
4942 |
/***/ }),
|
4943 |
+
/* 50 */
|
4944 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4945 |
|
4946 |
"use strict";
|
4947 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_admin_components_Fields_vue__ = __webpack_require__(125);
|
4948 |
//
|
4949 |
//
|
4950 |
//
|
5234 |
});
|
5235 |
|
5236 |
/***/ }),
|
5237 |
+
/* 51 */
|
5238 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5239 |
|
5240 |
"use strict";
|
5241 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty__ = __webpack_require__(127);
|
5242 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_defineProperty__);
|
5243 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray__ = __webpack_require__(128);
|
5244 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_slicedToArray__);
|
5245 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_ColorPicker_vue__ = __webpack_require__(23);
|
5246 |
|
5247 |
|
5248 |
|
5723 |
});
|
5724 |
|
5725 |
/***/ }),
|
|
|
5726 |
/* 52 */,
|
5727 |
/* 53 */,
|
5728 |
/* 54 */,
|
5730 |
/* 56 */,
|
5731 |
/* 57 */,
|
5732 |
/* 58 */,
|
5733 |
+
/* 59 */,
|
5734 |
+
/* 60 */
|
5735 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5736 |
|
5737 |
"use strict";
|
5738 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AddVendor_vue__ = __webpack_require__(155);
|
5739 |
//
|
5740 |
//
|
5741 |
//
|
6076 |
});
|
6077 |
|
6078 |
/***/ }),
|
6079 |
+
/* 61 */
|
6080 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6081 |
|
6082 |
"use strict";
|
6083 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__VendorAccountFields_vue__ = __webpack_require__(26);
|
6084 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__VendorAddressFields_vue__ = __webpack_require__(33);
|
6085 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__VendorPaymentFields_vue__ = __webpack_require__(35);
|
6086 |
//
|
6087 |
//
|
6088 |
//
|
6308 |
});
|
6309 |
|
6310 |
/***/ }),
|
|
|
6311 |
/* 62 */,
|
6312 |
/* 63 */,
|
6313 |
/* 64 */,
|
6340 |
/* 91 */,
|
6341 |
/* 92 */,
|
6342 |
/* 93 */,
|
6343 |
+
/* 94 */,
|
6344 |
+
/* 95 */,
|
6345 |
+
/* 96 */
|
6346 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6347 |
|
6348 |
"use strict";
|
6349 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
6350 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__App_vue__ = __webpack_require__(97);
|
6351 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__router__ = __webpack_require__(100);
|
6352 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_admin_menu_fix__ = __webpack_require__(159);
|
6353 |
|
6354 |
|
6355 |
|
6370 |
Object(__WEBPACK_IMPORTED_MODULE_2__utils_admin_menu_fix__["a" /* default */])('dokan');
|
6371 |
|
6372 |
/***/ }),
|
6373 |
+
/* 97 */
|
6374 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6375 |
|
6376 |
"use strict";
|
6377 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(44);
|
6378 |
/* unused harmony namespace reexport */
|
6379 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3a030f38_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(99);
|
6380 |
var disposed = false
|
6381 |
function injectStyle (ssrContext) {
|
6382 |
if (disposed) return
|
6383 |
+
__webpack_require__(98)
|
6384 |
}
|
6385 |
var normalizeComponent = __webpack_require__(0)
|
6386 |
/* script */
|
6426 |
|
6427 |
|
6428 |
/***/ }),
|
6429 |
+
/* 98 */
|
6430 |
/***/ (function(module, exports) {
|
6431 |
|
6432 |
// removed by extract-text-webpack-plugin
|
6433 |
|
6434 |
/***/ }),
|
6435 |
+
/* 99 */
|
6436 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6437 |
|
6438 |
"use strict";
|
6463 |
}
|
6464 |
|
6465 |
/***/ }),
|
6466 |
+
/* 100 */
|
6467 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6468 |
|
6469 |
"use strict";
|
6470 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__ = __webpack_require__(101);
|
6471 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__);
|
6472 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_pages_Dashboard_vue__ = __webpack_require__(102);
|
6473 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_pages_Withdraw_vue__ = __webpack_require__(108);
|
6474 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_pages_Premium_vue__ = __webpack_require__(111);
|
6475 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_admin_pages_Help_vue__ = __webpack_require__(120);
|
6476 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_admin_pages_Settings_vue__ = __webpack_require__(123);
|
6477 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_admin_pages_vendors_vue__ = __webpack_require__(153);
|
6478 |
|
6479 |
|
6480 |
|
6528 |
}));
|
6529 |
|
6530 |
/***/ }),
|
6531 |
+
/* 101 */,
|
6532 |
+
/* 102 */
|
6533 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6534 |
|
6535 |
"use strict";
|
6536 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Dashboard_vue__ = __webpack_require__(45);
|
6537 |
/* unused harmony namespace reexport */
|
6538 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_219ffca0_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Dashboard_vue__ = __webpack_require__(107);
|
6539 |
var disposed = false
|
6540 |
function injectStyle (ssrContext) {
|
6541 |
if (disposed) return
|
6542 |
+
__webpack_require__(103)
|
6543 |
}
|
6544 |
var normalizeComponent = __webpack_require__(0)
|
6545 |
/* script */
|
6585 |
|
6586 |
|
6587 |
/***/ }),
|
6588 |
+
/* 103 */
|
6589 |
/***/ (function(module, exports) {
|
6590 |
|
6591 |
// removed by extract-text-webpack-plugin
|
6592 |
|
6593 |
/***/ }),
|
|
|
|
|
6594 |
/* 104 */,
|
6595 |
+
/* 105 */,
|
6596 |
+
/* 106 */,
|
6597 |
+
/* 107 */
|
6598 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6599 |
|
6600 |
"use strict";
|
7069 |
}
|
7070 |
|
7071 |
/***/ }),
|
7072 |
+
/* 108 */
|
7073 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7074 |
|
7075 |
"use strict";
|
7076 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Withdraw_vue__ = __webpack_require__(46);
|
7077 |
/* unused harmony namespace reexport */
|
7078 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_62373ea4_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Withdraw_vue__ = __webpack_require__(110);
|
7079 |
var disposed = false
|
7080 |
function injectStyle (ssrContext) {
|
7081 |
if (disposed) return
|
7082 |
+
__webpack_require__(109)
|
7083 |
}
|
7084 |
var normalizeComponent = __webpack_require__(0)
|
7085 |
/* script */
|
7125 |
|
7126 |
|
7127 |
/***/ }),
|
7128 |
+
/* 109 */
|
7129 |
/***/ (function(module, exports) {
|
7130 |
|
7131 |
// removed by extract-text-webpack-plugin
|
7132 |
|
7133 |
/***/ }),
|
7134 |
+
/* 110 */
|
7135 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7136 |
|
7137 |
"use strict";
|
7513 |
}
|
7514 |
|
7515 |
/***/ }),
|
7516 |
+
/* 111 */
|
7517 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7518 |
|
7519 |
"use strict";
|
7520 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Premium_vue__ = __webpack_require__(47);
|
7521 |
/* unused harmony namespace reexport */
|
7522 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_b38fd83a_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Premium_vue__ = __webpack_require__(119);
|
7523 |
var disposed = false
|
7524 |
function injectStyle (ssrContext) {
|
7525 |
if (disposed) return
|
7526 |
+
__webpack_require__(112)
|
7527 |
}
|
7528 |
var normalizeComponent = __webpack_require__(0)
|
7529 |
/* script */
|
7569 |
|
7570 |
|
7571 |
/***/ }),
|
7572 |
+
/* 112 */
|
7573 |
/***/ (function(module, exports) {
|
7574 |
|
7575 |
// removed by extract-text-webpack-plugin
|
7576 |
|
7577 |
/***/ }),
|
|
|
|
|
7578 |
/* 113 */,
|
7579 |
/* 114 */,
|
7580 |
/* 115 */,
|
7581 |
/* 116 */,
|
7582 |
+
/* 117 */,
|
7583 |
+
/* 118 */,
|
7584 |
+
/* 119 */
|
7585 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7586 |
|
7587 |
"use strict";
|
8158 |
}
|
8159 |
|
8160 |
/***/ }),
|
8161 |
+
/* 120 */
|
8162 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8163 |
|
8164 |
"use strict";
|
8165 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Help_vue__ = __webpack_require__(49);
|
8166 |
/* unused harmony namespace reexport */
|
8167 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_c289d136_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Help_vue__ = __webpack_require__(122);
|
8168 |
var disposed = false
|
8169 |
function injectStyle (ssrContext) {
|
8170 |
if (disposed) return
|
8171 |
+
__webpack_require__(121)
|
8172 |
}
|
8173 |
var normalizeComponent = __webpack_require__(0)
|
8174 |
/* script */
|
8214 |
|
8215 |
|
8216 |
/***/ }),
|
8217 |
+
/* 121 */
|
8218 |
/***/ (function(module, exports) {
|
8219 |
|
8220 |
// removed by extract-text-webpack-plugin
|
8221 |
|
8222 |
/***/ }),
|
8223 |
+
/* 122 */
|
8224 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8225 |
|
8226 |
"use strict";
|
8282 |
}
|
8283 |
|
8284 |
/***/ }),
|
8285 |
+
/* 123 */
|
8286 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8287 |
|
8288 |
"use strict";
|
8289 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Settings_vue__ = __webpack_require__(50);
|
8290 |
/* unused harmony namespace reexport */
|
8291 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_e4dc4572_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Settings_vue__ = __webpack_require__(152);
|
8292 |
var disposed = false
|
8293 |
function injectStyle (ssrContext) {
|
8294 |
if (disposed) return
|
8295 |
+
__webpack_require__(124)
|
8296 |
}
|
8297 |
var normalizeComponent = __webpack_require__(0)
|
8298 |
/* script */
|
8338 |
|
8339 |
|
8340 |
/***/ }),
|
8341 |
+
/* 124 */
|
8342 |
/***/ (function(module, exports) {
|
8343 |
|
8344 |
// removed by extract-text-webpack-plugin
|
8345 |
|
8346 |
/***/ }),
|
8347 |
+
/* 125 */
|
8348 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8349 |
|
8350 |
"use strict";
|
8351 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Fields_vue__ = __webpack_require__(51);
|
8352 |
/* unused harmony namespace reexport */
|
8353 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_a96ce32e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Fields_vue__ = __webpack_require__(151);
|
8354 |
var disposed = false
|
8355 |
function injectStyle (ssrContext) {
|
8356 |
if (disposed) return
|
8357 |
+
__webpack_require__(126)
|
8358 |
}
|
8359 |
var normalizeComponent = __webpack_require__(0)
|
8360 |
/* script */
|
8400 |
|
8401 |
|
8402 |
/***/ }),
|
8403 |
+
/* 126 */
|
8404 |
/***/ (function(module, exports) {
|
8405 |
|
8406 |
// removed by extract-text-webpack-plugin
|
8407 |
|
8408 |
/***/ }),
|
|
|
|
|
8409 |
/* 127 */,
|
8410 |
/* 128 */,
|
8411 |
/* 129 */,
|
8428 |
/* 146 */,
|
8429 |
/* 147 */,
|
8430 |
/* 148 */,
|
8431 |
+
/* 149 */,
|
8432 |
+
/* 150 */,
|
8433 |
+
/* 151 */
|
8434 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8435 |
|
8436 |
"use strict";
|
9874 |
}
|
9875 |
|
9876 |
/***/ }),
|
9877 |
+
/* 152 */
|
9878 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9879 |
|
9880 |
"use strict";
|
10088 |
}
|
10089 |
|
10090 |
/***/ }),
|
10091 |
+
/* 153 */
|
10092 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10093 |
|
10094 |
"use strict";
|
10095 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_vendors_vue__ = __webpack_require__(60);
|
10096 |
/* unused harmony namespace reexport */
|
10097 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_208897d7_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_vendors_vue__ = __webpack_require__(158);
|
10098 |
var disposed = false
|
10099 |
function injectStyle (ssrContext) {
|
10100 |
if (disposed) return
|
10101 |
+
__webpack_require__(154)
|
10102 |
}
|
10103 |
var normalizeComponent = __webpack_require__(0)
|
10104 |
/* script */
|
10144 |
|
10145 |
|
10146 |
/***/ }),
|
10147 |
+
/* 154 */
|
10148 |
/***/ (function(module, exports) {
|
10149 |
|
10150 |
// removed by extract-text-webpack-plugin
|
10151 |
|
10152 |
/***/ }),
|
10153 |
+
/* 155 */
|
10154 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10155 |
|
10156 |
"use strict";
|
10157 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_AddVendor_vue__ = __webpack_require__(61);
|
10158 |
/* unused harmony namespace reexport */
|
10159 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_75e0fcd5_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_AddVendor_vue__ = __webpack_require__(157);
|
10160 |
var disposed = false
|
10161 |
function injectStyle (ssrContext) {
|
10162 |
if (disposed) return
|
10163 |
+
__webpack_require__(156)
|
10164 |
}
|
10165 |
var normalizeComponent = __webpack_require__(0)
|
10166 |
/* script */
|
10206 |
|
10207 |
|
10208 |
/***/ }),
|
10209 |
+
/* 156 */
|
10210 |
/***/ (function(module, exports) {
|
10211 |
|
10212 |
// removed by extract-text-webpack-plugin
|
10213 |
|
10214 |
/***/ }),
|
10215 |
+
/* 157 */
|
10216 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10217 |
|
10218 |
"use strict";
|
10351 |
}
|
10352 |
|
10353 |
/***/ }),
|
10354 |
+
/* 158 */
|
10355 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10356 |
|
10357 |
"use strict";
|
10665 |
}
|
10666 |
|
10667 |
/***/ }),
|
10668 |
+
/* 159 */
|
10669 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10670 |
|
10671 |
"use strict";
|
10701 |
/* harmony default export */ __webpack_exports__["a"] = (menuFix);
|
10702 |
|
10703 |
/***/ })
|
10704 |
+
],[96]);
|
assets/js/vue-bootstrap.js
CHANGED
@@ -8,11 +8,11 @@ dokanWebpack([0],[
|
|
8 |
"use strict";
|
9 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Switches_vue__ = __webpack_require__(9);
|
10 |
/* unused harmony namespace reexport */
|
11 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_aa8ad7dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Switches_vue__ = __webpack_require__(
|
12 |
var disposed = false
|
13 |
function injectStyle (ssrContext) {
|
14 |
if (disposed) return
|
15 |
-
__webpack_require__(
|
16 |
}
|
17 |
var normalizeComponent = __webpack_require__(0)
|
18 |
/* script */
|
@@ -139,7 +139,7 @@ if (false) {(function () {
|
|
139 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
140 |
|
141 |
"use strict";
|
142 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_color_src_components_Sketch_vue__ = __webpack_require__(
|
143 |
//
|
144 |
//
|
145 |
//
|
@@ -255,8 +255,8 @@ if (false) {(function () {
|
|
255 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce__ = __webpack_require__(2);
|
256 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_debounce__);
|
257 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_components_Switches_vue__ = __webpack_require__(3);
|
258 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_UploadImage_vue__ = __webpack_require__(
|
259 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_components_PasswordGenerator_vue__ = __webpack_require__(
|
260 |
//
|
261 |
//
|
262 |
//
|
@@ -1361,17 +1361,18 @@ if (false) {(function () {
|
|
1361 |
|
1362 |
/***/ }),
|
1363 |
/* 14 */,
|
1364 |
-
/* 15
|
|
|
1365 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1366 |
|
1367 |
"use strict";
|
1368 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_UploadImage_vue__ = __webpack_require__(10);
|
1369 |
/* unused harmony namespace reexport */
|
1370 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40b3524c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_UploadImage_vue__ = __webpack_require__(
|
1371 |
var disposed = false
|
1372 |
function injectStyle (ssrContext) {
|
1373 |
if (disposed) return
|
1374 |
-
__webpack_require__(
|
1375 |
}
|
1376 |
var normalizeComponent = __webpack_require__(0)
|
1377 |
/* script */
|
@@ -1417,13 +1418,13 @@ if (false) {(function () {
|
|
1417 |
|
1418 |
|
1419 |
/***/ }),
|
1420 |
-
/*
|
1421 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1422 |
|
1423 |
"use strict";
|
1424 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PasswordGenerator_vue__ = __webpack_require__(11);
|
1425 |
/* unused harmony namespace reexport */
|
1426 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4084a478_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PasswordGenerator_vue__ = __webpack_require__(
|
1427 |
var disposed = false
|
1428 |
var normalizeComponent = __webpack_require__(0)
|
1429 |
/* script */
|
@@ -1469,10 +1470,10 @@ if (false) {(function () {
|
|
1469 |
|
1470 |
|
1471 |
/***/ }),
|
1472 |
-
/* 17 */,
|
1473 |
/* 18 */,
|
1474 |
/* 19 */,
|
1475 |
-
/* 20
|
|
|
1476 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1477 |
|
1478 |
"use strict";
|
@@ -1523,18 +1524,18 @@ if (false) {(function () {
|
|
1523 |
|
1524 |
|
1525 |
/***/ }),
|
1526 |
-
/*
|
1527 |
-
/*
|
1528 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1529 |
|
1530 |
"use strict";
|
1531 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ColorPicker_vue__ = __webpack_require__(7);
|
1532 |
/* unused harmony namespace reexport */
|
1533 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01dc0d51_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ColorPicker_vue__ = __webpack_require__(
|
1534 |
var disposed = false
|
1535 |
function injectStyle (ssrContext) {
|
1536 |
if (disposed) return
|
1537 |
-
__webpack_require__(
|
1538 |
}
|
1539 |
var normalizeComponent = __webpack_require__(0)
|
1540 |
/* script */
|
@@ -1580,13 +1581,13 @@ if (false) {(function () {
|
|
1580 |
|
1581 |
|
1582 |
/***/ }),
|
1583 |
-
/*
|
1584 |
/***/ (function(module, exports) {
|
1585 |
|
1586 |
// removed by extract-text-webpack-plugin
|
1587 |
|
1588 |
/***/ }),
|
1589 |
-
/*
|
1590 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1591 |
|
1592 |
"use strict";
|
@@ -1677,13 +1678,13 @@ if (false) {
|
|
1677 |
}
|
1678 |
|
1679 |
/***/ }),
|
1680 |
-
/*
|
1681 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1682 |
|
1683 |
"use strict";
|
1684 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAccountFields_vue__ = __webpack_require__(8);
|
1685 |
/* unused harmony namespace reexport */
|
1686 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2b13daea_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAccountFields_vue__ = __webpack_require__(
|
1687 |
var disposed = false
|
1688 |
var normalizeComponent = __webpack_require__(0)
|
1689 |
/* script */
|
@@ -1729,13 +1730,13 @@ if (false) {(function () {
|
|
1729 |
|
1730 |
|
1731 |
/***/ }),
|
1732 |
-
/*
|
1733 |
/***/ (function(module, exports) {
|
1734 |
|
1735 |
// removed by extract-text-webpack-plugin
|
1736 |
|
1737 |
/***/ }),
|
1738 |
-
/*
|
1739 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1740 |
|
1741 |
"use strict";
|
@@ -1766,13 +1767,13 @@ if (false) {
|
|
1766 |
}
|
1767 |
|
1768 |
/***/ }),
|
1769 |
-
/*
|
1770 |
/***/ (function(module, exports) {
|
1771 |
|
1772 |
// removed by extract-text-webpack-plugin
|
1773 |
|
1774 |
/***/ }),
|
1775 |
-
/*
|
1776 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1777 |
|
1778 |
"use strict";
|
@@ -1817,7 +1818,7 @@ if (false) {
|
|
1817 |
}
|
1818 |
|
1819 |
/***/ }),
|
1820 |
-
/*
|
1821 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1822 |
|
1823 |
"use strict";
|
@@ -1890,7 +1891,7 @@ if (false) {
|
|
1890 |
}
|
1891 |
|
1892 |
/***/ }),
|
1893 |
-
/*
|
1894 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1895 |
|
1896 |
"use strict";
|
@@ -2376,13 +2377,13 @@ if (false) {
|
|
2376 |
}
|
2377 |
|
2378 |
/***/ }),
|
2379 |
-
/*
|
2380 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2381 |
|
2382 |
"use strict";
|
2383 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAddressFields_vue__ = __webpack_require__(12);
|
2384 |
/* unused harmony namespace reexport */
|
2385 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9504c01e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAddressFields_vue__ = __webpack_require__(
|
2386 |
var disposed = false
|
2387 |
var normalizeComponent = __webpack_require__(0)
|
2388 |
/* script */
|
@@ -2428,7 +2429,7 @@ if (false) {(function () {
|
|
2428 |
|
2429 |
|
2430 |
/***/ }),
|
2431 |
-
/*
|
2432 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2433 |
|
2434 |
"use strict";
|
@@ -2693,17 +2694,17 @@ if (false) {
|
|
2693 |
}
|
2694 |
|
2695 |
/***/ }),
|
2696 |
-
/*
|
2697 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2698 |
|
2699 |
"use strict";
|
2700 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorPaymentFields_vue__ = __webpack_require__(13);
|
2701 |
/* unused harmony namespace reexport */
|
2702 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ed34783_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorPaymentFields_vue__ = __webpack_require__(
|
2703 |
var disposed = false
|
2704 |
function injectStyle (ssrContext) {
|
2705 |
if (disposed) return
|
2706 |
-
__webpack_require__(
|
2707 |
}
|
2708 |
var normalizeComponent = __webpack_require__(0)
|
2709 |
/* script */
|
@@ -2749,13 +2750,13 @@ if (false) {(function () {
|
|
2749 |
|
2750 |
|
2751 |
/***/ }),
|
2752 |
-
/*
|
2753 |
/***/ (function(module, exports) {
|
2754 |
|
2755 |
// removed by extract-text-webpack-plugin
|
2756 |
|
2757 |
/***/ }),
|
2758 |
-
/*
|
2759 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2760 |
|
2761 |
"use strict";
|
@@ -3326,8 +3327,128 @@ if (false) {
|
|
3326 |
}
|
3327 |
|
3328 |
/***/ }),
|
3329 |
-
/*
|
3330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3331 |
/* 39 */,
|
3332 |
/* 40 */,
|
3333 |
/* 41 */,
|
@@ -3356,7 +3477,8 @@ if (false) {
|
|
3356 |
/* 64 */,
|
3357 |
/* 65 */,
|
3358 |
/* 66 */,
|
3359 |
-
/* 67
|
|
|
3360 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3361 |
|
3362 |
"use strict";
|
@@ -3396,7 +3518,7 @@ if (false) {
|
|
3396 |
});
|
3397 |
|
3398 |
/***/ }),
|
3399 |
-
/*
|
3400 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3401 |
|
3402 |
"use strict";
|
@@ -3412,7 +3534,7 @@ if (false) {
|
|
3412 |
});
|
3413 |
|
3414 |
/***/ }),
|
3415 |
-
/*
|
3416 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3417 |
|
3418 |
"use strict";
|
@@ -3475,7 +3597,7 @@ if (false) {
|
|
3475 |
});
|
3476 |
|
3477 |
/***/ }),
|
3478 |
-
/*
|
3479 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3480 |
|
3481 |
"use strict";
|
@@ -3642,7 +3764,7 @@ if (false) {
|
|
3642 |
});
|
3643 |
|
3644 |
/***/ }),
|
3645 |
-
/*
|
3646 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3647 |
|
3648 |
"use strict";
|
@@ -3660,7 +3782,7 @@ if (false) {
|
|
3660 |
});
|
3661 |
|
3662 |
/***/ }),
|
3663 |
-
/*
|
3664 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3665 |
|
3666 |
"use strict";
|
@@ -3729,7 +3851,7 @@ if (false) {
|
|
3729 |
});
|
3730 |
|
3731 |
/***/ }),
|
3732 |
-
/*
|
3733 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3734 |
|
3735 |
"use strict";
|
@@ -3763,7 +3885,7 @@ if (false) {
|
|
3763 |
});
|
3764 |
|
3765 |
/***/ }),
|
3766 |
-
/*
|
3767 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3768 |
|
3769 |
"use strict";
|
@@ -3806,7 +3928,7 @@ if (false) {
|
|
3806 |
});
|
3807 |
|
3808 |
/***/ }),
|
3809 |
-
/*
|
3810 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3811 |
|
3812 |
"use strict";
|
@@ -3868,8 +3990,8 @@ if (false) {
|
|
3868 |
});
|
3869 |
|
3870 |
/***/ }),
|
3871 |
-
/*
|
3872 |
-
/*
|
3873 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3874 |
|
3875 |
"use strict";
|
@@ -3997,13 +4119,13 @@ if (false) {
|
|
3997 |
});
|
3998 |
|
3999 |
/***/ }),
|
4000 |
-
/*
|
4001 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4002 |
|
4003 |
"use strict";
|
4004 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(
|
4005 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__);
|
4006 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(
|
4007 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__);
|
4008 |
|
4009 |
|
@@ -4214,7 +4336,7 @@ function () {
|
|
4214 |
});
|
4215 |
|
4216 |
/***/ }),
|
4217 |
-
/*
|
4218 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4219 |
|
4220 |
"use strict";
|
@@ -4294,7 +4416,6 @@ function () {
|
|
4294 |
});
|
4295 |
|
4296 |
/***/ }),
|
4297 |
-
/* 80 */,
|
4298 |
/* 81 */,
|
4299 |
/* 82 */,
|
4300 |
/* 83 */,
|
@@ -4372,51 +4493,53 @@ function () {
|
|
4372 |
/* 155 */,
|
4373 |
/* 156 */,
|
4374 |
/* 157 */,
|
4375 |
-
/* 158
|
|
|
|
|
4376 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4377 |
|
4378 |
"use strict";
|
4379 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
4380 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
4381 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(
|
4382 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment__ = __webpack_require__(
|
4383 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_moment__);
|
4384 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_notification__ = __webpack_require__(
|
4385 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_notification___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_vue_notification__);
|
4386 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_vue_wp_list_table__ = __webpack_require__(
|
4387 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_vue_multiselect__ = __webpack_require__(4);
|
4388 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_vue_multiselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_vue_multiselect__);
|
4389 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_Api__ = __webpack_require__(
|
4390 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_vue_chartjs__ = __webpack_require__(14);
|
4391 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Mixin__ = __webpack_require__(
|
4392 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_debounce__ = __webpack_require__(2);
|
4393 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_debounce__);
|
4394 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare__ = __webpack_require__(
|
4395 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare__);
|
4396 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_vue_content_loading__ = __webpack_require__(
|
4397 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_vue_content_loading___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_vue_content_loading__);
|
4398 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_admin_components_Postbox_vue__ = __webpack_require__(
|
4399 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_admin_components_Loading_vue__ = __webpack_require__(
|
4400 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_admin_components_Chart_vue__ = __webpack_require__(
|
4401 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_admin_components_Modal_vue__ = __webpack_require__(
|
4402 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_admin_components_Switches_vue__ = __webpack_require__(3);
|
4403 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_admin_components_TextEditor_vue__ = __webpack_require__(
|
4404 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_admin_components_Currency_vue__ = __webpack_require__(
|
4405 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_admin_components_LazyInput_vue__ = __webpack_require__(
|
4406 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_admin_components_Progressbar_vue__ = __webpack_require__(
|
4407 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_admin_components_Search_vue__ = __webpack_require__(
|
4408 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_admin_components_Datepicker_vue__ = __webpack_require__(
|
4409 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_vue_sweetalert2__ = __webpack_require__(
|
4410 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24_admin_components_ColorPicker_vue__ = __webpack_require__(
|
4411 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25_admin_components_GoogleMaps_vue__ = __webpack_require__(
|
4412 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26_admin_components_Mapbox_vue__ = __webpack_require__(
|
4413 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27_admin_components_UploadImage_vue__ = __webpack_require__(
|
4414 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28_admin_components_PasswordGenerator_vue__ = __webpack_require__(
|
4415 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29_admin_pages_VendorAccountFields_vue__ = __webpack_require__(
|
4416 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30_admin_pages_VendorAddressFields_vue__ = __webpack_require__(
|
4417 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31_admin_pages_VendorSocialFields_vue__ = __webpack_require__(
|
4418 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32_admin_pages_VendorPaymentFields_vue__ = __webpack_require__(
|
4419 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css__ = __webpack_require__(
|
4420 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css__);
|
4421 |
|
4422 |
|
@@ -4540,22 +4663,22 @@ if (dokan.hooks) {
|
|
4540 |
}
|
4541 |
|
4542 |
/***/ }),
|
4543 |
-
/*
|
4544 |
/***/ (function(module, exports) {
|
4545 |
|
4546 |
module.exports = moment;
|
4547 |
|
4548 |
/***/ }),
|
4549 |
-
/* 160 */,
|
4550 |
-
/* 161 */,
|
4551 |
/* 162 */,
|
4552 |
-
/* 163
|
|
|
|
|
4553 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4554 |
|
4555 |
"use strict";
|
4556 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(
|
4557 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__);
|
4558 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(
|
4559 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__);
|
4560 |
|
4561 |
|
@@ -4633,11 +4756,11 @@ function () {
|
|
4633 |
/* harmony default export */ __webpack_exports__["a"] = (Dokan_API);
|
4634 |
|
4635 |
/***/ }),
|
4636 |
-
/*
|
4637 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4638 |
|
4639 |
"use strict";
|
4640 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_i18n__ = __webpack_require__(
|
4641 |
|
4642 |
/* harmony default export */ __webpack_exports__["a"] = ({
|
4643 |
methods: {
|
@@ -4664,129 +4787,7 @@ function () {
|
|
4664 |
});
|
4665 |
|
4666 |
/***/ }),
|
4667 |
-
/*
|
4668 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4669 |
-
|
4670 |
-
"use strict";
|
4671 |
-
/* harmony export (immutable) */ __webpack_exports__["c"] = setLocaleData;
|
4672 |
-
/* unused harmony export getI18n */
|
4673 |
-
/* harmony export (immutable) */ __webpack_exports__["a"] = __;
|
4674 |
-
/* unused harmony export _x */
|
4675 |
-
/* unused harmony export _n */
|
4676 |
-
/* harmony export (immutable) */ __webpack_exports__["b"] = _nx;
|
4677 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return sprintf; });
|
4678 |
-
/**
|
4679 |
-
* External dependencies
|
4680 |
-
*/
|
4681 |
-
var i18n = {};
|
4682 |
-
/**
|
4683 |
-
* Creates a new Jed instance with specified locale data configuration.
|
4684 |
-
*
|
4685 |
-
* @see http://messageformat.github.io/Jed/
|
4686 |
-
*
|
4687 |
-
* @param {Object} data Locale data configuration.
|
4688 |
-
*/
|
4689 |
-
|
4690 |
-
function setLocaleData(data) {
|
4691 |
-
var jed = new Jed(data);
|
4692 |
-
i18n[jed._textdomain] = jed;
|
4693 |
-
}
|
4694 |
-
/**
|
4695 |
-
* Returns the current Jed instance, initializing with a default configuration
|
4696 |
-
* if not already assigned.
|
4697 |
-
*
|
4698 |
-
* @return {Jed} Jed instance.
|
4699 |
-
*/
|
4700 |
-
|
4701 |
-
function getI18n() {
|
4702 |
-
var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
4703 |
-
|
4704 |
-
if (!i18n[domain]) {
|
4705 |
-
setLocaleData({
|
4706 |
-
'': {}
|
4707 |
-
});
|
4708 |
-
}
|
4709 |
-
|
4710 |
-
return i18n[domain];
|
4711 |
-
}
|
4712 |
-
/**
|
4713 |
-
* Retrieve the translation of text.
|
4714 |
-
*
|
4715 |
-
* @see https://developer.wordpress.org/reference/functions/__/
|
4716 |
-
*
|
4717 |
-
* @param {string} text Text to translate.
|
4718 |
-
* @param {string} domain Domain to retrieve the translated text.
|
4719 |
-
*
|
4720 |
-
* @return {string} Translated text.
|
4721 |
-
*/
|
4722 |
-
|
4723 |
-
function __(text, domain) {
|
4724 |
-
return getI18n(domain) ? getI18n(domain).dgettext(domain, text) : text;
|
4725 |
-
}
|
4726 |
-
/**
|
4727 |
-
* Retrieve translated string with gettext context.
|
4728 |
-
*
|
4729 |
-
* @see https://developer.wordpress.org/reference/functions/_x/
|
4730 |
-
*
|
4731 |
-
* @param {string} text Text to translate.
|
4732 |
-
* @param {string} context Context information for the translators.
|
4733 |
-
* @param {string} domain Domain to retrieve the translated text.
|
4734 |
-
*
|
4735 |
-
* @return {string} Translated context string without pipe.
|
4736 |
-
*/
|
4737 |
-
|
4738 |
-
function _x(text, context, domain) {
|
4739 |
-
return getI18n(domain).dpgettext(domain, context, text);
|
4740 |
-
}
|
4741 |
-
/**
|
4742 |
-
* Translates and retrieves the singular or plural form based on the supplied
|
4743 |
-
* number.
|
4744 |
-
*
|
4745 |
-
* @see https://developer.wordpress.org/reference/functions/_n/
|
4746 |
-
*
|
4747 |
-
* @param {string} single The text to be used if the number is singular.
|
4748 |
-
* @param {string} plural The text to be used if the number is plural.
|
4749 |
-
* @param {number} number The number to compare against to use either the
|
4750 |
-
* singular or plural form.
|
4751 |
-
* @param {string} domain Domain to retrieve the translated text.
|
4752 |
-
*
|
4753 |
-
* @return {string} The translated singular or plural form.
|
4754 |
-
*/
|
4755 |
-
|
4756 |
-
function _n(single, plural, number, domain) {
|
4757 |
-
return getI18n(domain).dngettext(domain, single, plural, number);
|
4758 |
-
}
|
4759 |
-
/**
|
4760 |
-
* Translates and retrieves the singular or plural form based on the supplied
|
4761 |
-
* number, with gettext context.
|
4762 |
-
*
|
4763 |
-
* @see https://developer.wordpress.org/reference/functions/_nx/
|
4764 |
-
*
|
4765 |
-
* @param {string} single The text to be used if the number is singular.
|
4766 |
-
* @param {string} plural The text to be used if the number is plural.
|
4767 |
-
* @param {number} number The number to compare against to use either the
|
4768 |
-
* singular or plural form.
|
4769 |
-
* @param {string} context Context information for the translators.
|
4770 |
-
* @param {string} domain Domain to retrieve the translated text.
|
4771 |
-
*
|
4772 |
-
* @return {string} The translated singular or plural form.
|
4773 |
-
*/
|
4774 |
-
|
4775 |
-
function _nx(single, plural, number, context, domain) {
|
4776 |
-
return getI18n(domain).dnpgettext(domain, context, single, plural, number);
|
4777 |
-
}
|
4778 |
-
/**
|
4779 |
-
* Returns a formatted string.
|
4780 |
-
*
|
4781 |
-
* @see http://www.diveintojavascript.com/projects/javascript-sprintf
|
4782 |
-
*
|
4783 |
-
* @type {string}
|
4784 |
-
*/
|
4785 |
-
|
4786 |
-
var sprintf = Jed.sprintf;
|
4787 |
-
|
4788 |
-
/***/ }),
|
4789 |
-
/* 166 */
|
4790 |
/***/ (function(module, exports) {
|
4791 |
|
4792 |
module.exports = function versionCompare(v1, v2, operator) {
|
@@ -4914,17 +4915,17 @@ module.exports = function versionCompare(v1, v2, operator) {
|
|
4914 |
};
|
4915 |
|
4916 |
/***/ }),
|
4917 |
-
/*
|
4918 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4919 |
|
4920 |
"use strict";
|
4921 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Postbox_vue__ = __webpack_require__(
|
4922 |
/* unused harmony namespace reexport */
|
4923 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_36a997ab_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Postbox_vue__ = __webpack_require__(
|
4924 |
var disposed = false
|
4925 |
function injectStyle (ssrContext) {
|
4926 |
if (disposed) return
|
4927 |
-
__webpack_require__(
|
4928 |
}
|
4929 |
var normalizeComponent = __webpack_require__(0)
|
4930 |
/* script */
|
@@ -4970,13 +4971,13 @@ if (false) {(function () {
|
|
4970 |
|
4971 |
|
4972 |
/***/ }),
|
4973 |
-
/*
|
4974 |
/***/ (function(module, exports) {
|
4975 |
|
4976 |
// removed by extract-text-webpack-plugin
|
4977 |
|
4978 |
/***/ }),
|
4979 |
-
/*
|
4980 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4981 |
|
4982 |
"use strict";
|
@@ -5036,17 +5037,17 @@ if (false) {
|
|
5036 |
}
|
5037 |
|
5038 |
/***/ }),
|
5039 |
-
/*
|
5040 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5041 |
|
5042 |
"use strict";
|
5043 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Loading_vue__ = __webpack_require__(
|
5044 |
/* unused harmony namespace reexport */
|
5045 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_67db673c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Loading_vue__ = __webpack_require__(
|
5046 |
var disposed = false
|
5047 |
function injectStyle (ssrContext) {
|
5048 |
if (disposed) return
|
5049 |
-
__webpack_require__(
|
5050 |
}
|
5051 |
var normalizeComponent = __webpack_require__(0)
|
5052 |
/* script */
|
@@ -5092,13 +5093,13 @@ if (false) {(function () {
|
|
5092 |
|
5093 |
|
5094 |
/***/ }),
|
5095 |
-
/*
|
5096 |
/***/ (function(module, exports) {
|
5097 |
|
5098 |
// removed by extract-text-webpack-plugin
|
5099 |
|
5100 |
/***/ }),
|
5101 |
-
/*
|
5102 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5103 |
|
5104 |
"use strict";
|
@@ -5127,17 +5128,17 @@ if (false) {
|
|
5127 |
}
|
5128 |
|
5129 |
/***/ }),
|
5130 |
-
/*
|
5131 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5132 |
|
5133 |
"use strict";
|
5134 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Modal_vue__ = __webpack_require__(
|
5135 |
/* unused harmony namespace reexport */
|
5136 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4bd79a2d_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Modal_vue__ = __webpack_require__(
|
5137 |
var disposed = false
|
5138 |
function injectStyle (ssrContext) {
|
5139 |
if (disposed) return
|
5140 |
-
__webpack_require__(
|
5141 |
}
|
5142 |
var normalizeComponent = __webpack_require__(0)
|
5143 |
/* script */
|
@@ -5183,13 +5184,13 @@ if (false) {(function () {
|
|
5183 |
|
5184 |
|
5185 |
/***/ }),
|
5186 |
-
/*
|
5187 |
/***/ (function(module, exports) {
|
5188 |
|
5189 |
// removed by extract-text-webpack-plugin
|
5190 |
|
5191 |
/***/ }),
|
5192 |
-
/*
|
5193 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5194 |
|
5195 |
"use strict";
|
@@ -5267,13 +5268,13 @@ if (false) {
|
|
5267 |
}
|
5268 |
|
5269 |
/***/ }),
|
5270 |
-
/*
|
5271 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5272 |
|
5273 |
"use strict";
|
5274 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_TextEditor_vue__ = __webpack_require__(
|
5275 |
/* unused harmony namespace reexport */
|
5276 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_70730fac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_TextEditor_vue__ = __webpack_require__(
|
5277 |
var disposed = false
|
5278 |
var normalizeComponent = __webpack_require__(0)
|
5279 |
/* script */
|
@@ -5319,7 +5320,7 @@ if (false) {(function () {
|
|
5319 |
|
5320 |
|
5321 |
/***/ }),
|
5322 |
-
/*
|
5323 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5324 |
|
5325 |
"use strict";
|
@@ -5344,13 +5345,13 @@ if (false) {
|
|
5344 |
}
|
5345 |
|
5346 |
/***/ }),
|
5347 |
-
/*
|
5348 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5349 |
|
5350 |
"use strict";
|
5351 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Currency_vue__ = __webpack_require__(
|
5352 |
/* unused harmony namespace reexport */
|
5353 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7df58dc1_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Currency_vue__ = __webpack_require__(
|
5354 |
var disposed = false
|
5355 |
var normalizeComponent = __webpack_require__(0)
|
5356 |
/* script */
|
@@ -5396,7 +5397,7 @@ if (false) {(function () {
|
|
5396 |
|
5397 |
|
5398 |
/***/ }),
|
5399 |
-
/*
|
5400 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5401 |
|
5402 |
"use strict";
|
@@ -5420,13 +5421,13 @@ if (false) {
|
|
5420 |
}
|
5421 |
|
5422 |
/***/ }),
|
5423 |
-
/*
|
5424 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5425 |
|
5426 |
"use strict";
|
5427 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_LazyInput_vue__ = __webpack_require__(
|
5428 |
/* unused harmony namespace reexport */
|
5429 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_588d4894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_LazyInput_vue__ = __webpack_require__(
|
5430 |
var disposed = false
|
5431 |
var normalizeComponent = __webpack_require__(0)
|
5432 |
/* script */
|
@@ -5472,7 +5473,7 @@ if (false) {(function () {
|
|
5472 |
|
5473 |
|
5474 |
/***/ }),
|
5475 |
-
/*
|
5476 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5477 |
|
5478 |
"use strict";
|
@@ -5504,17 +5505,17 @@ if (false) {
|
|
5504 |
}
|
5505 |
|
5506 |
/***/ }),
|
5507 |
-
/*
|
5508 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5509 |
|
5510 |
"use strict";
|
5511 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Progressbar_vue__ = __webpack_require__(
|
5512 |
/* unused harmony namespace reexport */
|
5513 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_356fabc6_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Progressbar_vue__ = __webpack_require__(
|
5514 |
var disposed = false
|
5515 |
function injectStyle (ssrContext) {
|
5516 |
if (disposed) return
|
5517 |
-
__webpack_require__(
|
5518 |
}
|
5519 |
var normalizeComponent = __webpack_require__(0)
|
5520 |
/* script */
|
@@ -5560,13 +5561,13 @@ if (false) {(function () {
|
|
5560 |
|
5561 |
|
5562 |
/***/ }),
|
5563 |
-
/*
|
5564 |
/***/ (function(module, exports) {
|
5565 |
|
5566 |
// removed by extract-text-webpack-plugin
|
5567 |
|
5568 |
/***/ }),
|
5569 |
-
/*
|
5570 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5571 |
|
5572 |
"use strict";
|
@@ -5599,13 +5600,13 @@ if (false) {
|
|
5599 |
}
|
5600 |
|
5601 |
/***/ }),
|
5602 |
-
/*
|
5603 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5604 |
|
5605 |
"use strict";
|
5606 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Search_vue__ = __webpack_require__(
|
5607 |
/* unused harmony namespace reexport */
|
5608 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d8365d8_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Search_vue__ = __webpack_require__(
|
5609 |
var disposed = false
|
5610 |
var normalizeComponent = __webpack_require__(0)
|
5611 |
/* script */
|
@@ -5651,7 +5652,7 @@ if (false) {(function () {
|
|
5651 |
|
5652 |
|
5653 |
/***/ }),
|
5654 |
-
/*
|
5655 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5656 |
|
5657 |
"use strict";
|
@@ -5699,13 +5700,13 @@ if (false) {
|
|
5699 |
}
|
5700 |
|
5701 |
/***/ }),
|
5702 |
-
/*
|
5703 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5704 |
|
5705 |
"use strict";
|
5706 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Datepicker_vue__ = __webpack_require__(
|
5707 |
/* unused harmony namespace reexport */
|
5708 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ae257028_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Datepicker_vue__ = __webpack_require__(
|
5709 |
var disposed = false
|
5710 |
var normalizeComponent = __webpack_require__(0)
|
5711 |
/* script */
|
@@ -5751,7 +5752,7 @@ if (false) {(function () {
|
|
5751 |
|
5752 |
|
5753 |
/***/ }),
|
5754 |
-
/*
|
5755 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5756 |
|
5757 |
"use strict";
|
@@ -5781,20 +5782,20 @@ if (false) {
|
|
5781 |
}
|
5782 |
|
5783 |
/***/ }),
|
5784 |
-
/* 189 */,
|
5785 |
/* 190 */,
|
5786 |
/* 191 */,
|
5787 |
-
/* 192
|
|
|
5788 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5789 |
|
5790 |
"use strict";
|
5791 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_GoogleMaps_vue__ = __webpack_require__(
|
5792 |
/* unused harmony namespace reexport */
|
5793 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f45e4a0_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_GoogleMaps_vue__ = __webpack_require__(
|
5794 |
var disposed = false
|
5795 |
function injectStyle (ssrContext) {
|
5796 |
if (disposed) return
|
5797 |
-
__webpack_require__(
|
5798 |
}
|
5799 |
var normalizeComponent = __webpack_require__(0)
|
5800 |
/* script */
|
@@ -5840,13 +5841,13 @@ if (false) {(function () {
|
|
5840 |
|
5841 |
|
5842 |
/***/ }),
|
5843 |
-
/*
|
5844 |
/***/ (function(module, exports) {
|
5845 |
|
5846 |
// removed by extract-text-webpack-plugin
|
5847 |
|
5848 |
/***/ }),
|
5849 |
-
/*
|
5850 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5851 |
|
5852 |
"use strict";
|
@@ -5887,17 +5888,17 @@ if (false) {
|
|
5887 |
}
|
5888 |
|
5889 |
/***/ }),
|
5890 |
-
/*
|
5891 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5892 |
|
5893 |
"use strict";
|
5894 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Mapbox_vue__ = __webpack_require__(
|
5895 |
/* unused harmony namespace reexport */
|
5896 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2fe28f9f_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Mapbox_vue__ = __webpack_require__(
|
5897 |
var disposed = false
|
5898 |
function injectStyle (ssrContext) {
|
5899 |
if (disposed) return
|
5900 |
-
__webpack_require__(
|
5901 |
}
|
5902 |
var normalizeComponent = __webpack_require__(0)
|
5903 |
/* script */
|
@@ -5943,13 +5944,13 @@ if (false) {(function () {
|
|
5943 |
|
5944 |
|
5945 |
/***/ }),
|
5946 |
-
/*
|
5947 |
/***/ (function(module, exports) {
|
5948 |
|
5949 |
// removed by extract-text-webpack-plugin
|
5950 |
|
5951 |
/***/ }),
|
5952 |
-
/*
|
5953 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5954 |
|
5955 |
"use strict";
|
@@ -6004,13 +6005,13 @@ if (false) {
|
|
6004 |
}
|
6005 |
|
6006 |
/***/ }),
|
6007 |
-
/*
|
6008 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6009 |
|
6010 |
"use strict";
|
6011 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorSocialFields_vue__ = __webpack_require__(
|
6012 |
/* unused harmony namespace reexport */
|
6013 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_21406e92_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorSocialFields_vue__ = __webpack_require__(
|
6014 |
var disposed = false
|
6015 |
var normalizeComponent = __webpack_require__(0)
|
6016 |
/* script */
|
@@ -6056,7 +6057,7 @@ if (false) {(function () {
|
|
6056 |
|
6057 |
|
6058 |
/***/ }),
|
6059 |
-
/*
|
6060 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6061 |
|
6062 |
"use strict";
|
@@ -6369,4 +6370,4 @@ if (false) {
|
|
6369 |
}
|
6370 |
|
6371 |
/***/ })
|
6372 |
-
],[
|
8 |
"use strict";
|
9 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Switches_vue__ = __webpack_require__(9);
|
10 |
/* unused harmony namespace reexport */
|
11 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_aa8ad7dc_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Switches_vue__ = __webpack_require__(28);
|
12 |
var disposed = false
|
13 |
function injectStyle (ssrContext) {
|
14 |
if (disposed) return
|
15 |
+
__webpack_require__(27)
|
16 |
}
|
17 |
var normalizeComponent = __webpack_require__(0)
|
18 |
/* script */
|
139 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
140 |
|
141 |
"use strict";
|
142 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_color_src_components_Sketch_vue__ = __webpack_require__(52);
|
143 |
//
|
144 |
//
|
145 |
//
|
255 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce__ = __webpack_require__(2);
|
256 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_debounce__);
|
257 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_admin_components_Switches_vue__ = __webpack_require__(3);
|
258 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_admin_components_UploadImage_vue__ = __webpack_require__(16);
|
259 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_admin_components_PasswordGenerator_vue__ = __webpack_require__(17);
|
260 |
//
|
261 |
//
|
262 |
//
|
1361 |
|
1362 |
/***/ }),
|
1363 |
/* 14 */,
|
1364 |
+
/* 15 */,
|
1365 |
+
/* 16 */
|
1366 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1367 |
|
1368 |
"use strict";
|
1369 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_UploadImage_vue__ = __webpack_require__(10);
|
1370 |
/* unused harmony namespace reexport */
|
1371 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_40b3524c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_UploadImage_vue__ = __webpack_require__(30);
|
1372 |
var disposed = false
|
1373 |
function injectStyle (ssrContext) {
|
1374 |
if (disposed) return
|
1375 |
+
__webpack_require__(29)
|
1376 |
}
|
1377 |
var normalizeComponent = __webpack_require__(0)
|
1378 |
/* script */
|
1418 |
|
1419 |
|
1420 |
/***/ }),
|
1421 |
+
/* 17 */
|
1422 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1423 |
|
1424 |
"use strict";
|
1425 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_PasswordGenerator_vue__ = __webpack_require__(11);
|
1426 |
/* unused harmony namespace reexport */
|
1427 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4084a478_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_PasswordGenerator_vue__ = __webpack_require__(31);
|
1428 |
var disposed = false
|
1429 |
var normalizeComponent = __webpack_require__(0)
|
1430 |
/* script */
|
1470 |
|
1471 |
|
1472 |
/***/ }),
|
|
|
1473 |
/* 18 */,
|
1474 |
/* 19 */,
|
1475 |
+
/* 20 */,
|
1476 |
+
/* 21 */
|
1477 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1478 |
|
1479 |
"use strict";
|
1524 |
|
1525 |
|
1526 |
/***/ }),
|
1527 |
+
/* 22 */,
|
1528 |
+
/* 23 */
|
1529 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1530 |
|
1531 |
"use strict";
|
1532 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_ColorPicker_vue__ = __webpack_require__(7);
|
1533 |
/* unused harmony namespace reexport */
|
1534 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_01dc0d51_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_ColorPicker_vue__ = __webpack_require__(25);
|
1535 |
var disposed = false
|
1536 |
function injectStyle (ssrContext) {
|
1537 |
if (disposed) return
|
1538 |
+
__webpack_require__(24)
|
1539 |
}
|
1540 |
var normalizeComponent = __webpack_require__(0)
|
1541 |
/* script */
|
1581 |
|
1582 |
|
1583 |
/***/ }),
|
1584 |
+
/* 24 */
|
1585 |
/***/ (function(module, exports) {
|
1586 |
|
1587 |
// removed by extract-text-webpack-plugin
|
1588 |
|
1589 |
/***/ }),
|
1590 |
+
/* 25 */
|
1591 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1592 |
|
1593 |
"use strict";
|
1678 |
}
|
1679 |
|
1680 |
/***/ }),
|
1681 |
+
/* 26 */
|
1682 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1683 |
|
1684 |
"use strict";
|
1685 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAccountFields_vue__ = __webpack_require__(8);
|
1686 |
/* unused harmony namespace reexport */
|
1687 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2b13daea_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAccountFields_vue__ = __webpack_require__(32);
|
1688 |
var disposed = false
|
1689 |
var normalizeComponent = __webpack_require__(0)
|
1690 |
/* script */
|
1730 |
|
1731 |
|
1732 |
/***/ }),
|
1733 |
+
/* 27 */
|
1734 |
/***/ (function(module, exports) {
|
1735 |
|
1736 |
// removed by extract-text-webpack-plugin
|
1737 |
|
1738 |
/***/ }),
|
1739 |
+
/* 28 */
|
1740 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1741 |
|
1742 |
"use strict";
|
1767 |
}
|
1768 |
|
1769 |
/***/ }),
|
1770 |
+
/* 29 */
|
1771 |
/***/ (function(module, exports) {
|
1772 |
|
1773 |
// removed by extract-text-webpack-plugin
|
1774 |
|
1775 |
/***/ }),
|
1776 |
+
/* 30 */
|
1777 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1778 |
|
1779 |
"use strict";
|
1818 |
}
|
1819 |
|
1820 |
/***/ }),
|
1821 |
+
/* 31 */
|
1822 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1823 |
|
1824 |
"use strict";
|
1891 |
}
|
1892 |
|
1893 |
/***/ }),
|
1894 |
+
/* 32 */
|
1895 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1896 |
|
1897 |
"use strict";
|
2377 |
}
|
2378 |
|
2379 |
/***/ }),
|
2380 |
+
/* 33 */
|
2381 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2382 |
|
2383 |
"use strict";
|
2384 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorAddressFields_vue__ = __webpack_require__(12);
|
2385 |
/* unused harmony namespace reexport */
|
2386 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9504c01e_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorAddressFields_vue__ = __webpack_require__(34);
|
2387 |
var disposed = false
|
2388 |
var normalizeComponent = __webpack_require__(0)
|
2389 |
/* script */
|
2429 |
|
2430 |
|
2431 |
/***/ }),
|
2432 |
+
/* 34 */
|
2433 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2434 |
|
2435 |
"use strict";
|
2694 |
}
|
2695 |
|
2696 |
/***/ }),
|
2697 |
+
/* 35 */
|
2698 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2699 |
|
2700 |
"use strict";
|
2701 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorPaymentFields_vue__ = __webpack_require__(13);
|
2702 |
/* unused harmony namespace reexport */
|
2703 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2ed34783_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorPaymentFields_vue__ = __webpack_require__(37);
|
2704 |
var disposed = false
|
2705 |
function injectStyle (ssrContext) {
|
2706 |
if (disposed) return
|
2707 |
+
__webpack_require__(36)
|
2708 |
}
|
2709 |
var normalizeComponent = __webpack_require__(0)
|
2710 |
/* script */
|
2750 |
|
2751 |
|
2752 |
/***/ }),
|
2753 |
+
/* 36 */
|
2754 |
/***/ (function(module, exports) {
|
2755 |
|
2756 |
// removed by extract-text-webpack-plugin
|
2757 |
|
2758 |
/***/ }),
|
2759 |
+
/* 37 */
|
2760 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
2761 |
|
2762 |
"use strict";
|
3327 |
}
|
3328 |
|
3329 |
/***/ }),
|
3330 |
+
/* 38 */
|
3331 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3332 |
+
|
3333 |
+
"use strict";
|
3334 |
+
/* harmony export (immutable) */ __webpack_exports__["c"] = setLocaleData;
|
3335 |
+
/* unused harmony export getI18n */
|
3336 |
+
/* harmony export (immutable) */ __webpack_exports__["a"] = __;
|
3337 |
+
/* unused harmony export _x */
|
3338 |
+
/* unused harmony export _n */
|
3339 |
+
/* harmony export (immutable) */ __webpack_exports__["b"] = _nx;
|
3340 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return sprintf; });
|
3341 |
+
/**
|
3342 |
+
* External dependencies
|
3343 |
+
*/
|
3344 |
+
var i18n = {};
|
3345 |
+
/**
|
3346 |
+
* Creates a new Jed instance with specified locale data configuration.
|
3347 |
+
*
|
3348 |
+
* @see http://messageformat.github.io/Jed/
|
3349 |
+
*
|
3350 |
+
* @param {Object} data Locale data configuration.
|
3351 |
+
*/
|
3352 |
+
|
3353 |
+
function setLocaleData(data) {
|
3354 |
+
var jed = new Jed(data);
|
3355 |
+
i18n[jed._textdomain] = jed;
|
3356 |
+
}
|
3357 |
+
/**
|
3358 |
+
* Returns the current Jed instance, initializing with a default configuration
|
3359 |
+
* if not already assigned.
|
3360 |
+
*
|
3361 |
+
* @return {Jed} Jed instance.
|
3362 |
+
*/
|
3363 |
+
|
3364 |
+
function getI18n() {
|
3365 |
+
var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
3366 |
+
|
3367 |
+
if (!i18n[domain]) {
|
3368 |
+
setLocaleData({
|
3369 |
+
'': {}
|
3370 |
+
});
|
3371 |
+
}
|
3372 |
+
|
3373 |
+
return i18n[domain];
|
3374 |
+
}
|
3375 |
+
/**
|
3376 |
+
* Retrieve the translation of text.
|
3377 |
+
*
|
3378 |
+
* @see https://developer.wordpress.org/reference/functions/__/
|
3379 |
+
*
|
3380 |
+
* @param {string} text Text to translate.
|
3381 |
+
* @param {string} domain Domain to retrieve the translated text.
|
3382 |
+
*
|
3383 |
+
* @return {string} Translated text.
|
3384 |
+
*/
|
3385 |
+
|
3386 |
+
function __(text, domain) {
|
3387 |
+
return getI18n(domain) ? getI18n(domain).dgettext(domain, text) : text;
|
3388 |
+
}
|
3389 |
+
/**
|
3390 |
+
* Retrieve translated string with gettext context.
|
3391 |
+
*
|
3392 |
+
* @see https://developer.wordpress.org/reference/functions/_x/
|
3393 |
+
*
|
3394 |
+
* @param {string} text Text to translate.
|
3395 |
+
* @param {string} context Context information for the translators.
|
3396 |
+
* @param {string} domain Domain to retrieve the translated text.
|
3397 |
+
*
|
3398 |
+
* @return {string} Translated context string without pipe.
|
3399 |
+
*/
|
3400 |
+
|
3401 |
+
function _x(text, context, domain) {
|
3402 |
+
return getI18n(domain).dpgettext(domain, context, text);
|
3403 |
+
}
|
3404 |
+
/**
|
3405 |
+
* Translates and retrieves the singular or plural form based on the supplied
|
3406 |
+
* number.
|
3407 |
+
*
|
3408 |
+
* @see https://developer.wordpress.org/reference/functions/_n/
|
3409 |
+
*
|
3410 |
+
* @param {string} single The text to be used if the number is singular.
|
3411 |
+
* @param {string} plural The text to be used if the number is plural.
|
3412 |
+
* @param {number} number The number to compare against to use either the
|
3413 |
+
* singular or plural form.
|
3414 |
+
* @param {string} domain Domain to retrieve the translated text.
|
3415 |
+
*
|
3416 |
+
* @return {string} The translated singular or plural form.
|
3417 |
+
*/
|
3418 |
+
|
3419 |
+
function _n(single, plural, number, domain) {
|
3420 |
+
return getI18n(domain).dngettext(domain, single, plural, number);
|
3421 |
+
}
|
3422 |
+
/**
|
3423 |
+
* Translates and retrieves the singular or plural form based on the supplied
|
3424 |
+
* number, with gettext context.
|
3425 |
+
*
|
3426 |
+
* @see https://developer.wordpress.org/reference/functions/_nx/
|
3427 |
+
*
|
3428 |
+
* @param {string} single The text to be used if the number is singular.
|
3429 |
+
* @param {string} plural The text to be used if the number is plural.
|
3430 |
+
* @param {number} number The number to compare against to use either the
|
3431 |
+
* singular or plural form.
|
3432 |
+
* @param {string} context Context information for the translators.
|
3433 |
+
* @param {string} domain Domain to retrieve the translated text.
|
3434 |
+
*
|
3435 |
+
* @return {string} The translated singular or plural form.
|
3436 |
+
*/
|
3437 |
+
|
3438 |
+
function _nx(single, plural, number, context, domain) {
|
3439 |
+
return getI18n(domain).dnpgettext(domain, context, single, plural, number);
|
3440 |
+
}
|
3441 |
+
/**
|
3442 |
+
* Returns a formatted string.
|
3443 |
+
*
|
3444 |
+
* @see http://www.diveintojavascript.com/projects/javascript-sprintf
|
3445 |
+
*
|
3446 |
+
* @type {string}
|
3447 |
+
*/
|
3448 |
+
|
3449 |
+
var sprintf = Jed.sprintf;
|
3450 |
+
|
3451 |
+
/***/ }),
|
3452 |
/* 39 */,
|
3453 |
/* 40 */,
|
3454 |
/* 41 */,
|
3477 |
/* 64 */,
|
3478 |
/* 65 */,
|
3479 |
/* 66 */,
|
3480 |
+
/* 67 */,
|
3481 |
+
/* 68 */
|
3482 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3483 |
|
3484 |
"use strict";
|
3518 |
});
|
3519 |
|
3520 |
/***/ }),
|
3521 |
+
/* 69 */
|
3522 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3523 |
|
3524 |
"use strict";
|
3534 |
});
|
3535 |
|
3536 |
/***/ }),
|
3537 |
+
/* 70 */
|
3538 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3539 |
|
3540 |
"use strict";
|
3597 |
});
|
3598 |
|
3599 |
/***/ }),
|
3600 |
+
/* 71 */
|
3601 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3602 |
|
3603 |
"use strict";
|
3764 |
});
|
3765 |
|
3766 |
/***/ }),
|
3767 |
+
/* 72 */
|
3768 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3769 |
|
3770 |
"use strict";
|
3782 |
});
|
3783 |
|
3784 |
/***/ }),
|
3785 |
+
/* 73 */
|
3786 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3787 |
|
3788 |
"use strict";
|
3851 |
});
|
3852 |
|
3853 |
/***/ }),
|
3854 |
+
/* 74 */
|
3855 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3856 |
|
3857 |
"use strict";
|
3885 |
});
|
3886 |
|
3887 |
/***/ }),
|
3888 |
+
/* 75 */
|
3889 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3890 |
|
3891 |
"use strict";
|
3928 |
});
|
3929 |
|
3930 |
/***/ }),
|
3931 |
+
/* 76 */
|
3932 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3933 |
|
3934 |
"use strict";
|
3990 |
});
|
3991 |
|
3992 |
/***/ }),
|
3993 |
+
/* 77 */,
|
3994 |
+
/* 78 */
|
3995 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3996 |
|
3997 |
"use strict";
|
4119 |
});
|
4120 |
|
4121 |
/***/ }),
|
4122 |
+
/* 79 */
|
4123 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4124 |
|
4125 |
"use strict";
|
4126 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(65);
|
4127 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__);
|
4128 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(66);
|
4129 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__);
|
4130 |
|
4131 |
|
4336 |
});
|
4337 |
|
4338 |
/***/ }),
|
4339 |
+
/* 80 */
|
4340 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4341 |
|
4342 |
"use strict";
|
4416 |
});
|
4417 |
|
4418 |
/***/ }),
|
|
|
4419 |
/* 81 */,
|
4420 |
/* 82 */,
|
4421 |
/* 83 */,
|
4493 |
/* 155 */,
|
4494 |
/* 156 */,
|
4495 |
/* 157 */,
|
4496 |
+
/* 158 */,
|
4497 |
+
/* 159 */,
|
4498 |
+
/* 160 */
|
4499 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4500 |
|
4501 |
"use strict";
|
4502 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
4503 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
4504 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(20);
|
4505 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment__ = __webpack_require__(161);
|
4506 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_moment__);
|
4507 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_notification__ = __webpack_require__(62);
|
4508 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_vue_notification___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_vue_notification__);
|
4509 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_vue_wp_list_table__ = __webpack_require__(63);
|
4510 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_vue_multiselect__ = __webpack_require__(4);
|
4511 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_vue_multiselect___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_vue_multiselect__);
|
4512 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_Api__ = __webpack_require__(165);
|
4513 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_vue_chartjs__ = __webpack_require__(14);
|
4514 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Mixin__ = __webpack_require__(166);
|
4515 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_debounce__ = __webpack_require__(2);
|
4516 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_debounce___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_debounce__);
|
4517 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare__ = __webpack_require__(167);
|
4518 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__utils_VersionCompare__);
|
4519 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_vue_content_loading__ = __webpack_require__(67);
|
4520 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_vue_content_loading___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_vue_content_loading__);
|
4521 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_admin_components_Postbox_vue__ = __webpack_require__(168);
|
4522 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_admin_components_Loading_vue__ = __webpack_require__(171);
|
4523 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_admin_components_Chart_vue__ = __webpack_require__(21);
|
4524 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_admin_components_Modal_vue__ = __webpack_require__(174);
|
4525 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_admin_components_Switches_vue__ = __webpack_require__(3);
|
4526 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_admin_components_TextEditor_vue__ = __webpack_require__(177);
|
4527 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_admin_components_Currency_vue__ = __webpack_require__(179);
|
4528 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_admin_components_LazyInput_vue__ = __webpack_require__(181);
|
4529 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_admin_components_Progressbar_vue__ = __webpack_require__(183);
|
4530 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_admin_components_Search_vue__ = __webpack_require__(186);
|
4531 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_admin_components_Datepicker_vue__ = __webpack_require__(188);
|
4532 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_vue_sweetalert2__ = __webpack_require__(77);
|
4533 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24_admin_components_ColorPicker_vue__ = __webpack_require__(23);
|
4534 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25_admin_components_GoogleMaps_vue__ = __webpack_require__(193);
|
4535 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26_admin_components_Mapbox_vue__ = __webpack_require__(196);
|
4536 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27_admin_components_UploadImage_vue__ = __webpack_require__(16);
|
4537 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28_admin_components_PasswordGenerator_vue__ = __webpack_require__(17);
|
4538 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29_admin_pages_VendorAccountFields_vue__ = __webpack_require__(26);
|
4539 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30_admin_pages_VendorAddressFields_vue__ = __webpack_require__(33);
|
4540 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31_admin_pages_VendorSocialFields_vue__ = __webpack_require__(199);
|
4541 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32_admin_pages_VendorPaymentFields_vue__ = __webpack_require__(35);
|
4542 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css__ = __webpack_require__(201);
|
4543 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_33_vue_multiselect_dist_vue_multiselect_min_css__);
|
4544 |
|
4545 |
|
4663 |
}
|
4664 |
|
4665 |
/***/ }),
|
4666 |
+
/* 161 */
|
4667 |
/***/ (function(module, exports) {
|
4668 |
|
4669 |
module.exports = moment;
|
4670 |
|
4671 |
/***/ }),
|
|
|
|
|
4672 |
/* 162 */,
|
4673 |
+
/* 163 */,
|
4674 |
+
/* 164 */,
|
4675 |
+
/* 165 */
|
4676 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4677 |
|
4678 |
"use strict";
|
4679 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__ = __webpack_require__(65);
|
4680 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_classCallCheck__);
|
4681 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__ = __webpack_require__(66);
|
4682 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_createClass__);
|
4683 |
|
4684 |
|
4756 |
/* harmony default export */ __webpack_exports__["a"] = (Dokan_API);
|
4757 |
|
4758 |
/***/ }),
|
4759 |
+
/* 166 */
|
4760 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4761 |
|
4762 |
"use strict";
|
4763 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_i18n__ = __webpack_require__(38);
|
4764 |
|
4765 |
/* harmony default export */ __webpack_exports__["a"] = ({
|
4766 |
methods: {
|
4787 |
});
|
4788 |
|
4789 |
/***/ }),
|
4790 |
+
/* 167 */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4791 |
/***/ (function(module, exports) {
|
4792 |
|
4793 |
module.exports = function versionCompare(v1, v2, operator) {
|
4915 |
};
|
4916 |
|
4917 |
/***/ }),
|
4918 |
+
/* 168 */
|
4919 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4920 |
|
4921 |
"use strict";
|
4922 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Postbox_vue__ = __webpack_require__(68);
|
4923 |
/* unused harmony namespace reexport */
|
4924 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_36a997ab_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Postbox_vue__ = __webpack_require__(170);
|
4925 |
var disposed = false
|
4926 |
function injectStyle (ssrContext) {
|
4927 |
if (disposed) return
|
4928 |
+
__webpack_require__(169)
|
4929 |
}
|
4930 |
var normalizeComponent = __webpack_require__(0)
|
4931 |
/* script */
|
4971 |
|
4972 |
|
4973 |
/***/ }),
|
4974 |
+
/* 169 */
|
4975 |
/***/ (function(module, exports) {
|
4976 |
|
4977 |
// removed by extract-text-webpack-plugin
|
4978 |
|
4979 |
/***/ }),
|
4980 |
+
/* 170 */
|
4981 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
4982 |
|
4983 |
"use strict";
|
5037 |
}
|
5038 |
|
5039 |
/***/ }),
|
5040 |
+
/* 171 */
|
5041 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5042 |
|
5043 |
"use strict";
|
5044 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Loading_vue__ = __webpack_require__(69);
|
5045 |
/* unused harmony namespace reexport */
|
5046 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_67db673c_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Loading_vue__ = __webpack_require__(173);
|
5047 |
var disposed = false
|
5048 |
function injectStyle (ssrContext) {
|
5049 |
if (disposed) return
|
5050 |
+
__webpack_require__(172)
|
5051 |
}
|
5052 |
var normalizeComponent = __webpack_require__(0)
|
5053 |
/* script */
|
5093 |
|
5094 |
|
5095 |
/***/ }),
|
5096 |
+
/* 172 */
|
5097 |
/***/ (function(module, exports) {
|
5098 |
|
5099 |
// removed by extract-text-webpack-plugin
|
5100 |
|
5101 |
/***/ }),
|
5102 |
+
/* 173 */
|
5103 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5104 |
|
5105 |
"use strict";
|
5128 |
}
|
5129 |
|
5130 |
/***/ }),
|
5131 |
+
/* 174 */
|
5132 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5133 |
|
5134 |
"use strict";
|
5135 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Modal_vue__ = __webpack_require__(70);
|
5136 |
/* unused harmony namespace reexport */
|
5137 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4bd79a2d_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Modal_vue__ = __webpack_require__(176);
|
5138 |
var disposed = false
|
5139 |
function injectStyle (ssrContext) {
|
5140 |
if (disposed) return
|
5141 |
+
__webpack_require__(175)
|
5142 |
}
|
5143 |
var normalizeComponent = __webpack_require__(0)
|
5144 |
/* script */
|
5184 |
|
5185 |
|
5186 |
/***/ }),
|
5187 |
+
/* 175 */
|
5188 |
/***/ (function(module, exports) {
|
5189 |
|
5190 |
// removed by extract-text-webpack-plugin
|
5191 |
|
5192 |
/***/ }),
|
5193 |
+
/* 176 */
|
5194 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5195 |
|
5196 |
"use strict";
|
5268 |
}
|
5269 |
|
5270 |
/***/ }),
|
5271 |
+
/* 177 */
|
5272 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5273 |
|
5274 |
"use strict";
|
5275 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_TextEditor_vue__ = __webpack_require__(71);
|
5276 |
/* unused harmony namespace reexport */
|
5277 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_70730fac_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_TextEditor_vue__ = __webpack_require__(178);
|
5278 |
var disposed = false
|
5279 |
var normalizeComponent = __webpack_require__(0)
|
5280 |
/* script */
|
5320 |
|
5321 |
|
5322 |
/***/ }),
|
5323 |
+
/* 178 */
|
5324 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5325 |
|
5326 |
"use strict";
|
5345 |
}
|
5346 |
|
5347 |
/***/ }),
|
5348 |
+
/* 179 */
|
5349 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5350 |
|
5351 |
"use strict";
|
5352 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Currency_vue__ = __webpack_require__(72);
|
5353 |
/* unused harmony namespace reexport */
|
5354 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_7df58dc1_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Currency_vue__ = __webpack_require__(180);
|
5355 |
var disposed = false
|
5356 |
var normalizeComponent = __webpack_require__(0)
|
5357 |
/* script */
|
5397 |
|
5398 |
|
5399 |
/***/ }),
|
5400 |
+
/* 180 */
|
5401 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5402 |
|
5403 |
"use strict";
|
5421 |
}
|
5422 |
|
5423 |
/***/ }),
|
5424 |
+
/* 181 */
|
5425 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5426 |
|
5427 |
"use strict";
|
5428 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_LazyInput_vue__ = __webpack_require__(73);
|
5429 |
/* unused harmony namespace reexport */
|
5430 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_588d4894_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_LazyInput_vue__ = __webpack_require__(182);
|
5431 |
var disposed = false
|
5432 |
var normalizeComponent = __webpack_require__(0)
|
5433 |
/* script */
|
5473 |
|
5474 |
|
5475 |
/***/ }),
|
5476 |
+
/* 182 */
|
5477 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5478 |
|
5479 |
"use strict";
|
5505 |
}
|
5506 |
|
5507 |
/***/ }),
|
5508 |
+
/* 183 */
|
5509 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5510 |
|
5511 |
"use strict";
|
5512 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Progressbar_vue__ = __webpack_require__(74);
|
5513 |
/* unused harmony namespace reexport */
|
5514 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_356fabc6_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Progressbar_vue__ = __webpack_require__(185);
|
5515 |
var disposed = false
|
5516 |
function injectStyle (ssrContext) {
|
5517 |
if (disposed) return
|
5518 |
+
__webpack_require__(184)
|
5519 |
}
|
5520 |
var normalizeComponent = __webpack_require__(0)
|
5521 |
/* script */
|
5561 |
|
5562 |
|
5563 |
/***/ }),
|
5564 |
+
/* 184 */
|
5565 |
/***/ (function(module, exports) {
|
5566 |
|
5567 |
// removed by extract-text-webpack-plugin
|
5568 |
|
5569 |
/***/ }),
|
5570 |
+
/* 185 */
|
5571 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5572 |
|
5573 |
"use strict";
|
5600 |
}
|
5601 |
|
5602 |
/***/ }),
|
5603 |
+
/* 186 */
|
5604 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5605 |
|
5606 |
"use strict";
|
5607 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Search_vue__ = __webpack_require__(75);
|
5608 |
/* unused harmony namespace reexport */
|
5609 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5d8365d8_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Search_vue__ = __webpack_require__(187);
|
5610 |
var disposed = false
|
5611 |
var normalizeComponent = __webpack_require__(0)
|
5612 |
/* script */
|
5652 |
|
5653 |
|
5654 |
/***/ }),
|
5655 |
+
/* 187 */
|
5656 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5657 |
|
5658 |
"use strict";
|
5700 |
}
|
5701 |
|
5702 |
/***/ }),
|
5703 |
+
/* 188 */
|
5704 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5705 |
|
5706 |
"use strict";
|
5707 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Datepicker_vue__ = __webpack_require__(76);
|
5708 |
/* unused harmony namespace reexport */
|
5709 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_ae257028_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Datepicker_vue__ = __webpack_require__(189);
|
5710 |
var disposed = false
|
5711 |
var normalizeComponent = __webpack_require__(0)
|
5712 |
/* script */
|
5752 |
|
5753 |
|
5754 |
/***/ }),
|
5755 |
+
/* 189 */
|
5756 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5757 |
|
5758 |
"use strict";
|
5782 |
}
|
5783 |
|
5784 |
/***/ }),
|
|
|
5785 |
/* 190 */,
|
5786 |
/* 191 */,
|
5787 |
+
/* 192 */,
|
5788 |
+
/* 193 */
|
5789 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5790 |
|
5791 |
"use strict";
|
5792 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_GoogleMaps_vue__ = __webpack_require__(78);
|
5793 |
/* unused harmony namespace reexport */
|
5794 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_4f45e4a0_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_GoogleMaps_vue__ = __webpack_require__(195);
|
5795 |
var disposed = false
|
5796 |
function injectStyle (ssrContext) {
|
5797 |
if (disposed) return
|
5798 |
+
__webpack_require__(194)
|
5799 |
}
|
5800 |
var normalizeComponent = __webpack_require__(0)
|
5801 |
/* script */
|
5841 |
|
5842 |
|
5843 |
/***/ }),
|
5844 |
+
/* 194 */
|
5845 |
/***/ (function(module, exports) {
|
5846 |
|
5847 |
// removed by extract-text-webpack-plugin
|
5848 |
|
5849 |
/***/ }),
|
5850 |
+
/* 195 */
|
5851 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5852 |
|
5853 |
"use strict";
|
5888 |
}
|
5889 |
|
5890 |
/***/ }),
|
5891 |
+
/* 196 */
|
5892 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5893 |
|
5894 |
"use strict";
|
5895 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Mapbox_vue__ = __webpack_require__(79);
|
5896 |
/* unused harmony namespace reexport */
|
5897 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_2fe28f9f_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Mapbox_vue__ = __webpack_require__(198);
|
5898 |
var disposed = false
|
5899 |
function injectStyle (ssrContext) {
|
5900 |
if (disposed) return
|
5901 |
+
__webpack_require__(197)
|
5902 |
}
|
5903 |
var normalizeComponent = __webpack_require__(0)
|
5904 |
/* script */
|
5944 |
|
5945 |
|
5946 |
/***/ }),
|
5947 |
+
/* 197 */
|
5948 |
/***/ (function(module, exports) {
|
5949 |
|
5950 |
// removed by extract-text-webpack-plugin
|
5951 |
|
5952 |
/***/ }),
|
5953 |
+
/* 198 */
|
5954 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5955 |
|
5956 |
"use strict";
|
6005 |
}
|
6006 |
|
6007 |
/***/ }),
|
6008 |
+
/* 199 */
|
6009 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6010 |
|
6011 |
"use strict";
|
6012 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_VendorSocialFields_vue__ = __webpack_require__(80);
|
6013 |
/* unused harmony namespace reexport */
|
6014 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_21406e92_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_VendorSocialFields_vue__ = __webpack_require__(200);
|
6015 |
var disposed = false
|
6016 |
var normalizeComponent = __webpack_require__(0)
|
6017 |
/* script */
|
6057 |
|
6058 |
|
6059 |
/***/ }),
|
6060 |
+
/* 200 */
|
6061 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6062 |
|
6063 |
"use strict";
|
6370 |
}
|
6371 |
|
6372 |
/***/ })
|
6373 |
+
],[160]);
|
assets/js/vue-frontend.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
dokanWebpack([2],{
|
2 |
|
3 |
-
/***/
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
@@ -16,7 +16,7 @@ dokanWebpack([2],{
|
|
16 |
|
17 |
/***/ }),
|
18 |
|
19 |
-
/***/
|
20 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
21 |
|
22 |
"use strict";
|
@@ -37,7 +37,7 @@ dokanWebpack([2],{
|
|
37 |
|
38 |
/***/ }),
|
39 |
|
40 |
-
/***/
|
41 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
42 |
|
43 |
"use strict";
|
@@ -56,14 +56,14 @@ dokanWebpack([2],{
|
|
56 |
|
57 |
/***/ }),
|
58 |
|
59 |
-
/***/
|
60 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
61 |
|
62 |
"use strict";
|
63 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
64 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
65 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue__ = __webpack_require__(
|
66 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__router__ = __webpack_require__(
|
67 |
|
68 |
|
69 |
|
@@ -80,17 +80,17 @@ new __WEBPACK_IMPORTED_MODULE_0_vue__["default"]({
|
|
80 |
|
81 |
/***/ }),
|
82 |
|
83 |
-
/***/
|
84 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
85 |
|
86 |
"use strict";
|
87 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(
|
88 |
/* unused harmony namespace reexport */
|
89 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_82d33a46_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(
|
90 |
var disposed = false
|
91 |
function injectStyle (ssrContext) {
|
92 |
if (disposed) return
|
93 |
-
__webpack_require__(
|
94 |
}
|
95 |
var normalizeComponent = __webpack_require__(0)
|
96 |
/* script */
|
@@ -137,14 +137,14 @@ if (false) {(function () {
|
|
137 |
|
138 |
/***/ }),
|
139 |
|
140 |
-
/***/
|
141 |
/***/ (function(module, exports) {
|
142 |
|
143 |
// removed by extract-text-webpack-plugin
|
144 |
|
145 |
/***/ }),
|
146 |
|
147 |
-
/***/
|
148 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
149 |
|
150 |
"use strict";
|
@@ -167,14 +167,14 @@ if (false) {
|
|
167 |
|
168 |
/***/ }),
|
169 |
|
170 |
-
/***/
|
171 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
172 |
|
173 |
"use strict";
|
174 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
175 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(
|
176 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_frontend_components_Home_vue__ = __webpack_require__(
|
177 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_frontend_components_Profile_vue__ = __webpack_require__(
|
178 |
|
179 |
|
180 |
|
@@ -194,17 +194,17 @@ __WEBPACK_IMPORTED_MODULE_0_vue__["default"].use(__WEBPACK_IMPORTED_MODULE_1_vue
|
|
194 |
|
195 |
/***/ }),
|
196 |
|
197 |
-
/***/
|
198 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
199 |
|
200 |
"use strict";
|
201 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Home_vue__ = __webpack_require__(
|
202 |
/* unused harmony namespace reexport */
|
203 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5f1f0bb4_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Home_vue__ = __webpack_require__(
|
204 |
var disposed = false
|
205 |
function injectStyle (ssrContext) {
|
206 |
if (disposed) return
|
207 |
-
__webpack_require__(
|
208 |
}
|
209 |
var normalizeComponent = __webpack_require__(0)
|
210 |
/* script */
|
@@ -251,14 +251,14 @@ if (false) {(function () {
|
|
251 |
|
252 |
/***/ }),
|
253 |
|
254 |
-
/***/
|
255 |
/***/ (function(module, exports) {
|
256 |
|
257 |
// removed by extract-text-webpack-plugin
|
258 |
|
259 |
/***/ }),
|
260 |
|
261 |
-
/***/
|
262 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
263 |
|
264 |
"use strict";
|
@@ -283,17 +283,17 @@ if (false) {
|
|
283 |
|
284 |
/***/ }),
|
285 |
|
286 |
-
/***/
|
287 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
288 |
|
289 |
"use strict";
|
290 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Profile_vue__ = __webpack_require__(
|
291 |
/* unused harmony namespace reexport */
|
292 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dd754238_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Profile_vue__ = __webpack_require__(
|
293 |
var disposed = false
|
294 |
function injectStyle (ssrContext) {
|
295 |
if (disposed) return
|
296 |
-
__webpack_require__(
|
297 |
}
|
298 |
var normalizeComponent = __webpack_require__(0)
|
299 |
/* script */
|
@@ -340,14 +340,14 @@ if (false) {(function () {
|
|
340 |
|
341 |
/***/ }),
|
342 |
|
343 |
-
/***/
|
344 |
/***/ (function(module, exports) {
|
345 |
|
346 |
// removed by extract-text-webpack-plugin
|
347 |
|
348 |
/***/ }),
|
349 |
|
350 |
-
/***/
|
351 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
352 |
|
353 |
"use strict";
|
@@ -372,4 +372,4 @@ if (false) {
|
|
372 |
|
373 |
/***/ })
|
374 |
|
375 |
-
},[
|
1 |
dokanWebpack([2],{
|
2 |
|
3 |
+
/***/ 41:
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
16 |
|
17 |
/***/ }),
|
18 |
|
19 |
+
/***/ 42:
|
20 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
21 |
|
22 |
"use strict";
|
37 |
|
38 |
/***/ }),
|
39 |
|
40 |
+
/***/ 43:
|
41 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
42 |
|
43 |
"use strict";
|
56 |
|
57 |
/***/ }),
|
58 |
|
59 |
+
/***/ 83:
|
60 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
61 |
|
62 |
"use strict";
|
63 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
64 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
65 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__App_vue__ = __webpack_require__(86);
|
66 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__router__ = __webpack_require__(89);
|
67 |
|
68 |
|
69 |
|
80 |
|
81 |
/***/ }),
|
82 |
|
83 |
+
/***/ 86:
|
84 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
85 |
|
86 |
"use strict";
|
87 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_App_vue__ = __webpack_require__(41);
|
88 |
/* unused harmony namespace reexport */
|
89 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_82d33a46_hasScoped_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_App_vue__ = __webpack_require__(88);
|
90 |
var disposed = false
|
91 |
function injectStyle (ssrContext) {
|
92 |
if (disposed) return
|
93 |
+
__webpack_require__(87)
|
94 |
}
|
95 |
var normalizeComponent = __webpack_require__(0)
|
96 |
/* script */
|
137 |
|
138 |
/***/ }),
|
139 |
|
140 |
+
/***/ 87:
|
141 |
/***/ (function(module, exports) {
|
142 |
|
143 |
// removed by extract-text-webpack-plugin
|
144 |
|
145 |
/***/ }),
|
146 |
|
147 |
+
/***/ 88:
|
148 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
149 |
|
150 |
"use strict";
|
167 |
|
168 |
/***/ }),
|
169 |
|
170 |
+
/***/ 89:
|
171 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
172 |
|
173 |
"use strict";
|
174 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
175 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(20);
|
176 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_frontend_components_Home_vue__ = __webpack_require__(90);
|
177 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_frontend_components_Profile_vue__ = __webpack_require__(93);
|
178 |
|
179 |
|
180 |
|
194 |
|
195 |
/***/ }),
|
196 |
|
197 |
+
/***/ 90:
|
198 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
199 |
|
200 |
"use strict";
|
201 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Home_vue__ = __webpack_require__(42);
|
202 |
/* unused harmony namespace reexport */
|
203 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_5f1f0bb4_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Home_vue__ = __webpack_require__(92);
|
204 |
var disposed = false
|
205 |
function injectStyle (ssrContext) {
|
206 |
if (disposed) return
|
207 |
+
__webpack_require__(91)
|
208 |
}
|
209 |
var normalizeComponent = __webpack_require__(0)
|
210 |
/* script */
|
251 |
|
252 |
/***/ }),
|
253 |
|
254 |
+
/***/ 91:
|
255 |
/***/ (function(module, exports) {
|
256 |
|
257 |
// removed by extract-text-webpack-plugin
|
258 |
|
259 |
/***/ }),
|
260 |
|
261 |
+
/***/ 92:
|
262 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
263 |
|
264 |
"use strict";
|
283 |
|
284 |
/***/ }),
|
285 |
|
286 |
+
/***/ 93:
|
287 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
288 |
|
289 |
"use strict";
|
290 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_Profile_vue__ = __webpack_require__(43);
|
291 |
/* unused harmony namespace reexport */
|
292 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_dd754238_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_Profile_vue__ = __webpack_require__(95);
|
293 |
var disposed = false
|
294 |
function injectStyle (ssrContext) {
|
295 |
if (disposed) return
|
296 |
+
__webpack_require__(94)
|
297 |
}
|
298 |
var normalizeComponent = __webpack_require__(0)
|
299 |
/* script */
|
340 |
|
341 |
/***/ }),
|
342 |
|
343 |
+
/***/ 94:
|
344 |
/***/ (function(module, exports) {
|
345 |
|
346 |
// removed by extract-text-webpack-plugin
|
347 |
|
348 |
/***/ }),
|
349 |
|
350 |
+
/***/ 95:
|
351 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
352 |
|
353 |
"use strict";
|
372 |
|
373 |
/***/ })
|
374 |
|
375 |
+
},[83]);
|
assets/js/vue-vendor.js
CHANGED
@@ -34,7 +34,7 @@
|
|
34 |
/******/
|
35 |
/******/ // objects to store loaded and loading chunks
|
36 |
/******/ var installedChunks = {
|
37 |
-
/******/
|
38 |
/******/ };
|
39 |
/******/
|
40 |
/******/ // The require function
|
@@ -98,7 +98,7 @@
|
|
98 |
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
99 |
/******/
|
100 |
/******/ // Load entry module and return exports
|
101 |
-
/******/ return __webpack_require__(__webpack_require__.s =
|
102 |
/******/ })
|
103 |
/************************************************************************/
|
104 |
/******/ ([
|
@@ -11026,7 +11026,7 @@ Vue$3.compile = compileToFunctions;
|
|
11026 |
|
11027 |
/* harmony default export */ __webpack_exports__["default"] = (Vue$3);
|
11028 |
|
11029 |
-
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(
|
11030 |
|
11031 |
/***/ }),
|
11032 |
/* 2 */
|
@@ -11153,8 +11153,8 @@ module.exports = g;
|
|
11153 |
"use strict";
|
11154 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
11155 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VueCharts", function() { return VueCharts; });
|
11156 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_index_js__ = __webpack_require__(
|
11157 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BaseCharts__ = __webpack_require__(
|
11158 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["a"]; });
|
11159 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalBar", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["d"]; });
|
11160 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Doughnut", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["c"]; });
|
@@ -11185,7 +11185,8 @@ var VueCharts = {
|
|
11185 |
/***/ }),
|
11186 |
/* 15 */,
|
11187 |
/* 16 */,
|
11188 |
-
/* 17
|
|
|
11189 |
/***/ (function(module, exports) {
|
11190 |
|
11191 |
// shim for using process in browser
|
@@ -11375,7 +11376,7 @@ process.umask = function() { return 0; };
|
|
11375 |
|
11376 |
|
11377 |
/***/ }),
|
11378 |
-
/*
|
11379 |
/***/ (function(module, exports) {
|
11380 |
|
11381 |
/*
|
@@ -11457,7 +11458,7 @@ function toComment(sourceMap) {
|
|
11457 |
|
11458 |
|
11459 |
/***/ }),
|
11460 |
-
/*
|
11461 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11462 |
|
11463 |
"use strict";
|
@@ -14086,11 +14087,11 @@ if (inBrowser && window.Vue) {
|
|
14086 |
|
14087 |
/* harmony default export */ __webpack_exports__["default"] = (VueRouter);
|
14088 |
|
14089 |
-
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(
|
14090 |
|
14091 |
/***/ }),
|
14092 |
-
/*
|
14093 |
-
/*
|
14094 |
/***/ (function(module, exports, __webpack_require__) {
|
14095 |
|
14096 |
/*
|
@@ -14156,7 +14157,7 @@ var singleton = null;
|
|
14156 |
var singletonCounter = 0;
|
14157 |
var stylesInsertedAtTop = [];
|
14158 |
|
14159 |
-
var fixUrls = __webpack_require__(
|
14160 |
|
14161 |
module.exports = function(list, options) {
|
14162 |
if (typeof DEBUG !== "undefined" && DEBUG) {
|
@@ -14472,7 +14473,6 @@ function updateLink (link, options, obj) {
|
|
14472 |
|
14473 |
|
14474 |
/***/ }),
|
14475 |
-
/* 22 */,
|
14476 |
/* 23 */,
|
14477 |
/* 24 */,
|
14478 |
/* 25 */,
|
@@ -14487,7 +14487,9 @@ function updateLink (link, options, obj) {
|
|
14487 |
/* 34 */,
|
14488 |
/* 35 */,
|
14489 |
/* 36 */,
|
14490 |
-
/* 37
|
|
|
|
|
14491 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14492 |
|
14493 |
"use strict";
|
@@ -14509,7 +14511,7 @@ function updateLink (link, options, obj) {
|
|
14509 |
/* unused harmony export didFilter */
|
14510 |
/* unused harmony export actions */
|
14511 |
/* unused harmony export filters */
|
14512 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createHooks__ = __webpack_require__(
|
14513 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__createHooks__["a"]; });
|
14514 |
|
14515 |
|
@@ -14537,7 +14539,7 @@ var _createHooks = Object(__WEBPACK_IMPORTED_MODULE_0__createHooks__["a" /* defa
|
|
14537 |
//# sourceMappingURL=index.js.map
|
14538 |
|
14539 |
/***/ }),
|
14540 |
-
/*
|
14541 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14542 |
|
14543 |
"use strict";
|
@@ -14576,19 +14578,19 @@ function validateHookName(hookName) {
|
|
14576 |
//# sourceMappingURL=validateHookName.js.map
|
14577 |
|
14578 |
/***/ }),
|
14579 |
-
/* 39 */,
|
14580 |
-
/* 40 */,
|
14581 |
/* 41 */,
|
14582 |
/* 42 */,
|
14583 |
/* 43 */,
|
14584 |
/* 44 */,
|
14585 |
/* 45 */,
|
14586 |
-
/* 46
|
|
|
|
|
14587 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14588 |
|
14589 |
"use strict";
|
14590 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
14591 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery__ = __webpack_require__(
|
14592 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_jquery__);
|
14593 |
//
|
14594 |
//
|
@@ -14599,7 +14601,7 @@ function validateHookName(hookName) {
|
|
14599 |
// Check if the request came from the browser and is not server rendered
|
14600 |
|
14601 |
if (typeof window !== 'undefined') {
|
14602 |
-
const slick = __webpack_require__(
|
14603 |
}
|
14604 |
|
14605 |
/* harmony default export */ __webpack_exports__["a"] = ({
|
@@ -14729,21 +14731,20 @@ if (typeof window !== 'undefined') {
|
|
14729 |
});
|
14730 |
|
14731 |
/***/ }),
|
14732 |
-
/* 47 */,
|
14733 |
-
/* 48 */,
|
14734 |
/* 49 */,
|
14735 |
/* 50 */,
|
14736 |
-
/* 51
|
|
|
14737 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14738 |
|
14739 |
"use strict";
|
14740 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Sketch_vue__ = __webpack_require__(
|
14741 |
/* unused harmony namespace reexport */
|
14742 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_511efdd0_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Sketch_vue__ = __webpack_require__(
|
14743 |
var disposed = false
|
14744 |
function injectStyle (ssrContext) {
|
14745 |
if (disposed) return
|
14746 |
-
__webpack_require__(
|
14747 |
}
|
14748 |
var normalizeComponent = __webpack_require__(0)
|
14749 |
/* script */
|
@@ -14789,16 +14790,16 @@ if (false) {(function () {
|
|
14789 |
|
14790 |
|
14791 |
/***/ }),
|
14792 |
-
/*
|
14793 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14794 |
|
14795 |
"use strict";
|
14796 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixin_color__ = __webpack_require__(
|
14797 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_EditableInput_vue__ = __webpack_require__(
|
14798 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_Saturation_vue__ = __webpack_require__(
|
14799 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_Hue_vue__ = __webpack_require__(
|
14800 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_Alpha_vue__ = __webpack_require__(
|
14801 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_Checkboard_vue__ = __webpack_require__(
|
14802 |
//
|
14803 |
//
|
14804 |
//
|
@@ -14930,7 +14931,7 @@ const presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#4
|
|
14930 |
});
|
14931 |
|
14932 |
/***/ }),
|
14933 |
-
/*
|
14934 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14935 |
|
14936 |
"use strict";
|
@@ -15031,11 +15032,11 @@ const presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#4
|
|
15031 |
});
|
15032 |
|
15033 |
/***/ }),
|
15034 |
-
/*
|
15035 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15036 |
|
15037 |
"use strict";
|
15038 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_throttle__ = __webpack_require__(
|
15039 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_throttle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_throttle__);
|
15040 |
//
|
15041 |
//
|
@@ -15144,7 +15145,7 @@ const presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#4
|
|
15144 |
});
|
15145 |
|
15146 |
/***/ }),
|
15147 |
-
/*
|
15148 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15149 |
|
15150 |
"use strict";
|
@@ -15289,11 +15290,11 @@ const presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#4
|
|
15289 |
});
|
15290 |
|
15291 |
/***/ }),
|
15292 |
-
/*
|
15293 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15294 |
|
15295 |
"use strict";
|
15296 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Checkboard_vue__ = __webpack_require__(
|
15297 |
//
|
15298 |
//
|
15299 |
//
|
@@ -15381,17 +15382,17 @@ const presetColors = ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#4
|
|
15381 |
});
|
15382 |
|
15383 |
/***/ }),
|
15384 |
-
/*
|
15385 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15386 |
|
15387 |
"use strict";
|
15388 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__ = __webpack_require__(
|
15389 |
/* unused harmony namespace reexport */
|
15390 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_550f7e4e_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__ = __webpack_require__(
|
15391 |
var disposed = false
|
15392 |
function injectStyle (ssrContext) {
|
15393 |
if (disposed) return
|
15394 |
-
__webpack_require__(
|
15395 |
}
|
15396 |
var normalizeComponent = __webpack_require__(0)
|
15397 |
/* script */
|
@@ -15437,7 +15438,7 @@ if (false) {(function () {
|
|
15437 |
|
15438 |
|
15439 |
/***/ }),
|
15440 |
-
/*
|
15441 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15442 |
|
15443 |
"use strict";
|
@@ -15523,9 +15524,9 @@ function getCheckboard(c1, c2, size) {
|
|
15523 |
}
|
15524 |
|
15525 |
/***/ }),
|
15526 |
-
/* 59 */,
|
15527 |
/* 60 */,
|
15528 |
-
/* 61
|
|
|
15529 |
/***/ (function(module, exports, __webpack_require__) {
|
15530 |
|
15531 |
(function webpackUniversalModuleDefinition(root, factory) {
|
@@ -16646,13 +16647,13 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_20__;
|
|
16646 |
//# sourceMappingURL=index.js.map
|
16647 |
|
16648 |
/***/ }),
|
16649 |
-
/*
|
16650 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
16651 |
|
16652 |
"use strict";
|
16653 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
16654 |
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["install"] = install;
|
16655 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_ListTable_vue__ = __webpack_require__(
|
16656 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ListTable", function() { return __WEBPACK_IMPORTED_MODULE_0__components_ListTable_vue__["a"]; });
|
16657 |
|
16658 |
|
@@ -16690,7 +16691,7 @@ if (GlobalVue) {
|
|
16690 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(5)))
|
16691 |
|
16692 |
/***/ }),
|
16693 |
-
/*
|
16694 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
16695 |
|
16696 |
"use strict";
|
@@ -17056,7 +17057,7 @@ if (GlobalVue) {
|
|
17056 |
});
|
17057 |
|
17058 |
/***/ }),
|
17059 |
-
/*
|
17060 |
/***/ (function(module, exports) {
|
17061 |
|
17062 |
function _classCallCheck(instance, Constructor) {
|
@@ -17068,7 +17069,7 @@ function _classCallCheck(instance, Constructor) {
|
|
17068 |
module.exports = _classCallCheck;
|
17069 |
|
17070 |
/***/ }),
|
17071 |
-
/*
|
17072 |
/***/ (function(module, exports) {
|
17073 |
|
17074 |
function _defineProperties(target, props) {
|
@@ -17090,14 +17091,13 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
17090 |
module.exports = _createClass;
|
17091 |
|
17092 |
/***/ }),
|
17093 |
-
/*
|
17094 |
/***/ (function(module, exports, __webpack_require__) {
|
17095 |
|
17096 |
!function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueContentLoading=e():t.VueContentLoading=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(t,e,n){"use strict";var r=function(t){return/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/.test(t)};e.a={props:{speed:{default:2,type:Number},width:{default:400,type:Number},height:{default:130,type:Number},primary:{type:String,default:"#f0f0f0",validator:r},secondary:{type:String,default:"#e0e0e0",validator:r}},computed:{viewbox:function(){return"0 0 "+this.width+" "+this.height},formatedSpeed:function(){return this.speed+"s"},gradientId:function(){return"gradient-"+this._uid},clipPathId:function(){return"clipPath-"+this._uid}},template:'\n <svg :viewBox="viewbox" preserveAspectRatio="xMidYMid meet">\n <rect\n :style="{ fill: \'url(#\' + gradientId + \')\' }" \n :clip-path="\'url(#\' + clipPathId + \')\'"\n x="0" \n y="0" \n :width="width" \n :height="height" \n />\n\n <defs>\n <clipPath :id="clipPathId">\n <slot>\n <rect x="0" y="0" rx="5" ry="5" width="70" height="70" />\n <rect x="80" y="17" rx="4" ry="4" width="300" height="13" />\n <rect x="80" y="40" rx="3" ry="3" width="250" height="10" />\n <rect x="0" y="80" rx="3" ry="3" width="350" height="10" />\n <rect x="0" y="100" rx="3" ry="3" width="400" height="10" />\n <rect x="0" y="120" rx="3" ry="3" width="360" height="10" />\n </slot>\n </clipPath>\n\n <linearGradient :id="gradientId">\n <stop offset="0%" :stop-color="primary">\n <animate attributeName="offset" values="-2; 1" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n\n <stop offset="50%" :stop-color="secondary">\n <animate attributeName="offset" values="-1.5; 1.5" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n\n <stop offset="100%" :stop-color="primary">\n <animate attributeName="offset" values="-1; 2" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n </linearGradient>\n </defs>\n </svg>\n '}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(2),o=n(3),h=n(4),d=n(5),a=n(6),c=n(7);n.d(e,"VclCode",function(){return i.a}),n.d(e,"VclList",function(){return o.a}),n.d(e,"VclTwitch",function(){return h.a}),n.d(e,"VclFacebook",function(){return d.a}),n.d(e,"VclInstagram",function(){return a.a}),n.d(e,"VclBulletList",function(){return c.a}),n.d(e,"VueContentLoading",function(){return r.a}),e.default=r.a},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="80">\n <rect x="0" y="0" rx="3" ry="3" width="70" height="10" />\n <rect x="80" y="0" rx="3" ry="3" width="100" height="10" />\n <rect x="190" y="0" rx="3" ry="3" width="10" height="10" />\n <rect x="15" y="20" rx="3" ry="3" width="130" height="10" />\n <rect x="155" y="20" rx="3" ry="3" width="130" height="10" />\n <rect x="15" y="40" rx="3" ry="3" width="90" height="10" />\n <rect x="115" y="40" rx="3" ry="3" width="60" height="10" />\n <rect x="185" y="40" rx="3" ry="3" width="60" height="10" />\n <rect x="0" y="60" rx="3" ry="3" width="30" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="120">\n <rect x="0" y="0" rx="3" ry="3" width="250" height="10" />\n <rect x="20" y="20" rx="3" ry="3" width="220" height="10" />\n <rect x="20" y="40" rx="3" ry="3" width="170" height="10" />\n <rect x="0" y="60" rx="3" ry="3" width="250" height="10" />\n <rect x="20" y="80" rx="3" ry="3" width="200" height="10" />\n <rect x="20" y="100" rx="3" ry="3" width="80" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="225">\n <rect x="0" y="0" rx="3" ry="3" width="300" height="170" />\n <rect x="0" y="180" rx="2" ry="2" width="35" height="45" />\n <rect x="45" y="180" rx="2" ry="2" width="150" height="15" />\n <rect x="45" y="203" rx="2" ry="2" width="100" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs">\n <rect x="0" y="0" rx="5" ry="5" width="70" height="70" />\n <rect x="80" y="17" rx="4" ry="4" width="300" height="13" />\n <rect x="80" y="40" rx="3" ry="3" width="250" height="10" />\n <rect x="0" y="80" rx="3" ry="3" width="350" height="10" />\n <rect x="0" y="100" rx="3" ry="3" width="400" height="10" />\n <rect x="0" y="120" rx="3" ry="3" width="360" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :height="480">\n <circle cx="30" cy="30" r="30" />\n <rect x="75" y="13" rx="4" ry="4" width="100" height="13" />\n <rect x="75" y="37" rx="4" ry="4" width="50" height="8" />\n <rect x="0" y="70" rx="5" ry="5" width="400" height="400" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},props:{rows:{default:5,type:Number}},computed:{height:function(){return 21*this.rows}},methods:{getYPos:function(t,e){return e+22*(t-1)}},template:'\n <vue-content-loading v-bind="$attrs" :width="230" :height="height">\n <template v-for="i in rows">\n <circle cx="8" :cy="getYPos(i, 8)" r="8" />\n <rect x="22" :y="getYPos(i, 3)" rx="3" ry="3" width="200" height="9" />\n </template>\n </vue-content-loading>\n '}}])});
|
17097 |
//# sourceMappingURL=vuecontentloading.js.map
|
17098 |
|
17099 |
/***/ }),
|
17100 |
-
/* 67 */,
|
17101 |
/* 68 */,
|
17102 |
/* 69 */,
|
17103 |
/* 70 */,
|
@@ -17106,14 +17106,15 @@ module.exports = _createClass;
|
|
17106 |
/* 73 */,
|
17107 |
/* 74 */,
|
17108 |
/* 75 */,
|
17109 |
-
/* 76
|
|
|
17110 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17111 |
|
17112 |
"use strict";
|
17113 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
17114 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js__ = __webpack_require__(
|
17115 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js__);
|
17116 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css__ = __webpack_require__(
|
17117 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css__);
|
17118 |
// @ts-check
|
17119 |
/** @type swal {import("sweetalert2")} */
|
@@ -17155,10 +17156,10 @@ VueSweetalert2.install = function (Vue, options) {
|
|
17155 |
|
17156 |
|
17157 |
/***/ }),
|
17158 |
-
/* 77 */,
|
17159 |
/* 78 */,
|
17160 |
/* 79 */,
|
17161 |
-
/* 80
|
|
|
17162 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17163 |
|
17164 |
"use strict";
|
@@ -17190,8 +17191,9 @@ function validateNamespace(namespace) {
|
|
17190 |
//# sourceMappingURL=validateNamespace.js.map
|
17191 |
|
17192 |
/***/ }),
|
17193 |
-
/*
|
17194 |
-
/*
|
|
|
17195 |
/***/ (function(module, exports, __webpack_require__) {
|
17196 |
|
17197 |
/* WEBPACK VAR INJECTION */(function(global) {var apply = Function.prototype.apply;
|
@@ -17244,7 +17246,7 @@ exports._unrefActive = exports.active = function(item) {
|
|
17244 |
};
|
17245 |
|
17246 |
// setimmediate attaches itself to the global object
|
17247 |
-
__webpack_require__(
|
17248 |
// On some exotic environments, it's not clear which object `setimmeidate` was
|
17249 |
// able to install onto. Search each possibility in the same order as the
|
17250 |
// `setimmediate` library.
|
@@ -17258,7 +17260,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
|
|
17258 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
17259 |
|
17260 |
/***/ }),
|
17261 |
-
/*
|
17262 |
/***/ (function(module, exports, __webpack_require__) {
|
17263 |
|
17264 |
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
|
@@ -17448,11 +17450,9 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
|
|
17448 |
attachTo.clearImmediate = clearImmediate;
|
17449 |
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
17450 |
|
17451 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(
|
17452 |
|
17453 |
/***/ }),
|
17454 |
-
/* 84 */,
|
17455 |
-
/* 85 */,
|
17456 |
/* 86 */,
|
17457 |
/* 87 */,
|
17458 |
/* 88 */,
|
@@ -17466,7 +17466,9 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
|
|
17466 |
/* 96 */,
|
17467 |
/* 97 */,
|
17468 |
/* 98 */,
|
17469 |
-
/* 99
|
|
|
|
|
17470 |
/***/ (function(module, exports) {
|
17471 |
|
17472 |
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
@@ -17488,9 +17490,9 @@ function _typeof(obj) {
|
|
17488 |
module.exports = _typeof;
|
17489 |
|
17490 |
/***/ }),
|
17491 |
-
/*
|
17492 |
-
/*
|
17493 |
-
/*
|
17494 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17495 |
|
17496 |
"use strict";
|
@@ -17578,7 +17580,7 @@ var reactiveProp = {
|
|
17578 |
});
|
17579 |
|
17580 |
/***/ }),
|
17581 |
-
/*
|
17582 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17583 |
|
17584 |
"use strict";
|
@@ -17591,7 +17593,7 @@ var reactiveProp = {
|
|
17591 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return Radar; });
|
17592 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Bubble; });
|
17593 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return Scatter; });
|
17594 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chart_js__ = __webpack_require__(
|
17595 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chart_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_chart_js__);
|
17596 |
|
17597 |
|
@@ -17686,23 +17688,23 @@ var Scatter = generateChart('scatter-chart', 'scatter');
|
|
17686 |
});
|
17687 |
|
17688 |
/***/ }),
|
17689 |
-
/*
|
17690 |
/***/ (function(module, exports) {
|
17691 |
|
17692 |
module.exports = Chart;
|
17693 |
|
17694 |
/***/ }),
|
17695 |
-
/* 105 */,
|
17696 |
-
/* 106 */,
|
17697 |
/* 107 */,
|
17698 |
/* 108 */,
|
17699 |
/* 109 */,
|
17700 |
/* 110 */,
|
17701 |
-
/* 111
|
|
|
|
|
17702 |
/***/ (function(module, exports, __webpack_require__) {
|
17703 |
|
17704 |
|
17705 |
-
var content = __webpack_require__(
|
17706 |
|
17707 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
17708 |
|
@@ -17716,7 +17718,7 @@ var options = {"hmr":true}
|
|
17716 |
options.transform = transform
|
17717 |
options.insertInto = undefined;
|
17718 |
|
17719 |
-
var update = __webpack_require__(
|
17720 |
|
17721 |
if(content.locals) module.exports = content.locals;
|
17722 |
|
@@ -17748,10 +17750,10 @@ if(false) {
|
|
17748 |
}
|
17749 |
|
17750 |
/***/ }),
|
17751 |
-
/*
|
17752 |
/***/ (function(module, exports, __webpack_require__) {
|
17753 |
|
17754 |
-
exports = module.exports = __webpack_require__(
|
17755 |
// imports
|
17756 |
|
17757 |
|
@@ -17762,7 +17764,7 @@ exports.push([module.i, "/* Slider */\n.slick-slider\n{\n position: relative;
|
|
17762 |
|
17763 |
|
17764 |
/***/ }),
|
17765 |
-
/*
|
17766 |
/***/ (function(module, exports) {
|
17767 |
|
17768 |
|
@@ -17857,13 +17859,13 @@ module.exports = function (css) {
|
|
17857 |
|
17858 |
|
17859 |
/***/ }),
|
17860 |
-
/*
|
17861 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17862 |
|
17863 |
"use strict";
|
17864 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_slickCarousel_vue__ = __webpack_require__(
|
17865 |
/* unused harmony namespace reexport */
|
17866 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_14c5b163_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_slickCarousel_vue__ = __webpack_require__(
|
17867 |
var disposed = false
|
17868 |
var normalizeComponent = __webpack_require__(0)
|
17869 |
/* script */
|
@@ -17909,7 +17911,7 @@ if (false) {(function () {
|
|
17909 |
|
17910 |
|
17911 |
/***/ }),
|
17912 |
-
/*
|
17913 |
/***/ (function(module, exports, __webpack_require__) {
|
17914 |
|
17915 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
@@ -17932,7 +17934,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
17932 |
;(function(factory) {
|
17933 |
'use strict';
|
17934 |
if (true) {
|
17935 |
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(
|
17936 |
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
17937 |
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
17938 |
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
@@ -20929,7 +20931,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
20929 |
|
20930 |
|
20931 |
/***/ }),
|
20932 |
-
/*
|
20933 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
20934 |
|
20935 |
"use strict";
|
@@ -20951,15 +20953,15 @@ if (false) {
|
|
20951 |
}
|
20952 |
|
20953 |
/***/ }),
|
20954 |
-
/* 117 */,
|
20955 |
-
/* 118 */,
|
20956 |
/* 119 */,
|
20957 |
/* 120 */,
|
20958 |
/* 121 */,
|
20959 |
/* 122 */,
|
20960 |
/* 123 */,
|
20961 |
/* 124 */,
|
20962 |
-
/* 125
|
|
|
|
|
20963 |
/***/ (function(module, exports) {
|
20964 |
|
20965 |
function _defineProperty(obj, key, value) {
|
@@ -20980,14 +20982,14 @@ function _defineProperty(obj, key, value) {
|
|
20980 |
module.exports = _defineProperty;
|
20981 |
|
20982 |
/***/ }),
|
20983 |
-
/*
|
20984 |
/***/ (function(module, exports, __webpack_require__) {
|
20985 |
|
20986 |
-
var arrayWithHoles = __webpack_require__(
|
20987 |
|
20988 |
-
var iterableToArrayLimit = __webpack_require__(
|
20989 |
|
20990 |
-
var nonIterableRest = __webpack_require__(
|
20991 |
|
20992 |
function _slicedToArray(arr, i) {
|
20993 |
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
@@ -20996,7 +20998,7 @@ function _slicedToArray(arr, i) {
|
|
20996 |
module.exports = _slicedToArray;
|
20997 |
|
20998 |
/***/ }),
|
20999 |
-
/*
|
21000 |
/***/ (function(module, exports) {
|
21001 |
|
21002 |
function _arrayWithHoles(arr) {
|
@@ -21006,7 +21008,7 @@ function _arrayWithHoles(arr) {
|
|
21006 |
module.exports = _arrayWithHoles;
|
21007 |
|
21008 |
/***/ }),
|
21009 |
-
/*
|
21010 |
/***/ (function(module, exports) {
|
21011 |
|
21012 |
function _iterableToArrayLimit(arr, i) {
|
@@ -21038,7 +21040,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
21038 |
module.exports = _iterableToArrayLimit;
|
21039 |
|
21040 |
/***/ }),
|
21041 |
-
/*
|
21042 |
/***/ (function(module, exports) {
|
21043 |
|
21044 |
function _nonIterableRest() {
|
@@ -21048,17 +21050,17 @@ function _nonIterableRest() {
|
|
21048 |
module.exports = _nonIterableRest;
|
21049 |
|
21050 |
/***/ }),
|
21051 |
-
/*
|
21052 |
/***/ (function(module, exports) {
|
21053 |
|
21054 |
// removed by extract-text-webpack-plugin
|
21055 |
|
21056 |
/***/ }),
|
21057 |
-
/*
|
21058 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
21059 |
|
21060 |
"use strict";
|
21061 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinycolor2__ = __webpack_require__(
|
21062 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinycolor2___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_tinycolor2__);
|
21063 |
|
21064 |
|
@@ -21167,7 +21169,7 @@ function _colorChange (data, oldHue) {
|
|
21167 |
|
21168 |
|
21169 |
/***/ }),
|
21170 |
-
/*
|
21171 |
/***/ (function(module, exports, __webpack_require__) {
|
21172 |
|
21173 |
var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
|
@@ -22369,17 +22371,17 @@ else {
|
|
22369 |
|
22370 |
|
22371 |
/***/ }),
|
22372 |
-
/*
|
22373 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22374 |
|
22375 |
"use strict";
|
22376 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__ = __webpack_require__(
|
22377 |
/* unused harmony namespace reexport */
|
22378 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_6a3fe6f4_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__ = __webpack_require__(
|
22379 |
var disposed = false
|
22380 |
function injectStyle (ssrContext) {
|
22381 |
if (disposed) return
|
22382 |
-
__webpack_require__(
|
22383 |
}
|
22384 |
var normalizeComponent = __webpack_require__(0)
|
22385 |
/* script */
|
@@ -22425,13 +22427,13 @@ if (false) {(function () {
|
|
22425 |
|
22426 |
|
22427 |
/***/ }),
|
22428 |
-
/*
|
22429 |
/***/ (function(module, exports) {
|
22430 |
|
22431 |
// removed by extract-text-webpack-plugin
|
22432 |
|
22433 |
/***/ }),
|
22434 |
-
/*
|
22435 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22436 |
|
22437 |
"use strict";
|
@@ -22479,17 +22481,17 @@ if (false) {
|
|
22479 |
}
|
22480 |
|
22481 |
/***/ }),
|
22482 |
-
/*
|
22483 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22484 |
|
22485 |
"use strict";
|
22486 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Saturation_vue__ = __webpack_require__(
|
22487 |
/* unused harmony namespace reexport */
|
22488 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_c6d01d7c_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Saturation_vue__ = __webpack_require__(
|
22489 |
var disposed = false
|
22490 |
function injectStyle (ssrContext) {
|
22491 |
if (disposed) return
|
22492 |
-
__webpack_require__(
|
22493 |
}
|
22494 |
var normalizeComponent = __webpack_require__(0)
|
22495 |
/* script */
|
@@ -22535,13 +22537,13 @@ if (false) {(function () {
|
|
22535 |
|
22536 |
|
22537 |
/***/ }),
|
22538 |
-
/*
|
22539 |
/***/ (function(module, exports) {
|
22540 |
|
22541 |
// removed by extract-text-webpack-plugin
|
22542 |
|
22543 |
/***/ }),
|
22544 |
-
/*
|
22545 |
/***/ (function(module, exports, __webpack_require__) {
|
22546 |
|
22547 |
/* WEBPACK VAR INJECTION */(function(global) {/**
|
@@ -22987,7 +22989,7 @@ module.exports = throttle;
|
|
22987 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
22988 |
|
22989 |
/***/ }),
|
22990 |
-
/*
|
22991 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22992 |
|
22993 |
"use strict";
|
@@ -23035,17 +23037,17 @@ if (false) {
|
|
23035 |
}
|
23036 |
|
23037 |
/***/ }),
|
23038 |
-
/*
|
23039 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23040 |
|
23041 |
"use strict";
|
23042 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Hue_vue__ = __webpack_require__(
|
23043 |
/* unused harmony namespace reexport */
|
23044 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_61a5b2b8_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Hue_vue__ = __webpack_require__(
|
23045 |
var disposed = false
|
23046 |
function injectStyle (ssrContext) {
|
23047 |
if (disposed) return
|
23048 |
-
__webpack_require__(
|
23049 |
}
|
23050 |
var normalizeComponent = __webpack_require__(0)
|
23051 |
/* script */
|
@@ -23091,13 +23093,13 @@ if (false) {(function () {
|
|
23091 |
|
23092 |
|
23093 |
/***/ }),
|
23094 |
-
/*
|
23095 |
/***/ (function(module, exports) {
|
23096 |
|
23097 |
// removed by extract-text-webpack-plugin
|
23098 |
|
23099 |
/***/ }),
|
23100 |
-
/*
|
23101 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23102 |
|
23103 |
"use strict";
|
@@ -23142,17 +23144,17 @@ if (false) {
|
|
23142 |
}
|
23143 |
|
23144 |
/***/ }),
|
23145 |
-
/*
|
23146 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23147 |
|
23148 |
"use strict";
|
23149 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Alpha_vue__ = __webpack_require__(
|
23150 |
/* unused harmony namespace reexport */
|
23151 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_fc5ffbc4_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Alpha_vue__ = __webpack_require__(
|
23152 |
var disposed = false
|
23153 |
function injectStyle (ssrContext) {
|
23154 |
if (disposed) return
|
23155 |
-
__webpack_require__(
|
23156 |
}
|
23157 |
var normalizeComponent = __webpack_require__(0)
|
23158 |
/* script */
|
@@ -23198,19 +23200,19 @@ if (false) {(function () {
|
|
23198 |
|
23199 |
|
23200 |
/***/ }),
|
23201 |
-
/*
|
23202 |
/***/ (function(module, exports) {
|
23203 |
|
23204 |
// removed by extract-text-webpack-plugin
|
23205 |
|
23206 |
/***/ }),
|
23207 |
-
/*
|
23208 |
/***/ (function(module, exports) {
|
23209 |
|
23210 |
// removed by extract-text-webpack-plugin
|
23211 |
|
23212 |
/***/ }),
|
23213 |
-
/*
|
23214 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23215 |
|
23216 |
"use strict";
|
@@ -23232,7 +23234,7 @@ if (false) {
|
|
23232 |
}
|
23233 |
|
23234 |
/***/ }),
|
23235 |
-
/*
|
23236 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23237 |
|
23238 |
"use strict";
|
@@ -23289,7 +23291,7 @@ if (false) {
|
|
23289 |
}
|
23290 |
|
23291 |
/***/ }),
|
23292 |
-
/*
|
23293 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23294 |
|
23295 |
"use strict";
|
@@ -23479,8 +23481,6 @@ if (false) {
|
|
23479 |
}
|
23480 |
|
23481 |
/***/ }),
|
23482 |
-
/* 149 */,
|
23483 |
-
/* 150 */,
|
23484 |
/* 151 */,
|
23485 |
/* 152 */,
|
23486 |
/* 153 */,
|
@@ -23490,17 +23490,19 @@ if (false) {
|
|
23490 |
/* 157 */,
|
23491 |
/* 158 */,
|
23492 |
/* 159 */,
|
23493 |
-
/* 160
|
|
|
|
|
23494 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23495 |
|
23496 |
"use strict";
|
23497 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_ListTable_vue__ = __webpack_require__(
|
23498 |
/* unused harmony namespace reexport */
|
23499 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_2562096c_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_ListTable_vue__ = __webpack_require__(
|
23500 |
var disposed = false
|
23501 |
function injectStyle (ssrContext) {
|
23502 |
if (disposed) return
|
23503 |
-
__webpack_require__(
|
23504 |
}
|
23505 |
var normalizeComponent = __webpack_require__(0)
|
23506 |
/* script */
|
@@ -23546,13 +23548,13 @@ if (false) {(function () {
|
|
23546 |
|
23547 |
|
23548 |
/***/ }),
|
23549 |
-
/*
|
23550 |
/***/ (function(module, exports) {
|
23551 |
|
23552 |
// removed by extract-text-webpack-plugin
|
23553 |
|
23554 |
/***/ }),
|
23555 |
-
/*
|
23556 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23557 |
|
23558 |
"use strict";
|
@@ -24317,8 +24319,6 @@ if (false) {
|
|
24317 |
}
|
24318 |
|
24319 |
/***/ }),
|
24320 |
-
/* 163 */,
|
24321 |
-
/* 164 */,
|
24322 |
/* 165 */,
|
24323 |
/* 166 */,
|
24324 |
/* 167 */,
|
@@ -24343,17 +24343,18 @@ if (false) {
|
|
24343 |
/* 186 */,
|
24344 |
/* 187 */,
|
24345 |
/* 188 */,
|
24346 |
-
/* 189
|
|
|
24347 |
/***/ (function(module, exports, __webpack_require__) {
|
24348 |
|
24349 |
!function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t,n){return(l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&u(i,n.prototype),i}).apply(null,arguments)}function d(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var t="SweetAlert2:",f=function(e){return Array.prototype.slice.call(e)},R=function(e){console.warn("".concat(t," ").concat(e))},I=function(e){console.error("".concat(t," ").concat(e))},n=[],m=function(e){-1===n.indexOf(e)&&(n.push(e),R(e))},H=function(e){return"function"==typeof e?e():e},D=function(e){return e&&Promise.resolve(e)===e},e=Object.freeze({cancel:"cancel",backdrop:"overlay",close:"close",esc:"esc",timer:"timer"}),h=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},_=h(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","toast-column","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","icon-text","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl"]),g=h(["success","warning","info","question","error"]),b={previousBodyPadding:null},v=function(e,t){return e.classList.contains(t)},N=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},y=function(e,t,n){e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(function(t){e.forEach?e.forEach(function(e){n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},z=function(e,t){y(e,t,!0)},W=function(e,t){y(e,t,!1)},U=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(v(e.childNodes[n],t))return e.childNodes[n]},K=function(e){e.style.opacity="",e.style.display=e.id===_.content?"block":"flex"},F=function(e){e.style.opacity="",e.style.display="none"},Z=function(e){return e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w=function(){return document.body.querySelector("."+_.container)},C=function(e){var t=w();return t?t.querySelector("."+e):null},k=function(){return C(_.popup)},x=function(){var e=k();return f(e.querySelectorAll("."+_.icon))},A=function(){return C(_.title)},B=function(){return C(_.content)},S=function(){return C(_.image)},P=function(){return C(_.progresssteps)},E=function(){return C(_["validation-message"])},L=function(){return C(_.confirm)},O=function(){return C(_.cancel)},Q=function(){return C(_.actions)},Y=function(){return C(_.footer)},$=function(){return C(_.close)},J=function(){var e=f(k().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))<e?1:e<t?-1:0}),t=f(k().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function(e){return"-1"!==e.getAttribute("tabindex")});return function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(e.concat(t)).filter(function(e){return Z(e)})},T=function(){return!M()&&!document.body.classList.contains(_["no-backdrop"])},M=function(){return document.body.classList.contains(_["toast-shown"])},j=function(){return"undefined"==typeof window||"undefined"==typeof document},V='\n <div aria-labelledby="'.concat(_.title,'" aria-describedby="').concat(_.content,'" class="').concat(_.popup,'" tabindex="-1">\n <div class="').concat(_.header,'">\n <ul class="').concat(_.progresssteps,'"></ul>\n <div class="').concat(_.icon," ").concat(g.error,'">\n <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n </div>\n <div class="').concat(_.icon," ").concat(g.question,'">\n <span class="').concat(_["icon-text"],'">?</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.warning,'">\n <span class="').concat(_["icon-text"],'">!</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.info,'">\n <span class="').concat(_["icon-text"],'">i</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.success,'">\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n </div>\n <img class="').concat(_.image,'" />\n <h2 class="').concat(_.title,'" id="').concat(_.title,'"></h2>\n <button type="button" class="').concat(_.close,'">×</button>\n </div>\n <div class="').concat(_.content,'">\n <div id="').concat(_.content,'"></div>\n <input class="').concat(_.input,'" />\n <input type="file" class="').concat(_.file,'" />\n <div class="').concat(_.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(_.select,'"></select>\n <div class="').concat(_.radio,'"></div>\n <label for="').concat(_.checkbox,'" class="').concat(_.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(_.label,'"></span>\n </label>\n <textarea class="').concat(_.textarea,'"></textarea>\n <div class="').concat(_["validation-message"],'" id="').concat(_["validation-message"],'"></div>\n </div>\n <div class="').concat(_.actions,'">\n <button type="button" class="').concat(_.confirm,'">OK</button>\n <button type="button" class="').concat(_.cancel,'">Cancel</button>\n </div>\n <div class="').concat(_.footer,'">\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),X=function(e){var t=w();if(t&&(t.parentNode.removeChild(t),W([document.documentElement,document.body],[_["no-backdrop"],_["toast-shown"],_["has-column"]])),!j()){var n=document.createElement("div");n.className=_.container,n.innerHTML=V;var o="string"==typeof e.target?document.querySelector(e.target):e.target;o.appendChild(n);var i,r=k(),a=B(),s=U(a,_.input),c=U(a,_.file),u=a.querySelector(".".concat(_.range," input")),l=a.querySelector(".".concat(_.range," output")),d=U(a,_.select),p=a.querySelector(".".concat(_.checkbox," input")),f=U(a,_.textarea);r.setAttribute("role",e.toast?"alert":"dialog"),r.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||r.setAttribute("aria-modal","true"),"rtl"===window.getComputedStyle(o).direction&&z(w(),_.rtl);var m=function(e){De.isVisible()&&i!==e.target.value&&De.resetValidationMessage(),i=e.target.value};return s.oninput=m,c.onchange=m,d.onchange=m,p.onchange=m,f.oninput=m,u.oninput=function(e){m(e),l.value=u.value},u.onchange=function(e){m(e),u.nextSibling.value=u.value},r}I("SweetAlert2 requires document to initialize")},G=function(e,t){if(!e)return F(t);if(e instanceof HTMLElement)t.appendChild(e);else if("object"===q(e))if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));else e&&(t.innerHTML=e);K(t)},ee=function(){if(j())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1}(),te=function(e){var t=Q(),n=L(),o=O();if(e.showConfirmButton||e.showCancelButton?K(t):F(t),e.showCancelButton?o.style.display="inline-block":F(o),e.showConfirmButton?n.style.removeProperty("display"):F(n),n.innerHTML=e.confirmButtonText,o.innerHTML=e.cancelButtonText,n.setAttribute("aria-label",e.confirmButtonAriaLabel),o.setAttribute("aria-label",e.cancelButtonAriaLabel),n.className=_.confirm,z(n,e.confirmButtonClass),o.className=_.cancel,z(o,e.cancelButtonClass),e.buttonsStyling){z([n,o],_.styled),e.confirmButtonColor&&(n.style.backgroundColor=e.confirmButtonColor),e.cancelButtonColor&&(o.style.backgroundColor=e.cancelButtonColor);var i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.borderLeftColor=i,n.style.borderRightColor=i}else W([n,o],_.styled),n.style.backgroundColor=n.style.borderLeftColor=n.style.borderRightColor="",o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor=""},ne=function(e){var t=B().querySelector("#"+_.content);e.html?G(e.html,t):e.text?(t.textContent=e.text,K(t)):F(t)},oe=function(e){for(var t=x(),n=0;n<t.length;n++)F(t[n]);if(e.type)if(-1!==Object.keys(g).indexOf(e.type)){var o=De.getPopup().querySelector(".".concat(_.icon,".").concat(g[e.type]));K(o),e.animation&&z(o,"swal2-animate-".concat(e.type,"-icon"))}else I('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type,'"'))},ie=function(e){var t=S();e.imageUrl?(t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),K(t),e.imageWidth?t.setAttribute("width",e.imageWidth):t.removeAttribute("width"),e.imageHeight?t.setAttribute("height",e.imageHeight):t.removeAttribute("height"),t.className=_.image,e.imageClass&&z(t,e.imageClass)):F(t)},re=function(i){var r=P(),a=parseInt(null===i.currentProgressStep?De.getQueueStep():i.currentProgressStep,10);i.progressSteps&&i.progressSteps.length?(K(r),r.innerHTML="",a>=i.progressSteps.length&&R("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),i.progressSteps.forEach(function(e,t){var n=document.createElement("li");if(z(n,_.progresscircle),n.innerHTML=e,t===a&&z(n,_.activeprogressstep),r.appendChild(n),t!==i.progressSteps.length-1){var o=document.createElement("li");z(o,_.progressline),i.progressStepsDistance&&(o.style.width=i.progressStepsDistance),r.appendChild(o)}})):F(r)},ae=function(e){var t=A();e.titleText?t.innerText=e.titleText:e.title&&("string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),G(e.title,t))},se=function(){null===b.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(b.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=b.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},ce=function(){return!!window.MSInputMethodContext&&!!document.documentMode},ue=function(){var e=w(),t=k();e.style.removeProperty("align-items"),t.offsetTop<0&&(e.style.alignItems="flex-start")},le={},de=function(e,t){var n=w(),o=k();if(o){null!==e&&"function"==typeof e&&e(o),W(o,_.show),z(o,_.hide);var i=function(){M()?pe(t):(new Promise(function(e){var t=window.scrollX,n=window.scrollY;le.restoreFocusTimeout=setTimeout(function(){le.previousActiveElement&&le.previousActiveElement.focus?(le.previousActiveElement.focus(),le.previousActiveElement=null):document.body&&document.body.focus(),e()},100),void 0!==t&&void 0!==n&&window.scrollTo(t,n)}).then(function(){return pe(t)}),le.keydownTarget.removeEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!1),n.parentNode&&n.parentNode.removeChild(n),W([document.documentElement,document.body],[_.shown,_["height-auto"],_["no-backdrop"],_["toast-shown"],_["toast-column"]]),T()&&(null!==b.previousBodyPadding&&(document.body.style.paddingRight=b.previousBodyPadding,b.previousBodyPadding=null),function(){if(v(document.body,_.iosfix)){var e=parseInt(document.body.style.top,10);W(document.body,_.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}}(),"undefined"!=typeof window&&ce()&&window.removeEventListener("resize",ue),f(document.body.children).forEach(function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))};ee&&!v(o,_.noanimation)?o.addEventListener(ee,function e(){o.removeEventListener(ee,e),v(o,_.hide)&&i()}):i()}},pe=function(e){null!==e&&"function"==typeof e&&setTimeout(function(){e()})};function fe(e){var t=function e(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(!(this instanceof e))return l(e,n);Object.getPrototypeOf(e).apply(this,n)};return t.prototype=r(Object.create(e.prototype),{constructor:t}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var me={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",customContainerClass:"",target:"body",backdrop:!0,animation:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,validationMessage:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},he=["useRejections","expectRejections","extraParams"],ge=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],be=function(e){return me.hasOwnProperty(e)||"extraParams"===e},ve=function(e){return-1!==he.indexOf(e)},ye=function(e){for(var t in e)be(t)||R('Unknown parameter "'.concat(t,'"')),e.toast&&-1!==ge.indexOf(t)&&R('The parameter "'.concat(t,'" is incompatible with toasts')),ve(t)&&m('The parameter "'.concat(t,'" is deprecated and will be removed in the next major release.'))},we='"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.',Ce={};var ke=[],xe=function(){var e=k();e||De(""),e=k();var t=Q(),n=L(),o=O();K(t),K(n),z([e,t],_.loading),n.disabled=!0,o.disabled=!0,e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},Ae=Object.freeze({isValidParameter:be,isDeprecatedParameter:ve,argsToParams:function(n){var o={};switch(q(n[0])){case"object":r(o,n[0]);break;default:["title","html","type"].forEach(function(e,t){switch(q(n[t])){case"string":o[e]=n[t];break;case"undefined":break;default:I("Unexpected type of ".concat(e,'! Expected "string", got ').concat(q(n[t])))}})}return o},adaptInputValidator:function(n){return function(e,t){return n.call(this,e,t).then(function(){},function(e){return e})}},close:de,closePopup:de,closeModal:de,closeToast:de,isVisible:function(){return!!k()},clickConfirm:function(){return L().click()},clickCancel:function(){return O().click()},getContainer:w,getPopup:k,getTitle:A,getContent:B,getImage:S,getIcons:x,getCloseButton:$,getButtonsWrapper:function(){return m("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"),C(_.actions)},getActions:Q,getConfirmButton:L,getCancelButton:O,getFooter:Y,getFocusableElements:J,getValidationMessage:E,isLoading:function(){return k().hasAttribute("data-loading")},fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(this,t)},mixin:function(n){return fe(function(e){function t(){return a(this,t),d(this,c(t).apply(this,arguments))}return s(t,e),i(t,[{key:"_main",value:function(e){return p(c(t.prototype),"_main",this).call(this,r({},n,e))}}]),t}(this))},queue:function(e){var r=this;ke=e;var a=function(){ke=[],document.body.removeAttribute("data-swal2-queue-step")},s=[];return new Promise(function(i){!function t(n,o){n<ke.length?(document.body.setAttribute("data-swal2-queue-step",n),r(ke[n]).then(function(e){void 0!==e.value?(s.push(e.value),t(n+1,o)):(a(),i({dismiss:e.dismiss}))})):(a(),i({value:s}))}(0)})},getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")},insertQueueStep:function(e,t){return t&&t<ke.length?ke.splice(t,0,e):ke.push(e)},deleteQueueStep:function(e){void 0!==ke[e]&&ke.splice(e,1)},showLoading:xe,enableLoading:xe,getTimerLeft:function(){return le.timeout&&le.timeout.getTimerLeft()},stopTimer:function(){return le.timeout&&le.timeout.stop()},resumeTimer:function(){return le.timeout&&le.timeout.start()},toggleTimer:function(){var e=le.timeout;return e&&(e.running?e.stop():e.start())},increaseTimer:function(e){return le.timeout&&le.timeout.increase(e)},isTimerRunning:function(){return le.timeout&&le.timeout.isRunning()}}),Be="function"==typeof Symbol?Symbol:function(){var t=0;function e(e){return"__"+e+"_"+Math.floor(1e9*Math.random())+"_"+ ++t+"__"}return e.iterator=e("Symbol.iterator"),e}(),Se="function"==typeof WeakMap?WeakMap:function(n,o,t){function e(){o(this,n,{value:Be("WeakMap")})}return e.prototype={delete:function(e){delete e[this[n]]},get:function(e){return e[this[n]]},has:function(e){return t.call(e,this[n])},set:function(e,t){o(e,this[n],{configurable:!0,value:t})}},e}(Be("WeakMap"),Object.defineProperty,{}.hasOwnProperty),Pe={promise:new Se,innerParams:new Se,domCache:new Se};function Ee(){var e=Pe.innerParams.get(this),t=Pe.domCache.get(this);e.showConfirmButton||(F(t.confirmButton),e.showCancelButton||F(t.actions)),W([t.popup,t.actions],_.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1}function Le(e){var t=Pe.domCache.get(this);t.validationMessage.innerHTML=e;var n=window.getComputedStyle(t.popup);t.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),t.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),K(t.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",_["validation-message"]),N(o),z(o,_.inputerror))}function Oe(){var e=Pe.domCache.get(this);e.validationMessage&&F(e.validationMessage);var t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedBy"),W(t,_.inputerror))}var Te=function e(t,n){a(this,e);var o,i,r=n;this.running=!1,this.start=function(){return this.running||(this.running=!0,i=new Date,o=setTimeout(t,r)),r},this.stop=function(){return this.running&&(this.running=!1,clearTimeout(o),r-=new Date-i),r},this.increase=function(e){var t=this.running;return t&&this.stop(),r+=e,t&&this.start(),r},this.getTimerLeft=function(){return this.running&&(this.stop(),this.start()),r},this.isRunning=function(){return this.running},this.start()},Me={email:function(e,t){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid email address")},url:function(e,t){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid URL")}};var je=function(e){var t=w(),n=k();null!==e.onBeforeOpen&&"function"==typeof e.onBeforeOpen&&e.onBeforeOpen(n),e.animation?(z(n,_.show),z(t,_.fade),W(n,_.hide)):W(n,_.fade),K(n),t.style.overflowY="hidden",ee&&!v(n,_.noanimation)?n.addEventListener(ee,function e(){n.removeEventListener(ee,e),t.style.overflowY="auto"}):t.style.overflowY="auto",z([document.documentElement,document.body,t],_.shown),e.heightAuto&&e.backdrop&&!e.toast&&z([document.documentElement,document.body],_["height-auto"]),T()&&(se(),function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!v(document.body,_.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,_.iosfix)}}(),"undefined"!=typeof window&&ce()&&(ue(),window.addEventListener("resize",ue)),f(document.body.children).forEach(function(e){e===w()||function(e,t){if("function"==typeof e.contains)return e.contains(t)}(e,w())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),setTimeout(function(){t.scrollTop=0})),M()||le.previousActiveElement||(le.previousActiveElement=document.activeElement),null!==e.onOpen&&"function"==typeof e.onOpen&&setTimeout(function(){e.onOpen(n)})};var Ve,qe=Object.freeze({hideLoading:Ee,disableLoading:Ee,getInput:function(e){var t=Pe.innerParams.get(this),n=Pe.domCache.get(this);if(!(e=e||t.input))return null;switch(e){case"select":case"textarea":case"file":return U(n.content,_[e]);case"checkbox":return n.popup.querySelector(".".concat(_.checkbox," input"));case"radio":return n.popup.querySelector(".".concat(_.radio," input:checked"))||n.popup.querySelector(".".concat(_.radio," input:first-child"));case"range":return n.popup.querySelector(".".concat(_.range," input"));default:return U(n.content,_.input)}},enableButtons:function(){var e=Pe.domCache.get(this);e.confirmButton.disabled=!1,e.cancelButton.disabled=!1},disableButtons:function(){var e=Pe.domCache.get(this);e.confirmButton.disabled=!0,e.cancelButton.disabled=!0},enableConfirmButton:function(){Pe.domCache.get(this).confirmButton.disabled=!1},disableConfirmButton:function(){Pe.domCache.get(this).confirmButton.disabled=!0},enableInput:function(){var e=this.getInput();if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!1;else e.disabled=!1},disableInput:function(){var e=this.getInput();if(!e)return!1;if(e&&"radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!0;else e.disabled=!0},showValidationMessage:Le,resetValidationMessage:Oe,resetValidationError:function(){m("Swal.resetValidationError() is deprecated and will be removed in the next major release, use Swal.resetValidationMessage() instead"),Oe.bind(this)()},showValidationError:function(e){m("Swal.showValidationError() is deprecated and will be removed in the next major release, use Swal.showValidationMessage() instead"),Le.bind(this)(e)},getProgressSteps:function(){return Pe.innerParams.get(this).progressSteps},setProgressSteps:function(e){var t=r({},Pe.innerParams.get(this),{progressSteps:e});Pe.innerParams.set(this,t),re(t)},showProgressSteps:function(){var e=Pe.domCache.get(this);K(e.progressSteps)},hideProgressSteps:function(){var e=Pe.domCache.get(this);F(e.progressSteps)},_main:function(e){var T=this;ye(e);var M=r({},me,e);!function(t){var e;t.inputValidator||Object.keys(Me).forEach(function(e){t.input===e&&(t.inputValidator=t.expectRejections?Me[e]:De.adaptInputValidator(Me[e]))}),t.validationMessage&&("object"!==q(t.extraParams)&&(t.extraParams={}),t.extraParams.validationMessage=t.validationMessage),(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(R('Target parameter is not valid, defaulting to "body"'),t.target="body"),"function"==typeof t.animation&&(t.animation=t.animation.call());var n=k(),o="string"==typeof t.target?document.querySelector(t.target):t.target;e=n&&o&&n.parentNode!==o.parentNode?X(t):n||X(t),t.width&&(e.style.width="number"==typeof t.width?t.width+"px":t.width),t.padding&&(e.style.padding="number"==typeof t.padding?t.padding+"px":t.padding),t.background&&(e.style.background=t.background);for(var i=window.getComputedStyle(e).getPropertyValue("background-color"),r=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),a=0;a<r.length;a++)r[a].style.backgroundColor=i;var s=w(),c=$(),u=Y();if(ae(t),ne(t),"string"==typeof t.backdrop?w().style.background=t.backdrop:t.backdrop||z([document.documentElement,document.body],_["no-backdrop"]),!t.backdrop&&t.allowOutsideClick&&R('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.position in _?z(s,_[t.position]):(R('The "position" parameter is not valid, defaulting to "center"'),z(s,_.center)),t.grow&&"string"==typeof t.grow){var l="grow-"+t.grow;l in _&&z(s,_[l])}t.showCloseButton?(c.setAttribute("aria-label",t.closeButtonAriaLabel),K(c)):F(c),e.className=_.popup,t.toast?(z([document.documentElement,document.body],_["toast-shown"]),z(e,_.toast)):z(e,_.modal),t.customClass&&z(e,t.customClass),t.customContainerClass&&z(s,t.customContainerClass),re(t),oe(t),ie(t),te(t),G(t.footer,u),!0===t.animation?W(e,_.noanimation):z(e,_.noanimation),t.showLoaderOnConfirm&&!t.preConfirm&&R("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request")}(M),Object.freeze(M),Pe.innerParams.set(this,M),le.timeout&&(le.timeout.stop(),delete le.timeout),clearTimeout(le.restoreFocusTimeout);var j={popup:k(),container:w(),content:B(),actions:Q(),confirmButton:L(),cancelButton:O(),closeButton:$(),validationMessage:E(),progressSteps:P()};Pe.domCache.set(this,j);var V=this.constructor;return new Promise(function(t,n){var o=function(e){V.closePopup(M.onClose,M.onAfterClose),M.useRejections?t(e):t({value:e})},c=function(e){V.closePopup(M.onClose,M.onAfterClose),M.useRejections?n(e):t({dismiss:e})},u=function(e){V.closePopup(M.onClose,M.onAfterClose),n(e)};M.timer&&(le.timeout=new Te(function(){c("timer"),delete le.timeout},M.timer)),M.input&&setTimeout(function(){var e=T.getInput();e&&N(e)},0);for(var l=function(t){if(M.showLoaderOnConfirm&&V.showLoading(),M.preConfirm){T.resetValidationMessage();var e=Promise.resolve().then(function(){return M.preConfirm(t,M.extraParams)});M.expectRejections?e.then(function(e){return o(e||t)},function(e){T.hideLoading(),e&&T.showValidationMessage(e)}):e.then(function(e){Z(j.validationMessage)||!1===e?T.hideLoading():o(e||t)},function(e){return u(e)})}else o(t)},e=function(e){var t=e.target,n=j.confirmButton,o=j.cancelButton,i=n&&(n===t||n.contains(t)),r=o&&(o===t||o.contains(t));switch(e.type){case"click":if(i&&V.isVisible())if(T.disableButtons(),M.input){var a=function(){var e=T.getInput();if(!e)return null;switch(M.input){case"checkbox":return e.checked?1:0;case"radio":return e.checked?e.value:null;case"file":return e.files.length?e.files[0]:null;default:return M.inputAutoTrim?e.value.trim():e.value}}();if(M.inputValidator){T.disableInput();var s=Promise.resolve().then(function(){return M.inputValidator(a,M.extraParams)});M.expectRejections?s.then(function(){T.enableButtons(),T.enableInput(),l(a)},function(e){T.enableButtons(),T.enableInput(),e&&T.showValidationMessage(e)}):s.then(function(e){T.enableButtons(),T.enableInput(),e?T.showValidationMessage(e):l(a)},function(e){return u(e)})}else T.getInput().checkValidity()?l(a):(T.enableButtons(),T.showValidationMessage(M.validationMessage))}else l(!0);else r&&V.isVisible()&&(T.disableButtons(),c(V.DismissReason.cancel))}},i=j.popup.querySelectorAll("button"),r=0;r<i.length;r++)i[r].onclick=e,i[r].onmouseover=e,i[r].onmouseout=e,i[r].onmousedown=e;if(j.closeButton.onclick=function(){c(V.DismissReason.close)},M.toast)j.popup.onclick=function(){M.showConfirmButton||M.showCancelButton||M.showCloseButton||M.input||c(V.DismissReason.close)};else{var a=!1;j.popup.onmousedown=function(){j.container.onmouseup=function(e){j.container.onmouseup=void 0,e.target===j.container&&(a=!0)}},j.container.onmousedown=function(){j.popup.onmouseup=function(e){j.popup.onmouseup=void 0,(e.target===j.popup||j.popup.contains(e.target))&&(a=!0)}},j.container.onclick=function(e){a?a=!1:e.target===j.container&&H(M.allowOutsideClick)&&c(V.DismissReason.backdrop)}}M.reverseButtons?j.confirmButton.parentNode.insertBefore(j.cancelButton,j.confirmButton):j.confirmButton.parentNode.insertBefore(j.confirmButton,j.cancelButton);var s=function(e,t){for(var n=J(M.focusCancel),o=0;o<n.length;o++)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();j.popup.focus()};le.keydownHandlerAdded&&(le.keydownTarget.removeEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!1),M.toast||(le.keydownHandler=function(e){return function(e,t){if(t.stopKeydownPropagation&&e.stopPropagation(),"Enter"!==e.key||e.isComposing)if("Tab"===e.key){for(var n=e.target,o=J(t.focusCancel),i=-1,r=0;r<o.length;r++)if(n===o[r]){i=r;break}e.shiftKey?s(i,-1):s(i,1),e.stopPropagation(),e.preventDefault()}else-1!==["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"].indexOf(e.key)?document.activeElement===j.confirmButton&&Z(j.cancelButton)?j.cancelButton.focus():document.activeElement===j.cancelButton&&Z(j.confirmButton)&&j.confirmButton.focus():"Escape"!==e.key&&"Esc"!==e.key||!0!==H(t.allowEscapeKey)||(e.preventDefault(),c(V.DismissReason.esc));else if(e.target&&T.getInput()&&e.target.outerHTML===T.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(t.input))return;V.clickConfirm(),e.preventDefault()}}(e,M)},le.keydownTarget=M.keydownListenerCapture?window:j.popup,le.keydownListenerCapture=M.keydownListenerCapture,le.keydownTarget.addEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!0),T.enableButtons(),T.hideLoading(),T.resetValidationMessage(),M.toast&&(M.input||M.footer||M.showCloseButton)?z(document.body,_["toast-column"]):W(document.body,_["toast-column"]);for(var d,p,f=["input","file","range","select","radio","checkbox","textarea"],m=function(e){e.placeholder&&!M.inputPlaceholder||(e.placeholder=M.inputPlaceholder)},h=0;h<f.length;h++){var g=_[f[h]],b=U(j.content,g);if(d=T.getInput(f[h])){for(var v in d.attributes)if(d.attributes.hasOwnProperty(v)){var y=d.attributes[v].name;"type"!==y&&"value"!==y&&d.removeAttribute(y)}for(var w in M.inputAttributes)"range"===f[h]&&"placeholder"===w||d.setAttribute(w,M.inputAttributes[w])}b.className=g,M.inputClass&&z(b,M.inputClass),F(b)}switch(M.input){case"text":case"email":case"password":case"number":case"tel":case"url":d=U(j.content,_.input),"string"==typeof M.inputValue||"number"==typeof M.inputValue?d.value=M.inputValue:D(M.inputValue)||R('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(q(M.inputValue),'"')),m(d),d.type=M.input,K(d);break;case"file":m(d=U(j.content,_.file)),d.type=M.input,K(d);break;case"range":var C=U(j.content,_.range),k=C.querySelector("input"),x=C.querySelector("output");k.value=M.inputValue,k.type=M.input,x.value=M.inputValue,K(C);break;case"select":var A=U(j.content,_.select);if(A.innerHTML="",M.inputPlaceholder){var B=document.createElement("option");B.innerHTML=M.inputPlaceholder,B.value="",B.disabled=!0,B.selected=!0,A.appendChild(B)}p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement("option");o.value=t,o.innerHTML=n,M.inputValue.toString()===t.toString()&&(o.selected=!0),A.appendChild(o)}),K(A),A.focus()};break;case"radio":var S=U(j.content,_.radio);S.innerHTML="",p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=_.radio,o.value=t,M.inputValue.toString()===t.toString()&&(o.checked=!0);var r=document.createElement("span");r.innerHTML=n,r.className=_.label,i.appendChild(o),i.appendChild(r),S.appendChild(i)}),K(S);var t=S.querySelectorAll("input");t.length&&t[0].focus()};break;case"checkbox":var P=U(j.content,_.checkbox),E=T.getInput("checkbox");E.type="checkbox",E.value=1,E.id=_.checkbox,E.checked=Boolean(M.inputValue),P.querySelector("span").innerHTML=M.inputPlaceholder,K(P);break;case"textarea":var L=U(j.content,_.textarea);L.value=M.inputValue,m(L),K(L);break;case null:break;default:I('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(M.input,'"'))}if("select"===M.input||"radio"===M.input){var O=function(e){return p((t=e,n=[],"undefined"!=typeof Map&&t instanceof Map?t.forEach(function(e,t){n.push([t,e])}):Object.keys(t).forEach(function(e){n.push([e,t[e]])}),n));var t,n};D(M.inputOptions)?(V.showLoading(),M.inputOptions.then(function(e){T.hideLoading(),O(e)})):"object"===q(M.inputOptions)?O(M.inputOptions):I("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(q(M.inputOptions)))}else-1!==["text","email","number","tel","textarea"].indexOf(M.input)&&D(M.inputValue)&&(V.showLoading(),F(d),M.inputValue.then(function(e){d.value="number"===M.input?parseFloat(e)||0:e+"",K(d),d.focus(),T.hideLoading()}).catch(function(e){I("Error in inputValue promise: "+e),d.value="",K(d),d.focus(),T.hideLoading()}));je(M),M.toast||(H(M.allowEnterKey)?M.focusCancel&&Z(j.cancelButton)?j.cancelButton.focus():M.focusConfirm&&Z(j.confirmButton)?j.confirmButton.focus():s(-1,1):document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()),j.container.scrollTop=0})}});function Re(){if("undefined"!=typeof window){"undefined"==typeof Promise&&I("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Ve=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0}});var i=this._main(this.params);Pe.promise.set(this,i)}}Re.prototype.then=function(e,t){return Pe.promise.get(this).then(e,t)},Re.prototype.catch=function(e){return Pe.promise.get(this).catch(e)},Re.prototype.finally=function(e){return Pe.promise.get(this).finally(e)},r(Re.prototype,qe),r(Re,Ae),Object.keys(qe).forEach(function(t){Re[t]=function(){var e;if(Ve)return(e=Ve)[t].apply(e,arguments)}}),Re.DismissReason=e,Re.noop=function(){};var Ie,He,De=fe((Ie=Re,He=function(e){function t(){return a(this,t),d(this,c(t).apply(this,arguments))}return s(t,Ie),i(t,[{key:"_main",value:function(e){return p(c(t.prototype),"_main",this).call(this,r({},Ce,e))}}],[{key:"setDefaults",value:function(t){if(m(we),!t||"object"!==q(t))throw new TypeError("SweetAlert2: The argument for setDefaults() is required and has to be a object");ye(t),Object.keys(t).forEach(function(e){Ie.isValidParameter(e)&&(Ce[e]=t[e])})}},{key:"resetDefaults",value:function(){m(we),Ce={}}}]),t}(),"undefined"!=typeof window&&"object"===q(window._swalDefaults)&&He.setDefaults(window._swalDefaults),He));return De.default=De}),"undefined"!=typeof window&&window.Sweetalert2&&(window.Sweetalert2.version="7.33.1",window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2);
|
24350 |
|
24351 |
/***/ }),
|
24352 |
-
/*
|
24353 |
/***/ (function(module, exports, __webpack_require__) {
|
24354 |
|
24355 |
|
24356 |
-
var content = __webpack_require__(
|
24357 |
|
24358 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
24359 |
|
@@ -24367,7 +24368,7 @@ var options = {"hmr":true}
|
|
24367 |
options.transform = transform
|
24368 |
options.insertInto = undefined;
|
24369 |
|
24370 |
-
var update = __webpack_require__(
|
24371 |
|
24372 |
if(content.locals) module.exports = content.locals;
|
24373 |
|
@@ -24399,10 +24400,10 @@ if(false) {
|
|
24399 |
}
|
24400 |
|
24401 |
/***/ }),
|
24402 |
-
/*
|
24403 |
/***/ (function(module, exports, __webpack_require__) {
|
24404 |
|
24405 |
-
exports = module.exports = __webpack_require__(
|
24406 |
// imports
|
24407 |
|
24408 |
|
@@ -24413,7 +24414,6 @@ exports.push([module.i, "@-webkit-keyframes swal2-show{0%{-webkit-transform:scal
|
|
24413 |
|
24414 |
|
24415 |
/***/ }),
|
24416 |
-
/* 192 */,
|
24417 |
/* 193 */,
|
24418 |
/* 194 */,
|
24419 |
/* 195 */,
|
@@ -24421,11 +24421,12 @@ exports.push([module.i, "@-webkit-keyframes swal2-show{0%{-webkit-transform:scal
|
|
24421 |
/* 197 */,
|
24422 |
/* 198 */,
|
24423 |
/* 199 */,
|
24424 |
-
/* 200
|
|
|
24425 |
/***/ (function(module, exports, __webpack_require__) {
|
24426 |
|
24427 |
|
24428 |
-
var content = __webpack_require__(
|
24429 |
|
24430 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
24431 |
|
@@ -24439,7 +24440,7 @@ var options = {"hmr":true}
|
|
24439 |
options.transform = transform
|
24440 |
options.insertInto = undefined;
|
24441 |
|
24442 |
-
var update = __webpack_require__(
|
24443 |
|
24444 |
if(content.locals) module.exports = content.locals;
|
24445 |
|
@@ -24471,10 +24472,10 @@ if(false) {
|
|
24471 |
}
|
24472 |
|
24473 |
/***/ }),
|
24474 |
-
/*
|
24475 |
/***/ (function(module, exports, __webpack_require__) {
|
24476 |
|
24477 |
-
exports = module.exports = __webpack_require__(
|
24478 |
// imports
|
24479 |
|
24480 |
|
@@ -24485,33 +24486,33 @@ exports.push([module.i, "fieldset[disabled] .multiselect{pointer-events:none}.mu
|
|
24485 |
|
24486 |
|
24487 |
/***/ }),
|
24488 |
-
/*
|
24489 |
/***/ (function(module, exports, __webpack_require__) {
|
24490 |
|
24491 |
__webpack_require__(2);
|
24492 |
__webpack_require__(1);
|
24493 |
__webpack_require__(14);
|
24494 |
-
__webpack_require__(
|
24495 |
__webpack_require__(4);
|
24496 |
-
__webpack_require__(
|
24497 |
-
__webpack_require__(
|
24498 |
-
__webpack_require__(
|
24499 |
-
module.exports = __webpack_require__(
|
24500 |
|
24501 |
|
24502 |
/***/ }),
|
24503 |
-
/*
|
24504 |
-
/*
|
24505 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24506 |
|
24507 |
"use strict";
|
24508 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAddHook__ = __webpack_require__(
|
24509 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRemoveHook__ = __webpack_require__(
|
24510 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createHasHook__ = __webpack_require__(
|
24511 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createRunHook__ = __webpack_require__(
|
24512 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createCurrentHook__ = __webpack_require__(
|
24513 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createDoingHook__ = __webpack_require__(
|
24514 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__createDidHook__ = __webpack_require__(
|
24515 |
|
24516 |
|
24517 |
|
@@ -24556,13 +24557,13 @@ function createHooks() {
|
|
24556 |
//# sourceMappingURL=createHooks.js.map
|
24557 |
|
24558 |
/***/ }),
|
24559 |
-
/*
|
24560 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24561 |
|
24562 |
"use strict";
|
24563 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateNamespace_js__ = __webpack_require__(
|
24564 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__validateHookName_js__ = __webpack_require__(
|
24565 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(
|
24566 |
|
24567 |
|
24568 |
|
@@ -24655,13 +24656,13 @@ function createAddHook(hooks) {
|
|
24655 |
//# sourceMappingURL=createAddHook.js.map
|
24656 |
|
24657 |
/***/ }),
|
24658 |
-
/*
|
24659 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24660 |
|
24661 |
"use strict";
|
24662 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateNamespace_js__ = __webpack_require__(
|
24663 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__validateHookName_js__ = __webpack_require__(
|
24664 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(
|
24665 |
|
24666 |
|
24667 |
|
@@ -24745,7 +24746,7 @@ function createRemoveHook(hooks, removeAll) {
|
|
24745 |
//# sourceMappingURL=createRemoveHook.js.map
|
24746 |
|
24747 |
/***/ }),
|
24748 |
-
/*
|
24749 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24750 |
|
24751 |
"use strict";
|
@@ -24775,7 +24776,7 @@ function createHasHook(hooks) {
|
|
24775 |
//# sourceMappingURL=createHasHook.js.map
|
24776 |
|
24777 |
/***/ }),
|
24778 |
-
/*
|
24779 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24780 |
|
24781 |
"use strict";
|
@@ -24848,7 +24849,7 @@ function createRunHook(hooks, returnFirstArg) {
|
|
24848 |
//# sourceMappingURL=createRunHook.js.map
|
24849 |
|
24850 |
/***/ }),
|
24851 |
-
/*
|
24852 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24853 |
|
24854 |
"use strict";
|
@@ -24882,7 +24883,7 @@ function createCurrentHook(hooks) {
|
|
24882 |
//# sourceMappingURL=createCurrentHook.js.map
|
24883 |
|
24884 |
/***/ }),
|
24885 |
-
/*
|
24886 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24887 |
|
24888 |
"use strict";
|
@@ -24919,11 +24920,11 @@ function createDoingHook(hooks) {
|
|
24919 |
//# sourceMappingURL=createDoingHook.js.map
|
24920 |
|
24921 |
/***/ }),
|
24922 |
-
/*
|
24923 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24924 |
|
24925 |
"use strict";
|
24926 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateHookName_js__ = __webpack_require__(
|
24927 |
|
24928 |
/**
|
24929 |
* Returns a function which, when invoked, will return the number of times a
|
34 |
/******/
|
35 |
/******/ // objects to store loaded and loading chunks
|
36 |
/******/ var installedChunks = {
|
37 |
+
/******/ 5: 0
|
38 |
/******/ };
|
39 |
/******/
|
40 |
/******/ // The require function
|
98 |
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
|
99 |
/******/
|
100 |
/******/ // Load entry module and return exports
|
101 |
+
/******/ return __webpack_require__(__webpack_require__.s = 203);
|
102 |
/******/ })
|
103 |
/************************************************************************/
|
104 |
/******/ ([
|
11026 |
|
11027 |
/* harmony default export */ __webpack_exports__["default"] = (Vue$3);
|
11028 |
|
11029 |
+
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(18), __webpack_require__(5), __webpack_require__(84).setImmediate))
|
11030 |
|
11031 |
/***/ }),
|
11032 |
/* 2 */
|
11153 |
"use strict";
|
11154 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
11155 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VueCharts", function() { return VueCharts; });
|
11156 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_index_js__ = __webpack_require__(104);
|
11157 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BaseCharts__ = __webpack_require__(105);
|
11158 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["a"]; });
|
11159 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "HorizontalBar", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["d"]; });
|
11160 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Doughnut", function() { return __WEBPACK_IMPORTED_MODULE_1__BaseCharts__["c"]; });
|
11185 |
/***/ }),
|
11186 |
/* 15 */,
|
11187 |
/* 16 */,
|
11188 |
+
/* 17 */,
|
11189 |
+
/* 18 */
|
11190 |
/***/ (function(module, exports) {
|
11191 |
|
11192 |
// shim for using process in browser
|
11376 |
|
11377 |
|
11378 |
/***/ }),
|
11379 |
+
/* 19 */
|
11380 |
/***/ (function(module, exports) {
|
11381 |
|
11382 |
/*
|
11458 |
|
11459 |
|
11460 |
/***/ }),
|
11461 |
+
/* 20 */
|
11462 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11463 |
|
11464 |
"use strict";
|
14087 |
|
14088 |
/* harmony default export */ __webpack_exports__["default"] = (VueRouter);
|
14089 |
|
14090 |
+
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(18)))
|
14091 |
|
14092 |
/***/ }),
|
14093 |
+
/* 21 */,
|
14094 |
+
/* 22 */
|
14095 |
/***/ (function(module, exports, __webpack_require__) {
|
14096 |
|
14097 |
/*
|
14157 |
var singletonCounter = 0;
|
14158 |
var stylesInsertedAtTop = [];
|
14159 |
|
14160 |
+
var fixUrls = __webpack_require__(115);
|
14161 |
|
14162 |
module.exports = function(list, options) {
|
14163 |
if (typeof DEBUG !== "undefined" && DEBUG) {
|
14473 |
|
14474 |
|
14475 |
/***/ }),
|
|
|
14476 |
/* 23 */,
|
14477 |
/* 24 */,
|
14478 |
/* 25 */,
|
14487 |
/* 34 */,
|
14488 |
/* 35 */,
|
14489 |
/* 36 */,
|
14490 |
+
/* 37 */,
|
14491 |
+
/* 38 */,
|
14492 |
+
/* 39 */
|
14493 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14494 |
|
14495 |
"use strict";
|
14511 |
/* unused harmony export didFilter */
|
14512 |
/* unused harmony export actions */
|
14513 |
/* unused harmony export filters */
|
14514 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createHooks__ = __webpack_require__(205);
|
14515 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__createHooks__["a"]; });
|
14516 |
|
14517 |
|
14539 |
//# sourceMappingURL=index.js.map
|
14540 |
|
14541 |
/***/ }),
|
14542 |
+
/* 40 */
|
14543 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14544 |
|
14545 |
"use strict";
|
14578 |
//# sourceMappingURL=validateHookName.js.map
|
14579 |
|
14580 |
/***/ }),
|
|
|
|
|
14581 |
/* 41 */,
|
14582 |
/* 42 */,
|
14583 |
/* 43 */,
|
14584 |
/* 44 */,
|
14585 |
/* 45 */,
|
14586 |
+
/* 46 */,
|
14587 |
+
/* 47 */,
|
14588 |
+
/* 48 */
|
14589 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14590 |
|
14591 |
"use strict";
|
14592 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
|
14593 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery__ = __webpack_require__(15);
|
14594 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_jquery__);
|
14595 |
//
|
14596 |
//
|
14601 |
// Check if the request came from the browser and is not server rendered
|
14602 |
|
14603 |
if (typeof window !== 'undefined') {
|
14604 |
+
const slick = __webpack_require__(117);
|
14605 |
}
|
14606 |
|
14607 |
/* harmony default export */ __webpack_exports__["a"] = ({
|
14731 |
});
|
14732 |
|
14733 |
/***/ }),
|
|
|
|
|
14734 |
/* 49 */,
|
14735 |
/* 50 */,
|
14736 |
+
/* 51 */,
|
14737 |
+
/* 52 */
|
14738 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14739 |
|
14740 |
"use strict";
|
14741 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Sketch_vue__ = __webpack_require__(53);
|
14742 |
/* unused harmony namespace reexport */
|
14743 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_511efdd0_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Sketch_vue__ = __webpack_require__(150);
|
14744 |
var disposed = false
|
14745 |
function injectStyle (ssrContext) {
|
14746 |
if (disposed) return
|
14747 |
+
__webpack_require__(132)
|
14748 |
}
|
14749 |
var normalizeComponent = __webpack_require__(0)
|
14750 |
/* script */
|
14790 |
|
14791 |
|
14792 |
/***/ }),
|
14793 |
+
/* 53 */
|
14794 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14795 |
|
14796 |
"use strict";
|
14797 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixin_color__ = __webpack_require__(133);
|
14798 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common_EditableInput_vue__ = __webpack_require__(135);
|
14799 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__common_Saturation_vue__ = __webpack_require__(138);
|
14800 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__common_Hue_vue__ = __webpack_require__(142);
|
14801 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__common_Alpha_vue__ = __webpack_require__(145);
|
14802 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common_Checkboard_vue__ = __webpack_require__(58);
|
14803 |
//
|
14804 |
//
|
14805 |
//
|
14931 |
});
|
14932 |
|
14933 |
/***/ }),
|
14934 |
+
/* 54 */
|
14935 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
14936 |
|
14937 |
"use strict";
|
15032 |
});
|
15033 |
|
15034 |
/***/ }),
|
15035 |
+
/* 55 */
|
15036 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15037 |
|
15038 |
"use strict";
|
15039 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_throttle__ = __webpack_require__(140);
|
15040 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_throttle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash_throttle__);
|
15041 |
//
|
15042 |
//
|
15145 |
});
|
15146 |
|
15147 |
/***/ }),
|
15148 |
+
/* 56 */
|
15149 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15150 |
|
15151 |
"use strict";
|
15290 |
});
|
15291 |
|
15292 |
/***/ }),
|
15293 |
+
/* 57 */
|
15294 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15295 |
|
15296 |
"use strict";
|
15297 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Checkboard_vue__ = __webpack_require__(58);
|
15298 |
//
|
15299 |
//
|
15300 |
//
|
15382 |
});
|
15383 |
|
15384 |
/***/ }),
|
15385 |
+
/* 58 */
|
15386 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15387 |
|
15388 |
"use strict";
|
15389 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Checkboard_vue__ = __webpack_require__(59);
|
15390 |
/* unused harmony namespace reexport */
|
15391 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_550f7e4e_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Checkboard_vue__ = __webpack_require__(148);
|
15392 |
var disposed = false
|
15393 |
function injectStyle (ssrContext) {
|
15394 |
if (disposed) return
|
15395 |
+
__webpack_require__(147)
|
15396 |
}
|
15397 |
var normalizeComponent = __webpack_require__(0)
|
15398 |
/* script */
|
15438 |
|
15439 |
|
15440 |
/***/ }),
|
15441 |
+
/* 59 */
|
15442 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
15443 |
|
15444 |
"use strict";
|
15524 |
}
|
15525 |
|
15526 |
/***/ }),
|
|
|
15527 |
/* 60 */,
|
15528 |
+
/* 61 */,
|
15529 |
+
/* 62 */
|
15530 |
/***/ (function(module, exports, __webpack_require__) {
|
15531 |
|
15532 |
(function webpackUniversalModuleDefinition(root, factory) {
|
16647 |
//# sourceMappingURL=index.js.map
|
16648 |
|
16649 |
/***/ }),
|
16650 |
+
/* 63 */
|
16651 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
16652 |
|
16653 |
"use strict";
|
16654 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
16655 |
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["install"] = install;
|
16656 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_ListTable_vue__ = __webpack_require__(162);
|
16657 |
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ListTable", function() { return __WEBPACK_IMPORTED_MODULE_0__components_ListTable_vue__["a"]; });
|
16658 |
|
16659 |
|
16691 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(5)))
|
16692 |
|
16693 |
/***/ }),
|
16694 |
+
/* 64 */
|
16695 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
16696 |
|
16697 |
"use strict";
|
17057 |
});
|
17058 |
|
17059 |
/***/ }),
|
17060 |
+
/* 65 */
|
17061 |
/***/ (function(module, exports) {
|
17062 |
|
17063 |
function _classCallCheck(instance, Constructor) {
|
17069 |
module.exports = _classCallCheck;
|
17070 |
|
17071 |
/***/ }),
|
17072 |
+
/* 66 */
|
17073 |
/***/ (function(module, exports) {
|
17074 |
|
17075 |
function _defineProperties(target, props) {
|
17091 |
module.exports = _createClass;
|
17092 |
|
17093 |
/***/ }),
|
17094 |
+
/* 67 */
|
17095 |
/***/ (function(module, exports, __webpack_require__) {
|
17096 |
|
17097 |
!function(t,e){ true?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueContentLoading=e():t.VueContentLoading=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(t,e,n){"use strict";var r=function(t){return/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/.test(t)};e.a={props:{speed:{default:2,type:Number},width:{default:400,type:Number},height:{default:130,type:Number},primary:{type:String,default:"#f0f0f0",validator:r},secondary:{type:String,default:"#e0e0e0",validator:r}},computed:{viewbox:function(){return"0 0 "+this.width+" "+this.height},formatedSpeed:function(){return this.speed+"s"},gradientId:function(){return"gradient-"+this._uid},clipPathId:function(){return"clipPath-"+this._uid}},template:'\n <svg :viewBox="viewbox" preserveAspectRatio="xMidYMid meet">\n <rect\n :style="{ fill: \'url(#\' + gradientId + \')\' }" \n :clip-path="\'url(#\' + clipPathId + \')\'"\n x="0" \n y="0" \n :width="width" \n :height="height" \n />\n\n <defs>\n <clipPath :id="clipPathId">\n <slot>\n <rect x="0" y="0" rx="5" ry="5" width="70" height="70" />\n <rect x="80" y="17" rx="4" ry="4" width="300" height="13" />\n <rect x="80" y="40" rx="3" ry="3" width="250" height="10" />\n <rect x="0" y="80" rx="3" ry="3" width="350" height="10" />\n <rect x="0" y="100" rx="3" ry="3" width="400" height="10" />\n <rect x="0" y="120" rx="3" ry="3" width="360" height="10" />\n </slot>\n </clipPath>\n\n <linearGradient :id="gradientId">\n <stop offset="0%" :stop-color="primary">\n <animate attributeName="offset" values="-2; 1" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n\n <stop offset="50%" :stop-color="secondary">\n <animate attributeName="offset" values="-1.5; 1.5" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n\n <stop offset="100%" :stop-color="primary">\n <animate attributeName="offset" values="-1; 2" :dur="formatedSpeed" repeatCount="indefinite" />\n </stop>\n </linearGradient>\n </defs>\n </svg>\n '}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(2),o=n(3),h=n(4),d=n(5),a=n(6),c=n(7);n.d(e,"VclCode",function(){return i.a}),n.d(e,"VclList",function(){return o.a}),n.d(e,"VclTwitch",function(){return h.a}),n.d(e,"VclFacebook",function(){return d.a}),n.d(e,"VclInstagram",function(){return a.a}),n.d(e,"VclBulletList",function(){return c.a}),n.d(e,"VueContentLoading",function(){return r.a}),e.default=r.a},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="80">\n <rect x="0" y="0" rx="3" ry="3" width="70" height="10" />\n <rect x="80" y="0" rx="3" ry="3" width="100" height="10" />\n <rect x="190" y="0" rx="3" ry="3" width="10" height="10" />\n <rect x="15" y="20" rx="3" ry="3" width="130" height="10" />\n <rect x="155" y="20" rx="3" ry="3" width="130" height="10" />\n <rect x="15" y="40" rx="3" ry="3" width="90" height="10" />\n <rect x="115" y="40" rx="3" ry="3" width="60" height="10" />\n <rect x="185" y="40" rx="3" ry="3" width="60" height="10" />\n <rect x="0" y="60" rx="3" ry="3" width="30" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="120">\n <rect x="0" y="0" rx="3" ry="3" width="250" height="10" />\n <rect x="20" y="20" rx="3" ry="3" width="220" height="10" />\n <rect x="20" y="40" rx="3" ry="3" width="170" height="10" />\n <rect x="0" y="60" rx="3" ry="3" width="250" height="10" />\n <rect x="20" y="80" rx="3" ry="3" width="200" height="10" />\n <rect x="20" y="100" rx="3" ry="3" width="80" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :width="300" :height="225">\n <rect x="0" y="0" rx="3" ry="3" width="300" height="170" />\n <rect x="0" y="180" rx="2" ry="2" width="35" height="45" />\n <rect x="45" y="180" rx="2" ry="2" width="150" height="15" />\n <rect x="45" y="203" rx="2" ry="2" width="100" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs">\n <rect x="0" y="0" rx="5" ry="5" width="70" height="70" />\n <rect x="80" y="17" rx="4" ry="4" width="300" height="13" />\n <rect x="80" y="40" rx="3" ry="3" width="250" height="10" />\n <rect x="0" y="80" rx="3" ry="3" width="350" height="10" />\n <rect x="0" y="100" rx="3" ry="3" width="400" height="10" />\n <rect x="0" y="120" rx="3" ry="3" width="360" height="10" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},template:'\n <vue-content-loading v-bind="$attrs" :height="480">\n <circle cx="30" cy="30" r="30" />\n <rect x="75" y="13" rx="4" ry="4" width="100" height="13" />\n <rect x="75" y="37" rx="4" ry="4" width="50" height="8" />\n <rect x="0" y="70" rx="5" ry="5" width="400" height="400" />\n </vue-content-loading>\n '}},function(t,e,n){"use strict";var r=n(0);e.a={components:{VueContentLoading:r.a},props:{rows:{default:5,type:Number}},computed:{height:function(){return 21*this.rows}},methods:{getYPos:function(t,e){return e+22*(t-1)}},template:'\n <vue-content-loading v-bind="$attrs" :width="230" :height="height">\n <template v-for="i in rows">\n <circle cx="8" :cy="getYPos(i, 8)" r="8" />\n <rect x="22" :y="getYPos(i, 3)" rx="3" ry="3" width="200" height="9" />\n </template>\n </vue-content-loading>\n '}}])});
|
17098 |
//# sourceMappingURL=vuecontentloading.js.map
|
17099 |
|
17100 |
/***/ }),
|
|
|
17101 |
/* 68 */,
|
17102 |
/* 69 */,
|
17103 |
/* 70 */,
|
17106 |
/* 73 */,
|
17107 |
/* 74 */,
|
17108 |
/* 75 */,
|
17109 |
+
/* 76 */,
|
17110 |
+
/* 77 */
|
17111 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17112 |
|
17113 |
"use strict";
|
17114 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
17115 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js__ = __webpack_require__(190);
|
17116 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sweetalert2_dist_sweetalert2_min_js__);
|
17117 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css__ = __webpack_require__(191);
|
17118 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_sweetalert2_dist_sweetalert2_min_css__);
|
17119 |
// @ts-check
|
17120 |
/** @type swal {import("sweetalert2")} */
|
17156 |
|
17157 |
|
17158 |
/***/ }),
|
|
|
17159 |
/* 78 */,
|
17160 |
/* 79 */,
|
17161 |
+
/* 80 */,
|
17162 |
+
/* 81 */
|
17163 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17164 |
|
17165 |
"use strict";
|
17191 |
//# sourceMappingURL=validateNamespace.js.map
|
17192 |
|
17193 |
/***/ }),
|
17194 |
+
/* 82 */,
|
17195 |
+
/* 83 */,
|
17196 |
+
/* 84 */
|
17197 |
/***/ (function(module, exports, __webpack_require__) {
|
17198 |
|
17199 |
/* WEBPACK VAR INJECTION */(function(global) {var apply = Function.prototype.apply;
|
17246 |
};
|
17247 |
|
17248 |
// setimmediate attaches itself to the global object
|
17249 |
+
__webpack_require__(85);
|
17250 |
// On some exotic environments, it's not clear which object `setimmeidate` was
|
17251 |
// able to install onto. Search each possibility in the same order as the
|
17252 |
// `setimmediate` library.
|
17260 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
17261 |
|
17262 |
/***/ }),
|
17263 |
+
/* 85 */
|
17264 |
/***/ (function(module, exports, __webpack_require__) {
|
17265 |
|
17266 |
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
|
17450 |
attachTo.clearImmediate = clearImmediate;
|
17451 |
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
17452 |
|
17453 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(18)))
|
17454 |
|
17455 |
/***/ }),
|
|
|
|
|
17456 |
/* 86 */,
|
17457 |
/* 87 */,
|
17458 |
/* 88 */,
|
17466 |
/* 96 */,
|
17467 |
/* 97 */,
|
17468 |
/* 98 */,
|
17469 |
+
/* 99 */,
|
17470 |
+
/* 100 */,
|
17471 |
+
/* 101 */
|
17472 |
/***/ (function(module, exports) {
|
17473 |
|
17474 |
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
17490 |
module.exports = _typeof;
|
17491 |
|
17492 |
/***/ }),
|
17493 |
+
/* 102 */,
|
17494 |
+
/* 103 */,
|
17495 |
+
/* 104 */
|
17496 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17497 |
|
17498 |
"use strict";
|
17580 |
});
|
17581 |
|
17582 |
/***/ }),
|
17583 |
+
/* 105 */
|
17584 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17585 |
|
17586 |
"use strict";
|
17593 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return Radar; });
|
17594 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Bubble; });
|
17595 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return Scatter; });
|
17596 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chart_js__ = __webpack_require__(106);
|
17597 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_chart_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_chart_js__);
|
17598 |
|
17599 |
|
17688 |
});
|
17689 |
|
17690 |
/***/ }),
|
17691 |
+
/* 106 */
|
17692 |
/***/ (function(module, exports) {
|
17693 |
|
17694 |
module.exports = Chart;
|
17695 |
|
17696 |
/***/ }),
|
|
|
|
|
17697 |
/* 107 */,
|
17698 |
/* 108 */,
|
17699 |
/* 109 */,
|
17700 |
/* 110 */,
|
17701 |
+
/* 111 */,
|
17702 |
+
/* 112 */,
|
17703 |
+
/* 113 */
|
17704 |
/***/ (function(module, exports, __webpack_require__) {
|
17705 |
|
17706 |
|
17707 |
+
var content = __webpack_require__(114);
|
17708 |
|
17709 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
17710 |
|
17718 |
options.transform = transform
|
17719 |
options.insertInto = undefined;
|
17720 |
|
17721 |
+
var update = __webpack_require__(22)(content, options);
|
17722 |
|
17723 |
if(content.locals) module.exports = content.locals;
|
17724 |
|
17750 |
}
|
17751 |
|
17752 |
/***/ }),
|
17753 |
+
/* 114 */
|
17754 |
/***/ (function(module, exports, __webpack_require__) {
|
17755 |
|
17756 |
+
exports = module.exports = __webpack_require__(19)(false);
|
17757 |
// imports
|
17758 |
|
17759 |
|
17764 |
|
17765 |
|
17766 |
/***/ }),
|
17767 |
+
/* 115 */
|
17768 |
/***/ (function(module, exports) {
|
17769 |
|
17770 |
|
17859 |
|
17860 |
|
17861 |
/***/ }),
|
17862 |
+
/* 116 */
|
17863 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
17864 |
|
17865 |
"use strict";
|
17866 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_slickCarousel_vue__ = __webpack_require__(48);
|
17867 |
/* unused harmony namespace reexport */
|
17868 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_14c5b163_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_slickCarousel_vue__ = __webpack_require__(118);
|
17869 |
var disposed = false
|
17870 |
var normalizeComponent = __webpack_require__(0)
|
17871 |
/* script */
|
17911 |
|
17912 |
|
17913 |
/***/ }),
|
17914 |
+
/* 117 */
|
17915 |
/***/ (function(module, exports, __webpack_require__) {
|
17916 |
|
17917 |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
17934 |
;(function(factory) {
|
17935 |
'use strict';
|
17936 |
if (true) {
|
17937 |
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(15)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
17938 |
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
17939 |
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
17940 |
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
20931 |
|
20932 |
|
20933 |
/***/ }),
|
20934 |
+
/* 118 */
|
20935 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
20936 |
|
20937 |
"use strict";
|
20953 |
}
|
20954 |
|
20955 |
/***/ }),
|
|
|
|
|
20956 |
/* 119 */,
|
20957 |
/* 120 */,
|
20958 |
/* 121 */,
|
20959 |
/* 122 */,
|
20960 |
/* 123 */,
|
20961 |
/* 124 */,
|
20962 |
+
/* 125 */,
|
20963 |
+
/* 126 */,
|
20964 |
+
/* 127 */
|
20965 |
/***/ (function(module, exports) {
|
20966 |
|
20967 |
function _defineProperty(obj, key, value) {
|
20982 |
module.exports = _defineProperty;
|
20983 |
|
20984 |
/***/ }),
|
20985 |
+
/* 128 */
|
20986 |
/***/ (function(module, exports, __webpack_require__) {
|
20987 |
|
20988 |
+
var arrayWithHoles = __webpack_require__(129);
|
20989 |
|
20990 |
+
var iterableToArrayLimit = __webpack_require__(130);
|
20991 |
|
20992 |
+
var nonIterableRest = __webpack_require__(131);
|
20993 |
|
20994 |
function _slicedToArray(arr, i) {
|
20995 |
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
20998 |
module.exports = _slicedToArray;
|
20999 |
|
21000 |
/***/ }),
|
21001 |
+
/* 129 */
|
21002 |
/***/ (function(module, exports) {
|
21003 |
|
21004 |
function _arrayWithHoles(arr) {
|
21008 |
module.exports = _arrayWithHoles;
|
21009 |
|
21010 |
/***/ }),
|
21011 |
+
/* 130 */
|
21012 |
/***/ (function(module, exports) {
|
21013 |
|
21014 |
function _iterableToArrayLimit(arr, i) {
|
21040 |
module.exports = _iterableToArrayLimit;
|
21041 |
|
21042 |
/***/ }),
|
21043 |
+
/* 131 */
|
21044 |
/***/ (function(module, exports) {
|
21045 |
|
21046 |
function _nonIterableRest() {
|
21050 |
module.exports = _nonIterableRest;
|
21051 |
|
21052 |
/***/ }),
|
21053 |
+
/* 132 */
|
21054 |
/***/ (function(module, exports) {
|
21055 |
|
21056 |
// removed by extract-text-webpack-plugin
|
21057 |
|
21058 |
/***/ }),
|
21059 |
+
/* 133 */
|
21060 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
21061 |
|
21062 |
"use strict";
|
21063 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinycolor2__ = __webpack_require__(134);
|
21064 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tinycolor2___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_tinycolor2__);
|
21065 |
|
21066 |
|
21169 |
|
21170 |
|
21171 |
/***/ }),
|
21172 |
+
/* 134 */
|
21173 |
/***/ (function(module, exports, __webpack_require__) {
|
21174 |
|
21175 |
var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
|
22371 |
|
22372 |
|
22373 |
/***/ }),
|
22374 |
+
/* 135 */
|
22375 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22376 |
|
22377 |
"use strict";
|
22378 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_EditableInput_vue__ = __webpack_require__(54);
|
22379 |
/* unused harmony namespace reexport */
|
22380 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_6a3fe6f4_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_EditableInput_vue__ = __webpack_require__(137);
|
22381 |
var disposed = false
|
22382 |
function injectStyle (ssrContext) {
|
22383 |
if (disposed) return
|
22384 |
+
__webpack_require__(136)
|
22385 |
}
|
22386 |
var normalizeComponent = __webpack_require__(0)
|
22387 |
/* script */
|
22427 |
|
22428 |
|
22429 |
/***/ }),
|
22430 |
+
/* 136 */
|
22431 |
/***/ (function(module, exports) {
|
22432 |
|
22433 |
// removed by extract-text-webpack-plugin
|
22434 |
|
22435 |
/***/ }),
|
22436 |
+
/* 137 */
|
22437 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22438 |
|
22439 |
"use strict";
|
22481 |
}
|
22482 |
|
22483 |
/***/ }),
|
22484 |
+
/* 138 */
|
22485 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22486 |
|
22487 |
"use strict";
|
22488 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Saturation_vue__ = __webpack_require__(55);
|
22489 |
/* unused harmony namespace reexport */
|
22490 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_c6d01d7c_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Saturation_vue__ = __webpack_require__(141);
|
22491 |
var disposed = false
|
22492 |
function injectStyle (ssrContext) {
|
22493 |
if (disposed) return
|
22494 |
+
__webpack_require__(139)
|
22495 |
}
|
22496 |
var normalizeComponent = __webpack_require__(0)
|
22497 |
/* script */
|
22537 |
|
22538 |
|
22539 |
/***/ }),
|
22540 |
+
/* 139 */
|
22541 |
/***/ (function(module, exports) {
|
22542 |
|
22543 |
// removed by extract-text-webpack-plugin
|
22544 |
|
22545 |
/***/ }),
|
22546 |
+
/* 140 */
|
22547 |
/***/ (function(module, exports, __webpack_require__) {
|
22548 |
|
22549 |
/* WEBPACK VAR INJECTION */(function(global) {/**
|
22989 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
|
22990 |
|
22991 |
/***/ }),
|
22992 |
+
/* 141 */
|
22993 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
22994 |
|
22995 |
"use strict";
|
23037 |
}
|
23038 |
|
23039 |
/***/ }),
|
23040 |
+
/* 142 */
|
23041 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23042 |
|
23043 |
"use strict";
|
23044 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Hue_vue__ = __webpack_require__(56);
|
23045 |
/* unused harmony namespace reexport */
|
23046 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_61a5b2b8_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Hue_vue__ = __webpack_require__(144);
|
23047 |
var disposed = false
|
23048 |
function injectStyle (ssrContext) {
|
23049 |
if (disposed) return
|
23050 |
+
__webpack_require__(143)
|
23051 |
}
|
23052 |
var normalizeComponent = __webpack_require__(0)
|
23053 |
/* script */
|
23093 |
|
23094 |
|
23095 |
/***/ }),
|
23096 |
+
/* 143 */
|
23097 |
/***/ (function(module, exports) {
|
23098 |
|
23099 |
// removed by extract-text-webpack-plugin
|
23100 |
|
23101 |
/***/ }),
|
23102 |
+
/* 144 */
|
23103 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23104 |
|
23105 |
"use strict";
|
23144 |
}
|
23145 |
|
23146 |
/***/ }),
|
23147 |
+
/* 145 */
|
23148 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23149 |
|
23150 |
"use strict";
|
23151 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_Alpha_vue__ = __webpack_require__(57);
|
23152 |
/* unused harmony namespace reexport */
|
23153 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_fc5ffbc4_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_Alpha_vue__ = __webpack_require__(149);
|
23154 |
var disposed = false
|
23155 |
function injectStyle (ssrContext) {
|
23156 |
if (disposed) return
|
23157 |
+
__webpack_require__(146)
|
23158 |
}
|
23159 |
var normalizeComponent = __webpack_require__(0)
|
23160 |
/* script */
|
23200 |
|
23201 |
|
23202 |
/***/ }),
|
23203 |
+
/* 146 */
|
23204 |
/***/ (function(module, exports) {
|
23205 |
|
23206 |
// removed by extract-text-webpack-plugin
|
23207 |
|
23208 |
/***/ }),
|
23209 |
+
/* 147 */
|
23210 |
/***/ (function(module, exports) {
|
23211 |
|
23212 |
// removed by extract-text-webpack-plugin
|
23213 |
|
23214 |
/***/ }),
|
23215 |
+
/* 148 */
|
23216 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23217 |
|
23218 |
"use strict";
|
23234 |
}
|
23235 |
|
23236 |
/***/ }),
|
23237 |
+
/* 149 */
|
23238 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23239 |
|
23240 |
"use strict";
|
23291 |
}
|
23292 |
|
23293 |
/***/ }),
|
23294 |
+
/* 150 */
|
23295 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23296 |
|
23297 |
"use strict";
|
23481 |
}
|
23482 |
|
23483 |
/***/ }),
|
|
|
|
|
23484 |
/* 151 */,
|
23485 |
/* 152 */,
|
23486 |
/* 153 */,
|
23490 |
/* 157 */,
|
23491 |
/* 158 */,
|
23492 |
/* 159 */,
|
23493 |
+
/* 160 */,
|
23494 |
+
/* 161 */,
|
23495 |
+
/* 162 */
|
23496 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23497 |
|
23498 |
"use strict";
|
23499 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_vue_loader_lib_selector_type_script_index_0_ListTable_vue__ = __webpack_require__(64);
|
23500 |
/* unused harmony namespace reexport */
|
23501 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vue_loader_lib_template_compiler_index_id_data_v_2562096c_hasScoped_false_buble_transforms_vue_loader_lib_selector_type_template_index_0_ListTable_vue__ = __webpack_require__(164);
|
23502 |
var disposed = false
|
23503 |
function injectStyle (ssrContext) {
|
23504 |
if (disposed) return
|
23505 |
+
__webpack_require__(163)
|
23506 |
}
|
23507 |
var normalizeComponent = __webpack_require__(0)
|
23508 |
/* script */
|
23548 |
|
23549 |
|
23550 |
/***/ }),
|
23551 |
+
/* 163 */
|
23552 |
/***/ (function(module, exports) {
|
23553 |
|
23554 |
// removed by extract-text-webpack-plugin
|
23555 |
|
23556 |
/***/ }),
|
23557 |
+
/* 164 */
|
23558 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
23559 |
|
23560 |
"use strict";
|
24319 |
}
|
24320 |
|
24321 |
/***/ }),
|
|
|
|
|
24322 |
/* 165 */,
|
24323 |
/* 166 */,
|
24324 |
/* 167 */,
|
24343 |
/* 186 */,
|
24344 |
/* 187 */,
|
24345 |
/* 188 */,
|
24346 |
+
/* 189 */,
|
24347 |
+
/* 190 */
|
24348 |
/***/ (function(module, exports, __webpack_require__) {
|
24349 |
|
24350 |
!function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e,t,n){return(l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&u(i,n.prototype),i}).apply(null,arguments)}function d(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var t="SweetAlert2:",f=function(e){return Array.prototype.slice.call(e)},R=function(e){console.warn("".concat(t," ").concat(e))},I=function(e){console.error("".concat(t," ").concat(e))},n=[],m=function(e){-1===n.indexOf(e)&&(n.push(e),R(e))},H=function(e){return"function"==typeof e?e():e},D=function(e){return e&&Promise.resolve(e)===e},e=Object.freeze({cancel:"cancel",backdrop:"overlay",close:"close",esc:"esc",timer:"timer"}),h=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},_=h(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","toast-column","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","icon-text","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl"]),g=h(["success","warning","info","question","error"]),b={previousBodyPadding:null},v=function(e,t){return e.classList.contains(t)},N=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},y=function(e,t,n){e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(function(t){e.forEach?e.forEach(function(e){n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},z=function(e,t){y(e,t,!0)},W=function(e,t){y(e,t,!1)},U=function(e,t){for(var n=0;n<e.childNodes.length;n++)if(v(e.childNodes[n],t))return e.childNodes[n]},K=function(e){e.style.opacity="",e.style.display=e.id===_.content?"block":"flex"},F=function(e){e.style.opacity="",e.style.display="none"},Z=function(e){return e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w=function(){return document.body.querySelector("."+_.container)},C=function(e){var t=w();return t?t.querySelector("."+e):null},k=function(){return C(_.popup)},x=function(){var e=k();return f(e.querySelectorAll("."+_.icon))},A=function(){return C(_.title)},B=function(){return C(_.content)},S=function(){return C(_.image)},P=function(){return C(_.progresssteps)},E=function(){return C(_["validation-message"])},L=function(){return C(_.confirm)},O=function(){return C(_.cancel)},Q=function(){return C(_.actions)},Y=function(){return C(_.footer)},$=function(){return C(_.close)},J=function(){var e=f(k().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(e,t){return e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))<e?1:e<t?-1:0}),t=f(k().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function(e){return"-1"!==e.getAttribute("tabindex")});return function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(e.concat(t)).filter(function(e){return Z(e)})},T=function(){return!M()&&!document.body.classList.contains(_["no-backdrop"])},M=function(){return document.body.classList.contains(_["toast-shown"])},j=function(){return"undefined"==typeof window||"undefined"==typeof document},V='\n <div aria-labelledby="'.concat(_.title,'" aria-describedby="').concat(_.content,'" class="').concat(_.popup,'" tabindex="-1">\n <div class="').concat(_.header,'">\n <ul class="').concat(_.progresssteps,'"></ul>\n <div class="').concat(_.icon," ").concat(g.error,'">\n <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n </div>\n <div class="').concat(_.icon," ").concat(g.question,'">\n <span class="').concat(_["icon-text"],'">?</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.warning,'">\n <span class="').concat(_["icon-text"],'">!</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.info,'">\n <span class="').concat(_["icon-text"],'">i</span>\n </div>\n <div class="').concat(_.icon," ").concat(g.success,'">\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n </div>\n <img class="').concat(_.image,'" />\n <h2 class="').concat(_.title,'" id="').concat(_.title,'"></h2>\n <button type="button" class="').concat(_.close,'">×</button>\n </div>\n <div class="').concat(_.content,'">\n <div id="').concat(_.content,'"></div>\n <input class="').concat(_.input,'" />\n <input type="file" class="').concat(_.file,'" />\n <div class="').concat(_.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(_.select,'"></select>\n <div class="').concat(_.radio,'"></div>\n <label for="').concat(_.checkbox,'" class="').concat(_.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(_.label,'"></span>\n </label>\n <textarea class="').concat(_.textarea,'"></textarea>\n <div class="').concat(_["validation-message"],'" id="').concat(_["validation-message"],'"></div>\n </div>\n <div class="').concat(_.actions,'">\n <button type="button" class="').concat(_.confirm,'">OK</button>\n <button type="button" class="').concat(_.cancel,'">Cancel</button>\n </div>\n <div class="').concat(_.footer,'">\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),X=function(e){var t=w();if(t&&(t.parentNode.removeChild(t),W([document.documentElement,document.body],[_["no-backdrop"],_["toast-shown"],_["has-column"]])),!j()){var n=document.createElement("div");n.className=_.container,n.innerHTML=V;var o="string"==typeof e.target?document.querySelector(e.target):e.target;o.appendChild(n);var i,r=k(),a=B(),s=U(a,_.input),c=U(a,_.file),u=a.querySelector(".".concat(_.range," input")),l=a.querySelector(".".concat(_.range," output")),d=U(a,_.select),p=a.querySelector(".".concat(_.checkbox," input")),f=U(a,_.textarea);r.setAttribute("role",e.toast?"alert":"dialog"),r.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||r.setAttribute("aria-modal","true"),"rtl"===window.getComputedStyle(o).direction&&z(w(),_.rtl);var m=function(e){De.isVisible()&&i!==e.target.value&&De.resetValidationMessage(),i=e.target.value};return s.oninput=m,c.onchange=m,d.onchange=m,p.onchange=m,f.oninput=m,u.oninput=function(e){m(e),l.value=u.value},u.onchange=function(e){m(e),u.nextSibling.value=u.value},r}I("SweetAlert2 requires document to initialize")},G=function(e,t){if(!e)return F(t);if(e instanceof HTMLElement)t.appendChild(e);else if("object"===q(e))if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0));else e&&(t.innerHTML=e);K(t)},ee=function(){if(j())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(t.hasOwnProperty(n)&&void 0!==e.style[n])return t[n];return!1}(),te=function(e){var t=Q(),n=L(),o=O();if(e.showConfirmButton||e.showCancelButton?K(t):F(t),e.showCancelButton?o.style.display="inline-block":F(o),e.showConfirmButton?n.style.removeProperty("display"):F(n),n.innerHTML=e.confirmButtonText,o.innerHTML=e.cancelButtonText,n.setAttribute("aria-label",e.confirmButtonAriaLabel),o.setAttribute("aria-label",e.cancelButtonAriaLabel),n.className=_.confirm,z(n,e.confirmButtonClass),o.className=_.cancel,z(o,e.cancelButtonClass),e.buttonsStyling){z([n,o],_.styled),e.confirmButtonColor&&(n.style.backgroundColor=e.confirmButtonColor),e.cancelButtonColor&&(o.style.backgroundColor=e.cancelButtonColor);var i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.borderLeftColor=i,n.style.borderRightColor=i}else W([n,o],_.styled),n.style.backgroundColor=n.style.borderLeftColor=n.style.borderRightColor="",o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor=""},ne=function(e){var t=B().querySelector("#"+_.content);e.html?G(e.html,t):e.text?(t.textContent=e.text,K(t)):F(t)},oe=function(e){for(var t=x(),n=0;n<t.length;n++)F(t[n]);if(e.type)if(-1!==Object.keys(g).indexOf(e.type)){var o=De.getPopup().querySelector(".".concat(_.icon,".").concat(g[e.type]));K(o),e.animation&&z(o,"swal2-animate-".concat(e.type,"-icon"))}else I('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type,'"'))},ie=function(e){var t=S();e.imageUrl?(t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),K(t),e.imageWidth?t.setAttribute("width",e.imageWidth):t.removeAttribute("width"),e.imageHeight?t.setAttribute("height",e.imageHeight):t.removeAttribute("height"),t.className=_.image,e.imageClass&&z(t,e.imageClass)):F(t)},re=function(i){var r=P(),a=parseInt(null===i.currentProgressStep?De.getQueueStep():i.currentProgressStep,10);i.progressSteps&&i.progressSteps.length?(K(r),r.innerHTML="",a>=i.progressSteps.length&&R("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),i.progressSteps.forEach(function(e,t){var n=document.createElement("li");if(z(n,_.progresscircle),n.innerHTML=e,t===a&&z(n,_.activeprogressstep),r.appendChild(n),t!==i.progressSteps.length-1){var o=document.createElement("li");z(o,_.progressline),i.progressStepsDistance&&(o.style.width=i.progressStepsDistance),r.appendChild(o)}})):F(r)},ae=function(e){var t=A();e.titleText?t.innerText=e.titleText:e.title&&("string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),G(e.title,t))},se=function(){null===b.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(b.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=b.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},ce=function(){return!!window.MSInputMethodContext&&!!document.documentMode},ue=function(){var e=w(),t=k();e.style.removeProperty("align-items"),t.offsetTop<0&&(e.style.alignItems="flex-start")},le={},de=function(e,t){var n=w(),o=k();if(o){null!==e&&"function"==typeof e&&e(o),W(o,_.show),z(o,_.hide);var i=function(){M()?pe(t):(new Promise(function(e){var t=window.scrollX,n=window.scrollY;le.restoreFocusTimeout=setTimeout(function(){le.previousActiveElement&&le.previousActiveElement.focus?(le.previousActiveElement.focus(),le.previousActiveElement=null):document.body&&document.body.focus(),e()},100),void 0!==t&&void 0!==n&&window.scrollTo(t,n)}).then(function(){return pe(t)}),le.keydownTarget.removeEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!1),n.parentNode&&n.parentNode.removeChild(n),W([document.documentElement,document.body],[_.shown,_["height-auto"],_["no-backdrop"],_["toast-shown"],_["toast-column"]]),T()&&(null!==b.previousBodyPadding&&(document.body.style.paddingRight=b.previousBodyPadding,b.previousBodyPadding=null),function(){if(v(document.body,_.iosfix)){var e=parseInt(document.body.style.top,10);W(document.body,_.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}}(),"undefined"!=typeof window&&ce()&&window.removeEventListener("resize",ue),f(document.body.children).forEach(function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))};ee&&!v(o,_.noanimation)?o.addEventListener(ee,function e(){o.removeEventListener(ee,e),v(o,_.hide)&&i()}):i()}},pe=function(e){null!==e&&"function"==typeof e&&setTimeout(function(){e()})};function fe(e){var t=function e(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];if(!(this instanceof e))return l(e,n);Object.getPrototypeOf(e).apply(this,n)};return t.prototype=r(Object.create(e.prototype),{constructor:t}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var me={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",customContainerClass:"",target:"body",backdrop:!0,animation:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,validationMessage:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},he=["useRejections","expectRejections","extraParams"],ge=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],be=function(e){return me.hasOwnProperty(e)||"extraParams"===e},ve=function(e){return-1!==he.indexOf(e)},ye=function(e){for(var t in e)be(t)||R('Unknown parameter "'.concat(t,'"')),e.toast&&-1!==ge.indexOf(t)&&R('The parameter "'.concat(t,'" is incompatible with toasts')),ve(t)&&m('The parameter "'.concat(t,'" is deprecated and will be removed in the next major release.'))},we='"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.',Ce={};var ke=[],xe=function(){var e=k();e||De(""),e=k();var t=Q(),n=L(),o=O();K(t),K(n),z([e,t],_.loading),n.disabled=!0,o.disabled=!0,e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},Ae=Object.freeze({isValidParameter:be,isDeprecatedParameter:ve,argsToParams:function(n){var o={};switch(q(n[0])){case"object":r(o,n[0]);break;default:["title","html","type"].forEach(function(e,t){switch(q(n[t])){case"string":o[e]=n[t];break;case"undefined":break;default:I("Unexpected type of ".concat(e,'! Expected "string", got ').concat(q(n[t])))}})}return o},adaptInputValidator:function(n){return function(e,t){return n.call(this,e,t).then(function(){},function(e){return e})}},close:de,closePopup:de,closeModal:de,closeToast:de,isVisible:function(){return!!k()},clickConfirm:function(){return L().click()},clickCancel:function(){return O().click()},getContainer:w,getPopup:k,getTitle:A,getContent:B,getImage:S,getIcons:x,getCloseButton:$,getButtonsWrapper:function(){return m("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"),C(_.actions)},getActions:Q,getConfirmButton:L,getCancelButton:O,getFooter:Y,getFocusableElements:J,getValidationMessage:E,isLoading:function(){return k().hasAttribute("data-loading")},fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(this,t)},mixin:function(n){return fe(function(e){function t(){return a(this,t),d(this,c(t).apply(this,arguments))}return s(t,e),i(t,[{key:"_main",value:function(e){return p(c(t.prototype),"_main",this).call(this,r({},n,e))}}]),t}(this))},queue:function(e){var r=this;ke=e;var a=function(){ke=[],document.body.removeAttribute("data-swal2-queue-step")},s=[];return new Promise(function(i){!function t(n,o){n<ke.length?(document.body.setAttribute("data-swal2-queue-step",n),r(ke[n]).then(function(e){void 0!==e.value?(s.push(e.value),t(n+1,o)):(a(),i({dismiss:e.dismiss}))})):(a(),i({value:s}))}(0)})},getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")},insertQueueStep:function(e,t){return t&&t<ke.length?ke.splice(t,0,e):ke.push(e)},deleteQueueStep:function(e){void 0!==ke[e]&&ke.splice(e,1)},showLoading:xe,enableLoading:xe,getTimerLeft:function(){return le.timeout&&le.timeout.getTimerLeft()},stopTimer:function(){return le.timeout&&le.timeout.stop()},resumeTimer:function(){return le.timeout&&le.timeout.start()},toggleTimer:function(){var e=le.timeout;return e&&(e.running?e.stop():e.start())},increaseTimer:function(e){return le.timeout&&le.timeout.increase(e)},isTimerRunning:function(){return le.timeout&&le.timeout.isRunning()}}),Be="function"==typeof Symbol?Symbol:function(){var t=0;function e(e){return"__"+e+"_"+Math.floor(1e9*Math.random())+"_"+ ++t+"__"}return e.iterator=e("Symbol.iterator"),e}(),Se="function"==typeof WeakMap?WeakMap:function(n,o,t){function e(){o(this,n,{value:Be("WeakMap")})}return e.prototype={delete:function(e){delete e[this[n]]},get:function(e){return e[this[n]]},has:function(e){return t.call(e,this[n])},set:function(e,t){o(e,this[n],{configurable:!0,value:t})}},e}(Be("WeakMap"),Object.defineProperty,{}.hasOwnProperty),Pe={promise:new Se,innerParams:new Se,domCache:new Se};function Ee(){var e=Pe.innerParams.get(this),t=Pe.domCache.get(this);e.showConfirmButton||(F(t.confirmButton),e.showCancelButton||F(t.actions)),W([t.popup,t.actions],_.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.cancelButton.disabled=!1}function Le(e){var t=Pe.domCache.get(this);t.validationMessage.innerHTML=e;var n=window.getComputedStyle(t.popup);t.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),t.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),K(t.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",_["validation-message"]),N(o),z(o,_.inputerror))}function Oe(){var e=Pe.domCache.get(this);e.validationMessage&&F(e.validationMessage);var t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedBy"),W(t,_.inputerror))}var Te=function e(t,n){a(this,e);var o,i,r=n;this.running=!1,this.start=function(){return this.running||(this.running=!0,i=new Date,o=setTimeout(t,r)),r},this.stop=function(){return this.running&&(this.running=!1,clearTimeout(o),r-=new Date-i),r},this.increase=function(e){var t=this.running;return t&&this.stop(),r+=e,t&&this.start(),r},this.getTimerLeft=function(){return this.running&&(this.stop(),this.start()),r},this.isRunning=function(){return this.running},this.start()},Me={email:function(e,t){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid email address")},url:function(e,t){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(e)?Promise.resolve():Promise.reject(t&&t.validationMessage?t.validationMessage:"Invalid URL")}};var je=function(e){var t=w(),n=k();null!==e.onBeforeOpen&&"function"==typeof e.onBeforeOpen&&e.onBeforeOpen(n),e.animation?(z(n,_.show),z(t,_.fade),W(n,_.hide)):W(n,_.fade),K(n),t.style.overflowY="hidden",ee&&!v(n,_.noanimation)?n.addEventListener(ee,function e(){n.removeEventListener(ee,e),t.style.overflowY="auto"}):t.style.overflowY="auto",z([document.documentElement,document.body,t],_.shown),e.heightAuto&&e.backdrop&&!e.toast&&z([document.documentElement,document.body],_["height-auto"]),T()&&(se(),function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!v(document.body,_.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",z(document.body,_.iosfix)}}(),"undefined"!=typeof window&&ce()&&(ue(),window.addEventListener("resize",ue)),f(document.body.children).forEach(function(e){e===w()||function(e,t){if("function"==typeof e.contains)return e.contains(t)}(e,w())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),setTimeout(function(){t.scrollTop=0})),M()||le.previousActiveElement||(le.previousActiveElement=document.activeElement),null!==e.onOpen&&"function"==typeof e.onOpen&&setTimeout(function(){e.onOpen(n)})};var Ve,qe=Object.freeze({hideLoading:Ee,disableLoading:Ee,getInput:function(e){var t=Pe.innerParams.get(this),n=Pe.domCache.get(this);if(!(e=e||t.input))return null;switch(e){case"select":case"textarea":case"file":return U(n.content,_[e]);case"checkbox":return n.popup.querySelector(".".concat(_.checkbox," input"));case"radio":return n.popup.querySelector(".".concat(_.radio," input:checked"))||n.popup.querySelector(".".concat(_.radio," input:first-child"));case"range":return n.popup.querySelector(".".concat(_.range," input"));default:return U(n.content,_.input)}},enableButtons:function(){var e=Pe.domCache.get(this);e.confirmButton.disabled=!1,e.cancelButton.disabled=!1},disableButtons:function(){var e=Pe.domCache.get(this);e.confirmButton.disabled=!0,e.cancelButton.disabled=!0},enableConfirmButton:function(){Pe.domCache.get(this).confirmButton.disabled=!1},disableConfirmButton:function(){Pe.domCache.get(this).confirmButton.disabled=!0},enableInput:function(){var e=this.getInput();if(!e)return!1;if("radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!1;else e.disabled=!1},disableInput:function(){var e=this.getInput();if(!e)return!1;if(e&&"radio"===e.type)for(var t=e.parentNode.parentNode.querySelectorAll("input"),n=0;n<t.length;n++)t[n].disabled=!0;else e.disabled=!0},showValidationMessage:Le,resetValidationMessage:Oe,resetValidationError:function(){m("Swal.resetValidationError() is deprecated and will be removed in the next major release, use Swal.resetValidationMessage() instead"),Oe.bind(this)()},showValidationError:function(e){m("Swal.showValidationError() is deprecated and will be removed in the next major release, use Swal.showValidationMessage() instead"),Le.bind(this)(e)},getProgressSteps:function(){return Pe.innerParams.get(this).progressSteps},setProgressSteps:function(e){var t=r({},Pe.innerParams.get(this),{progressSteps:e});Pe.innerParams.set(this,t),re(t)},showProgressSteps:function(){var e=Pe.domCache.get(this);K(e.progressSteps)},hideProgressSteps:function(){var e=Pe.domCache.get(this);F(e.progressSteps)},_main:function(e){var T=this;ye(e);var M=r({},me,e);!function(t){var e;t.inputValidator||Object.keys(Me).forEach(function(e){t.input===e&&(t.inputValidator=t.expectRejections?Me[e]:De.adaptInputValidator(Me[e]))}),t.validationMessage&&("object"!==q(t.extraParams)&&(t.extraParams={}),t.extraParams.validationMessage=t.validationMessage),(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(R('Target parameter is not valid, defaulting to "body"'),t.target="body"),"function"==typeof t.animation&&(t.animation=t.animation.call());var n=k(),o="string"==typeof t.target?document.querySelector(t.target):t.target;e=n&&o&&n.parentNode!==o.parentNode?X(t):n||X(t),t.width&&(e.style.width="number"==typeof t.width?t.width+"px":t.width),t.padding&&(e.style.padding="number"==typeof t.padding?t.padding+"px":t.padding),t.background&&(e.style.background=t.background);for(var i=window.getComputedStyle(e).getPropertyValue("background-color"),r=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),a=0;a<r.length;a++)r[a].style.backgroundColor=i;var s=w(),c=$(),u=Y();if(ae(t),ne(t),"string"==typeof t.backdrop?w().style.background=t.backdrop:t.backdrop||z([document.documentElement,document.body],_["no-backdrop"]),!t.backdrop&&t.allowOutsideClick&&R('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.position in _?z(s,_[t.position]):(R('The "position" parameter is not valid, defaulting to "center"'),z(s,_.center)),t.grow&&"string"==typeof t.grow){var l="grow-"+t.grow;l in _&&z(s,_[l])}t.showCloseButton?(c.setAttribute("aria-label",t.closeButtonAriaLabel),K(c)):F(c),e.className=_.popup,t.toast?(z([document.documentElement,document.body],_["toast-shown"]),z(e,_.toast)):z(e,_.modal),t.customClass&&z(e,t.customClass),t.customContainerClass&&z(s,t.customContainerClass),re(t),oe(t),ie(t),te(t),G(t.footer,u),!0===t.animation?W(e,_.noanimation):z(e,_.noanimation),t.showLoaderOnConfirm&&!t.preConfirm&&R("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request")}(M),Object.freeze(M),Pe.innerParams.set(this,M),le.timeout&&(le.timeout.stop(),delete le.timeout),clearTimeout(le.restoreFocusTimeout);var j={popup:k(),container:w(),content:B(),actions:Q(),confirmButton:L(),cancelButton:O(),closeButton:$(),validationMessage:E(),progressSteps:P()};Pe.domCache.set(this,j);var V=this.constructor;return new Promise(function(t,n){var o=function(e){V.closePopup(M.onClose,M.onAfterClose),M.useRejections?t(e):t({value:e})},c=function(e){V.closePopup(M.onClose,M.onAfterClose),M.useRejections?n(e):t({dismiss:e})},u=function(e){V.closePopup(M.onClose,M.onAfterClose),n(e)};M.timer&&(le.timeout=new Te(function(){c("timer"),delete le.timeout},M.timer)),M.input&&setTimeout(function(){var e=T.getInput();e&&N(e)},0);for(var l=function(t){if(M.showLoaderOnConfirm&&V.showLoading(),M.preConfirm){T.resetValidationMessage();var e=Promise.resolve().then(function(){return M.preConfirm(t,M.extraParams)});M.expectRejections?e.then(function(e){return o(e||t)},function(e){T.hideLoading(),e&&T.showValidationMessage(e)}):e.then(function(e){Z(j.validationMessage)||!1===e?T.hideLoading():o(e||t)},function(e){return u(e)})}else o(t)},e=function(e){var t=e.target,n=j.confirmButton,o=j.cancelButton,i=n&&(n===t||n.contains(t)),r=o&&(o===t||o.contains(t));switch(e.type){case"click":if(i&&V.isVisible())if(T.disableButtons(),M.input){var a=function(){var e=T.getInput();if(!e)return null;switch(M.input){case"checkbox":return e.checked?1:0;case"radio":return e.checked?e.value:null;case"file":return e.files.length?e.files[0]:null;default:return M.inputAutoTrim?e.value.trim():e.value}}();if(M.inputValidator){T.disableInput();var s=Promise.resolve().then(function(){return M.inputValidator(a,M.extraParams)});M.expectRejections?s.then(function(){T.enableButtons(),T.enableInput(),l(a)},function(e){T.enableButtons(),T.enableInput(),e&&T.showValidationMessage(e)}):s.then(function(e){T.enableButtons(),T.enableInput(),e?T.showValidationMessage(e):l(a)},function(e){return u(e)})}else T.getInput().checkValidity()?l(a):(T.enableButtons(),T.showValidationMessage(M.validationMessage))}else l(!0);else r&&V.isVisible()&&(T.disableButtons(),c(V.DismissReason.cancel))}},i=j.popup.querySelectorAll("button"),r=0;r<i.length;r++)i[r].onclick=e,i[r].onmouseover=e,i[r].onmouseout=e,i[r].onmousedown=e;if(j.closeButton.onclick=function(){c(V.DismissReason.close)},M.toast)j.popup.onclick=function(){M.showConfirmButton||M.showCancelButton||M.showCloseButton||M.input||c(V.DismissReason.close)};else{var a=!1;j.popup.onmousedown=function(){j.container.onmouseup=function(e){j.container.onmouseup=void 0,e.target===j.container&&(a=!0)}},j.container.onmousedown=function(){j.popup.onmouseup=function(e){j.popup.onmouseup=void 0,(e.target===j.popup||j.popup.contains(e.target))&&(a=!0)}},j.container.onclick=function(e){a?a=!1:e.target===j.container&&H(M.allowOutsideClick)&&c(V.DismissReason.backdrop)}}M.reverseButtons?j.confirmButton.parentNode.insertBefore(j.cancelButton,j.confirmButton):j.confirmButton.parentNode.insertBefore(j.confirmButton,j.cancelButton);var s=function(e,t){for(var n=J(M.focusCancel),o=0;o<n.length;o++)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();j.popup.focus()};le.keydownHandlerAdded&&(le.keydownTarget.removeEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!1),M.toast||(le.keydownHandler=function(e){return function(e,t){if(t.stopKeydownPropagation&&e.stopPropagation(),"Enter"!==e.key||e.isComposing)if("Tab"===e.key){for(var n=e.target,o=J(t.focusCancel),i=-1,r=0;r<o.length;r++)if(n===o[r]){i=r;break}e.shiftKey?s(i,-1):s(i,1),e.stopPropagation(),e.preventDefault()}else-1!==["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"].indexOf(e.key)?document.activeElement===j.confirmButton&&Z(j.cancelButton)?j.cancelButton.focus():document.activeElement===j.cancelButton&&Z(j.confirmButton)&&j.confirmButton.focus():"Escape"!==e.key&&"Esc"!==e.key||!0!==H(t.allowEscapeKey)||(e.preventDefault(),c(V.DismissReason.esc));else if(e.target&&T.getInput()&&e.target.outerHTML===T.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(t.input))return;V.clickConfirm(),e.preventDefault()}}(e,M)},le.keydownTarget=M.keydownListenerCapture?window:j.popup,le.keydownListenerCapture=M.keydownListenerCapture,le.keydownTarget.addEventListener("keydown",le.keydownHandler,{capture:le.keydownListenerCapture}),le.keydownHandlerAdded=!0),T.enableButtons(),T.hideLoading(),T.resetValidationMessage(),M.toast&&(M.input||M.footer||M.showCloseButton)?z(document.body,_["toast-column"]):W(document.body,_["toast-column"]);for(var d,p,f=["input","file","range","select","radio","checkbox","textarea"],m=function(e){e.placeholder&&!M.inputPlaceholder||(e.placeholder=M.inputPlaceholder)},h=0;h<f.length;h++){var g=_[f[h]],b=U(j.content,g);if(d=T.getInput(f[h])){for(var v in d.attributes)if(d.attributes.hasOwnProperty(v)){var y=d.attributes[v].name;"type"!==y&&"value"!==y&&d.removeAttribute(y)}for(var w in M.inputAttributes)"range"===f[h]&&"placeholder"===w||d.setAttribute(w,M.inputAttributes[w])}b.className=g,M.inputClass&&z(b,M.inputClass),F(b)}switch(M.input){case"text":case"email":case"password":case"number":case"tel":case"url":d=U(j.content,_.input),"string"==typeof M.inputValue||"number"==typeof M.inputValue?d.value=M.inputValue:D(M.inputValue)||R('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(q(M.inputValue),'"')),m(d),d.type=M.input,K(d);break;case"file":m(d=U(j.content,_.file)),d.type=M.input,K(d);break;case"range":var C=U(j.content,_.range),k=C.querySelector("input"),x=C.querySelector("output");k.value=M.inputValue,k.type=M.input,x.value=M.inputValue,K(C);break;case"select":var A=U(j.content,_.select);if(A.innerHTML="",M.inputPlaceholder){var B=document.createElement("option");B.innerHTML=M.inputPlaceholder,B.value="",B.disabled=!0,B.selected=!0,A.appendChild(B)}p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement("option");o.value=t,o.innerHTML=n,M.inputValue.toString()===t.toString()&&(o.selected=!0),A.appendChild(o)}),K(A),A.focus()};break;case"radio":var S=U(j.content,_.radio);S.innerHTML="",p=function(e){e.forEach(function(e){var t=e[0],n=e[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=_.radio,o.value=t,M.inputValue.toString()===t.toString()&&(o.checked=!0);var r=document.createElement("span");r.innerHTML=n,r.className=_.label,i.appendChild(o),i.appendChild(r),S.appendChild(i)}),K(S);var t=S.querySelectorAll("input");t.length&&t[0].focus()};break;case"checkbox":var P=U(j.content,_.checkbox),E=T.getInput("checkbox");E.type="checkbox",E.value=1,E.id=_.checkbox,E.checked=Boolean(M.inputValue),P.querySelector("span").innerHTML=M.inputPlaceholder,K(P);break;case"textarea":var L=U(j.content,_.textarea);L.value=M.inputValue,m(L),K(L);break;case null:break;default:I('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(M.input,'"'))}if("select"===M.input||"radio"===M.input){var O=function(e){return p((t=e,n=[],"undefined"!=typeof Map&&t instanceof Map?t.forEach(function(e,t){n.push([t,e])}):Object.keys(t).forEach(function(e){n.push([e,t[e]])}),n));var t,n};D(M.inputOptions)?(V.showLoading(),M.inputOptions.then(function(e){T.hideLoading(),O(e)})):"object"===q(M.inputOptions)?O(M.inputOptions):I("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(q(M.inputOptions)))}else-1!==["text","email","number","tel","textarea"].indexOf(M.input)&&D(M.inputValue)&&(V.showLoading(),F(d),M.inputValue.then(function(e){d.value="number"===M.input?parseFloat(e)||0:e+"",K(d),d.focus(),T.hideLoading()}).catch(function(e){I("Error in inputValue promise: "+e),d.value="",K(d),d.focus(),T.hideLoading()}));je(M),M.toast||(H(M.allowEnterKey)?M.focusCancel&&Z(j.cancelButton)?j.cancelButton.focus():M.focusConfirm&&Z(j.confirmButton)?j.confirmButton.focus():s(-1,1):document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()),j.container.scrollTop=0})}});function Re(){if("undefined"!=typeof window){"undefined"==typeof Promise&&I("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Ve=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0}});var i=this._main(this.params);Pe.promise.set(this,i)}}Re.prototype.then=function(e,t){return Pe.promise.get(this).then(e,t)},Re.prototype.catch=function(e){return Pe.promise.get(this).catch(e)},Re.prototype.finally=function(e){return Pe.promise.get(this).finally(e)},r(Re.prototype,qe),r(Re,Ae),Object.keys(qe).forEach(function(t){Re[t]=function(){var e;if(Ve)return(e=Ve)[t].apply(e,arguments)}}),Re.DismissReason=e,Re.noop=function(){};var Ie,He,De=fe((Ie=Re,He=function(e){function t(){return a(this,t),d(this,c(t).apply(this,arguments))}return s(t,Ie),i(t,[{key:"_main",value:function(e){return p(c(t.prototype),"_main",this).call(this,r({},Ce,e))}}],[{key:"setDefaults",value:function(t){if(m(we),!t||"object"!==q(t))throw new TypeError("SweetAlert2: The argument for setDefaults() is required and has to be a object");ye(t),Object.keys(t).forEach(function(e){Ie.isValidParameter(e)&&(Ce[e]=t[e])})}},{key:"resetDefaults",value:function(){m(we),Ce={}}}]),t}(),"undefined"!=typeof window&&"object"===q(window._swalDefaults)&&He.setDefaults(window._swalDefaults),He));return De.default=De}),"undefined"!=typeof window&&window.Sweetalert2&&(window.Sweetalert2.version="7.33.1",window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2);
|
24351 |
|
24352 |
/***/ }),
|
24353 |
+
/* 191 */
|
24354 |
/***/ (function(module, exports, __webpack_require__) {
|
24355 |
|
24356 |
|
24357 |
+
var content = __webpack_require__(192);
|
24358 |
|
24359 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
24360 |
|
24368 |
options.transform = transform
|
24369 |
options.insertInto = undefined;
|
24370 |
|
24371 |
+
var update = __webpack_require__(22)(content, options);
|
24372 |
|
24373 |
if(content.locals) module.exports = content.locals;
|
24374 |
|
24400 |
}
|
24401 |
|
24402 |
/***/ }),
|
24403 |
+
/* 192 */
|
24404 |
/***/ (function(module, exports, __webpack_require__) {
|
24405 |
|
24406 |
+
exports = module.exports = __webpack_require__(19)(false);
|
24407 |
// imports
|
24408 |
|
24409 |
|
24414 |
|
24415 |
|
24416 |
/***/ }),
|
|
|
24417 |
/* 193 */,
|
24418 |
/* 194 */,
|
24419 |
/* 195 */,
|
24421 |
/* 197 */,
|
24422 |
/* 198 */,
|
24423 |
/* 199 */,
|
24424 |
+
/* 200 */,
|
24425 |
+
/* 201 */
|
24426 |
/***/ (function(module, exports, __webpack_require__) {
|
24427 |
|
24428 |
|
24429 |
+
var content = __webpack_require__(202);
|
24430 |
|
24431 |
if(typeof content === 'string') content = [[module.i, content, '']];
|
24432 |
|
24440 |
options.transform = transform
|
24441 |
options.insertInto = undefined;
|
24442 |
|
24443 |
+
var update = __webpack_require__(22)(content, options);
|
24444 |
|
24445 |
if(content.locals) module.exports = content.locals;
|
24446 |
|
24472 |
}
|
24473 |
|
24474 |
/***/ }),
|
24475 |
+
/* 202 */
|
24476 |
/***/ (function(module, exports, __webpack_require__) {
|
24477 |
|
24478 |
+
exports = module.exports = __webpack_require__(19)(false);
|
24479 |
// imports
|
24480 |
|
24481 |
|
24486 |
|
24487 |
|
24488 |
/***/ }),
|
24489 |
+
/* 203 */
|
24490 |
/***/ (function(module, exports, __webpack_require__) {
|
24491 |
|
24492 |
__webpack_require__(2);
|
24493 |
__webpack_require__(1);
|
24494 |
__webpack_require__(14);
|
24495 |
+
__webpack_require__(67);
|
24496 |
__webpack_require__(4);
|
24497 |
+
__webpack_require__(62);
|
24498 |
+
__webpack_require__(20);
|
24499 |
+
__webpack_require__(77);
|
24500 |
+
module.exports = __webpack_require__(63);
|
24501 |
|
24502 |
|
24503 |
/***/ }),
|
24504 |
+
/* 204 */,
|
24505 |
+
/* 205 */
|
24506 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24507 |
|
24508 |
"use strict";
|
24509 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAddHook__ = __webpack_require__(206);
|
24510 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRemoveHook__ = __webpack_require__(207);
|
24511 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createHasHook__ = __webpack_require__(208);
|
24512 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createRunHook__ = __webpack_require__(209);
|
24513 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createCurrentHook__ = __webpack_require__(210);
|
24514 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createDoingHook__ = __webpack_require__(211);
|
24515 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__createDidHook__ = __webpack_require__(212);
|
24516 |
|
24517 |
|
24518 |
|
24557 |
//# sourceMappingURL=createHooks.js.map
|
24558 |
|
24559 |
/***/ }),
|
24560 |
+
/* 206 */
|
24561 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24562 |
|
24563 |
"use strict";
|
24564 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateNamespace_js__ = __webpack_require__(81);
|
24565 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__validateHookName_js__ = __webpack_require__(40);
|
24566 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(39);
|
24567 |
|
24568 |
|
24569 |
|
24656 |
//# sourceMappingURL=createAddHook.js.map
|
24657 |
|
24658 |
/***/ }),
|
24659 |
+
/* 207 */
|
24660 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24661 |
|
24662 |
"use strict";
|
24663 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateNamespace_js__ = __webpack_require__(81);
|
24664 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__validateHookName_js__ = __webpack_require__(40);
|
24665 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2____ = __webpack_require__(39);
|
24666 |
|
24667 |
|
24668 |
|
24746 |
//# sourceMappingURL=createRemoveHook.js.map
|
24747 |
|
24748 |
/***/ }),
|
24749 |
+
/* 208 */
|
24750 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24751 |
|
24752 |
"use strict";
|
24776 |
//# sourceMappingURL=createHasHook.js.map
|
24777 |
|
24778 |
/***/ }),
|
24779 |
+
/* 209 */
|
24780 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24781 |
|
24782 |
"use strict";
|
24849 |
//# sourceMappingURL=createRunHook.js.map
|
24850 |
|
24851 |
/***/ }),
|
24852 |
+
/* 210 */
|
24853 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24854 |
|
24855 |
"use strict";
|
24883 |
//# sourceMappingURL=createCurrentHook.js.map
|
24884 |
|
24885 |
/***/ }),
|
24886 |
+
/* 211 */
|
24887 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24888 |
|
24889 |
"use strict";
|
24920 |
//# sourceMappingURL=createDoingHook.js.map
|
24921 |
|
24922 |
/***/ }),
|
24923 |
+
/* 212 */
|
24924 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
24925 |
|
24926 |
"use strict";
|
24927 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__validateHookName_js__ = __webpack_require__(40);
|
24928 |
|
24929 |
/**
|
24930 |
* Returns a function which, when invoked, will return the number of times a
|
classes/admin-withdraw.php
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dokan Admin withdraw class
|
5 |
-
*
|
6 |
-
* Manupulate all withdraw functionality
|
7 |
-
* in admin backend
|
8 |
-
*
|
9 |
-
* @author weDevs <info@wedevs>
|
10 |
-
*
|
11 |
-
* @since 2.4
|
12 |
-
*
|
13 |
-
* @package dokan
|
14 |
-
*/
|
15 |
-
class Dokan_Admin_Withdraw extends Dokan_Withdraw {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Initializes the Dokan_Admin_Withdraw class
|
19 |
-
*
|
20 |
-
* Checks for an existing Dokan_Admin_Withdraw instance
|
21 |
-
* and if it doesn't find one, creates it.
|
22 |
-
*/
|
23 |
-
public static function init() {
|
24 |
-
static $instance = false;
|
25 |
-
|
26 |
-
if ( ! $instance ) {
|
27 |
-
$instance = new Dokan_Admin_Withdraw();
|
28 |
-
}
|
29 |
-
|
30 |
-
return $instance;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Generate CSV file from ajax request (Vue)
|
35 |
-
*
|
36 |
-
* @return void
|
37 |
-
*/
|
38 |
-
public function withdraw_ajax() {
|
39 |
-
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
40 |
-
wp_send_json_error( __( 'You have no permission to do this action', 'dokan-lite' ) );
|
41 |
-
}
|
42 |
-
|
43 |
-
if ( ! isset( $_POST['nonce'] ) ) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
|
47 |
-
$nonce = sanitize_text_field( wp_unslash( $_POST['nonce'] ) );
|
48 |
-
|
49 |
-
if ( ! wp_verify_nonce( $nonce, 'dokan_admin' ) ) {
|
50 |
-
wp_send_json_error( __( 'Invalid nonce', 'dokan-lite' ) );
|
51 |
-
}
|
52 |
-
|
53 |
-
header( 'Content-type: html/csv' );
|
54 |
-
header( 'Content-Disposition: attachment; filename="withdraw-' . date( 'd-m-y' ) . '.csv"' );
|
55 |
-
|
56 |
-
$ids = isset( $_POST['id'] ) ? sanitize_text_field( wp_unslash( $_POST['id'] ) ) : '';
|
57 |
-
|
58 |
-
$this->generate_csv( $ids );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Export withdraws as CSV format
|
63 |
-
*
|
64 |
-
* @param string $withdraw_ids
|
65 |
-
*
|
66 |
-
* @return void admin
|
67 |
-
*/
|
68 |
-
function generate_csv( $withdraw_ids ) {
|
69 |
-
global $wpdb;
|
70 |
-
|
71 |
-
$result = $wpdb->get_results(
|
72 |
-
$wpdb->prepare( "SELECT * FROM {$wpdb->dokan_withdraw} WHERE id in ($withdraw_ids) and status = %d", 0 )
|
73 |
-
);
|
74 |
-
|
75 |
-
if ( ! $result ) {
|
76 |
-
return;
|
77 |
-
}
|
78 |
-
|
79 |
-
$currency = get_option( 'woocommerce_currency' );
|
80 |
-
|
81 |
-
foreach ( $result as $key => $obj ) {
|
82 |
-
|
83 |
-
if ( $obj->method != 'paypal' ) {
|
84 |
-
continue;
|
85 |
-
}
|
86 |
-
|
87 |
-
$data[] = array(
|
88 |
-
'email' => dokan_get_seller_withdraw_mail( $obj->user_id ),
|
89 |
-
'amount' => $obj->amount,
|
90 |
-
'currency' => $currency,
|
91 |
-
);
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( $data ) {
|
96 |
-
|
97 |
-
header( 'Content-type: html/csv' );
|
98 |
-
header( 'Content-Disposition: attachment; filename="withdraw-' . date( 'd-m-y' ) . '.csv"' );
|
99 |
-
|
100 |
-
foreach ( $data as $fields ) {
|
101 |
-
echo esc_html( $fields['email'] ) . ',';
|
102 |
-
echo esc_html( $fields['amount'] ) . ',';
|
103 |
-
echo esc_html( $fields['currency'] ) . "\n";
|
104 |
-
}
|
105 |
-
|
106 |
-
die();
|
107 |
-
}
|
108 |
-
}
|
109 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/template-main.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Dokan settings Class
|
4 |
-
*
|
5 |
-
* @author weDves <info@wedevs.com>
|
6 |
-
*/
|
7 |
-
class Dokan_Template_Main {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Load autometically when class inistantiate
|
11 |
-
* hooked up all actions and filters
|
12 |
-
*
|
13 |
-
* @since 2.4
|
14 |
-
*/
|
15 |
-
function __construct() {
|
16 |
-
add_action( 'dokan_dashboard_content_before', array( $this, 'get_dashboard_side_navigation' ), 10 );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Singleton method
|
21 |
-
*
|
22 |
-
* @return self
|
23 |
-
*/
|
24 |
-
public static function init() {
|
25 |
-
static $instance = false;
|
26 |
-
|
27 |
-
if ( ! $instance ) {
|
28 |
-
$instance = new Dokan_Template_Main();
|
29 |
-
}
|
30 |
-
|
31 |
-
return $instance;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Get Dashboard Side Navigations
|
36 |
-
*
|
37 |
-
* @since 2.4
|
38 |
-
*
|
39 |
-
* @return void
|
40 |
-
*/
|
41 |
-
public function get_dashboard_side_navigation() {
|
42 |
-
global $wp;
|
43 |
-
|
44 |
-
$request = $wp->request;
|
45 |
-
$active = explode( '/', $request );
|
46 |
-
|
47 |
-
unset( $active[0] );
|
48 |
-
|
49 |
-
if ( $active ) {
|
50 |
-
$active_menu = implode( '/', $active );
|
51 |
-
|
52 |
-
if ( $active_menu == 'new-product' ) {
|
53 |
-
$active_menu = 'products';
|
54 |
-
}
|
55 |
-
|
56 |
-
if ( get_query_var( 'edit' ) && is_singular( 'product' ) ) {
|
57 |
-
$active_menu = 'products';
|
58 |
-
}
|
59 |
-
} else {
|
60 |
-
$active_menu = 'dashboard';
|
61 |
-
}
|
62 |
-
|
63 |
-
dokan_get_template_part( 'global/dashboard-nav', '', array( 'active_menu' => apply_filters( 'dokan_dashboard_nav_active', $active_menu, $request, $active ) ) );
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/upgrade.php
DELETED
@@ -1,152 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Dokan Upgrade class
|
4 |
-
*
|
5 |
-
* Performas upgrade dokan latest version
|
6 |
-
*
|
7 |
-
* @since 2.1
|
8 |
-
*
|
9 |
-
* @package Dokan
|
10 |
-
*/
|
11 |
-
class Dokan_Upgrade {
|
12 |
-
|
13 |
-
/** @var array DB updates that need to be run */
|
14 |
-
private static $updates = [
|
15 |
-
'1.2' => 'upgrades/dokan-upgrade-1.2.php',
|
16 |
-
'2.1' => 'upgrades/dokan-upgrade-2.1.php',
|
17 |
-
'2.3' => 'upgrades/dokan-upgrade-2.3.php',
|
18 |
-
'2.4.11' => 'upgrades/dokan-upgrade-2.4.11.php',
|
19 |
-
'2.4.12' => 'upgrades/dokan-upgrade-2.4.12.php',
|
20 |
-
'2.5.7' => 'upgrades/dokan-upgrade-2.5.7.php',
|
21 |
-
'2.6.9' => 'upgrades/dokan-upgrade-2.6.9.php',
|
22 |
-
'2.7.3' => 'upgrades/dokan-upgrade-2.7.3.php',
|
23 |
-
'2.7.6' => 'upgrades/dokan-upgrade-2.7.6.php',
|
24 |
-
'2.8.0' => 'upgrades/dokan-upgrade-2.8.0.php',
|
25 |
-
'2.8.3' => 'upgrades/dokan-upgrade-2.8.3.php',
|
26 |
-
'2.8.6' => 'upgrades/dokan-upgrade-2.8.6.php',
|
27 |
-
'2.9.4' => 'upgrades/dokan-upgrade-2.9.4.php',
|
28 |
-
'2.9.13' => 'upgrades/dokan-upgrade-2.9.13.php',
|
29 |
-
'2.9.16' => 'upgrades/dokan-upgrade-2.9.16.php',
|
30 |
-
'2.9.19' => 'upgrades/dokan-upgrade-2.9.19.php',
|
31 |
-
'2.9.23' => 'upgrades/dokan-upgrade-2.9.23.php',
|
32 |
-
];
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Constructor loader function
|
36 |
-
*
|
37 |
-
* Load autometically when class instantiate.
|
38 |
-
*
|
39 |
-
* @since 1.0
|
40 |
-
*/
|
41 |
-
function __construct() {
|
42 |
-
add_action( 'admin_notices', array( $this, 'show_update_notice' ) );
|
43 |
-
add_action( 'admin_init', array( $this, 'do_updates' ) );
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Check if need any update
|
48 |
-
*
|
49 |
-
* @since 1.0
|
50 |
-
*
|
51 |
-
* @return boolean
|
52 |
-
*/
|
53 |
-
public function is_needs_update() {
|
54 |
-
$installed_version = get_option( 'dokan_theme_version' );
|
55 |
-
|
56 |
-
// may be it's the first install
|
57 |
-
if ( ! $installed_version ) {
|
58 |
-
return false;
|
59 |
-
}
|
60 |
-
|
61 |
-
if ( get_transient( 'dokan_theme_version_for_updater' ) ) {
|
62 |
-
return version_compare( get_transient( 'dokan_theme_version_for_updater' ), DOKAN_PLUGIN_VERSION, '<' );
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( version_compare( $installed_version, DOKAN_PLUGIN_VERSION, '<' ) ) {
|
66 |
-
return true;
|
67 |
-
}
|
68 |
-
|
69 |
-
return false;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Show update notice
|
74 |
-
*
|
75 |
-
* @since 1.0
|
76 |
-
*
|
77 |
-
* @return void
|
78 |
-
*/
|
79 |
-
public function show_update_notice() {
|
80 |
-
if ( ! current_user_can( 'update_plugins' ) || ! $this->is_needs_update() ) {
|
81 |
-
return;
|
82 |
-
}
|
83 |
-
|
84 |
-
$installed_version = get_option( 'dokan_theme_version' );
|
85 |
-
$updates_versions = array_keys( self::$updates );
|
86 |
-
|
87 |
-
if ( ! is_null( $installed_version ) && version_compare( $installed_version, end( $updates_versions ), '<' ) ) {
|
88 |
-
$url = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
89 |
-
?>
|
90 |
-
<div id="message" class="updated">
|
91 |
-
<p><?php printf( '<strong>%s – %s</strong>', esc_attr__( 'Dokan Data Update Required', 'dokan-lite' ), esc_attr__( 'We need to update your install to the latest version', 'dokan-lite' ) ); ?></p>
|
92 |
-
<p class="submit"><a href="<?php echo esc_url( add_query_arg( [ 'dokan_do_update' => true ], $url ) ); ?>" class="dokan-update-btn button-primary"><?php esc_attr_e( 'Run the updater', 'dokan-lite' ); ?></a></p>
|
93 |
-
</div>
|
94 |
-
|
95 |
-
<script type="text/javascript">
|
96 |
-
jQuery('.dokan-update-btn').click('click', function(){
|
97 |
-
return confirm( '<?php esc_attr_e( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'dokan-lite' ); ?>' );
|
98 |
-
});
|
99 |
-
</script>
|
100 |
-
<?php
|
101 |
-
} else {
|
102 |
-
update_option( 'dokan_theme_version', DOKAN_PLUGIN_VERSION );
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Do all updates when Run updater btn click
|
109 |
-
*
|
110 |
-
* @since 1.0
|
111 |
-
*
|
112 |
-
* @return void
|
113 |
-
*/
|
114 |
-
public function do_updates() {
|
115 |
-
if ( isset( $_GET['dokan_do_update'] ) && sanitize_text_field( wp_unslash( $_GET['dokan_do_update'] ) ) ) {
|
116 |
-
$this->perform_updates();
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Perform all updates
|
122 |
-
*
|
123 |
-
* @since 1.0
|
124 |
-
*
|
125 |
-
* @return void
|
126 |
-
*/
|
127 |
-
public function perform_updates() {
|
128 |
-
if ( ! $this->is_needs_update() ) {
|
129 |
-
return;
|
130 |
-
}
|
131 |
-
|
132 |
-
$installed_version = get_option( 'dokan_theme_version' );
|
133 |
-
|
134 |
-
if ( get_transient( 'dokan_theme_version_for_updater' ) ) {
|
135 |
-
$installed_version = get_transient( 'dokan_theme_version_for_updater' );
|
136 |
-
}
|
137 |
-
|
138 |
-
foreach ( self::$updates as $version => $path ) {
|
139 |
-
if ( version_compare( $installed_version, $version, '<' ) ) {
|
140 |
-
include DOKAN_INC_DIR . '/' . $path;
|
141 |
-
update_option( 'dokan_theme_version', $version );
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
delete_transient( 'dokan_theme_version_for_updater' );
|
146 |
-
update_option( 'dokan_theme_version', DOKAN_PLUGIN_VERSION );
|
147 |
-
|
148 |
-
$location = wp_unslash( add_query_arg( [ 'page' => 'dokan' ], admin_url( 'admin.php' ) ) );
|
149 |
-
wp_redirect( $location );
|
150 |
-
exit();
|
151 |
-
}
|
152 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/withdraw.php
DELETED
@@ -1,231 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Withdraw base class
|
4 |
-
*
|
5 |
-
* @author wedDevs <info@wedevs.com>
|
6 |
-
*
|
7 |
-
* @since 2.4
|
8 |
-
*
|
9 |
-
* @package dokan
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Dokan_Withdraw {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Initializes the Dokan_Template_Withdraw class
|
16 |
-
*
|
17 |
-
* Checks for an existing Dokan_Template_Withdraw instance
|
18 |
-
* and if it doesn't find one, creates it.
|
19 |
-
*/
|
20 |
-
public static function init() {
|
21 |
-
static $instance = false;
|
22 |
-
|
23 |
-
if ( ! $instance ) {
|
24 |
-
$instance = new Dokan_Withdraw();
|
25 |
-
}
|
26 |
-
|
27 |
-
return $instance;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Update withdraw status
|
32 |
-
*
|
33 |
-
* @since 2.4
|
34 |
-
*
|
35 |
-
* @param integer $row_id
|
36 |
-
* @param integer $user_id
|
37 |
-
* @param string $status
|
38 |
-
*
|
39 |
-
* @return void
|
40 |
-
*/
|
41 |
-
function update_status( $row_id, $user_id, $status ) {
|
42 |
-
global $wpdb;
|
43 |
-
|
44 |
-
// 0 -> pending
|
45 |
-
// 1 -> active
|
46 |
-
// 2 -> cancelled
|
47 |
-
|
48 |
-
$wpdb->query(
|
49 |
-
$wpdb->prepare( "UPDATE {$wpdb->dokan_withdraw} SET status = %d WHERE user_id=%d AND id = %d",
|
50 |
-
$status,
|
51 |
-
$user_id,
|
52 |
-
$row_id
|
53 |
-
)
|
54 |
-
);
|
55 |
-
|
56 |
-
do_action( 'dokan_withdraw_status_updated', $status, $user_id, $row_id );
|
57 |
-
|
58 |
-
$cache_key = 'dokan_seller_balance_' . $user_id;
|
59 |
-
wp_cache_delete( $cache_key );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Insert an withdraw request
|
64 |
-
*
|
65 |
-
* @param array $data
|
66 |
-
*
|
67 |
-
* @return boolean
|
68 |
-
*/
|
69 |
-
function insert_withdraw( $data = array() ) {
|
70 |
-
global $wpdb;
|
71 |
-
|
72 |
-
$wpdb->dokan_withdraw = $wpdb->prefix . 'dokan_withdraw';
|
73 |
-
$data = array(
|
74 |
-
'user_id' => $data['user_id'],
|
75 |
-
'amount' => $data['amount'],
|
76 |
-
'date' => current_time( 'mysql' ),
|
77 |
-
'status' => $data['status'],
|
78 |
-
'method' => $data['method'],
|
79 |
-
'note' => $data['notes'],
|
80 |
-
'ip' => $data['ip'],
|
81 |
-
);
|
82 |
-
|
83 |
-
$format = array( '%d', '%f', '%s', '%d', '%s', '%s', '%s' );
|
84 |
-
|
85 |
-
return $wpdb->insert( $wpdb->dokan_withdraw, $data, $format );
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Check if a user has already pending withdraw request
|
90 |
-
*
|
91 |
-
* @param integer $user_id
|
92 |
-
*
|
93 |
-
* @return boolean
|
94 |
-
*/
|
95 |
-
function has_pending_request( $user_id ) {
|
96 |
-
global $wpdb;
|
97 |
-
|
98 |
-
$wpdb->dokan_withdraw = $wpdb->prefix . 'dokan_withdraw';
|
99 |
-
|
100 |
-
$status = $wpdb->get_results(
|
101 |
-
$wpdb->prepare(
|
102 |
-
"SELECT id
|
103 |
-
FROM $wpdb->dokan_withdraw
|
104 |
-
WHERE user_id = %d AND status = 0",
|
105 |
-
$user_id
|
106 |
-
)
|
107 |
-
);
|
108 |
-
|
109 |
-
if ( $status ) {
|
110 |
-
return true;
|
111 |
-
}
|
112 |
-
|
113 |
-
return false;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get withdraw request of a user
|
118 |
-
*
|
119 |
-
* @param integer $user_id
|
120 |
-
* @param integer $status
|
121 |
-
* @param integer $limit
|
122 |
-
* @param integer $offset
|
123 |
-
*
|
124 |
-
* @return array
|
125 |
-
*/
|
126 |
-
function get_withdraw_requests( $user_id = '', $status = 0, $limit = 10, $offset = 0 ) {
|
127 |
-
global $wpdb;
|
128 |
-
|
129 |
-
if ( empty( $user_id ) ) {
|
130 |
-
$result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->dokan_withdraw} WHERE status = %d LIMIT %d, %d", $status, $offset, $limit ) );
|
131 |
-
} else {
|
132 |
-
$result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->dokan_withdraw} WHERE user_id = %d AND status = %d LIMIT %d, %d", $user_id, $status, $offset, $limit ) );
|
133 |
-
}
|
134 |
-
|
135 |
-
return $result;
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Delete an withdraw request
|
140 |
-
*
|
141 |
-
* @param integer
|
142 |
-
*
|
143 |
-
* @return void
|
144 |
-
*/
|
145 |
-
function delete_withdraw( $id ) {
|
146 |
-
global $wpdb;
|
147 |
-
|
148 |
-
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->dokan_withdraw} WHERE id = %d", $id ) );
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Get status code by status type
|
153 |
-
*
|
154 |
-
* @param string
|
155 |
-
*
|
156 |
-
* @return integer
|
157 |
-
*/
|
158 |
-
function get_status_code( $status ) {
|
159 |
-
switch ( $status ) {
|
160 |
-
case 'pending':
|
161 |
-
return 0;
|
162 |
-
break;
|
163 |
-
|
164 |
-
case 'completed':
|
165 |
-
return 1;
|
166 |
-
break;
|
167 |
-
|
168 |
-
case 'cancelled':
|
169 |
-
return 2;
|
170 |
-
break;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Check if a user has sufficient withdraw balance
|
176 |
-
*
|
177 |
-
* @param integer $user_id
|
178 |
-
*
|
179 |
-
* @return boolean
|
180 |
-
*/
|
181 |
-
function has_withdraw_balance( $user_id ) {
|
182 |
-
|
183 |
-
$balance = $this->get_user_balance( $user_id );
|
184 |
-
$withdraw_limit = $this->get_withdraw_limit();
|
185 |
-
|
186 |
-
if ( $balance < $withdraw_limit ) {
|
187 |
-
return false;
|
188 |
-
}
|
189 |
-
|
190 |
-
return true;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Get the system withdraw limit
|
195 |
-
*
|
196 |
-
* @return integer
|
197 |
-
*/
|
198 |
-
function get_withdraw_limit() {
|
199 |
-
return (int) dokan_get_option( 'withdraw_limit', 'dokan_withdraw', 0 );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Get a sellers balance
|
204 |
-
*
|
205 |
-
* @param integer $user_id
|
206 |
-
*
|
207 |
-
* @return integer
|
208 |
-
*/
|
209 |
-
function get_user_balance( $user_id ) {
|
210 |
-
return dokan_get_seller_balance( $user_id, false );
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Print status messages
|
215 |
-
*
|
216 |
-
* @param string $status
|
217 |
-
*
|
218 |
-
* @return void
|
219 |
-
*/
|
220 |
-
function request_status( $status ) {
|
221 |
-
switch ( $status ) {
|
222 |
-
case 0:
|
223 |
-
return '<span class="label label-danger">' . __( 'Pending Reivew', 'dokan-lite' ) . '</span>';
|
224 |
-
break;
|
225 |
-
|
226 |
-
case 1:
|
227 |
-
return '<span class="label label-warning">' . __( 'Accepted', 'dokan-lite' ) . '</span>';
|
228 |
-
break;
|
229 |
-
}
|
230 |
-
}
|
231 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/traits/singleton.php → depricated/Singleton.php
RENAMED
File without changes
|
depricated/class-abstract-class-dokan-background-processes.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Abstracts\DokanBackgroundProcesses;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Abstract Dokan_Background_Processes class
|
7 |
+
*/
|
8 |
+
abstract class Abstract_Dokan_Background_Processes extends DokanBackgroundProcesses {}
|
depricated/class-abstrct-dokan-rest-store-controller.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Abstracts\DokanRESTAdminController;
|
4 |
+
|
5 |
+
abstract class Dokan_REST_Admin_Controller extends DokanRESTAdminController {}
|
depricated/class-dokan-email.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Fallback for depricated
|
5 |
+
* Dokan Email Class
|
6 |
+
*/
|
7 |
+
class Dokan_Email {
|
8 |
+
|
9 |
+
public static function init() {
|
10 |
+
return dokan()->email;
|
11 |
+
}
|
12 |
+
}
|
depricated/class-dokan-rest-controller.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Abstracts\DokanRESTController;
|
4 |
+
|
5 |
+
class Dokan_REST_Controller extends DokanRESTController {}
|
depricated/class-dokan-rest-product-controller.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\REST\ProductController;
|
4 |
+
|
5 |
+
class Dokan_REST_Product_Controller extends ProductController {
|
6 |
+
|
7 |
+
public function __construct() {}
|
8 |
+
}
|
depricated/class-dokan-rest-store-controller.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\REST\StoreController;
|
4 |
+
|
5 |
+
class Dokan_REST_Store_Controller extends StoreController {}
|
depricated/class-dokan-seller-setup-wizard.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
use WeDevs\Dokan\Vendor\SetupWizard;
|
3 |
+
|
4 |
+
class Dokan_Seller_Setup_Wizard extends SetupWizard {}
|
depricated/class-dokan-store-category-walker.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Walkers\Category;
|
4 |
+
|
5 |
+
class Dokan_Store_Category_Walker extends Category {}
|
depricated/class-dokan-store-location-widget.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Dokan_Store_Location {}
|
depricated/class-dokan-taxonomy-walker.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Walkers\TaxonomyDropdown\DokanTaxonomyWalker as DokanTaxWalker;
|
4 |
+
|
5 |
+
class DokanTaxonomyWalker extends DokanTaxWalker {}
|
depricated/class-dokan-template-dashboard.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Dashboard\Templates\Dashboard;
|
4 |
+
|
5 |
+
class Dokan_Template_Dashboard extends Dashboard {}
|
depricated/class-dokan-template-products.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Dashboard\Templates\Products;
|
4 |
+
|
5 |
+
class Dokan_Template_Products extends Products {}
|
depricated/class-dokan-template-settings.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Dashboard\Templates\Settings;
|
4 |
+
|
5 |
+
class Dokan_Template_Settings extends Settings {}
|
depricated/class-dokan-vendor.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Vendor\Vendor;
|
4 |
+
|
5 |
+
class Dokan_Vendor extends Vendor {}
|
depricated/class-dokan-withdraw.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WeDevs\Dokan\Withdraw\Manager;
|
4 |
+
|
5 |
+
class Dokan_Withdraw extends Manager {}
|
depricated/depricated-classes.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Lists all depricated classes
|
5 |
+
*/
|
6 |
+
class Dokan_Depricated_Classes {
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
$dir_path = DOKAN_DIR . '/depricated';
|
10 |
+
|
11 |
+
require_once $dir_path . '/class-abstract-class-dokan-background-processes.php';
|
12 |
+
require_once $dir_path . '/Singleton.php';
|
13 |
+
require_once $dir_path . '/class-dokan-template-dashboard.php';
|
14 |
+
require_once $dir_path . '/class-dokan-template-settings.php';
|
15 |
+
require_once $dir_path . '/class-dokan-template-products.php';
|
16 |
+
require_once $dir_path . '/class-dokan-rest-controller.php';
|
17 |
+
require_once $dir_path . '/class-dokan-rest-product-controller.php';
|
18 |
+
require_once $dir_path . '/class-dokan-rest-store-controller.php';
|
19 |
+
require_once $dir_path . '/class-abstrct-dokan-rest-store-controller.php';
|
20 |
+
require_once $dir_path . '/class-dokan-vendor.php';
|
21 |
+
require_once $dir_path . '/class-dokan-email.php';
|
22 |
+
require_once $dir_path . '/class-dokan-store-location-widget.php';
|
23 |
+
require_once $dir_path . '/class-dokan-seller-setup-wizard.php';
|
24 |
+
require_once $dir_path . '/class-dokan-withdraw.php';
|
25 |
+
require_once $dir_path . '/class-dokan-store-category-walker.php';
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
new Dokan_Depricated_Classes();
|
depricated/depricated-functions.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Wrapper for wc_doing_it_wrong.
|
5 |
+
*
|
6 |
+
* @since DOKAN_LITE_SINCE
|
7 |
+
*
|
8 |
+
* @param string $function Function used.
|
9 |
+
* @param string $message Message to log.
|
10 |
+
* @param string $version Version the message was added in.
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
function dokan_doing_it_wrong( $function, $message, $version ) {
|
15 |
+
$message .= ' Backtrace: ' . wp_debug_backtrace_summary();
|
16 |
+
|
17 |
+
if ( is_ajax() || WC()->is_rest_api_request() ) {
|
18 |
+
do_action( 'doing_it_wrong_run', $function, $message, $version );
|
19 |
+
error_log( "{$function} was called incorrectly. {$message}. This message was added in version {$version}." );
|
20 |
+
} else {
|
21 |
+
_doing_it_wrong( $function, $message, $version );
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Dokan get product status
|
27 |
+
*
|
28 |
+
* @since 2.5
|
29 |
+
*
|
30 |
+
* @deprecated 2.5.1
|
31 |
+
*
|
32 |
+
* @return string|array
|
33 |
+
**/
|
34 |
+
function dokan_get_product_status( $status ) {
|
35 |
+
_deprecated_function( 'dokan_get_product_status', '2.5', 'dokan_get_product_types' );
|
36 |
+
return dokan_get_product_types( $status );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Load depericated widget class dynamically
|
41 |
+
*
|
42 |
+
* @since DOKAN_LITE_SINCE
|
43 |
+
*
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
function dokan_depricated_widget_classes() {
|
47 |
+
global $wp_widget_factory;
|
48 |
+
|
49 |
+
$widget_classes = [
|
50 |
+
'Dokan_Best_Selling_Widget' => \WeDevs\Dokan\Widgets\BestSellingProducts::class,
|
51 |
+
'Dokan_Store_Contact_Form' => \WeDevs\Dokan\Widgets\StoreContactForm::class,
|
52 |
+
'Dokan_Store_Location' => \WeDevs\Dokan\Widgets\StoreLocation::class,
|
53 |
+
'Dokan_Store_Category_Menu' => \WeDevs\Dokan\Widgets\StoreCategoryMenu::class,
|
54 |
+
'Dokan_Store_Open_Close' => \WeDevs\Dokan\Widgets\StoreOpenClose::class,
|
55 |
+
'Dokan_Toprated_Widget' => \WeDevs\Dokan\Widgets\TopratedProducts::class,
|
56 |
+
];
|
57 |
+
|
58 |
+
foreach ( $widget_classes as $deprecated_class => $new_class ) {
|
59 |
+
$wp_widget_factory->widgets[ $deprecated_class ] = $wp_widget_factory->widgets[ $new_class ];
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
add_action( 'woocommerce_before_main_content', 'dokan_depricated_widget_classes' );
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Depricated function for render seller metabox in product
|
67 |
+
*
|
68 |
+
* @param object $post
|
69 |
+
*
|
70 |
+
* @return void|html
|
71 |
+
*/
|
72 |
+
function dokan_seller_meta_box( $post ) {
|
73 |
+
\WeDevs\Dokan\Admin\Hooks::seller_meta_box_content( $post );
|
74 |
+
}
|
depricated/depricated-hooks.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Support for Elementor Store Widgets
|
5 |
+
*
|
6 |
+
* @since DOKAN_LITE_SINCE
|
7 |
+
*
|
8 |
+
* @param array $default_widget_args
|
9 |
+
* @param \Widget_WordPress $widget_wordpress
|
10 |
+
*
|
11 |
+
* @return array
|
12 |
+
*/
|
13 |
+
function dokan_depricated_elementor_store_widgets( $default_widget_args, $widget_wordpress ) {
|
14 |
+
if ( ! defined( 'DOKAN_PRO_PLUGIN_VERSION' ) ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
if ( version_compare( DOKAN_PRO_PLUGIN_VERSION, '3.0.0', '>' ) ) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
$widget_class_name = get_class( $widget_wordpress->get_widget_instance() );
|
23 |
+
|
24 |
+
if ( 0 === strpos( $widget_class_name, 'WeDevs\\Dokan\\Widgets\\') ) {
|
25 |
+
$widget = $widget_wordpress->get_widget_instance();
|
26 |
+
|
27 |
+
$id = str_replace( 'REPLACE_TO_ID', $widget_wordpress->get_id(), $widget->id );
|
28 |
+
$default_widget_args['before_widget'] = sprintf( '<aside id="%1$s" class="widget dokan-store-widget %2$s">', $id, $widget->widget_options['classname'] );
|
29 |
+
$default_widget_args['after_widget'] = '</aside>';
|
30 |
+
$default_widget_args['before_title'] = '<h3 class="widget-title">';
|
31 |
+
$default_widget_args['after_title'] = '</h3>';
|
32 |
+
}
|
33 |
+
|
34 |
+
return $default_widget_args;
|
35 |
+
}
|
36 |
+
|
37 |
+
add_action( 'elementor/widgets/wordpress/widget_args', 'dokan_depricated_elementor_store_widgets', 10, 2 );
|
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:
|
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: 3.
|
12 |
Domain Path: /languages/
|
13 |
License: GPL2
|
14 |
*/
|
@@ -42,30 +42,6 @@ License: GPL2
|
|
42 |
// don't call the file directly
|
43 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
44 |
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Autoload class files on demand
|
48 |
-
*
|
49 |
-
* `Dokan_Installer` becomes => installer.php
|
50 |
-
* `Dokan_Template_Report` becomes => template-report.php
|
51 |
-
*
|
52 |
-
* @since 1.0
|
53 |
-
*
|
54 |
-
* @param string $class requested class name
|
55 |
-
*/
|
56 |
-
function dokan_autoload( $class ) {
|
57 |
-
if ( stripos( $class, 'Dokan_' ) !== false ) {
|
58 |
-
$class_name = str_replace( array( 'Dokan_', '_' ), array( '', '-' ), $class );
|
59 |
-
$file_path = dirname( __FILE__ ) . '/classes/' . strtolower( $class_name ) . '.php';
|
60 |
-
|
61 |
-
if ( file_exists( $file_path ) ) {
|
62 |
-
require_once $file_path;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
spl_autoload_register( 'dokan_autoload' );
|
68 |
-
|
69 |
/**
|
70 |
* WeDevs_Dokan class
|
71 |
*
|
@@ -78,7 +54,7 @@ final class WeDevs_Dokan {
|
|
78 |
*
|
79 |
* @var string
|
80 |
*/
|
81 |
-
public $version = '
|
82 |
|
83 |
/**
|
84 |
* Instance of self
|
@@ -103,6 +79,15 @@ final class WeDevs_Dokan {
|
|
103 |
*/
|
104 |
private $container = array();
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/**
|
107 |
* Constructor for the WeDevs_Dokan class
|
108 |
*
|
@@ -110,8 +95,9 @@ final class WeDevs_Dokan {
|
|
110 |
* within our plugin.
|
111 |
*/
|
112 |
private function __construct() {
|
|
|
|
|
113 |
$this->define_constants();
|
114 |
-
$this->include_exceptions();
|
115 |
|
116 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
117 |
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
|
@@ -132,7 +118,6 @@ final class WeDevs_Dokan {
|
|
132 |
* and if it doesn't find one, creates it.
|
133 |
*/
|
134 |
public static function init() {
|
135 |
-
|
136 |
if ( self::$instance === null ) {
|
137 |
self::$instance = new self();
|
138 |
}
|
@@ -186,17 +171,6 @@ final class WeDevs_Dokan {
|
|
186 |
return apply_filters( 'dokan_template_path', 'dokan/' );
|
187 |
}
|
188 |
|
189 |
-
/**
|
190 |
-
* Include custom throwable exceptions
|
191 |
-
*
|
192 |
-
* @since 2.9.16
|
193 |
-
*
|
194 |
-
* @return void
|
195 |
-
*/
|
196 |
-
private function include_exceptions() {
|
197 |
-
require_once DOKAN_INC_DIR . '/exceptions/class-dokan-exception.php';
|
198 |
-
}
|
199 |
-
|
200 |
/**
|
201 |
* Placeholder for activation function
|
202 |
*
|
@@ -217,7 +191,8 @@ final class WeDevs_Dokan {
|
|
217 |
require_once dirname( __FILE__ ) . '/includes/functions.php';
|
218 |
require_once dirname( __FILE__ ) . '/includes/functions-compatibility.php';
|
219 |
|
220 |
-
$
|
|
|
221 |
$installer->do_install();
|
222 |
}
|
223 |
|
@@ -281,7 +256,6 @@ final class WeDevs_Dokan {
|
|
281 |
public function init_plugin() {
|
282 |
$this->includes();
|
283 |
$this->init_hooks();
|
284 |
-
$this->maybe_perform_updates();
|
285 |
|
286 |
do_action( 'dokan_loaded' );
|
287 |
}
|
@@ -292,7 +266,6 @@ final class WeDevs_Dokan {
|
|
292 |
* @return void
|
293 |
*/
|
294 |
function init_hooks() {
|
295 |
-
|
296 |
// Localize our plugin
|
297 |
add_action( 'init', array( $this, 'localization_setup' ) );
|
298 |
|
@@ -303,7 +276,7 @@ final class WeDevs_Dokan {
|
|
303 |
add_action( 'plugins_loaded', array( $this, 'after_plugins_loaded' ) );
|
304 |
|
305 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'plugin_action_links' ) );
|
306 |
-
add_action( 'in_plugin_update_message-dokan-lite/dokan.php', array(
|
307 |
|
308 |
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
309 |
}
|
@@ -314,63 +287,23 @@ final class WeDevs_Dokan {
|
|
314 |
* @return void
|
315 |
*/
|
316 |
function includes() {
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
require_once
|
322 |
-
require_once
|
323 |
-
require_once
|
324 |
-
|
325 |
-
|
326 |
-
require_once
|
327 |
-
|
328 |
-
// widgets
|
329 |
-
require_once $inc_dir . 'widgets/menu-category.php';
|
330 |
-
require_once $inc_dir . 'widgets/bestselling-product.php';
|
331 |
-
require_once $inc_dir . 'widgets/top-rated-product.php';
|
332 |
-
require_once $inc_dir . 'widgets/store-menu-category.php';
|
333 |
-
require_once $inc_dir . 'widgets/store-menu.php';
|
334 |
-
require_once $inc_dir . 'widgets/store-location.php';
|
335 |
-
require_once $inc_dir . 'widgets/store-contact.php';
|
336 |
-
require_once $inc_dir . 'widgets/store-open-close.php';
|
337 |
-
require_once $inc_dir . 'wc-functions.php';
|
338 |
-
require_once $inc_dir . '/admin/setup-wizard.php';
|
339 |
-
require_once $classes_dir . 'seller-setup-wizard.php';
|
340 |
-
|
341 |
-
require_once $inc_dir . 'wc-template.php';
|
342 |
-
|
343 |
-
require_once $inc_dir . 'class-core.php';
|
344 |
-
require_once $inc_dir . 'class-shortcodes.php';
|
345 |
-
require_once $inc_dir . 'class-registration.php';
|
346 |
-
require_once $inc_dir . 'class-assets.php';
|
347 |
-
require_once $inc_dir . 'class-email.php';
|
348 |
-
require_once $inc_dir . 'class-vendor.php';
|
349 |
-
require_once $inc_dir . 'class-vendor-manager.php';
|
350 |
-
require_once $inc_dir . 'class-order-manager.php';
|
351 |
-
require_once $inc_dir . 'class-product-manager.php';
|
352 |
-
require_once $inc_dir . 'class-dokan-privacy.php';
|
353 |
-
require_once $inc_dir . 'class-commission.php';
|
354 |
|
355 |
if ( is_admin() ) {
|
356 |
-
require_once
|
357 |
-
require_once $inc_dir . 'admin/class-admin.php';
|
358 |
-
require_once $inc_dir . 'admin/class-ajax.php';
|
359 |
-
require_once $inc_dir . 'admin/class-admin-pointers.php';
|
360 |
-
require_once $inc_dir . 'admin-functions.php';
|
361 |
-
require_once $inc_dir . 'admin/promotion.php';
|
362 |
} else {
|
363 |
-
require_once
|
364 |
-
require_once $inc_dir . 'class-theme-support.php';
|
365 |
-
require_once $inc_dir . 'class-store-lists-filter.php';
|
366 |
}
|
367 |
-
|
368 |
-
// API includes
|
369 |
-
require_once $inc_dir . 'api/class-api-rest-controller.php';
|
370 |
-
require_once $inc_dir . 'class-api-manager.php';
|
371 |
-
|
372 |
-
// Background Processes
|
373 |
-
$this->include_backgorund_processing_files();
|
374 |
}
|
375 |
|
376 |
/**
|
@@ -379,47 +312,51 @@ final class WeDevs_Dokan {
|
|
379 |
* @return void
|
380 |
*/
|
381 |
function init_classes() {
|
|
|
|
|
|
|
|
|
|
|
382 |
if ( is_admin() ) {
|
383 |
-
new
|
384 |
-
|
385 |
-
new
|
386 |
-
new
|
387 |
-
new
|
|
|
|
|
|
|
388 |
}
|
389 |
|
390 |
-
$this->container['pageview'] = new
|
391 |
-
$this->container['
|
392 |
-
$this->container['
|
393 |
-
$this->container['
|
394 |
-
$this->container['
|
395 |
-
$this->container['
|
396 |
-
$this->container['
|
397 |
-
$this->container['
|
398 |
-
$this->container['
|
399 |
-
$this->container['
|
400 |
-
$this->container['
|
401 |
-
$this->container['
|
402 |
-
$this->container['
|
|
|
|
|
|
|
403 |
|
404 |
$this->container = apply_filters( 'dokan_get_class_container', $this->container );
|
405 |
|
406 |
-
if ( ! is_admin() && is_user_logged_in() ) {
|
407 |
-
Dokan_Template_Main::init();
|
408 |
-
Dokan_Template_Dashboard::init();
|
409 |
-
Dokan_Template_Products::init();
|
410 |
-
Dokan_Template_Orders::init();
|
411 |
-
Dokan_Template_Withdraw::init();
|
412 |
-
Dokan_Template_Settings::init();
|
413 |
-
}
|
414 |
-
|
415 |
if ( ! is_admin() ) {
|
416 |
-
new
|
417 |
-
|
418 |
}
|
419 |
|
420 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
421 |
-
|
422 |
}
|
|
|
|
|
423 |
}
|
424 |
|
425 |
/**
|
@@ -429,7 +366,7 @@ final class WeDevs_Dokan {
|
|
429 |
*
|
430 |
* @return void
|
431 |
*/
|
432 |
-
function wpdb_table_shortcuts() {
|
433 |
global $wpdb;
|
434 |
|
435 |
$wpdb->dokan_withdraw = $wpdb->prefix . 'dokan_withdraw';
|
@@ -449,7 +386,17 @@ final class WeDevs_Dokan {
|
|
449 |
* @return void
|
450 |
*/
|
451 |
public function after_plugins_loaded() {
|
452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
}
|
454 |
|
455 |
/**
|
@@ -460,13 +407,7 @@ final class WeDevs_Dokan {
|
|
460 |
* @return void
|
461 |
*/
|
462 |
public function register_widgets() {
|
463 |
-
|
464 |
-
register_widget( 'Dokan_Category_Widget' );
|
465 |
-
register_widget( 'Dokan_Store_Contact_Form' );
|
466 |
-
register_widget( 'Dokan_Store_Location' );
|
467 |
-
register_widget( 'Dokan_Store_Category_Menu' );
|
468 |
-
register_widget( 'Dokan_Toprated_Widget' );
|
469 |
-
register_widget( 'Dokan_Store_Open_Close' );
|
470 |
}
|
471 |
|
472 |
/**
|
@@ -490,7 +431,6 @@ final class WeDevs_Dokan {
|
|
490 |
* @return array
|
491 |
*/
|
492 |
function plugin_action_links( $links ) {
|
493 |
-
|
494 |
if ( !$this->is_pro_exists() ) {
|
495 |
$links[] = '<a href="https://wedevs.com/dokan/" style="color: #389e38;font-weight: bold;" target="_blank">' . __( 'Get Pro', 'dokan-lite' ) . '</a>';
|
496 |
}
|
@@ -507,7 +447,7 @@ final class WeDevs_Dokan {
|
|
507 |
* @return void
|
508 |
*/
|
509 |
public function init_appsero_tracker() {
|
510 |
-
$this->container['tracker'] = new
|
511 |
}
|
512 |
|
513 |
/**
|
@@ -570,40 +510,6 @@ final class WeDevs_Dokan {
|
|
570 |
return class_exists( 'WooCommerce' );
|
571 |
}
|
572 |
|
573 |
-
/**
|
574 |
-
* Maybe perform updates (only runs when dokan was installed before
|
575 |
-
* but wc wasn't installed)
|
576 |
-
*
|
577 |
-
* @since 2.9.16
|
578 |
-
*
|
579 |
-
* @return void
|
580 |
-
*/
|
581 |
-
public function maybe_perform_updates() {
|
582 |
-
if ( ! get_transient( 'dokan_theme_version_for_updater' ) ) {
|
583 |
-
return;
|
584 |
-
}
|
585 |
-
|
586 |
-
$updater = new Dokan_Upgrade;
|
587 |
-
$updater->perform_updates();
|
588 |
-
}
|
589 |
-
|
590 |
-
/**
|
591 |
-
* Include background processing files
|
592 |
-
*
|
593 |
-
* @since 2.9.16
|
594 |
-
*
|
595 |
-
* @return void
|
596 |
-
*/
|
597 |
-
public function include_backgorund_processing_files() {
|
598 |
-
if ( ! class_exists( 'Abstract_Dokan_Background_Processes' ) ) {
|
599 |
-
require_once DOKAN_INC_DIR . '/background-processes/abstract-class-dokan-background-processes.php';
|
600 |
-
}
|
601 |
-
|
602 |
-
if ( ! class_exists( 'Dokan_Background_Processes' ) ) {
|
603 |
-
require_once DOKAN_INC_DIR . '/background-processes/class-dokan-background-processes.php';
|
604 |
-
}
|
605 |
-
}
|
606 |
-
|
607 |
/**
|
608 |
* Handles scenerios when WooCommerce is not active
|
609 |
*
|
@@ -622,13 +528,20 @@ final class WeDevs_Dokan {
|
|
622 |
dokan_redirect_to_admin_setup_wizard();
|
623 |
}
|
624 |
|
625 |
-
|
626 |
-
require_once DOKAN_INC_DIR . '/admin/setup-wizard-no-wc.php';
|
627 |
-
|
628 |
-
new Dokan_Admin_Setup_Wizard_No_WC();
|
629 |
}
|
630 |
|
631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
|
633 |
/**
|
634 |
* Load Dokan Plugin when all plugins loaded
|
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.0.0
|
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: 3.9.1
|
12 |
Domain Path: /languages/
|
13 |
License: GPL2
|
14 |
*/
|
42 |
// don't call the file directly
|
43 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
/**
|
46 |
* WeDevs_Dokan class
|
47 |
*
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
+
public $version = '3.0.0';
|
58 |
|
59 |
/**
|
60 |
* Instance of self
|
79 |
*/
|
80 |
private $container = array();
|
81 |
|
82 |
+
/**
|
83 |
+
* Databse version key
|
84 |
+
*
|
85 |
+
* @since DOKAN_LITE_SINCE
|
86 |
+
*
|
87 |
+
* @var string
|
88 |
+
*/
|
89 |
+
private $db_version_key = 'dokan_theme_version';
|
90 |
+
|
91 |
/**
|
92 |
* Constructor for the WeDevs_Dokan class
|
93 |
*
|
95 |
* within our plugin.
|
96 |
*/
|
97 |
private function __construct() {
|
98 |
+
require_once __DIR__ . '/vendor/autoload.php';
|
99 |
+
|
100 |
$this->define_constants();
|
|
|
101 |
|
102 |
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
103 |
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
|
118 |
* and if it doesn't find one, creates it.
|
119 |
*/
|
120 |
public static function init() {
|
|
|
121 |
if ( self::$instance === null ) {
|
122 |
self::$instance = new self();
|
123 |
}
|
171 |
return apply_filters( 'dokan_template_path', 'dokan/' );
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
/**
|
175 |
* Placeholder for activation function
|
176 |
*
|
191 |
require_once dirname( __FILE__ ) . '/includes/functions.php';
|
192 |
require_once dirname( __FILE__ ) . '/includes/functions-compatibility.php';
|
193 |
|
194 |
+
$this->container['upgrades'] = new \WeDevs\Dokan\Upgrade\Manager();
|
195 |
+
$installer = new \WeDevs\Dokan\Install\Installer();
|
196 |
$installer->do_install();
|
197 |
}
|
198 |
|
256 |
public function init_plugin() {
|
257 |
$this->includes();
|
258 |
$this->init_hooks();
|
|
|
259 |
|
260 |
do_action( 'dokan_loaded' );
|
261 |
}
|
266 |
* @return void
|
267 |
*/
|
268 |
function init_hooks() {
|
|
|
269 |
// Localize our plugin
|
270 |
add_action( 'init', array( $this, 'localization_setup' ) );
|
271 |
|
276 |
add_action( 'plugins_loaded', array( $this, 'after_plugins_loaded' ) );
|
277 |
|
278 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array( $this, 'plugin_action_links' ) );
|
279 |
+
add_action( 'in_plugin_update_message-dokan-lite/dokan.php', array( \WeDevs\Dokan\Install\Installer::class, 'in_plugin_update_message' ) );
|
280 |
|
281 |
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
|
282 |
}
|
287 |
* @return void
|
288 |
*/
|
289 |
function includes() {
|
290 |
+
require_once DOKAN_DIR . '/depricated/depricated-functions.php';
|
291 |
+
require_once DOKAN_DIR . '/depricated/depricated-hooks.php';
|
292 |
+
require_once DOKAN_INC_DIR . '/functions.php';
|
293 |
+
require_once DOKAN_INC_DIR . '/Order/functions.php';
|
294 |
+
require_once DOKAN_INC_DIR . '/Product/functions.php';
|
295 |
+
require_once DOKAN_INC_DIR . '/Withdraw/functions.php';
|
296 |
+
require_once DOKAN_INC_DIR . '/functions-compatibility.php';
|
297 |
+
require_once DOKAN_INC_DIR . '/wc-functions.php';
|
298 |
+
|
299 |
+
require_once DOKAN_INC_DIR . '/wc-template.php';
|
300 |
+
require_once DOKAN_DIR . '/depricated/depricated-classes.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
|
302 |
if ( is_admin() ) {
|
303 |
+
require_once DOKAN_INC_DIR . '/Admin/functions.php';
|
|
|
|
|
|
|
|
|
|
|
304 |
} else {
|
305 |
+
require_once DOKAN_INC_DIR . '/template-tags.php';
|
|
|
|
|
306 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
|
309 |
/**
|
312 |
* @return void
|
313 |
*/
|
314 |
function init_classes() {
|
315 |
+
new \WeDevs\Dokan\Withdraw\Hooks();
|
316 |
+
new \WeDevs\Dokan\Order\Hooks();
|
317 |
+
new \WeDevs\Dokan\Product\Hooks();
|
318 |
+
new \WeDevs\Dokan\Upgrade\Hooks();
|
319 |
+
|
320 |
if ( is_admin() ) {
|
321 |
+
new \WeDevs\Dokan\Admin\Hooks();
|
322 |
+
new \WeDevs\Dokan\Admin\Menu();
|
323 |
+
new \WeDevs\Dokan\Admin\AdminBar();
|
324 |
+
new \WeDevs\Dokan\Admin\Pointers();
|
325 |
+
new \WeDevs\Dokan\Admin\Settings();
|
326 |
+
new \WeDevs\Dokan\Admin\UserProfile();
|
327 |
+
new \WeDevs\Dokan\Admin\SetupWizard();
|
328 |
+
new \WeDevs\Dokan\Admin\Promotion();
|
329 |
}
|
330 |
|
331 |
+
$this->container['pageview'] = new \WeDevs\Dokan\PageViews();
|
332 |
+
$this->container['seller_wizard'] = new \WeDevs\Dokan\Vendor\SetupWizard();
|
333 |
+
$this->container['core'] = new \WeDevs\Dokan\Core();
|
334 |
+
$this->container['scripts'] = new \WeDevs\Dokan\Assets();
|
335 |
+
$this->container['email'] = new \WeDevs\Dokan\Emails\Manager();
|
336 |
+
$this->container['vendor'] = new \WeDevs\Dokan\Vendor\Manager();
|
337 |
+
$this->container['product'] = new \WeDevs\Dokan\Product\Manager();
|
338 |
+
$this->container['shortcodes'] = new \WeDevs\Dokan\Shortcodes\Shortcodes();
|
339 |
+
$this->container['registration'] = new \WeDevs\Dokan\Registration();
|
340 |
+
$this->container['order'] = new \WeDevs\Dokan\Order\Manager();
|
341 |
+
$this->container['api'] = new \WeDevs\Dokan\REST\Manager();
|
342 |
+
$this->container['withdraw'] = new \WeDevs\Dokan\Withdraw\Manager();
|
343 |
+
$this->container['dashboard'] = new \WeDevs\Dokan\Dashboard\Manager();
|
344 |
+
$this->container['rewrite'] = new \WeDevs\Dokan\Rewrites();
|
345 |
+
$this->container['commission'] = new \WeDevs\Dokan\Commission();
|
346 |
+
$this->container['upgrades'] = new \WeDevs\Dokan\Upgrade\Manager();
|
347 |
|
348 |
$this->container = apply_filters( 'dokan_get_class_container', $this->container );
|
349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
if ( ! is_admin() ) {
|
351 |
+
new \WeDevs\Dokan\Vendor\StoreListsFilter();
|
352 |
+
new \WeDevs\Dokan\ThemeSupport\Manager();
|
353 |
}
|
354 |
|
355 |
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
356 |
+
new \WeDevs\Dokan\Ajax();
|
357 |
}
|
358 |
+
|
359 |
+
new \WeDevs\Dokan\Privacy();
|
360 |
}
|
361 |
|
362 |
/**
|
366 |
*
|
367 |
* @return void
|
368 |
*/
|
369 |
+
public function wpdb_table_shortcuts() {
|
370 |
global $wpdb;
|
371 |
|
372 |
$wpdb->dokan_withdraw = $wpdb->prefix . 'dokan_withdraw';
|
386 |
* @return void
|
387 |
*/
|
388 |
public function after_plugins_loaded() {
|
389 |
+
// Initiate background processes
|
390 |
+
$processes = get_option( 'dokan_background_processes', array() );
|
391 |
+
|
392 |
+
if ( ! empty( $processes ) ) {
|
393 |
+
foreach ( $processes as $processor => $file ) {
|
394 |
+
if ( file_exists( $file ) ) {
|
395 |
+
include_once $file;
|
396 |
+
new $processor();
|
397 |
+
}
|
398 |
+
}
|
399 |
+
}
|
400 |
}
|
401 |
|
402 |
/**
|
407 |
* @return void
|
408 |
*/
|
409 |
public function register_widgets() {
|
410 |
+
$this->container['widgets'] = new \WeDevs\Dokan\Widgets\Manager();
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
}
|
412 |
|
413 |
/**
|
431 |
* @return array
|
432 |
*/
|
433 |
function plugin_action_links( $links ) {
|
|
|
434 |
if ( !$this->is_pro_exists() ) {
|
435 |
$links[] = '<a href="https://wedevs.com/dokan/" style="color: #389e38;font-weight: bold;" target="_blank">' . __( 'Get Pro', 'dokan-lite' ) . '</a>';
|
436 |
}
|
447 |
* @return void
|
448 |
*/
|
449 |
public function init_appsero_tracker() {
|
450 |
+
$this->container['tracker'] = new \WeDevs\Dokan\Tracker();
|
451 |
}
|
452 |
|
453 |
/**
|
510 |
return class_exists( 'WooCommerce' );
|
511 |
}
|
512 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
/**
|
514 |
* Handles scenerios when WooCommerce is not active
|
515 |
*
|
528 |
dokan_redirect_to_admin_setup_wizard();
|
529 |
}
|
530 |
|
531 |
+
new \WeDevs\Dokan\Admin\SetupWizardNoWC();
|
|
|
|
|
|
|
532 |
}
|
533 |
|
534 |
+
/**
|
535 |
+
* Get Dokan db version key
|
536 |
+
*
|
537 |
+
* @since DOKAN_LITE_SINCE
|
538 |
+
*
|
539 |
+
* @return string
|
540 |
+
*/
|
541 |
+
public function get_db_version_key() {
|
542 |
+
return $this->db_version_key;
|
543 |
+
}
|
544 |
+
}
|
545 |
|
546 |
/**
|
547 |
* Load Dokan Plugin when all plugins loaded
|
includes/{background-processes/abstract-class-dokan-background-processes.php → Abstracts/DokanBackgroundProcesses.php}
RENAMED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
if ( ! class_exists( 'WP_Async_Request', false ) ) {
|
6 |
include_once dirname( WC_PLUGIN_FILE ) . '/includes/libraries/wp-async-request.php';
|
@@ -13,7 +15,7 @@ if ( ! class_exists( 'WP_Background_Process', false ) ) {
|
|
13 |
/**
|
14 |
* Abstract Dokan_Background_Processes class
|
15 |
*/
|
16 |
-
abstract class
|
17 |
|
18 |
/**
|
19 |
* Action
|
@@ -24,7 +26,22 @@ abstract class Abstract_Dokan_Background_Processes extends WP_Background_Process
|
|
24 |
*
|
25 |
* @var string
|
26 |
*/
|
27 |
-
protected $action =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
/**
|
30 |
* Execute after complete a task
|
@@ -86,6 +103,17 @@ abstract class Abstract_Dokan_Background_Processes extends WP_Background_Process
|
|
86 |
parent::cancel_process();
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
/**
|
90 |
* Dispatch process
|
91 |
*
|
@@ -97,11 +125,16 @@ abstract class Abstract_Dokan_Background_Processes extends WP_Background_Process
|
|
97 |
*
|
98 |
* @return $this
|
99 |
*/
|
100 |
-
public function dispatch_process( $processor_file ) {
|
|
|
|
|
|
|
|
|
|
|
101 |
$this->save()->dispatch();
|
102 |
|
103 |
$processes = get_option( 'dokan_background_processes', array() );
|
104 |
-
$processes[
|
105 |
|
106 |
update_option( 'dokan_background_processes', $processes, 'no' );
|
107 |
|
@@ -118,8 +151,8 @@ abstract class Abstract_Dokan_Background_Processes extends WP_Background_Process
|
|
118 |
public function clear_process() {
|
119 |
$processes = get_option( 'dokan_background_processes', array() );
|
120 |
|
121 |
-
if ( array_key_exists(
|
122 |
-
unset( $processes[
|
123 |
update_option( 'dokan_background_processes', $processes, 'no' );
|
124 |
}
|
125 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
use ReflectionClass;
|
6 |
|
7 |
if ( ! class_exists( 'WP_Async_Request', false ) ) {
|
8 |
include_once dirname( WC_PLUGIN_FILE ) . '/includes/libraries/wp-async-request.php';
|
15 |
/**
|
16 |
* Abstract Dokan_Background_Processes class
|
17 |
*/
|
18 |
+
abstract class DokanBackgroundProcesses extends \WP_Background_Process {
|
19 |
|
20 |
/**
|
21 |
* Action
|
26 |
*
|
27 |
* @var string
|
28 |
*/
|
29 |
+
protected $action = null;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Class constructor
|
33 |
+
*
|
34 |
+
* @since DOKAN_LITE_SINCE
|
35 |
+
*
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
if ( ! $this->action ) {
|
40 |
+
$this->set_action();
|
41 |
+
}
|
42 |
+
|
43 |
+
parent::__construct();
|
44 |
+
}
|
45 |
|
46 |
/**
|
47 |
* Execute after complete a task
|
103 |
parent::cancel_process();
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Set process action
|
108 |
+
*
|
109 |
+
* @since DOKAN_LITE_SINCE
|
110 |
+
*
|
111 |
+
* @return void
|
112 |
+
*/
|
113 |
+
protected function set_action() {
|
114 |
+
$this->action = 'dokan_' . md5( static::class );
|
115 |
+
}
|
116 |
+
|
117 |
/**
|
118 |
* Dispatch process
|
119 |
*
|
125 |
*
|
126 |
* @return $this
|
127 |
*/
|
128 |
+
public function dispatch_process( $processor_file = null ) {
|
129 |
+
if ( ! $processor_file ) {
|
130 |
+
$reflector = new ReflectionClass( static::class );
|
131 |
+
$processor_file = $reflector->getFileName();
|
132 |
+
}
|
133 |
+
|
134 |
$this->save()->dispatch();
|
135 |
|
136 |
$processes = get_option( 'dokan_background_processes', array() );
|
137 |
+
$processes[ static::class ] = $processor_file;
|
138 |
|
139 |
update_option( 'dokan_background_processes', $processes, 'no' );
|
140 |
|
151 |
public function clear_process() {
|
152 |
$processes = get_option( 'dokan_background_processes', array() );
|
153 |
|
154 |
+
if ( array_key_exists( static::class , $processes ) ) {
|
155 |
+
unset( $processes[ static::class ] );
|
156 |
update_option( 'dokan_background_processes', $processes, 'no' );
|
157 |
}
|
158 |
|
includes/Abstracts/DokanModel.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
abstract class DokanModel {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Set model data
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*
|
12 |
+
* @param array $data
|
13 |
+
*/
|
14 |
+
abstract protected function set_data( $data );
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Get model data
|
18 |
+
*
|
19 |
+
* @since DOKAN_LITE_SINCE
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
public function get_data() {
|
24 |
+
return $this->data;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Save model data
|
29 |
+
*
|
30 |
+
* @since DOKAN_LITE_SINCE
|
31 |
+
*
|
32 |
+
* @return \WeDevs\Dokan\Abstracts\Model
|
33 |
+
*/
|
34 |
+
abstract public function save();
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Create a model
|
38 |
+
*
|
39 |
+
* @since DOKAN_LITE_SINCE
|
40 |
+
*
|
41 |
+
* @return \WeDevs\Dokan\Abstracts\Model
|
42 |
+
*/
|
43 |
+
abstract protected function create();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Update a model
|
47 |
+
*
|
48 |
+
* @since DOKAN_LITE_SINCE
|
49 |
+
*
|
50 |
+
* @return \WeDevs\Dokan\Abstracts\Model
|
51 |
+
*/
|
52 |
+
abstract protected function update();
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Delete a model
|
56 |
+
*
|
57 |
+
* @since DOKAN_LITE_SINCE
|
58 |
+
*
|
59 |
+
* @return \WeDevs\Dokan\Abstracts\Model
|
60 |
+
*/
|
61 |
+
abstract public function delete();
|
62 |
+
}
|
includes/Abstracts/DokanPromotion.php
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Promotion class
|
7 |
+
*
|
8 |
+
* For displaying AI base promotion in admin panel
|
9 |
+
*
|
10 |
+
* @since 2.9.0
|
11 |
+
*
|
12 |
+
* @package dokan
|
13 |
+
*/
|
14 |
+
abstract class DokanPromotion {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Time Interval displaying between two promo
|
18 |
+
*
|
19 |
+
* @var integer
|
20 |
+
*/
|
21 |
+
public $time_interval = 60*60*24*7;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* option key for promo
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $promo_option_key = '_dokan_displayed_promos';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Load autometically when class initiate
|
32 |
+
*
|
33 |
+
* @since 2.9.0
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
add_action( 'admin_notices', array( $this, 'show_promotions' ) );
|
37 |
+
add_action( 'wp_ajax_dokan-dismiss-upgrade-promotional-notice', array( $this, 'dismiss_upgrade_promo' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get data
|
42 |
+
*
|
43 |
+
* @since 1.0.0
|
44 |
+
*
|
45 |
+
* @return array
|
46 |
+
*/
|
47 |
+
abstract public function get_promotion_data();
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Module promotion notices
|
51 |
+
*
|
52 |
+
* @since 2.9.0
|
53 |
+
*
|
54 |
+
* @return void
|
55 |
+
*/
|
56 |
+
public function show_promotions() {
|
57 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
$notice = $this->get_latest_promo();
|
62 |
+
$last_time = get_option( $this->promo_option_key . '_displayed_time' );
|
63 |
+
$current_time = current_time( 'mysql' );
|
64 |
+
|
65 |
+
if ( empty( $notice ) ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ( strtotime( $current_time ) - strtotime( $last_time ) ) < $this->time_interval ) {
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
|
73 |
+
?>
|
74 |
+
<div class="notice dokan-upgrade-promotional-notice">
|
75 |
+
<div class="thumbnail">
|
76 |
+
<img src="<?php echo esc_url( $notice['thumbnail'] ); ?>" alt="<?php echo esc_attr( $notice['title'] ); ?>">
|
77 |
+
</div>
|
78 |
+
<div class="content">
|
79 |
+
<h2><?php echo esc_html( $notice['title'] ); ?></h2>
|
80 |
+
<p><?php echo esc_html( $notice['content'] ); ?></p>
|
81 |
+
<a href="<?php echo esc_url( $notice['link'] ); ?>" class="button button-primary promo-btn" target="_blank"><?php echo !empty( $notice['btn_text'] ) ? esc_html( $notice['btn_text'] ) : esc_html__( 'Learn More →', 'dokan-lite' ); ?></a>
|
82 |
+
</div>
|
83 |
+
<span class="prmotion-close-icon dashicons dashicons-no-alt" data-key="<?php echo esc_attr( $notice['key'] ); ?>" data-promo_key="<?php echo esc_attr( $this->promo_option_key ); ?>"></span>
|
84 |
+
<div class="clear"></div>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<style>
|
88 |
+
.dokan-upgrade-promotional-notice {
|
89 |
+
padding: 20px;
|
90 |
+
box-sizing: border-box;
|
91 |
+
position: relative;
|
92 |
+
}
|
93 |
+
|
94 |
+
.dokan-upgrade-promotional-notice .prmotion-close-icon{
|
95 |
+
position: absolute;
|
96 |
+
top: 20px;
|
97 |
+
right: 20px;
|
98 |
+
cursor: pointer;
|
99 |
+
}
|
100 |
+
|
101 |
+
.dokan-upgrade-promotional-notice .thumbnail {
|
102 |
+
width: 20%;
|
103 |
+
float: left;
|
104 |
+
}
|
105 |
+
|
106 |
+
.dokan-upgrade-promotional-notice .thumbnail img{
|
107 |
+
width: 100%;
|
108 |
+
height: auto;
|
109 |
+
box-shadow: 0px 0px 25px #bbbbbb;
|
110 |
+
margin-right: 20px;
|
111 |
+
box-sizing: border-box;
|
112 |
+
}
|
113 |
+
|
114 |
+
.dokan-upgrade-promotional-notice .content {
|
115 |
+
float:left;
|
116 |
+
margin-left: 20px;
|
117 |
+
width: 75%;
|
118 |
+
}
|
119 |
+
|
120 |
+
.dokan-upgrade-promotional-notice .content h2 {
|
121 |
+
margin: 3px 0px 5px;
|
122 |
+
font-size: 17px;
|
123 |
+
font-weight: bold;
|
124 |
+
color: #555;
|
125 |
+
line-height: 25px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.dokan-upgrade-promotional-notice .content p {
|
129 |
+
font-size: 14px;
|
130 |
+
text-align: justify;
|
131 |
+
color: #666;
|
132 |
+
margin-bottom: 10px;
|
133 |
+
}
|
134 |
+
|
135 |
+
.dokan-upgrade-promotional-notice .content a {
|
136 |
+
border: none;
|
137 |
+
box-shadow: none;
|
138 |
+
height: 31px;
|
139 |
+
line-height: 30px;
|
140 |
+
border-radius: 3px;
|
141 |
+
background: #ff5722;
|
142 |
+
text-shadow: none;
|
143 |
+
width: 140px;
|
144 |
+
text-align: center;
|
145 |
+
}
|
146 |
+
|
147 |
+
</style>
|
148 |
+
|
149 |
+
<script type='text/javascript'>
|
150 |
+
jQuery(document).ready(function($){
|
151 |
+
$('body').on('click', '.dokan-upgrade-promotional-notice span.prmotion-close-icon', function(e) {
|
152 |
+
e.preventDefault();
|
153 |
+
|
154 |
+
var self = $(this),
|
155 |
+
key = self.data('key'),
|
156 |
+
promo_key = self.data('promo_key');
|
157 |
+
|
158 |
+
wp.ajax.send( 'dokan-dismiss-upgrade-promotional-notice', {
|
159 |
+
data: {
|
160 |
+
dokan_upgrade_promotion_dismissed: true,
|
161 |
+
key: key,
|
162 |
+
promo_key: promo_key,
|
163 |
+
nonce: '<?php echo esc_attr( wp_create_nonce( 'dokan_admin' ) ); ?>'
|
164 |
+
},
|
165 |
+
complete: function( resp ) {
|
166 |
+
self.closest('.dokan-upgrade-promotional-notice').fadeOut(200);
|
167 |
+
}
|
168 |
+
} );
|
169 |
+
});
|
170 |
+
});
|
171 |
+
</script>
|
172 |
+
<?php
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Dissmiss prmo notice according
|
177 |
+
*
|
178 |
+
* @since 1.0.0
|
179 |
+
*
|
180 |
+
* @return void
|
181 |
+
*/
|
182 |
+
public function dismiss_upgrade_promo() {
|
183 |
+
$post_data = wp_unslash( $_POST );
|
184 |
+
|
185 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
186 |
+
wp_send_json_error( __( 'You have no permission to do that', 'dokan-lite' ) );
|
187 |
+
}
|
188 |
+
|
189 |
+
if ( ! wp_verify_nonce( $post_data['nonce'], 'dokan_admin' ) ) {
|
190 |
+
wp_send_json_error( __( 'Invalid nonce', 'dokan-lite' ) );
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( isset( $post_data['dokan_upgrade_promotion_dismissed'] ) && $post_data['dokan_upgrade_promotion_dismissed'] ) {
|
194 |
+
$promo_option_key = $post_data['promo_key'];
|
195 |
+
$promo_last_display_time = $post_data['promo_key'] . '_displayed_time';
|
196 |
+
|
197 |
+
$already_displayed_promo = get_option( $promo_option_key, array() );
|
198 |
+
|
199 |
+
if ( ! isset( $already_displayed_promo[ $post_data['key'] ] ) ) {
|
200 |
+
$already_displayed_promo[ $post_data['key'] ] = array(
|
201 |
+
'display' => 0,
|
202 |
+
'last_displayed' => current_time( 'mysql' )
|
203 |
+
);
|
204 |
+
}
|
205 |
+
|
206 |
+
update_option( $promo_option_key, $already_displayed_promo );
|
207 |
+
update_option( $promo_last_display_time, current_time( 'mysql' ) );
|
208 |
+
wp_send_json_success();
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Get latest prmo
|
214 |
+
*
|
215 |
+
* @since 1.0.0
|
216 |
+
*
|
217 |
+
* @return void
|
218 |
+
*/
|
219 |
+
public function get_latest_promo() {
|
220 |
+
$latest_promo = array();
|
221 |
+
$promotions = $this->get_promotion_data();
|
222 |
+
|
223 |
+
if ( empty( $promotions ) ) {
|
224 |
+
return $latest_promo;
|
225 |
+
}
|
226 |
+
|
227 |
+
uasort( $promotions, array( $this, 'sort_by_priority' ) );
|
228 |
+
|
229 |
+
$already_displayed_promo = get_option( $this->promo_option_key, array() );
|
230 |
+
|
231 |
+
foreach ( $promotions as $key => $value ) {
|
232 |
+
if ( ! isset( $already_displayed_promo[$key] ) ) {
|
233 |
+
$latest_promo = $value;
|
234 |
+
$latest_promo['key'] = $key;
|
235 |
+
return $latest_promo;
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
return $latest_promo;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Sort all promotions depends on priority key
|
244 |
+
*
|
245 |
+
* @param array $a
|
246 |
+
* @param array $b
|
247 |
+
*
|
248 |
+
* @return integer
|
249 |
+
*/
|
250 |
+
public function sort_by_priority( $a, $b ) {
|
251 |
+
if ( isset( $a['priority'] ) && isset( $b['priority'] ) ) {
|
252 |
+
return $a['priority'] - $b['priority'];
|
253 |
+
} else {
|
254 |
+
return 199;
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
}
|
includes/{api/admin/class-admin-controller.php → Abstracts/DokanRESTAdminController.php}
RENAMED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Admin Dashboard
|
5 |
*
|
@@ -7,7 +11,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
abstract class
|
11 |
|
12 |
/**
|
13 |
* Endpoint namespace.
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
use WP_REST_Controller;
|
6 |
+
|
7 |
/**
|
8 |
* Admin Dashboard
|
9 |
*
|
11 |
*
|
12 |
* @package dokan
|
13 |
*/
|
14 |
+
abstract class DokanRESTAdminController extends WP_REST_Controller {
|
15 |
|
16 |
/**
|
17 |
* Endpoint namespace.
|
includes/{api/class-api-rest-controller.php → Abstracts/DokanRESTController.php}
RENAMED
@@ -1,5 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Base REST Controller for dokan
|
5 |
*
|
@@ -7,7 +16,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
abstract class
|
11 |
|
12 |
/**
|
13 |
* Get object.
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
use WC_Data_Exception;
|
6 |
+
use WC_REST_Exception;
|
7 |
+
use WP_Error;
|
8 |
+
use WP_Query;
|
9 |
+
use WP_REST_Controller;
|
10 |
+
use WP_REST_Response;
|
11 |
+
|
12 |
/**
|
13 |
* Base REST Controller for dokan
|
14 |
*
|
16 |
*
|
17 |
* @package dokan
|
18 |
*/
|
19 |
+
abstract class DokanRESTController extends WP_REST_Controller {
|
20 |
|
21 |
/**
|
22 |
* Get object.
|
includes/Abstracts/DokanShortcode.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
abstract class DokanShortcode {
|
6 |
+
|
7 |
+
protected $shortcode = '';
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
if ( empty( $this->shortcode ) ) {
|
11 |
+
dokan_doing_it_wrong( static::class, __( '$shortcode property is empty.', 'dokan-lite' ), 'DOKAN_LITE_SINCE' );
|
12 |
+
}
|
13 |
+
|
14 |
+
add_shortcode( $this->shortcode, [ $this, 'render_shortcode' ] );
|
15 |
+
}
|
16 |
+
|
17 |
+
public function get_shortcode() {
|
18 |
+
return $this->shortcode;
|
19 |
+
}
|
20 |
+
|
21 |
+
abstract public function render_shortcode( $atts );
|
22 |
+
}
|
includes/Abstracts/DokanUpgrader.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Abstracts;
|
4 |
+
|
5 |
+
use ReflectionClass;
|
6 |
+
|
7 |
+
abstract class DokanUpgrader {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Execute upgrader class methods
|
11 |
+
*
|
12 |
+
* This method will execute every method found in child
|
13 |
+
* upgrader class dynamically. Keep in mind that methods
|
14 |
+
* should be public static function.
|
15 |
+
*
|
16 |
+
* @since DOKAN_LITE_SINCE
|
17 |
+
*
|
18 |
+
* @param string $required_lite_version Required in case of Pro upgraders
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public static function run( $required_lite_version = null ) {
|
23 |
+
// This checkpoint is useful for upgraders set in Dokan Pro
|
24 |
+
if ( $required_lite_version ) {
|
25 |
+
// Do not use `self::get_db_version_key()` here, `get_db_version_key` method
|
26 |
+
// will override in pro
|
27 |
+
$lite_db_version = get_option( dokan()->get_db_version_key() );
|
28 |
+
|
29 |
+
if ( version_compare( $lite_db_version, $required_lite_version, '<' ) ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
$methods = get_class_methods( static::class );
|
35 |
+
|
36 |
+
foreach ( $methods as $method ) {
|
37 |
+
if ( 'run' !== $method && 'update_db_version' !== $method ) {
|
38 |
+
call_user_func( [ static::class, $method ] );
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Update the DB version
|
45 |
+
*
|
46 |
+
* Upgrader files should follow naming convention
|
47 |
+
* as V_XX_XX_XX.php where Xs are number following
|
48 |
+
* semvar convention. For example if you have a upgrader
|
49 |
+
* for version 1.23.40, the the filename should be
|
50 |
+
* V_1_23_40.php.
|
51 |
+
*
|
52 |
+
* @since DOKAN_LITE_SINCE
|
53 |
+
*
|
54 |
+
* @return void
|
55 |
+
*/
|
56 |
+
public static function update_db_version() {
|
57 |
+
$reflect = new ReflectionClass( static::class );
|
58 |
+
$base_class = $reflect->getShortName();
|
59 |
+
$version = str_replace( [ 'V_', '_' ], [ '', '.' ], $base_class );
|
60 |
+
|
61 |
+
update_option( static::get_db_version_key(), $version );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get db versioning key
|
66 |
+
*
|
67 |
+
* This method should be overriden in Dokan Pro
|
68 |
+
*
|
69 |
+
* @since DOKAN_LITE_SINCE
|
70 |
+
*
|
71 |
+
* @return string
|
72 |
+
*/
|
73 |
+
public static function get_db_version_key() {
|
74 |
+
return dokan()->get_db_version_key();
|
75 |
+
}
|
76 |
+
}
|
includes/Admin/AdminBar.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* WordPress settings API For Dokan Admin Settings class
|
7 |
+
*
|
8 |
+
* @author Tareq Hasan
|
9 |
+
*/
|
10 |
+
class AdminBar {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class constructor
|
14 |
+
*
|
15 |
+
* Sets up all the appropriate hooks and actions
|
16 |
+
* within our plugin.
|
17 |
+
*
|
18 |
+
* @return void
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
add_action( 'wp_before_admin_bar_render', array( $this, 'dokan_admin_toolbar' ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Add Menu in Dashboard Top bar
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
public function dokan_admin_toolbar() {
|
30 |
+
global $wp_admin_bar;
|
31 |
+
|
32 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
$args = array(
|
37 |
+
'id' => 'dokan',
|
38 |
+
'title' => __( 'Dokan', 'dokan-lite' ),
|
39 |
+
'href' => admin_url( 'admin.php?page=dokan' )
|
40 |
+
);
|
41 |
+
|
42 |
+
$wp_admin_bar->add_menu( $args );
|
43 |
+
|
44 |
+
$wp_admin_bar->add_menu( array(
|
45 |
+
'id' => 'dokan-dashboard',
|
46 |
+
'parent' => 'dokan',
|
47 |
+
'title' => __( 'Dashboard', 'dokan-lite' ),
|
48 |
+
'href' => admin_url( 'admin.php?page=dokan' )
|
49 |
+
) );
|
50 |
+
|
51 |
+
$wp_admin_bar->add_menu( array(
|
52 |
+
'id' => 'dokan-withdraw',
|
53 |
+
'parent' => 'dokan',
|
54 |
+
'title' => __( 'Withdraw', 'dokan-lite' ),
|
55 |
+
'href' => admin_url( 'admin.php?page=dokan#/withdraw' )
|
56 |
+
) );
|
57 |
+
|
58 |
+
$wp_admin_bar->add_menu( array(
|
59 |
+
'id' => 'dokan-pro-features',
|
60 |
+
'parent' => 'dokan',
|
61 |
+
'title' => __( 'PRO Features', 'dokan-lite' ),
|
62 |
+
'href' => admin_url( 'admin.php?page=dokan#/premium' )
|
63 |
+
) );
|
64 |
+
|
65 |
+
$wp_admin_bar->add_menu( array(
|
66 |
+
'id' => 'dokan-settings',
|
67 |
+
'parent' => 'dokan',
|
68 |
+
'title' => __( 'Settings', 'dokan-lite' ),
|
69 |
+
'href' => admin_url( 'admin.php?page=dokan#/settings' )
|
70 |
+
) );
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Add new or remove toolbar
|
74 |
+
*
|
75 |
+
* @since 2.5.3
|
76 |
+
*/
|
77 |
+
do_action( 'dokan_render_admin_toolbar', $wp_admin_bar );
|
78 |
+
}
|
79 |
+
}
|
includes/Admin/Hooks.php
ADDED
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace WeDevs\Dokan\Admin;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Admin Hooks
|
6 |
+
*
|
7 |
+
* @package dokan
|
8 |
+
*
|
9 |
+
* @since DOKAN_LITE_SINCE
|
10 |
+
*/
|
11 |
+
class Hooks {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Load autometically when class initiate
|
15 |
+
*
|
16 |
+
* @since DOKAN_LITE_SINCE
|
17 |
+
*/
|
18 |
+
public function __construct() {
|
19 |
+
// Load all actions
|
20 |
+
add_action( 'pre_get_posts', [ $this, 'admin_shop_order_remove_parents' ] );
|
21 |
+
add_action( 'manage_shop_order_posts_custom_column', [ $this, 'shop_order_custom_columns' ], 11 );
|
22 |
+
add_action( 'admin_footer-edit.php', [ $this, 'admin_shop_order_scripts' ] );
|
23 |
+
add_action( 'wp_trash_post', [ $this, 'admin_on_trash_order' ] );
|
24 |
+
add_action( 'untrash_post', [ $this, 'admin_on_untrash_order' ] );
|
25 |
+
add_action( 'delete_post', [ $this, 'admin_on_delete_order' ] );
|
26 |
+
add_action( 'restrict_manage_posts', [ $this, 'admin_shop_order_toggle_sub_orders' ] );
|
27 |
+
add_action( 'pending_to_publish', [ $this, 'send_notification_on_product_publish' ] );
|
28 |
+
add_action( 'add_meta_boxes', [ $this, 'add_seller_meta_box' ] );
|
29 |
+
add_action( 'woocommerce_process_product_meta', [ $this, 'override_product_author_by_admin' ], 12, 2 );
|
30 |
+
|
31 |
+
// Load all filters
|
32 |
+
add_filter( 'woocommerce_reports_get_order_report_query', [ $this, 'admin_order_reports_remove_parents' ] );
|
33 |
+
add_filter( 'manage_edit-shop_order_columns', [ $this, 'admin_shop_order_edit_columns' ], 11 );
|
34 |
+
add_filter( 'post_class', [ $this, 'admin_shop_order_row_classes' ], 10, 2);
|
35 |
+
add_filter( 'post_types_to_delete_with_user', [ $this, 'add_wc_post_types_to_delete_user' ], 10, 2 );
|
36 |
+
add_filter( 'dokan_save_settings_value', [ $this, 'update_pages' ], 10, 2 );
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Filter all the shop orders to remove child orders
|
42 |
+
*
|
43 |
+
* @param WP_Query $query
|
44 |
+
*/
|
45 |
+
public function admin_shop_order_remove_parents( $query ) {
|
46 |
+
if ( $query->is_main_query() && 'shop_order' == $query->query['post_type'] ) {
|
47 |
+
$query->set( 'orderby', 'ID' );
|
48 |
+
$query->set( 'order', 'DESC' );
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Remove child orders from WC reports
|
54 |
+
*
|
55 |
+
* @param array $query
|
56 |
+
*
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
public function admin_order_reports_remove_parents( $query ) {
|
60 |
+
$query['where'] .= ' AND posts.post_parent = 0';
|
61 |
+
|
62 |
+
return $query;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Change the columns shown in admin.
|
67 |
+
*
|
68 |
+
* @param array $existing_columns
|
69 |
+
*
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public function admin_shop_order_edit_columns( $existing_columns ) {
|
73 |
+
if ( WC_VERSION > '3.2.6' ) {
|
74 |
+
unset( $existing_columns['wc_actions'] );
|
75 |
+
|
76 |
+
$columns = array_slice( $existing_columns, 0, count( $existing_columns ), true ) +
|
77 |
+
array(
|
78 |
+
'seller' => __( 'Vendor', 'dokan-lite' ),
|
79 |
+
'wc_actions' => __( 'Actions', 'dokan-lite' ),
|
80 |
+
'suborder' => __( 'Sub Order', 'dokan-lite' ),
|
81 |
+
)
|
82 |
+
+ array_slice( $existing_columns, count( $existing_columns ), count( $existing_columns ) - 1, true );
|
83 |
+
} else {
|
84 |
+
$existing_columns['seller'] = __( 'Vendor', 'dokan-lite' );
|
85 |
+
$existing_columns['suborder'] = __( 'Sub Order', 'dokan-lite' );
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( WC_VERSION > '3.2.6' ) {
|
89 |
+
// Remove seller, suborder column if seller is viewing his own product
|
90 |
+
if ( ! current_user_can( 'manage_woocommerce' ) || ( isset( $_GET['author'] ) && ! empty( $_GET['author'] ) ) ) {
|
91 |
+
unset( $columns['suborder'] );
|
92 |
+
unset( $columns['seller'] );
|
93 |
+
}
|
94 |
+
|
95 |
+
return apply_filters( 'dokan_edit_shop_order_columns', $columns );
|
96 |
+
}
|
97 |
+
|
98 |
+
// Remove seller, suborder column if seller is viewing his own product
|
99 |
+
if ( ! current_user_can( 'manage_woocommerce' ) || ( isset( $_GET['author'] ) && ! empty( $_GET['author'] ) ) ) {
|
100 |
+
unset( $existing_columns['suborder'] );
|
101 |
+
unset( $existing_columns['seller'] );
|
102 |
+
}
|
103 |
+
|
104 |
+
return apply_filters( 'dokan_edit_shop_order_columns', $existing_columns );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Adds custom column on dokan admin shop order table
|
109 |
+
*
|
110 |
+
* @global type $post
|
111 |
+
* @global type $woocommerce
|
112 |
+
* @global WC_Order $the_order
|
113 |
+
*
|
114 |
+
* @param type $col
|
115 |
+
*
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
+
public function shop_order_custom_columns( $col ) {
|
119 |
+
global $post, $the_order;
|
120 |
+
|
121 |
+
if ( empty( $the_order ) || $the_order->get_id() != $post->ID ) {
|
122 |
+
$the_order = new WC_Order( $post->ID );
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
126 |
+
return $col;
|
127 |
+
}
|
128 |
+
|
129 |
+
switch ($col) {
|
130 |
+
case 'order_number':
|
131 |
+
if ($post->post_parent !== 0) {
|
132 |
+
echo '<strong>';
|
133 |
+
echo esc_html__( ' Sub Order of', 'dokan-lite' );
|
134 |
+
printf( ' <a href="%s">#%s</a>', esc_url( admin_url( 'post.php?action=edit&post=' . $post->post_parent ) ), esc_html( $post->post_parent ) );
|
135 |
+
echo '</strong>';
|
136 |
+
}
|
137 |
+
break;
|
138 |
+
|
139 |
+
case 'suborder':
|
140 |
+
$has_sub = get_post_meta( $post->ID, 'has_sub_order', true );
|
141 |
+
|
142 |
+
if ( $has_sub == '1' ) {
|
143 |
+
printf( '<a href="#" class="show-sub-orders" data-class="parent-%1$d" data-show="%2$s" data-hide="%3$s">%2$s</a>', esc_attr( $post->ID ), esc_attr__( 'Show Sub-Orders', 'dokan-lite' ), esc_attr__( 'Hide Sub-Orders', 'dokan-lite' ) );
|
144 |
+
}
|
145 |
+
break;
|
146 |
+
|
147 |
+
case 'seller':
|
148 |
+
$has_sub = get_post_meta( $post->ID, 'has_sub_order', true );
|
149 |
+
|
150 |
+
if ( $has_sub != '1' && $seller = get_user_by( 'id', dokan_get_seller_id_by_order( $post->ID ) ) ) {
|
151 |
+
printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=shop_order&vendor_id=' . $seller->ID ) ), esc_html( $seller->display_name ) );
|
152 |
+
} else {
|
153 |
+
esc_html_e( '(no name)', 'dokan-lite' );
|
154 |
+
}
|
155 |
+
|
156 |
+
break;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Adds css classes on admin shop order table
|
162 |
+
*
|
163 |
+
* @global WP_Post $post
|
164 |
+
*
|
165 |
+
* @param array $classes
|
166 |
+
* @param int $post_id
|
167 |
+
*
|
168 |
+
* @return array
|
169 |
+
*/
|
170 |
+
public function admin_shop_order_row_classes( $classes, $post_id ) {
|
171 |
+
global $post;
|
172 |
+
|
173 |
+
if ( is_search() || ! current_user_can( 'manage_woocommerce' ) ) {
|
174 |
+
return $classes;
|
175 |
+
}
|
176 |
+
|
177 |
+
$vendor_id = isset( $_GET['vendor_id'] ) ? sanitize_text_field( wp_unslash( $_GET['vendor_id'] ) ) : '';
|
178 |
+
|
179 |
+
if ( $vendor_id ) {
|
180 |
+
return $classes;
|
181 |
+
}
|
182 |
+
|
183 |
+
if ( $post->post_type == 'shop_order' && $post->post_parent != 0 ) {
|
184 |
+
$classes[] = 'sub-order parent-' . $post->post_parent;
|
185 |
+
}
|
186 |
+
|
187 |
+
return $classes;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Show/hide sub order css/js
|
192 |
+
*
|
193 |
+
* @return void
|
194 |
+
*/
|
195 |
+
public function admin_shop_order_scripts() {
|
196 |
+
?>
|
197 |
+
<script type="text/javascript">
|
198 |
+
jQuery(function($) {
|
199 |
+
$('tr.sub-order').hide();
|
200 |
+
|
201 |
+
$('a.show-sub-orders').on('click', function(e) {
|
202 |
+
e.preventDefault();
|
203 |
+
|
204 |
+
var $self = $(this),
|
205 |
+
el = $('tr.' + $self.data('class') );
|
206 |
+
|
207 |
+
if ( el.is(':hidden') ) {
|
208 |
+
el.show();
|
209 |
+
$self.text( $self.data('hide') );
|
210 |
+
} else {
|
211 |
+
el.hide();
|
212 |
+
$self.text( $self.data('show') );
|
213 |
+
}
|
214 |
+
});
|
215 |
+
|
216 |
+
$('button.toggle-sub-orders').on('click', function(e) {
|
217 |
+
e.preventDefault();
|
218 |
+
|
219 |
+
$('tr.sub-order').toggle();
|
220 |
+
});
|
221 |
+
});
|
222 |
+
</script>
|
223 |
+
|
224 |
+
<style type="text/css">
|
225 |
+
tr.sub-order {
|
226 |
+
background: #ECFFF2;
|
227 |
+
}
|
228 |
+
|
229 |
+
th#order_number {
|
230 |
+
width: 21ch;
|
231 |
+
}
|
232 |
+
|
233 |
+
th#order_date {
|
234 |
+
width: 9ch;
|
235 |
+
}
|
236 |
+
|
237 |
+
th#order_status {
|
238 |
+
width: 12ch;
|
239 |
+
}
|
240 |
+
|
241 |
+
th#shipping_address {
|
242 |
+
width: 18ch;
|
243 |
+
}
|
244 |
+
|
245 |
+
th#wc_actions {
|
246 |
+
width: 9ch;
|
247 |
+
}
|
248 |
+
|
249 |
+
th#seller {
|
250 |
+
width: 6ch;
|
251 |
+
}
|
252 |
+
|
253 |
+
th#suborder {
|
254 |
+
width: 9ch;
|
255 |
+
}
|
256 |
+
</style>
|
257 |
+
<?php
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Delete sub orders when parent order is trashed
|
262 |
+
*
|
263 |
+
* @param int $post_id
|
264 |
+
*/
|
265 |
+
public function admin_on_trash_order( $post_id ) {
|
266 |
+
$post = get_post( $post_id );
|
267 |
+
|
268 |
+
if ( 'shop_order' == $post->post_type && 0 == $post->post_parent ) {
|
269 |
+
$sub_orders = get_children( array(
|
270 |
+
'post_parent' => $post_id,
|
271 |
+
'post_type' => 'shop_order'
|
272 |
+
) );
|
273 |
+
|
274 |
+
if ( $sub_orders ) {
|
275 |
+
foreach ( $sub_orders as $order_post ) {
|
276 |
+
wp_trash_post( $order_post->ID );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Untrash sub orders when parent orders are untrashed
|
284 |
+
*
|
285 |
+
* @param int $post_id
|
286 |
+
*/
|
287 |
+
public function admin_on_untrash_order( $post_id ) {
|
288 |
+
$post = get_post( $post_id );
|
289 |
+
|
290 |
+
if ( 'shop_order' == $post->post_type && 0 == $post->post_parent ) {
|
291 |
+
global $wpdb;
|
292 |
+
|
293 |
+
$suborder_ids = $wpdb->get_col(
|
294 |
+
$wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_type = 'shop_order'", $post_id )
|
295 |
+
);
|
296 |
+
|
297 |
+
if ( $suborder_ids ) {
|
298 |
+
foreach ( $suborder_ids as $suborder_id ) {
|
299 |
+
wp_untrash_post( $suborder_id );
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Delete sub orders and from dokan sync table when a order is deleted
|
307 |
+
*
|
308 |
+
* @param int $post_id
|
309 |
+
*/
|
310 |
+
public function admin_on_delete_order( $post_id ) {
|
311 |
+
$post = get_post( $post_id );
|
312 |
+
|
313 |
+
if ( 'shop_order' == $post->post_type ) {
|
314 |
+
dokan_delete_sync_order( $post_id );
|
315 |
+
|
316 |
+
$sub_orders = get_children( array(
|
317 |
+
'post_parent' => $post_id,
|
318 |
+
'post_type' => 'shop_order'
|
319 |
+
) );
|
320 |
+
|
321 |
+
if ( $sub_orders ) {
|
322 |
+
foreach ($sub_orders as $order_post) {
|
323 |
+
wp_delete_post( $order_post->ID );
|
324 |
+
}
|
325 |
+
}
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Show a toggle button to toggle all the sub orders
|
331 |
+
*
|
332 |
+
* @global WP_Query $wp_query
|
333 |
+
*/
|
334 |
+
public function admin_shop_order_toggle_sub_orders() {
|
335 |
+
global $wp_query;
|
336 |
+
|
337 |
+
if ( isset( $wp_query->query['post_type'] ) && 'shop_order' == $wp_query->query['post_type'] ) {
|
338 |
+
echo '<button class="toggle-sub-orders button">' . esc_html__( 'Toggle Sub-orders', 'dokan-lite' ) . '</button>';
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Send notification to the seller once a product is published from pending
|
344 |
+
*
|
345 |
+
* @param WP_Post $post
|
346 |
+
* @return void
|
347 |
+
*/
|
348 |
+
public function send_notification_on_product_publish( $post ) {
|
349 |
+
if ( $post->post_type != 'product' ) {
|
350 |
+
return;
|
351 |
+
}
|
352 |
+
|
353 |
+
$seller = get_user_by( 'id', $post->post_author );
|
354 |
+
|
355 |
+
do_action( 'dokan_pending_product_published_notification', $post, $seller );
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Remove default author metabox and added new one for dokan seller
|
360 |
+
*
|
361 |
+
* @since 1.0.0
|
362 |
+
*
|
363 |
+
* @return void
|
364 |
+
*/
|
365 |
+
public function add_seller_meta_box(){
|
366 |
+
remove_meta_box( 'authordiv', 'product', 'core' );
|
367 |
+
add_meta_box( 'sellerdiv', __( 'Vendor', 'dokan-lite' ), [ self::class, 'seller_meta_box_content' ], 'product', 'normal', 'core' );
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Display form field with list of authors.
|
372 |
+
*
|
373 |
+
* @since 2.5.3
|
374 |
+
*
|
375 |
+
* @param object $post
|
376 |
+
*/
|
377 |
+
public static function seller_meta_box_content( $post ) {
|
378 |
+
global $user_ID;
|
379 |
+
|
380 |
+
$admin_user = get_user_by( 'id', $user_ID );
|
381 |
+
$selected = empty( $post->ID ) ? $user_ID : $post->post_author;
|
382 |
+
$vendors = dokan()->vendor->all( [ 'number' => -1, 'role__in' => [ 'seller' ] ] );
|
383 |
+
?>
|
384 |
+
<label class="screen-reader-text" for="dokan_product_author_override"><?php esc_html_e( 'Vendor', 'dokan-lite' ); ?></label>
|
385 |
+
<select name="dokan_product_author_override" id="dokan_product_author_override" class="">
|
386 |
+
<?php if ( empty( $vendors ) ): ?>
|
387 |
+
<option value="<?php echo esc_attr( $admin_user->ID ); ?>"><?php echo esc_html( $admin_user->display_name ); ?></option>
|
388 |
+
<?php else: ?>
|
389 |
+
<option value="<?php echo esc_attr( $user_ID ); ?>" <?php selected( $selected, $user_ID ); ?>><?php echo esc_html( $admin_user->display_name ); ?></option>
|
390 |
+
<?php foreach ( $vendors as $key => $vendor ): ?>
|
391 |
+
<option value="<?php echo esc_attr( $vendor->get_id() ) ?>" <?php selected( $selected, $vendor->get_id() ); ?>><?php echo ! empty( $vendor->get_shop_name() ) ? esc_html( $vendor->get_shop_name() ) : $vendor->get_name(); ?></option>
|
392 |
+
<?php endforeach ?>
|
393 |
+
<?php endif ?>
|
394 |
+
</select>
|
395 |
+
<?php
|
396 |
+
}
|
397 |
+
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Override product vendor ID from admin panel
|
401 |
+
*
|
402 |
+
* @since 2.6.2
|
403 |
+
*
|
404 |
+
* @return void
|
405 |
+
*/
|
406 |
+
public function override_product_author_by_admin( $product_id, $post ) {
|
407 |
+
$product = wc_get_product( $product_id );
|
408 |
+
$posted_vendor_id = ! empty( $_POST['dokan_product_author_override'] ) ? intval( $_POST['dokan_product_author_override'] ) : 0; // WPCS: CSRF ok.
|
409 |
+
|
410 |
+
if ( ! $posted_vendor_id ) {
|
411 |
+
return;
|
412 |
+
}
|
413 |
+
|
414 |
+
$vendor = dokan_get_vendor_by_product( $product );
|
415 |
+
|
416 |
+
if ( ! $vendor ) {
|
417 |
+
return;
|
418 |
+
}
|
419 |
+
|
420 |
+
if ( $posted_vendor_id === $vendor->get_id() ) {
|
421 |
+
return;
|
422 |
+
}
|
423 |
+
|
424 |
+
dokan_override_product_author( $product, $posted_vendor_id );
|
425 |
+
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Assign vendor for deleted post types
|
429 |
+
*
|
430 |
+
* @param array $post_types
|
431 |
+
* @param integer $user_id
|
432 |
+
*
|
433 |
+
* @return array
|
434 |
+
*/
|
435 |
+
public function add_wc_post_types_to_delete_user( $post_types, $user_id ) {
|
436 |
+
if ( ! dokan_is_user_seller( $user_id ) ) {
|
437 |
+
return $post_types;
|
438 |
+
}
|
439 |
+
|
440 |
+
$wc_post_types = array( 'product', 'product_variation', 'shop_order', 'shop_coupon' );
|
441 |
+
|
442 |
+
return array_merge( $post_types, $wc_post_types );
|
443 |
+
}
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Dokan update pages
|
447 |
+
*
|
448 |
+
* @param array $value
|
449 |
+
* @param array $name
|
450 |
+
*
|
451 |
+
* @return array
|
452 |
+
*/
|
453 |
+
public function update_pages( $value, $name ) {
|
454 |
+
if ( 'dokan_pages' !== $name ) {
|
455 |
+
return $value;
|
456 |
+
}
|
457 |
+
|
458 |
+
$current_settings = get_option( $name, array() );
|
459 |
+
$current_settings = is_array( $current_settings ) ? $current_settings : array();
|
460 |
+
$value = is_array( $value ) ? $value : array();
|
461 |
+
|
462 |
+
return array_replace_recursive( $current_settings, $value );
|
463 |
+
}
|
464 |
+
}
|
includes/Admin/Menu.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
+
class Menu {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class constructor
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
public function __construct() {
|
15 |
+
add_action( 'admin_menu', [ $this, 'add_admin_menu' ] );
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Add Dokan admin menu
|
20 |
+
*
|
21 |
+
* @since 1.0.0
|
22 |
+
* @since DOKAN_LITE_SINCE Moved to Menu class
|
23 |
+
*
|
24 |
+
* @return void
|
25 |
+
*/
|
26 |
+
public function add_admin_menu() {
|
27 |
+
global $submenu;
|
28 |
+
|
29 |
+
$menu_position = dokan_admin_menu_position();
|
30 |
+
$capability = dokana_admin_menu_capability();
|
31 |
+
$withdraw = dokan_get_withdraw_count();
|
32 |
+
$withdraw_text = __( 'Withdraw', 'dokan-lite' );
|
33 |
+
$slug = 'dokan';
|
34 |
+
|
35 |
+
if ( $withdraw['pending'] ) {
|
36 |
+
$withdraw_text = sprintf( __( 'Withdraw %s', 'dokan-lite' ), '<span class="awaiting-mod count-1"><span class="pending-count">' . $withdraw['pending'] . '</span></span>' );
|
37 |
+
}
|
38 |
+
|
39 |
+
$dashboard = add_menu_page( __( 'Dokan', 'dokan-lite' ), __( 'Dokan', 'dokan-lite' ), $capability, $slug, array( $this, 'dashboard'), 'data:image/svg+xml;base64,' . base64_encode( '<svg width="58px" height="63px" viewBox="0 0 58 63" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="dokan-icon" fill-rule="nonzero" fill="#9EA3A8"><path d="M5.33867702,3.0997123 C5.33867702,3.0997123 40.6568031,0.833255993 40.6568031,27.7724223 C40.6568031,54.7115885 31.3258879,60.1194199 23.1436827,61.8692575 C23.1436827,61.8692575 57.1718639,69.1185847 57.1718639,31.1804393 C57.1718639,-6.75770611 13.7656892,-1.28321423 5.33867702,3.0997123 Z" id="Shape"></path><path d="M34.0564282,48.9704547 C34.0564282,48.9704547 30.6479606,59.4444826 20.3472329,60.7776922 C10.0465051,62.1109017 8.12571122,57.1530286 0.941565611,57.4946635 C0.941565611,57.4946635 0.357794932,52.5784532 6.1578391,51.8868507 C11.9578833,51.1952482 22.8235504,52.5451229 30.0547743,48.5038314 C30.0547743,48.5038314 34.3294822,46.5206821 35.1674756,45.5624377 L34.0564282,48.9704547 Z" id="Shape"></path><path d="M4.80198462,4.99953596 L4.80198462,17.9733318 L4.80198462,17.9733318 L4.80198462,50.2869992 C5.1617776,50.2053136 5.52640847,50.1413326 5.89420073,50.0953503 C7.92701701,49.903571 9.97004544,49.8089979 12.0143772,49.8120433 C14.1423155,49.8120433 16.4679825,49.7370502 18.7936496,49.5454014 L18.7936496,34.3134818 C18.7936496,29.2472854 18.426439,24.0727656 18.7936496,19.0149018 C19.186126,15.9594324 21.459175,13.3479115 24.697266,12.232198 C27.2835811,11.3792548 30.1586431,11.546047 32.5970015,12.6904888 C20.9498348,5.04953132 7.86207285,4.89954524 4.80198462,4.99953596 Z" id="Shape"></path></g></g></svg>' ), $menu_position );
|
40 |
+
|
41 |
+
if ( current_user_can( $capability ) ) {
|
42 |
+
$submenu[ $slug ][] = array( __( 'Dashboard', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/' );
|
43 |
+
$submenu[ $slug ][] = array( __( 'Withdraw', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/withdraw?status=pending' );
|
44 |
+
|
45 |
+
// if dokan pro not installed or dokan pro is greater than 2.9.14 register the `vendor` sub-menu
|
46 |
+
if ( ! dokan()->is_pro_exists() || version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '>' ) ) {
|
47 |
+
$submenu[ $slug ][] = array( __( 'Vendors', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/vendors' );
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( ! dokan()->is_pro_exists() ) {
|
51 |
+
$submenu[ $slug ][] = array( __( 'PRO Features', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/premium' );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
do_action( 'dokan_admin_menu', $capability, $menu_position );
|
56 |
+
|
57 |
+
if ( current_user_can( $capability ) ) {
|
58 |
+
$submenu[ $slug ][] = array( __( '<span style="color:#f18500">Help</span>', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/help' );
|
59 |
+
$submenu[ $slug ][] = array( __( 'Settings', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/settings' );
|
60 |
+
}
|
61 |
+
|
62 |
+
add_action( $dashboard, array( $this, 'dashboard_script' ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Dashboard scripts and styles
|
67 |
+
*
|
68 |
+
* @since 1.0
|
69 |
+
* @since DOKAN_LITE_SINCE Moved to Menu class
|
70 |
+
*
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
public function dashboard_script() {
|
74 |
+
wp_enqueue_style( 'dokan-admin-css' );
|
75 |
+
wp_enqueue_style( 'jquery-ui' );
|
76 |
+
|
77 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
78 |
+
wp_enqueue_script( 'wp-color-picker' );
|
79 |
+
wp_enqueue_script( 'dokan-flot' );
|
80 |
+
wp_enqueue_script( 'dokan-chart' );
|
81 |
+
|
82 |
+
do_action( 'dokan_enqueue_admin_dashboard_script' );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Load Dashboard Template
|
87 |
+
*
|
88 |
+
* @since 1.0
|
89 |
+
* @since DOKAN_LITE_SINCE Moved to Menu class
|
90 |
+
*
|
91 |
+
* @return void
|
92 |
+
*/
|
93 |
+
public function dashboard() {
|
94 |
+
echo '<div class="wrap"><div id="dokan-vue-admin"></div></div>';
|
95 |
+
}
|
96 |
+
}
|
includes/{admin/class-admin-pointers.php → Admin/Pointers.php}
RENAMED
@@ -1,4 +1,7 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Adds and controls pointers for contextual help/tutorials
|
4 |
*
|
@@ -15,7 +18,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
15 |
/**
|
16 |
* Dokan_Admin_Pointers Class.
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
/**
|
21 |
* Hold current screen ID
|
@@ -64,7 +67,6 @@ class Dokan_Admin_Pointers {
|
|
64 |
* Setup pointers for screen.
|
65 |
*/
|
66 |
public function setup_pointers_for_screen() {
|
67 |
-
|
68 |
if ( ! $screen = get_current_screen() ) {
|
69 |
return;
|
70 |
}
|
@@ -88,7 +90,6 @@ class Dokan_Admin_Pointers {
|
|
88 |
* Render pointers on Dashboard Page
|
89 |
*/
|
90 |
public function dashboard_tutorial() {
|
91 |
-
|
92 |
if ( $this->is_dismissed( $this->screen_id ) ) {
|
93 |
return;
|
94 |
}
|
@@ -252,7 +253,4 @@ class Dokan_Admin_Pointers {
|
|
252 |
wp_localize_script( 'dokan-pointers', 'Dokan_Pointers', $pointers );
|
253 |
wp_localize_script( 'dokan-pointers', 'dokan_pointer_data', $data );
|
254 |
}
|
255 |
-
|
256 |
}
|
257 |
-
|
258 |
-
new Dokan_Admin_Pointers();
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
/**
|
6 |
* Adds and controls pointers for contextual help/tutorials
|
7 |
*
|
18 |
/**
|
19 |
* Dokan_Admin_Pointers Class.
|
20 |
*/
|
21 |
+
class Pointers {
|
22 |
|
23 |
/**
|
24 |
* Hold current screen ID
|
67 |
* Setup pointers for screen.
|
68 |
*/
|
69 |
public function setup_pointers_for_screen() {
|
|
|
70 |
if ( ! $screen = get_current_screen() ) {
|
71 |
return;
|
72 |
}
|
90 |
* Render pointers on Dashboard Page
|
91 |
*/
|
92 |
public function dashboard_tutorial() {
|
|
|
93 |
if ( $this->is_dismissed( $this->screen_id ) ) {
|
94 |
return;
|
95 |
}
|
253 |
wp_localize_script( 'dokan-pointers', 'Dokan_Pointers', $pointers );
|
254 |
wp_localize_script( 'dokan-pointers', 'dokan_pointer_data', $data );
|
255 |
}
|
|
|
256 |
}
|
|
|
|
includes/{admin/promotion.php → Admin/Promotion.php}
RENAMED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
|
7 |
/**
|
8 |
* Promotion class
|
9 |
*
|
10 |
* For displaying AI base add on admin panel
|
11 |
*/
|
12 |
-
class
|
13 |
|
14 |
/**
|
15 |
* Time interval for displaying promo
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanPromotion;
|
6 |
|
7 |
/**
|
8 |
* Promotion class
|
9 |
*
|
10 |
* For displaying AI base add on admin panel
|
11 |
*/
|
12 |
+
class Promotion extends DokanPromotion {
|
13 |
|
14 |
/**
|
15 |
* Time interval for displaying promo
|
includes/{admin/class-settings.php → Admin/Settings.php}
RENAMED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Admin Settings Class
|
5 |
*
|
@@ -7,7 +12,7 @@
|
|
7 |
*
|
8 |
* @since 3.0.0
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Load autometically when class initiate
|
@@ -57,20 +62,20 @@ class Dokan_Settings {
|
|
57 |
public function save_settings_value() {
|
58 |
try {
|
59 |
if ( ! current_user_can( 'manage_options' ) ) {
|
60 |
-
throw new
|
61 |
}
|
62 |
|
63 |
$_post_data = wp_unslash( $_POST );
|
|
|
64 |
if ( ! wp_verify_nonce( sanitize_text_field( $_post_data['nonce'] ), 'dokan_admin' ) ) {
|
65 |
-
throw new
|
66 |
}
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
if ( empty( $option_name ) ) {
|
71 |
-
throw new Exception( __( 'Setting not saved properly', 'dokan-lite' ), 400 );
|
72 |
}
|
73 |
|
|
|
74 |
$option_value = $this->sanitize_options( $_post_data['settingsData'] );
|
75 |
$option_value = apply_filters( 'dokan_save_settings_value', $option_value, $option_name );
|
76 |
|
@@ -91,7 +96,7 @@ class Dokan_Settings {
|
|
91 |
} catch ( Exception $e ) {
|
92 |
$error_code = $e->getCode() ? $e->getCode() : 422;
|
93 |
|
94 |
-
wp_send_json_error( new WP_Error( '
|
95 |
}
|
96 |
}
|
97 |
|
@@ -100,7 +105,7 @@ class Dokan_Settings {
|
|
100 |
*
|
101 |
* @return mixed
|
102 |
*/
|
103 |
-
function sanitize_options( $options ) {
|
104 |
if ( ! $options ) {
|
105 |
return $options;
|
106 |
}
|
@@ -125,7 +130,7 @@ class Dokan_Settings {
|
|
125 |
*
|
126 |
* @return mixed string or bool false
|
127 |
*/
|
128 |
-
function get_sanitize_callback( $slug = '' ) {
|
129 |
if ( empty( $slug ) ) {
|
130 |
return false;
|
131 |
}
|
@@ -205,7 +210,7 @@ class Dokan_Settings {
|
|
205 |
*
|
206 |
* @return array
|
207 |
*/
|
208 |
-
function get_settings_sections() {
|
209 |
$sections = array(
|
210 |
array(
|
211 |
'id' => 'dokan_general',
|
@@ -249,9 +254,9 @@ class Dokan_Settings {
|
|
249 |
*
|
250 |
* @return array settings fields
|
251 |
*/
|
252 |
-
function get_settings_fields() {
|
253 |
-
$pages_array
|
254 |
-
|
255 |
$commission_types = dokan_commission_types();
|
256 |
|
257 |
$general_site_options = apply_filters( 'dokan_settings_general_site_options', array(
|
@@ -379,36 +384,6 @@ class Dokan_Settings {
|
|
379 |
$general_site_options,
|
380 |
$general_vendor_store_options
|
381 |
),
|
382 |
-
'dokan_selling' => array(
|
383 |
-
'new_seller_enable_selling' => array(
|
384 |
-
'name' => 'new_seller_enable_selling',
|
385 |
-
'label' => __( 'New Vendor Product Upload', 'dokan-lite' ),
|
386 |
-
'desc' => __( 'Allow newly registered vendors to add products', 'dokan-lite' ),
|
387 |
-
'type' => 'checkbox',
|
388 |
-
'default' => 'on'
|
389 |
-
),
|
390 |
-
'order_status_change' => array(
|
391 |
-
'name' => 'order_status_change',
|
392 |
-
'label' => __( 'Order Status Change', 'dokan-lite' ),
|
393 |
-
'desc' => __( 'Vendor can update order status', 'dokan-lite' ),
|
394 |
-
'type' => 'checkbox',
|
395 |
-
'default' => 'on'
|
396 |
-
),
|
397 |
-
'disable_product_popup' => array(
|
398 |
-
'name' => 'disable_product_popup',
|
399 |
-
'label' => __( 'Disable Product Popup', 'dokan-lite' ),
|
400 |
-
'desc' => __( 'Disable add new product in popup view', 'dokan-lite' ),
|
401 |
-
'type' => 'checkbox',
|
402 |
-
'default' => 'off'
|
403 |
-
),
|
404 |
-
'disable_welcome_wizard' => array(
|
405 |
-
'name' => 'disable_welcome_wizard',
|
406 |
-
'label' => __( 'Disable Welcome Wizard', 'dokan-lite' ),
|
407 |
-
'desc' => __( 'Disable welcome wizard for newly registered vendors', 'dokan-lite' ),
|
408 |
-
'type' => 'checkbox',
|
409 |
-
'default' => 'off'
|
410 |
-
),
|
411 |
-
),
|
412 |
'dokan_selling' => array_merge(
|
413 |
$selling_option_commission,
|
414 |
$selling_option_vendor_capability
|
@@ -594,5 +569,3 @@ class Dokan_Settings {
|
|
594 |
return $settings_fields;
|
595 |
}
|
596 |
}
|
597 |
-
|
598 |
-
new Dokan_Settings();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use WP_Error;
|
7 |
+
|
8 |
/**
|
9 |
* Admin Settings Class
|
10 |
*
|
12 |
*
|
13 |
* @since 3.0.0
|
14 |
*/
|
15 |
+
class Settings {
|
16 |
|
17 |
/**
|
18 |
* Load autometically when class initiate
|
62 |
public function save_settings_value() {
|
63 |
try {
|
64 |
if ( ! current_user_can( 'manage_options' ) ) {
|
65 |
+
throw new DokanException( 'dokan_settings_unauthorized_operation', __( 'You are not authorized to perform this action.', 'dokan-lite' ), 401 );
|
66 |
}
|
67 |
|
68 |
$_post_data = wp_unslash( $_POST );
|
69 |
+
|
70 |
if ( ! wp_verify_nonce( sanitize_text_field( $_post_data['nonce'] ), 'dokan_admin' ) ) {
|
71 |
+
throw new DokanException( 'dokan_settings_invalid_nonce', __( 'Invalid nonce', 'dokan-lite' ), 403 );
|
72 |
}
|
73 |
|
74 |
+
if ( empty( $_post_data['section'] ) ) {
|
75 |
+
throw new DokanException( 'dokan_settings_error_saving', __( '`section` parameter is required.', 'dokan-lite' ), 400 );
|
|
|
|
|
76 |
}
|
77 |
|
78 |
+
$option_name = $_post_data['section'];
|
79 |
$option_value = $this->sanitize_options( $_post_data['settingsData'] );
|
80 |
$option_value = apply_filters( 'dokan_save_settings_value', $option_value, $option_name );
|
81 |
|
96 |
} catch ( Exception $e ) {
|
97 |
$error_code = $e->getCode() ? $e->getCode() : 422;
|
98 |
|
99 |
+
wp_send_json_error( new WP_Error( 'dokan_settings_error', $e->getMessage() ), $error_code );
|
100 |
}
|
101 |
}
|
102 |
|
105 |
*
|
106 |
* @return mixed
|
107 |
*/
|
108 |
+
public function sanitize_options( $options ) {
|
109 |
if ( ! $options ) {
|
110 |
return $options;
|
111 |
}
|
130 |
*
|
131 |
* @return mixed string or bool false
|
132 |
*/
|
133 |
+
public function get_sanitize_callback( $slug = '' ) {
|
134 |
if ( empty( $slug ) ) {
|
135 |
return false;
|
136 |
}
|
210 |
*
|
211 |
* @return array
|
212 |
*/
|
213 |
+
public function get_settings_sections() {
|
214 |
$sections = array(
|
215 |
array(
|
216 |
'id' => 'dokan_general',
|
254 |
*
|
255 |
* @return array settings fields
|
256 |
*/
|
257 |
+
public function get_settings_fields() {
|
258 |
+
$pages_array = $this->get_post_type( 'page' );
|
259 |
+
|
260 |
$commission_types = dokan_commission_types();
|
261 |
|
262 |
$general_site_options = apply_filters( 'dokan_settings_general_site_options', array(
|
384 |
$general_site_options,
|
385 |
$general_vendor_store_options
|
386 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
'dokan_selling' => array_merge(
|
388 |
$selling_option_commission,
|
389 |
$selling_option_vendor_capability
|
569 |
return $settings_fields;
|
570 |
}
|
571 |
}
|
|
|
|
includes/{admin/setup-wizard.php → Admin/SetupWizard.php}
RENAMED
@@ -1,14 +1,13 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Setup wizard class
|
4 |
*
|
5 |
* Walkthrough to the basic setup upon installation
|
6 |
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The class
|
10 |
-
*/
|
11 |
-
class Dokan_Setup_Wizard {
|
12 |
|
13 |
/** @var string Currenct Step */
|
14 |
protected $step = '';
|
@@ -34,12 +33,10 @@ class Dokan_Setup_Wizard {
|
|
34 |
add_action( 'weforms_loaded', [ $this, 'after_weforms_activate' ] );
|
35 |
|
36 |
if ( get_transient( 'dokan_setup_wizard_no_wc' ) ) {
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
add_action( 'dokan_admin_setup_wizard_step_store_start', array( 'Dokan_Admin_Setup_Wizard_No_WC', 'add_wc_html_step_start' ) );
|
42 |
-
add_action( 'dokan_admin_setup_wizard_save_step_store', array( 'Dokan_Admin_Setup_Wizard_No_WC', 'save_wc_store_setup_data' ) );
|
43 |
}
|
44 |
}
|
45 |
}
|
@@ -314,7 +311,9 @@ class Dokan_Setup_Wizard {
|
|
314 |
$selling_options = get_option( 'dokan_selling', array() );
|
315 |
$shipping_fee_recipient = ! empty( $selling_options['shipping_fee_recipient'] ) ? $selling_options['shipping_fee_recipient'] : 'seller';
|
316 |
$tax_fee_recipient = ! empty( $selling_options['tax_fee_recipient'] ) ? $selling_options['tax_fee_recipient'] : 'seller';
|
|
|
317 |
$gmap_api_key = dokan_get_option( 'gmap_api_key', 'dokan_appearance', '' );
|
|
|
318 |
|
319 |
$recipients = array(
|
320 |
'seller' => __( 'Vendor', 'dokan-lite' ),
|
@@ -326,7 +325,13 @@ class Dokan_Setup_Wizard {
|
|
326 |
'recipients' => $recipients,
|
327 |
'shipping_fee_recipient' => $shipping_fee_recipient,
|
328 |
'tax_fee_recipient' => $tax_fee_recipient,
|
|
|
329 |
'gmap_api_key' => $gmap_api_key,
|
|
|
|
|
|
|
|
|
|
|
330 |
'setup_wizard' => $this,
|
331 |
) );
|
332 |
|
@@ -348,7 +353,9 @@ class Dokan_Setup_Wizard {
|
|
348 |
$general_options['custom_store_url'] = ! empty( $_post_data['custom_store_url'] ) ? sanitize_text_field( $_post_data['custom_store_url'] ) : '';
|
349 |
$selling_options['shipping_fee_recipient'] = ! empty( $_post_data['shipping_fee_recipient'] ) ? sanitize_text_field( $_post_data['shipping_fee_recipient'] ) : '';
|
350 |
$selling_options['tax_fee_recipient'] = ! empty( $_post_data['tax_fee_recipient'] ) ? sanitize_text_field( $_post_data['tax_fee_recipient'] ) : '';
|
351 |
-
$appearance['
|
|
|
|
|
352 |
|
353 |
$share_essentials = sanitize_text_field( isset( $_post_data['share_essentials'] ) );
|
354 |
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
/**
|
6 |
* Setup wizard class
|
7 |
*
|
8 |
* Walkthrough to the basic setup upon installation
|
9 |
*/
|
10 |
+
class SetupWizard {
|
|
|
|
|
|
|
|
|
11 |
|
12 |
/** @var string Currenct Step */
|
13 |
protected $step = '';
|
33 |
add_action( 'weforms_loaded', [ $this, 'after_weforms_activate' ] );
|
34 |
|
35 |
if ( get_transient( 'dokan_setup_wizard_no_wc' ) ) {
|
36 |
+
add_filter( 'dokan_admin_setup_wizard_steps', array( SetupWizardNoWC::class, 'add_wc_steps_to_wizard' ) );
|
37 |
+
add_filter( 'dokan_setup_wizard_enqueue_scripts', array( SetupWizardNoWC::class, 'enqueue_wc_localized_scripts' ) );
|
38 |
+
add_action( 'dokan_admin_setup_wizard_step_store_start', array( SetupWizardNoWC::class, 'add_wc_html_step_start' ) );
|
39 |
+
add_action( 'dokan_admin_setup_wizard_save_step_store', array( SetupWizardNoWC::class, 'save_wc_store_setup_data' ) );
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
}
|
311 |
$selling_options = get_option( 'dokan_selling', array() );
|
312 |
$shipping_fee_recipient = ! empty( $selling_options['shipping_fee_recipient'] ) ? $selling_options['shipping_fee_recipient'] : 'seller';
|
313 |
$tax_fee_recipient = ! empty( $selling_options['tax_fee_recipient'] ) ? $selling_options['tax_fee_recipient'] : 'seller';
|
314 |
+
$map_api_source = dokan_get_option( 'map_api_source', 'dokan_appearance', 'google_maps' );
|
315 |
$gmap_api_key = dokan_get_option( 'gmap_api_key', 'dokan_appearance', '' );
|
316 |
+
$mapbox_access_token = dokan_get_option( 'mapbox_access_token', 'dokan_appearance', '' );
|
317 |
|
318 |
$recipients = array(
|
319 |
'seller' => __( 'Vendor', 'dokan-lite' ),
|
325 |
'recipients' => $recipients,
|
326 |
'shipping_fee_recipient' => $shipping_fee_recipient,
|
327 |
'tax_fee_recipient' => $tax_fee_recipient,
|
328 |
+
'map_api_source' => $map_api_source,
|
329 |
'gmap_api_key' => $gmap_api_key,
|
330 |
+
'mapbox_access_token' => $mapbox_access_token,
|
331 |
+
'map_api_source_options' => array(
|
332 |
+
'google_maps' => __( 'Google Maps', 'dokan-lite' ),
|
333 |
+
'mapbox' => __( 'Mapbox', 'dokan-lite' ),
|
334 |
+
),
|
335 |
'setup_wizard' => $this,
|
336 |
) );
|
337 |
|
353 |
$general_options['custom_store_url'] = ! empty( $_post_data['custom_store_url'] ) ? sanitize_text_field( $_post_data['custom_store_url'] ) : '';
|
354 |
$selling_options['shipping_fee_recipient'] = ! empty( $_post_data['shipping_fee_recipient'] ) ? sanitize_text_field( $_post_data['shipping_fee_recipient'] ) : '';
|
355 |
$selling_options['tax_fee_recipient'] = ! empty( $_post_data['tax_fee_recipient'] ) ? sanitize_text_field( $_post_data['tax_fee_recipient'] ) : '';
|
356 |
+
$appearance['map_api_source'] = ! empty( $_post_data['map_api_source'] ) ? sanitize_text_field( $_post_data['map_api_source'] ) : '';
|
357 |
+
$appearance['gmap_api_key'] = ! empty( $_post_data['gmap_api_key'] ) ? sanitize_text_field( $_post_data['gmap_api_key'] ) : '';
|
358 |
+
$appearance['mapbox_access_token'] = ! empty( $_post_data['mapbox_access_token'] ) ? sanitize_text_field( $_post_data['mapbox_access_token'] ) : '';
|
359 |
|
360 |
$share_essentials = sanitize_text_field( isset( $_post_data['share_essentials'] ) );
|
361 |
|
includes/{admin/setup-wizard-no-wc.php → Admin/SetupWizardNoWC.php}
RENAMED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Set wizard steps
|
@@ -125,10 +130,7 @@ class Dokan_Admin_Setup_Wizard_No_WC extends Dokan_Setup_Wizard {
|
|
125 |
delete_transient( '_wc_activation_redirect' );
|
126 |
|
127 |
if ( is_wp_error( $installed ) ) {
|
128 |
-
wp_die(
|
129 |
-
esc_html( $installed->get_error_message() ),
|
130 |
-
esc_html( __( 'Error installing WooCommerce plugin', 'dokan-lite' ) )
|
131 |
-
);
|
132 |
}
|
133 |
|
134 |
set_transient( 'dokan_setup_wizard_no_wc', true, 15 * MINUTE_IN_SECONDS );
|
@@ -145,14 +147,13 @@ class Dokan_Admin_Setup_Wizard_No_WC extends Dokan_Setup_Wizard {
|
|
145 |
*
|
146 |
* @param array $steps
|
147 |
*
|
148 |
-
* @return \
|
149 |
*/
|
150 |
protected static function get_wc_setup_wizard( $steps = array() ) {
|
151 |
static $setup_wizard = null;
|
152 |
|
153 |
if ( is_null( $setup_wizard ) ) {
|
154 |
-
|
155 |
-
$setup_wizard = new Dokan_Admin_Setup_Wizard_WC_Admin( $steps );
|
156 |
}
|
157 |
|
158 |
return $setup_wizard;
|
@@ -227,17 +228,15 @@ class Dokan_Admin_Setup_Wizard_No_WC extends Dokan_Setup_Wizard {
|
|
227 |
* @return void
|
228 |
*/
|
229 |
public static function save_wc_store_setup_data() {
|
230 |
-
|
231 |
-
|
232 |
-
$
|
233 |
-
$
|
234 |
-
$
|
235 |
-
$
|
236 |
-
$
|
237 |
-
$
|
238 |
-
$
|
239 |
-
$product_type = isset( $_POST['product_type'] ) ? sanitize_text_field( wp_unslash( $_POST['product_type'] ) ) : '';
|
240 |
-
$sell_in_person = isset( $_POST['sell_in_person'] ) && ( 'on' === sanitize_text_field( wp_unslash( $_POST['sell_in_person'] ) ) );
|
241 |
|
242 |
update_option( 'woocommerce_store_address', $address );
|
243 |
update_option( 'woocommerce_store_address_2', $address_2 );
|
@@ -263,7 +262,7 @@ class Dokan_Admin_Setup_Wizard_No_WC extends Dokan_Setup_Wizard {
|
|
263 |
}
|
264 |
}
|
265 |
|
266 |
-
WC_Install::create_pages();
|
267 |
}
|
268 |
|
269 |
/**
|
@@ -324,7 +323,7 @@ class Dokan_Admin_Setup_Wizard_No_WC extends Dokan_Setup_Wizard {
|
|
324 |
public static function wc_setup_shipping_save( $dokan_admin_setup_wizard ) {
|
325 |
$wc_setup_wizard = self::get_wc_setup_wizard( $dokan_admin_setup_wizard->get_steps() );
|
326 |
|
327 |
-
WC_Admin_Notices::remove_notice( 'install' );
|
328 |
|
329 |
$wc_setup_wizard->set_step( 'shipping' );
|
330 |
$wc_setup_wizard->wc_setup_shipping_save();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Admin\SetupWizard as DokanSetupWizard;
|
6 |
+
use WeDevs\Dokan\Admin\SetupWizardWCAdmin;
|
7 |
+
|
8 |
+
class SetupWizardNoWC extends DokanSetupWizard {
|
9 |
|
10 |
/**
|
11 |
* Set wizard steps
|
130 |
delete_transient( '_wc_activation_redirect' );
|
131 |
|
132 |
if ( is_wp_error( $installed ) ) {
|
133 |
+
wp_die( $installed->get_error_message(), __( 'Error installing WooCommerce plugin', 'dokan-lite' ) );
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
set_transient( 'dokan_setup_wizard_no_wc', true, 15 * MINUTE_IN_SECONDS );
|
147 |
*
|
148 |
* @param array $steps
|
149 |
*
|
150 |
+
* @return \WeDevs\Dokan\Admin\SetupWizardWCAdmin
|
151 |
*/
|
152 |
protected static function get_wc_setup_wizard( $steps = array() ) {
|
153 |
static $setup_wizard = null;
|
154 |
|
155 |
if ( is_null( $setup_wizard ) ) {
|
156 |
+
$setup_wizard = new SetupWizardWCAdmin( $steps );
|
|
|
157 |
}
|
158 |
|
159 |
return $setup_wizard;
|
228 |
* @return void
|
229 |
*/
|
230 |
public static function save_wc_store_setup_data() {
|
231 |
+
$address = isset( $_POST['store_address'] ) ? wc_clean( wp_unslash( $_POST['store_address'] ) ) : '';
|
232 |
+
$address_2 = isset( $_POST['store_address_2'] ) ? wc_clean( wp_unslash( $_POST['store_address_2'] ) ) : '';
|
233 |
+
$city = isset( $_POST['store_city'] ) ? wc_clean( wp_unslash( $_POST['store_city'] ) ) : '';
|
234 |
+
$country = isset( $_POST['store_country'] ) ? wc_clean( wp_unslash( $_POST['store_country'] ) ) : '';
|
235 |
+
$state = isset( $_POST['store_state'] ) ? wc_clean( wp_unslash( $_POST['store_state'] ) ) : '*';
|
236 |
+
$postcode = isset( $_POST['store_postcode'] ) ? wc_clean( wp_unslash( $_POST['store_postcode'] ) ) : '';
|
237 |
+
$currency_code = isset( $_POST['currency_code'] ) ? wc_clean( wp_unslash( $_POST['currency_code'] ) ) : '';
|
238 |
+
$product_type = isset( $_POST['product_type'] ) ? wc_clean( wp_unslash( $_POST['product_type'] ) ) : '';
|
239 |
+
$sell_in_person = isset( $_POST['sell_in_person'] ) && ( 'on' === wc_clean( wp_unslash( $_POST['sell_in_person'] ) ) );
|
|
|
|
|
240 |
|
241 |
update_option( 'woocommerce_store_address', $address );
|
242 |
update_option( 'woocommerce_store_address_2', $address_2 );
|
262 |
}
|
263 |
}
|
264 |
|
265 |
+
\WC_Install::create_pages();
|
266 |
}
|
267 |
|
268 |
/**
|
323 |
public static function wc_setup_shipping_save( $dokan_admin_setup_wizard ) {
|
324 |
$wc_setup_wizard = self::get_wc_setup_wizard( $dokan_admin_setup_wizard->get_steps() );
|
325 |
|
326 |
+
\WC_Admin_Notices::remove_notice( 'install' );
|
327 |
|
328 |
$wc_setup_wizard->set_step( 'shipping' );
|
329 |
$wc_setup_wizard->wc_setup_shipping_save();
|
includes/{admin/setup-wizard-wc-admin.php → Admin/SetupWizardWCAdmin.php}
RENAMED
@@ -1,10 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );
|
4 |
|
5 |
include_once WC_ABSPATH . '/includes/admin/class-wc-admin-setup-wizard.php';
|
6 |
|
7 |
-
class
|
8 |
|
9 |
/**
|
10 |
* Current step
|
@@ -64,7 +66,7 @@ class Dokan_Admin_Setup_Wizard_WC_Admin extends WC_Admin_Setup_Wizard {
|
|
64 |
$country_name = WC()->countries->countries[ $country_code ];
|
65 |
$prefixed_country_name = WC()->countries->estimated_for_prefix( $country_code ) . $country_name;
|
66 |
$currency_code = get_woocommerce_currency();
|
67 |
-
$existing_zones = WC_Shipping_Zones::get_zones();
|
68 |
$intro_text = '';
|
69 |
|
70 |
if ( empty( $existing_zones ) ) {
|
@@ -285,7 +287,7 @@ class Dokan_Admin_Setup_Wizard_WC_Admin extends WC_Admin_Setup_Wizard {
|
|
285 |
type="checkbox"
|
286 |
name="wc-wizard-service-<?php echo esc_attr( $item_id ); ?>-enabled"
|
287 |
value="yes" <?php checked( $should_enable_toggle ); ?>
|
288 |
-
data-plugins="<?php echo wc_esc_json( wp_json_encode( $plugins ) );
|
289 |
>
|
290 |
<label for="wc-wizard-service-<?php echo esc_attr( $item_id ); ?>-enabled" class="switch-label"></label>
|
291 |
|
@@ -329,7 +331,7 @@ class Dokan_Admin_Setup_Wizard_WC_Admin extends WC_Admin_Setup_Wizard {
|
|
329 |
placeholder="<?php echo esc_attr( $setting['placeholder'] ); ?>"
|
330 |
<?php echo ( $setting['required'] ) ? 'required' : ''; ?>
|
331 |
<?php echo $is_checkbox ? checked( isset( $checked ) && $checked, true, false ) : ''; ?>
|
332 |
-
data-plugins="<?php echo wc_esc_json( wp_json_encode( isset( $setting['plugins'] ) ? $setting['plugins'] : null ) );
|
333 |
/>
|
334 |
<?php if ( ! empty( $setting['description'] ) ) : ?>
|
335 |
<span class="wc-wizard-service-settings-description"><?php echo esc_html( $setting['description'] ); ?></span>
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );
|
6 |
|
7 |
include_once WC_ABSPATH . '/includes/admin/class-wc-admin-setup-wizard.php';
|
8 |
|
9 |
+
class SetupWizardWCAdmin extends \WC_Admin_Setup_Wizard {
|
10 |
|
11 |
/**
|
12 |
* Current step
|
66 |
$country_name = WC()->countries->countries[ $country_code ];
|
67 |
$prefixed_country_name = WC()->countries->estimated_for_prefix( $country_code ) . $country_name;
|
68 |
$currency_code = get_woocommerce_currency();
|
69 |
+
$existing_zones = \WC_Shipping_Zones::get_zones();
|
70 |
$intro_text = '';
|
71 |
|
72 |
if ( empty( $existing_zones ) ) {
|
287 |
type="checkbox"
|
288 |
name="wc-wizard-service-<?php echo esc_attr( $item_id ); ?>-enabled"
|
289 |
value="yes" <?php checked( $should_enable_toggle ); ?>
|
290 |
+
data-plugins="<?php echo wc_esc_json( wp_json_encode( $plugins ) ); ?>"
|
291 |
>
|
292 |
<label for="wc-wizard-service-<?php echo esc_attr( $item_id ); ?>-enabled" class="switch-label"></label>
|
293 |
|
331 |
placeholder="<?php echo esc_attr( $setting['placeholder'] ); ?>"
|
332 |
<?php echo ( $setting['required'] ) ? 'required' : ''; ?>
|
333 |
<?php echo $is_checkbox ? checked( isset( $checked ) && $checked, true, false ) : ''; ?>
|
334 |
+
data-plugins="<?php echo wc_esc_json( wp_json_encode( isset( $setting['plugins'] ) ? $setting['plugins'] : null ) ); ?>"
|
335 |
/>
|
336 |
<?php if ( ! empty( $setting['description'] ) ) : ?>
|
337 |
<span class="wc-wizard-service-settings-description"><?php echo esc_html( $setting['description'] ); ?></span>
|
classes/admin-user-profile.php → includes/Admin/UserProfile.php
RENAMED
@@ -1,10 +1,13 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* User profile related tasks for wp-admin
|
4 |
*
|
5 |
* @package Dokan
|
6 |
*/
|
7 |
-
class
|
8 |
|
9 |
public function __construct() {
|
10 |
add_action( 'show_user_profile', array( $this, 'add_meta_fields' ), 20 );
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Admin;
|
4 |
+
|
5 |
/**
|
6 |
* User profile related tasks for wp-admin
|
7 |
*
|
8 |
* @package Dokan
|
9 |
*/
|
10 |
+
class UserProfile {
|
11 |
|
12 |
public function __construct() {
|
13 |
add_action( 'show_user_profile', array( $this, 'add_meta_fields' ), 20 );
|
includes/{admin-functions.php → Admin/functions.php}
RENAMED
@@ -1,336 +1,50 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
-
*
|
5 |
*
|
6 |
-
* @
|
7 |
-
*/
|
8 |
-
function dokan_admin_shop_order_remove_parents( $query ) {
|
9 |
-
if ( $query->is_main_query() && 'shop_order' == $query->query['post_type'] ) {
|
10 |
-
$query->set( 'orderby', 'ID' );
|
11 |
-
$query->set( 'order', 'DESC' );
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
add_action( 'pre_get_posts', 'dokan_admin_shop_order_remove_parents' );
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Remove child orders from WC reports
|
19 |
*
|
20 |
-
* @
|
21 |
-
* @return array
|
22 |
*/
|
23 |
-
function
|
24 |
-
|
25 |
-
$query['where'] .= ' AND posts.post_parent = 0';
|
26 |
-
|
27 |
-
return $query;
|
28 |
-
}
|
29 |
-
|
30 |
-
add_filter( 'woocommerce_reports_get_order_report_query', 'dokan_admin_order_reports_remove_parents' );
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
* @return array
|
37 |
-
*/
|
38 |
-
function dokan_admin_shop_order_edit_columns( $existing_columns ) {
|
39 |
-
if ( WC_VERSION > '3.2.6' ) {
|
40 |
-
unset( $existing_columns['wc_actions'] );
|
41 |
-
|
42 |
-
$columns = array_slice( $existing_columns, 0, count( $existing_columns ), true ) +
|
43 |
-
array(
|
44 |
-
'seller' => __( 'Vendor', 'dokan-lite' ),
|
45 |
-
'wc_actions' => __( 'Actions', 'dokan-lite' ),
|
46 |
-
'suborder' => __( 'Sub Order', 'dokan-lite' ),
|
47 |
-
)
|
48 |
-
+ array_slice( $existing_columns, count( $existing_columns ), count( $existing_columns ) - 1, true );
|
49 |
-
} else {
|
50 |
-
$existing_columns['seller'] = __( 'Vendor', 'dokan-lite' );
|
51 |
-
$existing_columns['suborder'] = __( 'Sub Order', 'dokan-lite' );
|
52 |
-
}
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
if ( ! current_user_can( 'manage_woocommerce' ) || ( isset( $_GET['author'] ) && ! empty( $_GET['author'] ) ) ) {
|
57 |
-
unset( $columns['suborder'] );
|
58 |
-
unset( $columns['seller'] );
|
59 |
}
|
60 |
|
61 |
-
|
62 |
}
|
63 |
|
64 |
-
|
65 |
-
if ( ! current_user_can( 'manage_woocommerce' ) || ( isset( $_GET['author'] ) && ! empty( $_GET['author'] ) ) ) {
|
66 |
-
unset( $existing_columns['suborder'] );
|
67 |
-
unset( $existing_columns['seller'] );
|
68 |
-
}
|
69 |
|
70 |
-
return
|
71 |
}
|
72 |
|
73 |
-
add_filter( 'manage_edit-shop_order_columns', 'dokan_admin_shop_order_edit_columns', 11 );
|
74 |
-
|
75 |
/**
|
76 |
-
*
|
77 |
*
|
78 |
-
* @
|
79 |
-
* @global type $woocommerce
|
80 |
-
* @global WC_Order $the_order
|
81 |
-
* @param type $col
|
82 |
-
*/
|
83 |
-
function dokan_shop_order_custom_columns( $col ) {
|
84 |
-
global $post, $the_order;
|
85 |
-
|
86 |
-
if ( empty( $the_order ) || $the_order->get_id() != $post->ID ) {
|
87 |
-
$the_order = new WC_Order( $post->ID );
|
88 |
-
}
|
89 |
-
|
90 |
-
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
91 |
-
return $col;
|
92 |
-
}
|
93 |
-
|
94 |
-
switch ($col) {
|
95 |
-
case 'order_number':
|
96 |
-
if ($post->post_parent !== 0) {
|
97 |
-
echo '<strong>';
|
98 |
-
echo esc_html__( ' Sub Order of', 'dokan-lite' );
|
99 |
-
printf( ' <a href="%s">#%s</a>', esc_url( admin_url( 'post.php?action=edit&post=' . $post->post_parent ) ), esc_html( $post->post_parent ) );
|
100 |
-
echo '</strong>';
|
101 |
-
}
|
102 |
-
break;
|
103 |
-
|
104 |
-
case 'suborder':
|
105 |
-
$has_sub = get_post_meta( $post->ID, 'has_sub_order', true );
|
106 |
-
|
107 |
-
if ( $has_sub == '1' ) {
|
108 |
-
printf( '<a href="#" class="show-sub-orders" data-class="parent-%1$d" data-show="%2$s" data-hide="%3$s">%2$s</a>', esc_attr( $post->ID ), esc_attr__( 'Show Sub-Orders', 'dokan-lite' ), esc_attr__( 'Hide Sub-Orders', 'dokan-lite' ) );
|
109 |
-
}
|
110 |
-
break;
|
111 |
-
|
112 |
-
case 'seller':
|
113 |
-
$has_sub = get_post_meta( $post->ID, 'has_sub_order', true );
|
114 |
-
|
115 |
-
if ( $has_sub != '1' ) {
|
116 |
-
$seller = get_user_by( 'id', dokan_get_seller_id_by_order( $post->ID ) );
|
117 |
-
printf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit.php?post_type=shop_order&vendor_id=' . $seller->ID ) ), esc_html( $seller->display_name ) );
|
118 |
-
}
|
119 |
-
|
120 |
-
break;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
add_action( 'manage_shop_order_posts_custom_column', 'dokan_shop_order_custom_columns', 11 );
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Adds css classes on admin shop order table
|
128 |
*
|
129 |
-
* @
|
130 |
-
* @param
|
131 |
-
* @param int $post_id
|
132 |
-
* @return array
|
133 |
-
*/
|
134 |
-
function dokan_admin_shop_order_row_classes( $classes, $post_id ) {
|
135 |
-
global $post;
|
136 |
-
|
137 |
-
if ( is_search() || ! current_user_can( 'manage_woocommerce' ) ) {
|
138 |
-
return $classes;
|
139 |
-
}
|
140 |
-
|
141 |
-
$vendor_id = isset( $_GET['vendor_id'] ) ? sanitize_text_field( wp_unslash( $_GET['vendor_id'] ) ) : '';
|
142 |
-
|
143 |
-
if ( $vendor_id ) {
|
144 |
-
return $classes;
|
145 |
-
}
|
146 |
-
|
147 |
-
if ( $post->post_type == 'shop_order' && $post->post_parent != 0 ) {
|
148 |
-
$classes[] = 'sub-order parent-' . $post->post_parent;
|
149 |
-
}
|
150 |
-
|
151 |
-
return $classes;
|
152 |
-
}
|
153 |
-
|
154 |
-
add_filter( 'post_class', 'dokan_admin_shop_order_row_classes', 10, 2);
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Show/hide sub order css/js
|
158 |
*
|
159 |
* @return void
|
160 |
*/
|
161 |
-
function
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
$('a.show-sub-orders').on('click', function(e) {
|
168 |
-
e.preventDefault();
|
169 |
-
|
170 |
-
var $self = $(this),
|
171 |
-
el = $('tr.' + $self.data('class') );
|
172 |
-
|
173 |
-
if ( el.is(':hidden') ) {
|
174 |
-
el.show();
|
175 |
-
$self.text( $self.data('hide') );
|
176 |
-
} else {
|
177 |
-
el.hide();
|
178 |
-
$self.text( $self.data('show') );
|
179 |
-
}
|
180 |
-
});
|
181 |
-
|
182 |
-
$('button.toggle-sub-orders').on('click', function(e) {
|
183 |
-
e.preventDefault();
|
184 |
-
|
185 |
-
$('tr.sub-order').toggle();
|
186 |
-
});
|
187 |
-
});
|
188 |
-
</script>
|
189 |
-
|
190 |
-
<style type="text/css">
|
191 |
-
tr.sub-order {
|
192 |
-
background: #ECFFF2;
|
193 |
-
}
|
194 |
-
|
195 |
-
th#order_number {
|
196 |
-
width: 21ch;
|
197 |
-
}
|
198 |
-
|
199 |
-
th#order_date {
|
200 |
-
width: 9ch;
|
201 |
-
}
|
202 |
-
|
203 |
-
th#order_status {
|
204 |
-
width: 12ch;
|
205 |
-
}
|
206 |
-
|
207 |
-
th#shipping_address {
|
208 |
-
width: 18ch;
|
209 |
-
}
|
210 |
-
|
211 |
-
th#wc_actions {
|
212 |
-
width: 9ch;
|
213 |
-
}
|
214 |
-
|
215 |
-
th#seller {
|
216 |
-
width: 6ch;
|
217 |
-
}
|
218 |
-
|
219 |
-
th#suborder {
|
220 |
-
width: 9ch;
|
221 |
-
}
|
222 |
-
</style>
|
223 |
-
<?php
|
224 |
-
}
|
225 |
-
|
226 |
-
add_action( 'admin_footer-edit.php', 'dokan_admin_shop_order_scripts' );
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Delete sub orders when parent order is trashed
|
230 |
-
*
|
231 |
-
* @param int $post_id
|
232 |
-
*/
|
233 |
-
function dokan_admin_on_trash_order( $post_id ) {
|
234 |
-
$post = get_post( $post_id );
|
235 |
-
|
236 |
-
if ( 'shop_order' == $post->post_type && 0 == $post->post_parent ) {
|
237 |
-
$sub_orders = get_children( array(
|
238 |
-
'post_parent' => $post_id,
|
239 |
-
'post_type' => 'shop_order'
|
240 |
-
) );
|
241 |
-
|
242 |
-
if ( $sub_orders ) {
|
243 |
-
foreach ( $sub_orders as $order_post ) {
|
244 |
-
wp_trash_post( $order_post->ID );
|
245 |
-
}
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
add_action( 'wp_trash_post', 'dokan_admin_on_trash_order' );
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Untrash sub orders when parent orders are untrashed
|
254 |
-
*
|
255 |
-
* @param int $post_id
|
256 |
-
*/
|
257 |
-
function dokan_admin_on_untrash_order( $post_id ) {
|
258 |
-
$post = get_post( $post_id );
|
259 |
-
|
260 |
-
if ( 'shop_order' == $post->post_type && 0 == $post->post_parent ) {
|
261 |
-
global $wpdb;
|
262 |
-
|
263 |
-
$suborder_ids = $wpdb->get_col(
|
264 |
-
$wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_type = 'shop_order'", $post_id )
|
265 |
-
);
|
266 |
-
|
267 |
-
if ( $suborder_ids ) {
|
268 |
-
foreach ( $suborder_ids as $suborder_id ) {
|
269 |
-
wp_untrash_post( $suborder_id );
|
270 |
-
}
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
|
275 |
-
add_action( 'untrash_post', 'dokan_admin_on_untrash_order' );
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Delete sub orders and from dokan sync table when a order is deleted
|
279 |
-
*
|
280 |
-
* @param int $post_id
|
281 |
-
*/
|
282 |
-
function dokan_admin_on_delete_order( $post_id ) {
|
283 |
-
$post = get_post( $post_id );
|
284 |
-
|
285 |
-
if ( 'shop_order' == $post->post_type ) {
|
286 |
-
dokan_delete_sync_order( $post_id );
|
287 |
-
|
288 |
-
$sub_orders = get_children( array(
|
289 |
-
'post_parent' => $post_id,
|
290 |
-
'post_type' => 'shop_order'
|
291 |
-
) );
|
292 |
-
|
293 |
-
if ( $sub_orders ) {
|
294 |
-
foreach ($sub_orders as $order_post) {
|
295 |
-
wp_delete_post( $order_post->ID );
|
296 |
-
}
|
297 |
-
}
|
298 |
-
}
|
299 |
-
}
|
300 |
-
|
301 |
-
add_action( 'delete_post', 'dokan_admin_on_delete_order' );
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Show a toggle button to toggle all the sub orders
|
305 |
-
*
|
306 |
-
* @global WP_Query $wp_query
|
307 |
-
*/
|
308 |
-
function dokan_admin_shop_order_toggle_sub_orders() {
|
309 |
-
global $wp_query;
|
310 |
|
311 |
-
|
312 |
-
echo '<button class="toggle-sub-orders button">' . esc_html__( 'Toggle Sub-orders', 'dokan-lite' ) . '</button>';
|
313 |
-
}
|
314 |
}
|
315 |
|
316 |
-
add_action( 'restrict_manage_posts', 'dokan_admin_shop_order_toggle_sub_orders');
|
317 |
-
|
318 |
-
/**
|
319 |
-
* Get total commision earning of the site
|
320 |
-
*
|
321 |
-
* @global WPDB $wpdb
|
322 |
-
* @return int
|
323 |
-
*/
|
324 |
-
function dokan_site_total_earning() {
|
325 |
-
global $wpdb;
|
326 |
-
|
327 |
-
return $wpdb->get_var( $wpdb->prepare( "SELECT SUM((do.order_total - do.net_amount)) as earning
|
328 |
-
FROM {$wpdb->prefix}dokan_orders do
|
329 |
-
LEFT JOIN $wpdb->posts p ON do.order_id = p.ID
|
330 |
-
WHERE seller_id != %d AND p.post_status = 'publish' AND do.order_status IN ('wc-on-hold', 'wc-completed', 'wc-processing')
|
331 |
-
ORDER BY do.order_id DESC", 0
|
332 |
-
) );
|
333 |
-
}
|
334 |
|
335 |
/**
|
336 |
* Dokan Get Admin report data
|
@@ -403,8 +117,10 @@ function dokan_admin_report_data( $group_by = 'day', $year = '', $start = '', $e
|
|
403 |
*
|
404 |
* @global WPDB $wpdb
|
405 |
* @global type $wp_locale
|
|
|
406 |
* @param string $group_by
|
407 |
* @param string $year
|
|
|
408 |
* @return obj
|
409 |
*/
|
410 |
function dokan_admin_report( $group_by = 'day', $year = '', $start = '', $end = '' ) {
|
@@ -647,119 +363,6 @@ function dokan_admin_report( $group_by = 'day', $year = '', $start = '', $end =
|
|
647 |
return $data;
|
648 |
}
|
649 |
|
650 |
-
/**
|
651 |
-
* Send notification to the seller once a product is published from pending
|
652 |
-
*
|
653 |
-
* @param WP_Post $post
|
654 |
-
* @return void
|
655 |
-
*/
|
656 |
-
function dokan_send_notification_on_product_publish( $post ) {
|
657 |
-
if ( $post->post_type != 'product' ) {
|
658 |
-
return;
|
659 |
-
}
|
660 |
-
|
661 |
-
$seller = get_user_by( 'id', $post->post_author );
|
662 |
-
|
663 |
-
do_action( 'dokan_pending_product_published_notification', $post, $seller );
|
664 |
-
}
|
665 |
-
|
666 |
-
add_action( 'pending_to_publish', 'dokan_send_notification_on_product_publish' );
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
/**
|
671 |
-
* Display form field with list of authors.
|
672 |
-
*
|
673 |
-
* @since 2.5.3
|
674 |
-
*
|
675 |
-
* @param object $post
|
676 |
-
*/
|
677 |
-
function dokan_seller_meta_box( $post ) {
|
678 |
-
global $user_ID;
|
679 |
-
|
680 |
-
$admin_user = get_user_by( 'id', $user_ID );
|
681 |
-
$selected = empty( $post->ID ) ? $user_ID : $post->post_author;
|
682 |
-
$user_query = new WP_User_Query( array( 'role' => 'seller' ) );
|
683 |
-
$sellers = $user_query->get_results();
|
684 |
-
?>
|
685 |
-
<label class="screen-reader-text" for="dokan_product_author_override"><?php esc_html_e( 'Vendor', 'dokan-lite' ); ?></label>
|
686 |
-
<select name="dokan_product_author_override" id="dokan_product_author_override" class="">
|
687 |
-
<?php if ( ! $sellers ): ?>
|
688 |
-
<option value="<?php echo esc_attr( $admin_user->ID ); ?>"><?php echo esc_html( $admin_user->display_name ); ?></option>
|
689 |
-
<?php else: ?>
|
690 |
-
<option value="<?php echo esc_attr( $user_ID ); ?>" <?php selected( $selected, $user_ID ); ?>><?php echo esc_html( $admin_user->display_name ); ?></option>
|
691 |
-
<?php foreach ( $sellers as $key => $user): ?>
|
692 |
-
<option value="<?php echo esc_attr( $user->ID ) ?>" <?php selected( $selected, $user->ID ); ?>><?php echo esc_html( $user->display_name ); ?></option>
|
693 |
-
<?php endforeach ?>
|
694 |
-
<?php endif ?>
|
695 |
-
</select>
|
696 |
-
<?php
|
697 |
-
}
|
698 |
-
|
699 |
-
/**
|
700 |
-
* Remove default author metabox and added
|
701 |
-
* new one for dokan seller
|
702 |
-
*
|
703 |
-
* @since 1.0.0
|
704 |
-
*
|
705 |
-
* @return void
|
706 |
-
*/
|
707 |
-
function dokan_add_seller_meta_box(){
|
708 |
-
remove_meta_box( 'authordiv', 'product', 'core' );
|
709 |
-
add_meta_box( 'sellerdiv', __('Vendor', 'dokan-lite' ), 'dokan_seller_meta_box', 'product', 'normal', 'core' );
|
710 |
-
}
|
711 |
-
|
712 |
-
add_action( 'add_meta_boxes', 'dokan_add_seller_meta_box' );
|
713 |
-
|
714 |
-
/**
|
715 |
-
* Override product vendor ID from admin panel
|
716 |
-
*
|
717 |
-
* @since 2.6.2
|
718 |
-
*
|
719 |
-
* @return void
|
720 |
-
**/
|
721 |
-
function dokan_override_product_author_by_admin( $product_id, $post ) {
|
722 |
-
$product = wc_get_product( $product_id );
|
723 |
-
$posted_vendor_id = ! empty( $_POST['dokan_product_author_override'] ) ? intval( $_POST['dokan_product_author_override'] ) : 0; // WPCS: CSRF ok.
|
724 |
-
|
725 |
-
if ( ! $posted_vendor_id ) {
|
726 |
-
return;
|
727 |
-
}
|
728 |
-
|
729 |
-
$vendor = dokan_get_vendor_by_product( $product );
|
730 |
-
|
731 |
-
if ( ! $vendor ) {
|
732 |
-
return;
|
733 |
-
}
|
734 |
-
|
735 |
-
if ( $posted_vendor_id === $vendor->get_id() ) {
|
736 |
-
return;
|
737 |
-
}
|
738 |
-
|
739 |
-
dokan_override_product_author( $product, $posted_vendor_id );
|
740 |
-
}
|
741 |
-
|
742 |
-
add_action( 'woocommerce_process_product_meta', 'dokan_override_product_author_by_admin', 12, 2 );
|
743 |
-
|
744 |
-
/**
|
745 |
-
* Dokan override author ID from admin
|
746 |
-
*
|
747 |
-
* @since 2.6.2
|
748 |
-
*
|
749 |
-
* @param object $product
|
750 |
-
* @param integer $seller_id
|
751 |
-
*
|
752 |
-
* @return void
|
753 |
-
*/
|
754 |
-
function dokan_override_product_author( $product, $seller_id ){
|
755 |
-
wp_update_post( array(
|
756 |
-
'ID' => $product->get_id(),
|
757 |
-
'post_author' => $seller_id
|
758 |
-
) );
|
759 |
-
|
760 |
-
do_action( 'dokan_after_override_product_author', $product, $seller_id );
|
761 |
-
}
|
762 |
-
|
763 |
/**
|
764 |
* Generate Earning report By seller in admin area
|
765 |
*
|
@@ -1027,64 +630,3 @@ function dokan_admin_report_by_seller( $chosen_seller_id) {
|
|
1027 |
|
1028 |
return $data;
|
1029 |
}
|
1030 |
-
|
1031 |
-
add_filter( 'post_types_to_delete_with_user', 'dokan_add_wc_post_types_to_delete_user', 10, 2 );
|
1032 |
-
|
1033 |
-
function dokan_add_wc_post_types_to_delete_user( $post_types, $user_id ) {
|
1034 |
-
if ( ! dokan_is_user_seller( $user_id ) ) {
|
1035 |
-
return $post_types;
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
$wc_post_types = array( 'product', 'product_variation', 'shop_order', 'shop_coupon' );
|
1039 |
-
|
1040 |
-
return array_merge( $post_types, $wc_post_types );
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
/**
|
1044 |
-
* Get help documents for admin
|
1045 |
-
*
|
1046 |
-
* @since 2.8
|
1047 |
-
*
|
1048 |
-
* @return Object
|
1049 |
-
*/
|
1050 |
-
function dokan_admin_get_help() {
|
1051 |
-
$help_docs = get_transient( 'dokan_help_docs', '[]' );
|
1052 |
-
|
1053 |
-
if ( false === $help_docs ) {
|
1054 |
-
$help_url = 'https://api.bitbucket.org/2.0/snippets/wedevs/oErMz/files/dokan-help.json';
|
1055 |
-
$response = wp_remote_get( $help_url, array('timeout' => 15) );
|
1056 |
-
$help_docs = wp_remote_retrieve_body( $response );
|
1057 |
-
|
1058 |
-
if ( is_wp_error( $response ) || $response['response']['code'] != 200 ) {
|
1059 |
-
$help_docs = '[]';
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
set_transient( 'dokan_help_docs', $help_docs, 12 * HOUR_IN_SECONDS );
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
$help_docs = json_decode( $help_docs );
|
1066 |
-
|
1067 |
-
return $help_docs;
|
1068 |
-
}
|
1069 |
-
|
1070 |
-
/**
|
1071 |
-
* Dokan update pages
|
1072 |
-
*
|
1073 |
-
* @param array $value
|
1074 |
-
* @param array $name
|
1075 |
-
*
|
1076 |
-
* @return array
|
1077 |
-
*/
|
1078 |
-
function dokan_update_pages( $value, $name ) {
|
1079 |
-
if ( 'dokan_pages' !== $name ) {
|
1080 |
-
return $value;
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
$current_settings = get_option( $name, array() );
|
1084 |
-
$current_settings = is_array( $current_settings ) ? $current_settings : array();
|
1085 |
-
$value = is_array( $value ) ? $value : array();
|
1086 |
-
|
1087 |
-
return array_replace_recursive( $current_settings, $value );
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
add_filter( 'dokan_save_settings_value', 'dokan_update_pages', 10, 2 );
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
+
* Get help documents for admin
|
4 |
*
|
5 |
+
* @since 2.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
*
|
7 |
+
* @return Object
|
|
|
8 |
*/
|
9 |
+
function dokan_admin_get_help() {
|
10 |
+
$help_docs = get_transient( 'dokan_help_docs', '[]' );
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
if ( false === $help_docs ) {
|
13 |
+
$help_url = 'https://api.bitbucket.org/2.0/snippets/wedevs/oErMz/files/dokan-help.json';
|
14 |
+
$response = wp_remote_get( $help_url, array('timeout' => 15) );
|
15 |
+
$help_docs = wp_remote_retrieve_body( $response );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
if ( is_wp_error( $response ) || $response['response']['code'] != 200 ) {
|
18 |
+
$help_docs = '[]';
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
+
set_transient( 'dokan_help_docs', $help_docs, 12 * HOUR_IN_SECONDS );
|
22 |
}
|
23 |
|
24 |
+
$help_docs = json_decode( $help_docs );
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
return $help_docs;
|
27 |
}
|
28 |
|
|
|
|
|
29 |
/**
|
30 |
+
* Dokan override author ID from admin
|
31 |
*
|
32 |
+
* @since 2.6.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*
|
34 |
+
* @param object $product
|
35 |
+
* @param integer $seller_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
*
|
37 |
* @return void
|
38 |
*/
|
39 |
+
function dokan_override_product_author( $product, $seller_id ){
|
40 |
+
wp_update_post( array(
|
41 |
+
'ID' => $product->get_id(),
|
42 |
+
'post_author' => $seller_id
|
43 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
+
do_action( 'dokan_after_override_product_author', $product, $seller_id );
|
|
|
|
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
/**
|
50 |
* Dokan Get Admin report data
|
117 |
*
|
118 |
* @global WPDB $wpdb
|
119 |
* @global type $wp_locale
|
120 |
+
*
|
121 |
* @param string $group_by
|
122 |
* @param string $year
|
123 |
+
*
|
124 |
* @return obj
|
125 |
*/
|
126 |
function dokan_admin_report( $group_by = 'day', $year = '', $start = '', $end = '' ) {
|
363 |
return $data;
|
364 |
}
|
365 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
/**
|
367 |
* Generate Earning report By seller in admin area
|
368 |
*
|
630 |
|
631 |
return $data;
|
632 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/ajax.php → includes/Ajax.php
RENAMED
@@ -1,40 +1,28 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Ajax handler for Dokan
|
4 |
*
|
5 |
* @package Dokan
|
6 |
*/
|
7 |
-
class
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Singleton object
|
11 |
-
*
|
12 |
-
* @staticvar boolean $instance
|
13 |
-
* @return \self
|
14 |
-
*/
|
15 |
-
public static function init() {
|
16 |
-
|
17 |
-
static $instance = false;
|
18 |
-
|
19 |
-
if ( ! $instance ) {
|
20 |
-
$instance = new self;
|
21 |
-
}
|
22 |
-
|
23 |
-
return $instance;
|
24 |
-
}
|
25 |
|
26 |
/**
|
27 |
-
*
|
28 |
*
|
29 |
* @return void
|
30 |
*/
|
31 |
-
function
|
32 |
-
|
33 |
-
$withdraw = Dokan_Admin_Withdraw::init();
|
34 |
-
add_action( 'wp_ajax_withdraw_ajax_submission', array( $withdraw, 'withdraw_ajax' ) );
|
35 |
|
36 |
//settings
|
37 |
-
$settings =
|
38 |
add_action( 'wp_ajax_dokan_settings', array( $settings, 'ajax_settings' ) );
|
39 |
|
40 |
add_action( 'wp_ajax_dokan-mark-order-complete', array( $this, 'complete_order' ) );
|
@@ -76,7 +64,7 @@ class Dokan_Ajax {
|
|
76 |
*
|
77 |
* @return void
|
78 |
*/
|
79 |
-
function create_product() {
|
80 |
check_ajax_referer( 'dokan_reviews' );
|
81 |
|
82 |
if ( ! current_user_can( 'dokan_add_product' ) ) {
|
@@ -109,7 +97,7 @@ class Dokan_Ajax {
|
|
109 |
/**
|
110 |
* shop url check
|
111 |
*/
|
112 |
-
function shop_url_check() {
|
113 |
global $user_ID;
|
114 |
|
115 |
$nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : '';
|
@@ -159,7 +147,7 @@ class Dokan_Ajax {
|
|
159 |
*
|
160 |
* Fires from seller dashboard in frontend
|
161 |
*/
|
162 |
-
function complete_order() {
|
163 |
if ( ! is_admin() ) {
|
164 |
die();
|
165 |
}
|
@@ -182,7 +170,7 @@ class Dokan_Ajax {
|
|
182 |
wp_die( esc_html__( 'You do not have permission to change this order', 'dokan-lite' ) );
|
183 |
}
|
184 |
|
185 |
-
$order =
|
186 |
$order->update_status( 'completed' );
|
187 |
|
188 |
wp_safe_redirect( wp_get_referer() );
|
@@ -194,7 +182,7 @@ class Dokan_Ajax {
|
|
194 |
*
|
195 |
* Fires from frontend seller dashboard
|
196 |
*/
|
197 |
-
function process_order() {
|
198 |
if ( ! is_admin() ) {
|
199 |
die();
|
200 |
}
|
@@ -217,7 +205,7 @@ class Dokan_Ajax {
|
|
217 |
wp_die( esc_html__( 'You do not have permission to change this order', 'dokan-lite' ) );
|
218 |
}
|
219 |
|
220 |
-
$order =
|
221 |
$order->update_status( 'processing' );
|
222 |
|
223 |
wp_safe_redirect( wp_get_referer() );
|
@@ -230,14 +218,24 @@ class Dokan_Ajax {
|
|
230 |
* @access public
|
231 |
* @return void
|
232 |
*/
|
233 |
-
function grant_access_to_download() {
|
|
|
|
|
234 |
check_ajax_referer( 'grant-access', 'security' );
|
235 |
|
236 |
if ( ! current_user_can( 'dokandar' ) || ! isset( $_POST['loop'], $_POST['order_id'], $_POST['product_ids']) ) {
|
237 |
wp_die( -1 );
|
238 |
}
|
239 |
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
|
242 |
$wpdb->hide_errors();
|
243 |
|
@@ -245,10 +243,10 @@ class Dokan_Ajax {
|
|
245 |
$product_ids = array_filter( array_map( 'absint', (array) wp_unslash( $_POST['product_ids'] ) ) );
|
246 |
$loop = intval( $_POST['loop'] );
|
247 |
$file_counter = 0;
|
248 |
-
$order =
|
249 |
|
250 |
foreach ( $product_ids as $product_id ) {
|
251 |
-
$product =
|
252 |
$files = $product->get_downloads();
|
253 |
|
254 |
if ( ! $order->get_billing_email() ) {
|
@@ -284,7 +282,7 @@ class Dokan_Ajax {
|
|
284 |
*
|
285 |
* @return void
|
286 |
*/
|
287 |
-
function change_order_status() {
|
288 |
|
289 |
check_ajax_referer( 'dokan_change_status' );
|
290 |
|
@@ -296,7 +294,7 @@ class Dokan_Ajax {
|
|
296 |
$order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : '';
|
297 |
$order_status = isset( $_POST['order_status'] ) ? sanitize_text_field( wp_unslash( $_POST['order_status'] ) ) : '';
|
298 |
|
299 |
-
$order =
|
300 |
$order->update_status( $order_status );
|
301 |
|
302 |
$statuses = wc_get_order_statuses();
|
@@ -313,8 +311,7 @@ class Dokan_Ajax {
|
|
313 |
*
|
314 |
* Catches the form submission from store page
|
315 |
*/
|
316 |
-
function contact_seller() {
|
317 |
-
|
318 |
check_ajax_referer( 'dokan_contact_seller' );
|
319 |
|
320 |
$posted = $_POST;
|
@@ -352,7 +349,7 @@ class Dokan_Ajax {
|
|
352 |
*
|
353 |
* @return void
|
354 |
*/
|
355 |
-
function revoke_access_to_download() {
|
356 |
check_ajax_referer( 'revoke-access', 'security' );
|
357 |
|
358 |
if ( ! current_user_can( 'dokandar' ) || ! isset( $_POST['download_id'], $_POST['product_id'], $_POST['order_id'], $_POST['permission_id'] ) ) {
|
@@ -393,7 +390,7 @@ class Dokan_Ajax {
|
|
393 |
$is_customer_note = ( $note_type == 'customer' ) ? 1 : 0;
|
394 |
|
395 |
if ( $post_id > 0 ) {
|
396 |
-
$order =
|
397 |
$comment_id = $order->add_order_note( $note, $is_customer_note );
|
398 |
|
399 |
echo '<li rel="' . esc_attr( $comment_id ) . '" class="note ';
|
@@ -414,7 +411,6 @@ class Dokan_Ajax {
|
|
414 |
* Add shipping tracking info via ajax
|
415 |
*/
|
416 |
public function add_shipping_tracking_info() {
|
417 |
-
|
418 |
if ( isset( $_POST['dokan_security_nonce'] ) && ! wp_verify_nonce( sanitize_key( $_POST['dokan_security_nonce'] ), 'dokan_security_action' ) ) {
|
419 |
die( -1 );
|
420 |
}
|
@@ -440,10 +436,8 @@ class Dokan_Ajax {
|
|
440 |
}
|
441 |
|
442 |
if ( $post_id > 0 ) {
|
443 |
-
$order
|
444 |
-
|
445 |
-
|
446 |
-
$time = current_time( 'mysql' );
|
447 |
|
448 |
$data = array(
|
449 |
'comment_post_ID' => $post_id,
|
@@ -625,12 +619,12 @@ class Dokan_Ajax {
|
|
625 |
}
|
626 |
|
627 |
/**
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
public function json_search_product() {
|
635 |
check_ajax_referer( 'search-products', 'security' );
|
636 |
|
@@ -667,12 +661,12 @@ class Dokan_Ajax {
|
|
667 |
}
|
668 |
|
669 |
/**
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
public function dokan_json_search_vendor_customers() {
|
677 |
check_ajax_referer( 'search-customer', 'security' );
|
678 |
|
@@ -735,7 +729,7 @@ class Dokan_Ajax {
|
|
735 |
wp_send_json( apply_filters( 'dokan_json_search_found_customers', $found_customers ) );
|
736 |
}
|
737 |
|
738 |
-
|
739 |
* Calculate width and height based on what the currently selected theme supports.
|
740 |
*
|
741 |
* @since 2.5
|
@@ -815,7 +809,6 @@ class Dokan_Ajax {
|
|
815 |
return $object;
|
816 |
}
|
817 |
|
818 |
-
|
819 |
/**
|
820 |
* Insert an attachment and its metadata.
|
821 |
*
|
@@ -938,4 +931,34 @@ class Dokan_Ajax {
|
|
938 |
|
939 |
wp_send_json( $vendor_earning );
|
940 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
941 |
}
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
+
use WC_Customer;
|
6 |
+
use WC_Data_Store;
|
7 |
+
use WC_Order;
|
8 |
+
|
9 |
/**
|
10 |
* Ajax handler for Dokan
|
11 |
*
|
12 |
* @package Dokan
|
13 |
*/
|
14 |
+
class Ajax {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
/**
|
17 |
+
* Class constructor
|
18 |
*
|
19 |
* @return void
|
20 |
*/
|
21 |
+
public function __construct() {
|
22 |
+
add_action( 'wp_ajax_withdraw_ajax_submission', array( $this, 'withdraw_export_csv' ) );
|
|
|
|
|
23 |
|
24 |
//settings
|
25 |
+
$settings = dokan()->dashboard->templates->settings;
|
26 |
add_action( 'wp_ajax_dokan_settings', array( $settings, 'ajax_settings' ) );
|
27 |
|
28 |
add_action( 'wp_ajax_dokan-mark-order-complete', array( $this, 'complete_order' ) );
|
64 |
*
|
65 |
* @return void
|
66 |
*/
|
67 |
+
public function create_product() {
|
68 |
check_ajax_referer( 'dokan_reviews' );
|
69 |
|
70 |
if ( ! current_user_can( 'dokan_add_product' ) ) {
|
97 |
/**
|
98 |
* shop url check
|
99 |
*/
|
100 |
+
public function shop_url_check() {
|
101 |
global $user_ID;
|
102 |
|
103 |
$nonce = isset( $_POST['_nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['_nonce'] ) ) : '';
|
147 |
*
|
148 |
* Fires from seller dashboard in frontend
|
149 |
*/
|
150 |
+
public function complete_order() {
|
151 |
if ( ! is_admin() ) {
|
152 |
die();
|
153 |
}
|
170 |
wp_die( esc_html__( 'You do not have permission to change this order', 'dokan-lite' ) );
|
171 |
}
|
172 |
|
173 |
+
$order = dokan()->order->get( $order_id );
|
174 |
$order->update_status( 'completed' );
|
175 |
|
176 |
wp_safe_redirect( wp_get_referer() );
|
182 |
*
|
183 |
* Fires from frontend seller dashboard
|
184 |
*/
|
185 |
+
public function process_order() {
|
186 |
if ( ! is_admin() ) {
|
187 |
die();
|
188 |
}
|
205 |
wp_die( esc_html__( 'You do not have permission to change this order', 'dokan-lite' ) );
|
206 |
}
|
207 |
|
208 |
+
$order = dokan()->order->get( $order_id );
|
209 |
$order->update_status( 'processing' );
|
210 |
|
211 |
wp_safe_redirect( wp_get_referer() );
|
218 |
* @access public
|
219 |
* @return void
|
220 |
*/
|
221 |
+
public function grant_access_to_download() {
|
222 |
+
global $wpdb;
|
223 |
+
|
224 |
check_ajax_referer( 'grant-access', 'security' );
|
225 |
|
226 |
if ( ! current_user_can( 'dokandar' ) || ! isset( $_POST['loop'], $_POST['order_id'], $_POST['product_ids']) ) {
|
227 |
wp_die( -1 );
|
228 |
}
|
229 |
|
230 |
+
$order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : 0;
|
231 |
+
$product_ids = isset( $_POST['product_ids'] ) ? intval( $_POST['product_ids'] ) : 0;
|
232 |
+
$loop = isset( $_POST['loop'] ) ? intval( $_POST['loop'] ) : 0;
|
233 |
+
$file_counter = 0;
|
234 |
+
$order = dokan()->order->get( $order_id );
|
235 |
+
|
236 |
+
if ( ! is_array( $product_ids ) ) {
|
237 |
+
$product_ids = array( $product_ids );
|
238 |
+
}
|
239 |
|
240 |
$wpdb->hide_errors();
|
241 |
|
243 |
$product_ids = array_filter( array_map( 'absint', (array) wp_unslash( $_POST['product_ids'] ) ) );
|
244 |
$loop = intval( $_POST['loop'] );
|
245 |
$file_counter = 0;
|
246 |
+
$order = dokan()->order->get( $order_id );
|
247 |
|
248 |
foreach ( $product_ids as $product_id ) {
|
249 |
+
$product = dokan()->product->get( $product_id );
|
250 |
$files = $product->get_downloads();
|
251 |
|
252 |
if ( ! $order->get_billing_email() ) {
|
282 |
*
|
283 |
* @return void
|
284 |
*/
|
285 |
+
public function change_order_status() {
|
286 |
|
287 |
check_ajax_referer( 'dokan_change_status' );
|
288 |
|
294 |
$order_id = isset( $_POST['order_id'] ) ? intval( $_POST['order_id'] ) : '';
|
295 |
$order_status = isset( $_POST['order_status'] ) ? sanitize_text_field( wp_unslash( $_POST['order_status'] ) ) : '';
|
296 |
|
297 |
+
$order = dokan()->order->get( $order_id );
|
298 |
$order->update_status( $order_status );
|
299 |
|
300 |
$statuses = wc_get_order_statuses();
|
311 |
*
|
312 |
* Catches the form submission from store page
|
313 |
*/
|
314 |
+
public function contact_seller() {
|
|
|
315 |
check_ajax_referer( 'dokan_contact_seller' );
|
316 |
|
317 |
$posted = $_POST;
|
349 |
*
|
350 |
* @return void
|
351 |
*/
|
352 |
+
public function revoke_access_to_download() {
|
353 |
check_ajax_referer( 'revoke-access', 'security' );
|
354 |
|
355 |
if ( ! current_user_can( 'dokandar' ) || ! isset( $_POST['download_id'], $_POST['product_id'], $_POST['order_id'], $_POST['permission_id'] ) ) {
|
390 |
$is_customer_note = ( $note_type == 'customer' ) ? 1 : 0;
|
391 |
|
392 |
if ( $post_id > 0 ) {
|
393 |
+
$order = dokan()->order->get( $post_id );
|
394 |
$comment_id = $order->add_order_note( $note, $is_customer_note );
|
395 |
|
396 |
echo '<li rel="' . esc_attr( $comment_id ) . '" class="note ';
|
411 |
* Add shipping tracking info via ajax
|
412 |
*/
|
413 |
public function add_shipping_tracking_info() {
|
|
|
414 |
if ( isset( $_POST['dokan_security_nonce'] ) && ! wp_verify_nonce( sanitize_key( $_POST['dokan_security_nonce'] ), 'dokan_security_action' ) ) {
|
415 |
die( -1 );
|
416 |
}
|
436 |
}
|
437 |
|
438 |
if ( $post_id > 0 ) {
|
439 |
+
$order = dokan()->order->get( $post_id );
|
440 |
+
$time = current_time( 'mysql' );
|
|
|
|
|
441 |
|
442 |
$data = array(
|
443 |
'comment_post_ID' => $post_id,
|
619 |
}
|
620 |
|
621 |
/**
|
622 |
+
* Search product using term
|
623 |
+
*
|
624 |
+
* @since 2.6.8
|
625 |
+
*
|
626 |
+
* @return void
|
627 |
+
*/
|
628 |
public function json_search_product() {
|
629 |
check_ajax_referer( 'search-products', 'security' );
|
630 |
|
661 |
}
|
662 |
|
663 |
/**
|
664 |
+
* Search customer
|
665 |
+
*
|
666 |
+
* @since 2.8.3
|
667 |
+
*
|
668 |
+
* @return array
|
669 |
+
*/
|
670 |
public function dokan_json_search_vendor_customers() {
|
671 |
check_ajax_referer( 'search-customer', 'security' );
|
672 |
|
729 |
wp_send_json( apply_filters( 'dokan_json_search_found_customers', $found_customers ) );
|
730 |
}
|
731 |
|
732 |
+
/**
|
733 |
* Calculate width and height based on what the currently selected theme supports.
|
734 |
*
|
735 |
* @since 2.5
|
809 |
return $object;
|
810 |
}
|
811 |
|
|
|
812 |
/**
|
813 |
* Insert an attachment and its metadata.
|
814 |
*
|
931 |
|
932 |
wp_send_json( $vendor_earning );
|
933 |
}
|
934 |
+
|
935 |
+
/**
|
936 |
+
* Export witdraw requests
|
937 |
+
*
|
938 |
+
* @since DOKAN_LITE_SINCE
|
939 |
+
*
|
940 |
+
* @return void
|
941 |
+
*/
|
942 |
+
public function withdraw_export_csv() {
|
943 |
+
check_ajax_referer( 'dokan_admin', 'nonce' );
|
944 |
+
|
945 |
+
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
946 |
+
wp_send_json_error( __( 'You have no permission to do this action', 'dokan-lite' ) );
|
947 |
+
}
|
948 |
+
|
949 |
+
$post_data = wp_unslash( $_POST );
|
950 |
+
|
951 |
+
if ( empty( $post_data['id'] ) ) {
|
952 |
+
wp_send_json_error( __( 'id param is required', 'dokan-lite' ), 400 );
|
953 |
+
}
|
954 |
+
|
955 |
+
$ids = explode( ',', $post_data['id'] );
|
956 |
+
|
957 |
+
$args = array(
|
958 |
+
'ids' => $ids,
|
959 |
+
'method' => 'paypal'
|
960 |
+
);
|
961 |
+
|
962 |
+
dokan()->withdraw->export( $args )->csv();
|
963 |
+
}
|
964 |
}
|
includes/{class-assets.php → Assets.php}
RENAMED
@@ -1,17 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
* @since 3.0.0
|
7 |
-
*/
|
8 |
-
class Dokan_Assets {
|
9 |
|
10 |
/**
|
11 |
* The constructor
|
12 |
*/
|
13 |
function __construct() {
|
14 |
-
|
15 |
add_action( 'init', array( $this, 'register_all_scripts' ), 10 );
|
16 |
add_filter( 'dokan_localized_args', array( $this, 'conditional_localized_args' ) );
|
17 |
|
@@ -31,46 +27,7 @@ class Dokan_Assets {
|
|
31 |
|
32 |
// load vue app inside the parent menu only
|
33 |
if ( 'toplevel_page_dokan' == $hook ) {
|
34 |
-
$
|
35 |
-
$banner_width = dokan_get_option( 'store_banner_width', 'dokan_appearance', 625 );
|
36 |
-
$banner_height = dokan_get_option( 'store_banner_height', 'dokan_appearance', 300 );
|
37 |
-
$has_flex_width = ! empty( $general_settings['store_banner_flex_width'] ) ? $general_settings['store_banner_flex_width'] : true;
|
38 |
-
$has_flex_height = ! empty( $general_settings['store_banner_flex_height'] ) ? $general_settings['store_banner_flex_height'] : true;
|
39 |
-
|
40 |
-
$localize_script = apply_filters( 'dokan_admin_localize_script', array(
|
41 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
42 |
-
'nonce' => wp_create_nonce( 'dokan_admin' ),
|
43 |
-
'rest' => array(
|
44 |
-
'root' => esc_url_raw( get_rest_url() ),
|
45 |
-
'nonce' => wp_create_nonce( 'wp_rest' ),
|
46 |
-
'version' => 'dokan/v1',
|
47 |
-
),
|
48 |
-
'api' => null,
|
49 |
-
'libs' => array(),
|
50 |
-
'routeComponents' => array( 'default' => null ),
|
51 |
-
'routes' => $this->get_vue_admin_routes(),
|
52 |
-
'currency' => $this->get_localized_price(),
|
53 |
-
'hasPro' => dokan()->is_pro_exists(),
|
54 |
-
'proVersion' => dokan()->is_pro_exists() ? dokan_pro()->version : '',
|
55 |
-
'i18n' => array( 'dokan-lite' => dokan_get_jed_locale_data( 'dokan-lite' ) ) ,
|
56 |
-
'urls' => array(
|
57 |
-
'adminRoot' => admin_url(),
|
58 |
-
'siteUrl' => home_url( '/' ),
|
59 |
-
'storePrefix' => dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ),
|
60 |
-
'assetsUrl' => DOKAN_PLUGIN_ASSEST,
|
61 |
-
'buynowpro' => dokan_pro_buynow_url()
|
62 |
-
),
|
63 |
-
'states' => WC()->countries->get_allowed_country_states(),
|
64 |
-
'countries' => WC()->countries->get_allowed_countries(),
|
65 |
-
'current_time' => current_time( 'mysql' ),
|
66 |
-
'store_banner_dimension' => [
|
67 |
-
'width' => $banner_width,
|
68 |
-
'height' => $banner_height,
|
69 |
-
'flex-width' => $has_flex_width,
|
70 |
-
'flex-height' => $has_flex_height
|
71 |
-
],
|
72 |
-
'ajax_loader' => DOKAN_PLUGIN_ASSEST . '/images/spinner-2x.gif',
|
73 |
-
) );
|
74 |
|
75 |
// Load common styles and scripts
|
76 |
wp_enqueue_script( 'dokan-tinymce' );
|
@@ -382,7 +339,7 @@ class Dokan_Assets {
|
|
382 |
'dokan-vue-vendor' => array(
|
383 |
'src' => $asset_url . '/js/vue-vendor.js',
|
384 |
'version' => filemtime( $asset_path . '/js/vue-vendor.js' ),
|
385 |
-
'deps' => array('dokan-i18n-jed', 'dokan-tinymce-plugin' )
|
386 |
),
|
387 |
'dokan-vue-bootstrap' => array(
|
388 |
'src' => $asset_url . '/js/vue-bootstrap.js',
|
@@ -545,7 +502,7 @@ class Dokan_Assets {
|
|
545 |
*
|
546 |
* @global type $wp
|
547 |
*/
|
548 |
-
function dokan_dashboard_scripts() {
|
549 |
global $wp;
|
550 |
|
551 |
if ( DOKAN_LOAD_STYLE ) {
|
@@ -632,7 +589,7 @@ class Dokan_Assets {
|
|
632 |
*
|
633 |
* @return $default_args
|
634 |
*/
|
635 |
-
function conditional_localized_args( $default_args ) {
|
636 |
|
637 |
if ( dokan_is_seller_dashboard()
|
638 |
|| ( get_query_var( 'edit' ) && is_singular( 'product' ) )
|
@@ -784,4 +741,53 @@ class Dokan_Assets {
|
|
784 |
}
|
785 |
}
|
786 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
+
class Assets {
|
|
|
|
|
|
|
6 |
|
7 |
/**
|
8 |
* The constructor
|
9 |
*/
|
10 |
function __construct() {
|
|
|
11 |
add_action( 'init', array( $this, 'register_all_scripts' ), 10 );
|
12 |
add_filter( 'dokan_localized_args', array( $this, 'conditional_localized_args' ) );
|
13 |
|
27 |
|
28 |
// load vue app inside the parent menu only
|
29 |
if ( 'toplevel_page_dokan' == $hook ) {
|
30 |
+
$localize_script = $this->get_admin_localized_scripts();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
// Load common styles and scripts
|
33 |
wp_enqueue_script( 'dokan-tinymce' );
|
339 |
'dokan-vue-vendor' => array(
|
340 |
'src' => $asset_url . '/js/vue-vendor.js',
|
341 |
'version' => filemtime( $asset_path . '/js/vue-vendor.js' ),
|
342 |
+
'deps' => array( 'dokan-i18n-jed', 'dokan-tinymce-plugin', 'dokan-chart' )
|
343 |
),
|
344 |
'dokan-vue-bootstrap' => array(
|
345 |
'src' => $asset_url . '/js/vue-bootstrap.js',
|
502 |
*
|
503 |
* @global type $wp
|
504 |
*/
|
505 |
+
public function dokan_dashboard_scripts() {
|
506 |
global $wp;
|
507 |
|
508 |
if ( DOKAN_LOAD_STYLE ) {
|
589 |
*
|
590 |
* @return $default_args
|
591 |
*/
|
592 |
+
public function conditional_localized_args( $default_args ) {
|
593 |
|
594 |
if ( dokan_is_seller_dashboard()
|
595 |
|| ( get_query_var( 'edit' ) && is_singular( 'product' ) )
|
741 |
}
|
742 |
}
|
743 |
|
744 |
+
/**
|
745 |
+
* Admin localized scripts
|
746 |
+
*
|
747 |
+
* @since DOKAN_LITE_SINCE
|
748 |
+
*
|
749 |
+
* @return array
|
750 |
+
*/
|
751 |
+
public function get_admin_localized_scripts() {
|
752 |
+
$general_settings = get_option( 'dokan_general', [] );
|
753 |
+
$banner_width = dokan_get_option( 'store_banner_width', 'dokan_appearance', 625 );
|
754 |
+
$banner_height = dokan_get_option( 'store_banner_height', 'dokan_appearance', 300 );
|
755 |
+
$has_flex_width = ! empty( $general_settings['store_banner_flex_width'] ) ? $general_settings['store_banner_flex_width'] : true;
|
756 |
+
$has_flex_height = ! empty( $general_settings['store_banner_flex_height'] ) ? $general_settings['store_banner_flex_height'] : true;
|
757 |
+
|
758 |
+
return apply_filters( 'dokan_admin_localize_script', array(
|
759 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
760 |
+
'nonce' => wp_create_nonce( 'dokan_admin' ),
|
761 |
+
'rest' => array(
|
762 |
+
'root' => esc_url_raw( get_rest_url() ),
|
763 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
764 |
+
'version' => 'dokan/v1',
|
765 |
+
),
|
766 |
+
'api' => null,
|
767 |
+
'libs' => array(),
|
768 |
+
'routeComponents' => array( 'default' => null ),
|
769 |
+
'routes' => $this->get_vue_admin_routes(),
|
770 |
+
'currency' => $this->get_localized_price(),
|
771 |
+
'hasPro' => dokan()->is_pro_exists(),
|
772 |
+
'proVersion' => dokan()->is_pro_exists() ? dokan_pro()->version : '',
|
773 |
+
'i18n' => array( 'dokan-lite' => dokan_get_jed_locale_data( 'dokan-lite' ) ) ,
|
774 |
+
'urls' => array(
|
775 |
+
'adminRoot' => admin_url(),
|
776 |
+
'siteUrl' => home_url( '/' ),
|
777 |
+
'storePrefix' => dokan_get_option( 'custom_store_url', 'dokan_general', 'store' ),
|
778 |
+
'assetsUrl' => DOKAN_PLUGIN_ASSEST,
|
779 |
+
'buynowpro' => dokan_pro_buynow_url()
|
780 |
+
),
|
781 |
+
'states' => WC()->countries->get_allowed_country_states(),
|
782 |
+
'countries' => WC()->countries->get_allowed_countries(),
|
783 |
+
'current_time' => current_time( 'mysql' ),
|
784 |
+
'store_banner_dimension' => [
|
785 |
+
'width' => $banner_width,
|
786 |
+
'height' => $banner_height,
|
787 |
+
'flex-width' => $has_flex_width,
|
788 |
+
'flex-height' => $has_flex_height
|
789 |
+
],
|
790 |
+
'ajax_loader' => DOKAN_PLUGIN_ASSEST . '/images/spinner-2x.gif',
|
791 |
+
) );
|
792 |
+
}
|
793 |
}
|
includes/{class-commission.php → Commission.php}
RENAMED
@@ -1,16 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
use Dokan\Traits\Singleton;
|
6 |
|
7 |
/**
|
8 |
* Dokan Commission Class
|
9 |
*
|
10 |
* @since 2.9.21
|
11 |
*/
|
12 |
-
class
|
13 |
-
use Singleton;
|
14 |
|
15 |
/**
|
16 |
* Order id holder
|
@@ -31,24 +28,13 @@ class Dokan_Commission {
|
|
31 |
public $quantity = 0;
|
32 |
|
33 |
/**
|
34 |
-
*
|
35 |
-
*
|
36 |
-
* @since 2.9.21
|
37 |
-
*
|
38 |
-
* @return void
|
39 |
-
*/
|
40 |
-
private function boot() {
|
41 |
-
$this->hooks();
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Init hooks
|
46 |
*
|
47 |
* @since 2.9.21
|
48 |
*
|
49 |
* @return void
|
50 |
*/
|
51 |
-
|
52 |
add_filter( 'woocommerce_order_item_get_formatted_meta_data', [ $this, 'hide_extra_data' ] );
|
53 |
}
|
54 |
|
@@ -134,12 +120,12 @@ class Dokan_Commission {
|
|
134 |
* @return float
|
135 |
*/
|
136 |
public function get_earning_by_product( $product, $context = 'seller', $price = null ) {
|
137 |
-
if ( ! $product instanceof WC_Product ) {
|
138 |
$product = wc_get_product( $product );
|
139 |
}
|
140 |
|
141 |
if ( ! $product ) {
|
142 |
-
return new WP_Error( __( 'Product not found', 'dokan-lite' ), 404 );
|
143 |
}
|
144 |
|
145 |
$product_price = is_null( $price ) ? (float) $product->get_price() : (float) $price;
|
@@ -162,19 +148,19 @@ class Dokan_Commission {
|
|
162 |
* @return float|null on failure
|
163 |
*/
|
164 |
public function get_earning_by_order( $order, $context = 'seller' ) {
|
165 |
-
if ( ! $order instanceof WC_Order ) {
|
166 |
$order = wc_get_order( $order );
|
167 |
}
|
168 |
|
169 |
if ( ! $order ) {
|
170 |
-
return new WP_Error( __( 'Order not found', 'dokan-lite' ), 404 );
|
171 |
}
|
172 |
|
173 |
if ( $order->get_meta( 'has_sub_order' ) ) {
|
174 |
return;
|
175 |
}
|
176 |
|
177 |
-
// If `_dokan_admin_fee` is found means, the commission has been calculated for this order without the `
|
178 |
// So we'll return the previously earned commission to keep backward compatability.
|
179 |
$saved_admin_fee = get_post_meta( $order->get_id(), '_dokan_admin_fee', true );
|
180 |
|
@@ -199,7 +185,7 @@ class Dokan_Commission {
|
|
199 |
continue;
|
200 |
}
|
201 |
|
202 |
-
// Set line item quantity so that we can use it later in the
|
203 |
$this->set_order_qunatity( $item->get_quantity() );
|
204 |
|
205 |
$product_id = $item->get_product()->get_id();
|
@@ -406,6 +392,10 @@ class Dokan_Commission {
|
|
406 |
* @return float|null on failure
|
407 |
*/
|
408 |
public function get_category_wise_earning( $product_id, $product_price ) {
|
|
|
|
|
|
|
|
|
409 |
return $this->prepare_for_calculation( __FUNCTION__, $product_id, $product_price );
|
410 |
}
|
411 |
|
@@ -417,9 +407,13 @@ class Dokan_Commission {
|
|
417 |
* @param int $product_id
|
418 |
* @param int $product_price
|
419 |
*
|
420 |
-
* @return float
|
421 |
*/
|
422 |
public function get_product_wise_earning( $product_id, $product_price ) {
|
|
|
|
|
|
|
|
|
423 |
return $this->prepare_for_calculation( __FUNCTION__, $product_id, $product_price );
|
424 |
}
|
425 |
|
@@ -459,6 +453,17 @@ class Dokan_Commission {
|
|
459 |
$commission_type = $this->$func_type( $product_id );
|
460 |
}
|
461 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
// get[product,category,vendor,global]_wise_additional_fee
|
463 |
if ( is_callable( [ $this, $func_fee ] ) ) {
|
464 |
$additional_fee = $this->$func_fee( $product_id );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Dokan Commission Class
|
7 |
*
|
8 |
* @since 2.9.21
|
9 |
*/
|
10 |
+
class Commission {
|
|
|
11 |
|
12 |
/**
|
13 |
* Order id holder
|
28 |
public $quantity = 0;
|
29 |
|
30 |
/**
|
31 |
+
* Class constructor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
*
|
33 |
* @since 2.9.21
|
34 |
*
|
35 |
* @return void
|
36 |
*/
|
37 |
+
public function __construct() {
|
38 |
add_filter( 'woocommerce_order_item_get_formatted_meta_data', [ $this, 'hide_extra_data' ] );
|
39 |
}
|
40 |
|
120 |
* @return float
|
121 |
*/
|
122 |
public function get_earning_by_product( $product, $context = 'seller', $price = null ) {
|
123 |
+
if ( ! $product instanceof \WC_Product ) {
|
124 |
$product = wc_get_product( $product );
|
125 |
}
|
126 |
|
127 |
if ( ! $product ) {
|
128 |
+
return new \WP_Error( __( 'Product not found', 'dokan-lite' ), 404 );
|
129 |
}
|
130 |
|
131 |
$product_price = is_null( $price ) ? (float) $product->get_price() : (float) $price;
|
148 |
* @return float|null on failure
|
149 |
*/
|
150 |
public function get_earning_by_order( $order, $context = 'seller' ) {
|
151 |
+
if ( ! $order instanceof \WC_Order ) {
|
152 |
$order = wc_get_order( $order );
|
153 |
}
|
154 |
|
155 |
if ( ! $order ) {
|
156 |
+
return new \WP_Error( __( 'Order not found', 'dokan-lite' ), 404 );
|
157 |
}
|
158 |
|
159 |
if ( $order->get_meta( 'has_sub_order' ) ) {
|
160 |
return;
|
161 |
}
|
162 |
|
163 |
+
// If `_dokan_admin_fee` is found means, the commission has been calculated for this order without the `WeDevs\Dokan\Commission` class.
|
164 |
// So we'll return the previously earned commission to keep backward compatability.
|
165 |
$saved_admin_fee = get_post_meta( $order->get_id(), '_dokan_admin_fee', true );
|
166 |
|
185 |
continue;
|
186 |
}
|
187 |
|
188 |
+
// Set line item quantity so that we can use it later in the `\WeDevs\Dokan\Commission::prepare_for_calculation()` method
|
189 |
$this->set_order_qunatity( $item->get_quantity() );
|
190 |
|
191 |
$product_id = $item->get_product()->get_id();
|
392 |
* @return float|null on failure
|
393 |
*/
|
394 |
public function get_category_wise_earning( $product_id, $product_price ) {
|
395 |
+
if ( ! dokan()->is_pro_exists() ) {
|
396 |
+
return null;
|
397 |
+
}
|
398 |
+
|
399 |
return $this->prepare_for_calculation( __FUNCTION__, $product_id, $product_price );
|
400 |
}
|
401 |
|
407 |
* @param int $product_id
|
408 |
* @param int $product_price
|
409 |
*
|
410 |
+
* @return float|null on failure
|
411 |
*/
|
412 |
public function get_product_wise_earning( $product_id, $product_price ) {
|
413 |
+
if ( ! dokan()->is_pro_exists() ) {
|
414 |
+
return null;
|
415 |
+
}
|
416 |
+
|
417 |
return $this->prepare_for_calculation( __FUNCTION__, $product_id, $product_price );
|
418 |
}
|
419 |
|
453 |
$commission_type = $this->$func_type( $product_id );
|
454 |
}
|
455 |
|
456 |
+
/**
|
457 |
+
* If dokan pro doesn't exists but combine commission is found in database due to it was active before
|
458 |
+
* Then make the commission type 'flat'. We are making it flat cause when commission type is there in database
|
459 |
+
* But in option field, looks like flat commission is selected.
|
460 |
+
*
|
461 |
+
* @since DOKAN_LITE_SINCE
|
462 |
+
*/
|
463 |
+
if ( ! dokan()->is_pro_exists() && 'combine' === $commission_type ) {
|
464 |
+
$commission_type = 'flat';
|
465 |
+
}
|
466 |
+
|
467 |
// get[product,category,vendor,global]_wise_additional_fee
|
468 |
if ( is_callable( [ $this, $func_fee ] ) ) {
|
469 |
$additional_fee = $this->$func_fee( $product_id );
|
includes/{class-core.php → Core.php}
RENAMED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Core Class for Dokan Main functionality
|
5 |
*
|
@@ -7,7 +9,7 @@
|
|
7 |
*
|
8 |
* @since 3.0.0
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Load autometically when class initiate
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
/**
|
6 |
* Core Class for Dokan Main functionality
|
7 |
*
|
9 |
*
|
10 |
* @since 3.0.0
|
11 |
*/
|
12 |
+
class Core {
|
13 |
|
14 |
/**
|
15 |
* Load autometically when class initiate
|
includes/Dashboard/Manager.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Dashboard\Templates\Manager as TemplateManager;
|
6 |
+
use WeDevs\Dokan\Traits\ChainableContainer;
|
7 |
+
|
8 |
+
class Manager {
|
9 |
+
|
10 |
+
use ChainableContainer;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class constructor
|
14 |
+
*
|
15 |
+
* @since DOKAN_LITE_SINCE
|
16 |
+
*
|
17 |
+
* @return void
|
18 |
+
*/
|
19 |
+
public function __construct() {
|
20 |
+
$this->container['templates'] = new TemplateManager();
|
21 |
+
}
|
22 |
+
}
|
classes/template-dashboard.php → includes/Dashboard/Templates/Dashboard.php
RENAMED
@@ -1,10 +1,13 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Dokan Template Dashboard Class
|
4 |
*
|
5 |
* @author weDves
|
6 |
*/
|
7 |
-
class
|
8 |
|
9 |
public $user_id;
|
10 |
public $orders_count;
|
@@ -36,21 +39,6 @@ class Dokan_Template_Dashboard {
|
|
36 |
|
37 |
}
|
38 |
|
39 |
-
/**
|
40 |
-
* Singleton method
|
41 |
-
*
|
42 |
-
* @return self
|
43 |
-
*/
|
44 |
-
public static function init() {
|
45 |
-
static $instance = false;
|
46 |
-
|
47 |
-
if ( ! $instance ) {
|
48 |
-
$instance = new Dokan_Template_Dashboard();
|
49 |
-
}
|
50 |
-
|
51 |
-
return $instance;
|
52 |
-
}
|
53 |
-
|
54 |
/**
|
55 |
* Get Seller Dhasboard Notice
|
56 |
*
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
/**
|
6 |
* Dokan Template Dashboard Class
|
7 |
*
|
8 |
* @author weDves
|
9 |
*/
|
10 |
+
class Dashboard {
|
11 |
|
12 |
public $user_id;
|
13 |
public $orders_count;
|
39 |
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* Get Seller Dhasboard Notice
|
44 |
*
|
includes/Dashboard/Templates/Main.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
+
class Main {
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
add_action( 'dokan_dashboard_content_before', [ self::class, 'dashboard_side_navigation' ] );
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Dashboard Side Navigations
|
13 |
+
*
|
14 |
+
* @since 2.4
|
15 |
+
*
|
16 |
+
* @return void
|
17 |
+
*/
|
18 |
+
public static function dashboard_side_navigation() {
|
19 |
+
global $wp;
|
20 |
+
|
21 |
+
$request = $wp->request;
|
22 |
+
$active = explode( '/', $request );
|
23 |
+
|
24 |
+
unset( $active[0] );
|
25 |
+
|
26 |
+
if ( $active ) {
|
27 |
+
$active_menu = implode( '/', $active );
|
28 |
+
|
29 |
+
if ( $active_menu == 'new-product' ) {
|
30 |
+
$active_menu = 'products';
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( get_query_var( 'edit' ) && is_singular( 'product' ) ) {
|
34 |
+
$active_menu = 'products';
|
35 |
+
}
|
36 |
+
} else {
|
37 |
+
$active_menu = 'dashboard';
|
38 |
+
}
|
39 |
+
|
40 |
+
dokan_get_template_part( 'global/dashboard-nav', '', [ 'active_menu' => apply_filters( 'dokan_dashboard_nav_active', $active_menu, $request, $active ) ] );
|
41 |
+
}
|
42 |
+
}
|
includes/Dashboard/Templates/Manager.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Dashboard\Templates\Dashboard;
|
6 |
+
use WeDevs\Dokan\Dashboard\Templates\Main;
|
7 |
+
use WeDevs\Dokan\Dashboard\Templates\Orders;
|
8 |
+
use WeDevs\Dokan\Dashboard\Templates\Products;
|
9 |
+
use WeDevs\Dokan\Dashboard\Templates\Settings;
|
10 |
+
use WeDevs\Dokan\Dashboard\Templates\Withdraw;
|
11 |
+
use WeDevs\Dokan\Traits\ChainableContainer;
|
12 |
+
|
13 |
+
class Manager {
|
14 |
+
|
15 |
+
use ChainableContainer;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class constructor
|
19 |
+
*
|
20 |
+
* @since DOKAN_LITE_SINCE
|
21 |
+
*
|
22 |
+
* @return void
|
23 |
+
*/
|
24 |
+
public function __construct() {
|
25 |
+
$this->container['main'] = new Main();
|
26 |
+
$this->container['dashboard'] = new Dashboard();
|
27 |
+
$this->container['products'] = new Products();
|
28 |
+
$this->container['orders'] = new Orders();
|
29 |
+
$this->container['settings'] = new Settings();
|
30 |
+
$this->container['withdraw'] = new Withdraw();
|
31 |
+
}
|
32 |
+
}
|
classes/template-orders.php → includes/Dashboard/Templates/Orders.php
RENAMED
@@ -1,4 +1,7 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Dokan Order Template Class
|
4 |
*
|
@@ -6,7 +9,7 @@
|
|
6 |
*
|
7 |
* @author weDves <info@wedevs.com>
|
8 |
*/
|
9 |
-
class
|
10 |
|
11 |
/**
|
12 |
* Load autometically when class inistantiate
|
@@ -21,21 +24,6 @@ class Dokan_Template_Orders {
|
|
21 |
add_action( 'dokan_order_inside_content', array( $this, 'order_main_content' ), 15 );
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* Singleton method
|
26 |
-
*
|
27 |
-
* @return self
|
28 |
-
*/
|
29 |
-
public static function init() {
|
30 |
-
static $instance = false;
|
31 |
-
|
32 |
-
if ( ! $instance ) {
|
33 |
-
$instance = new Dokan_Template_Orders();
|
34 |
-
}
|
35 |
-
|
36 |
-
return $instance;
|
37 |
-
}
|
38 |
-
|
39 |
/**
|
40 |
* Show Seller Enable Error Message
|
41 |
*
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
/**
|
6 |
* Dokan Order Template Class
|
7 |
*
|
9 |
*
|
10 |
* @author weDves <info@wedevs.com>
|
11 |
*/
|
12 |
+
class Orders {
|
13 |
|
14 |
/**
|
15 |
* Load autometically when class inistantiate
|
24 |
add_action( 'dokan_order_inside_content', array( $this, 'order_main_content' ), 15 );
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/**
|
28 |
* Show Seller Enable Error Message
|
29 |
*
|
classes/template-products.php → includes/Dashboard/Templates/Products.php
RENAMED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Product Functionality for Product Handler
|
5 |
*
|
@@ -7,7 +9,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
public static $errors;
|
13 |
public static $product_cat;
|
@@ -21,7 +23,7 @@ class Dokan_Template_Products {
|
|
21 |
* @uses actions
|
22 |
* @uses filters
|
23 |
*/
|
24 |
-
function __construct() {
|
25 |
add_action( 'dokan_render_product_listing_template', array( $this, 'render_product_listing_template' ), 11 );
|
26 |
add_action( 'template_redirect', array( $this, 'handle_product_add' ), 11 );
|
27 |
add_action( 'template_redirect', array( $this, 'handle_product_update' ), 11 );
|
@@ -36,18 +38,38 @@ class Dokan_Template_Products {
|
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
-
*
|
|
|
|
|
|
|
|
|
40 |
*
|
41 |
-
* @return
|
42 |
*/
|
43 |
-
public
|
44 |
-
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -141,7 +163,7 @@ class Dokan_Template_Products {
|
|
141 |
* @return void
|
142 |
*/
|
143 |
public function render_new_product_template( $query_vars ) {
|
144 |
-
if ( isset( $query_vars['new-product'] ) && !
|
145 |
dokan_get_template_part( 'products/new-product' );
|
146 |
}
|
147 |
}
|
@@ -188,7 +210,7 @@ class Dokan_Template_Products {
|
|
188 |
*
|
189 |
* @return void
|
190 |
*/
|
191 |
-
function handle_product_add() {
|
192 |
|
193 |
if ( ! is_user_logged_in() ) {
|
194 |
return;
|
@@ -460,7 +482,7 @@ class Dokan_Template_Products {
|
|
460 |
}
|
461 |
}
|
462 |
|
463 |
-
function load_add_new_product_popup() {
|
464 |
dokan_get_template_part( 'products/tmpl-add-product-popup' );
|
465 |
}
|
466 |
|
@@ -469,13 +491,8 @@ class Dokan_Template_Products {
|
|
469 |
*
|
470 |
* @return void
|
471 |
*/
|
472 |
-
function handle_delete_product() {
|
473 |
-
|
474 |
-
if ( ! is_user_logged_in() ) {
|
475 |
-
return;
|
476 |
-
}
|
477 |
-
|
478 |
-
if ( ! dokan_is_user_seller( get_current_user_id() ) ) {
|
479 |
return;
|
480 |
}
|
481 |
|
@@ -483,7 +500,35 @@ class Dokan_Template_Products {
|
|
483 |
return;
|
484 |
}
|
485 |
|
486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
}
|
488 |
|
489 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
/**
|
6 |
* Product Functionality for Product Handler
|
7 |
*
|
9 |
*
|
10 |
* @package dokan
|
11 |
*/
|
12 |
+
class Products {
|
13 |
|
14 |
public static $errors;
|
15 |
public static $product_cat;
|
23 |
* @uses actions
|
24 |
* @uses filters
|
25 |
*/
|
26 |
+
public function __construct() {
|
27 |
add_action( 'dokan_render_product_listing_template', array( $this, 'render_product_listing_template' ), 11 );
|
28 |
add_action( 'template_redirect', array( $this, 'handle_product_add' ), 11 );
|
29 |
add_action( 'template_redirect', array( $this, 'handle_product_update' ), 11 );
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* Set errors
|
42 |
+
*
|
43 |
+
* @since DOKAN_LITE_SINCE
|
44 |
+
*
|
45 |
+
* @param void $errors
|
46 |
*
|
47 |
+
* @return void
|
48 |
*/
|
49 |
+
public function set_errors( $errors ) {
|
50 |
+
self::$errors = $errors;
|
51 |
+
}
|
52 |
|
53 |
+
/**
|
54 |
+
* Verify if the instance contains errors
|
55 |
+
*
|
56 |
+
* @since DOKAN_LITE_SINCE
|
57 |
+
*
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
public function has_errors() {
|
61 |
+
return ! empty( self::$errors );
|
62 |
+
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Retrieve all errors
|
66 |
+
*
|
67 |
+
* @since DOKAN_LITE_SINCE
|
68 |
+
*
|
69 |
+
* @return array
|
70 |
+
*/
|
71 |
+
public function get_errors() {
|
72 |
+
return self::$errors;
|
73 |
}
|
74 |
|
75 |
/**
|
163 |
* @return void
|
164 |
*/
|
165 |
public function render_new_product_template( $query_vars ) {
|
166 |
+
if ( isset( $query_vars['new-product'] ) && ! dokan()->is_pro_exists() ) {
|
167 |
dokan_get_template_part( 'products/new-product' );
|
168 |
}
|
169 |
}
|
210 |
*
|
211 |
* @return void
|
212 |
*/
|
213 |
+
public function handle_product_add() {
|
214 |
|
215 |
if ( ! is_user_logged_in() ) {
|
216 |
return;
|
482 |
}
|
483 |
}
|
484 |
|
485 |
+
public function load_add_new_product_popup() {
|
486 |
dokan_get_template_part( 'products/tmpl-add-product-popup' );
|
487 |
}
|
488 |
|
491 |
*
|
492 |
* @return void
|
493 |
*/
|
494 |
+
public function handle_delete_product() {
|
495 |
+
if ( ! dokan_is_user_seller( dokan_get_current_user_id() ) ) {
|
|
|
|
|
|
|
|
|
|
|
496 |
return;
|
497 |
}
|
498 |
|
500 |
return;
|
501 |
}
|
502 |
|
503 |
+
if ( isset( $_GET['action'] ) && $_GET['action'] == 'dokan-delete-product' ) {
|
504 |
+
$product_id = isset( $_GET['product_id'] ) ? (int) $_GET['product_id'] : 0;
|
505 |
+
|
506 |
+
$getdata = wp_unslash( $_GET );
|
507 |
+
|
508 |
+
if ( ! $product_id ) {
|
509 |
+
wp_redirect( add_query_arg( array( 'message' => 'error' ), dokan_get_navigation_url( 'products' ) ) );
|
510 |
+
return;
|
511 |
+
}
|
512 |
+
|
513 |
+
if ( ! wp_verify_nonce( $getdata['_wpnonce'], 'dokan-delete-product' ) ) {
|
514 |
+
wp_redirect( add_query_arg( array( 'message' => 'error' ), dokan_get_navigation_url( 'products' ) ) );
|
515 |
+
return;
|
516 |
+
}
|
517 |
+
|
518 |
+
if ( ! dokan_is_product_author( $product_id ) ) {
|
519 |
+
wp_redirect( add_query_arg( array( 'message' => 'error' ), dokan_get_navigation_url( 'products' ) ) );
|
520 |
+
return;
|
521 |
+
}
|
522 |
+
|
523 |
+
dokan()->product->delete( $product_id, true );
|
524 |
+
|
525 |
+
do_action( 'dokan_product_deleted', $product_id );
|
526 |
+
|
527 |
+
$redirect = apply_filters( 'dokan_add_new_product_redirect', dokan_get_navigation_url( 'products' ), '' );
|
528 |
+
|
529 |
+
wp_redirect( add_query_arg( array( 'message' => 'product_deleted' ), $redirect ) );
|
530 |
+
exit;
|
531 |
+
}
|
532 |
}
|
533 |
|
534 |
}
|
classes/template-settings.php → includes/Dashboard/Templates/Settings.php
RENAMED
@@ -1,10 +1,15 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Dokan settings Class
|
4 |
*
|
5 |
* @author weDves
|
6 |
*/
|
7 |
-
class
|
8 |
|
9 |
public $currentuser;
|
10 |
public $profile_info;
|
@@ -17,7 +22,6 @@ class Dokan_Template_Settings {
|
|
17 |
* @return void
|
18 |
*/
|
19 |
function __construct() {
|
20 |
-
|
21 |
add_action( 'dokan_settings_content_inside_before', array( $this, 'show_enable_seller_message' ) );
|
22 |
add_action( 'dokan_settings_content_area_header', array( $this, 'render_settings_header' ), 10 );
|
23 |
add_action( 'dokan_settings_content_area_header', array( $this, 'render_settings_help' ), 15 );
|
@@ -26,22 +30,6 @@ class Dokan_Template_Settings {
|
|
26 |
add_action( 'dokan_settings_content', array( $this, 'render_settings_content' ), 10 );
|
27 |
}
|
28 |
|
29 |
-
/**
|
30 |
-
* Initializes the Dokan_Template_Settings() class
|
31 |
-
*
|
32 |
-
* Checks for an existing WeDevs_Dokan_Template_Settings() instance
|
33 |
-
* and if it doesn't find one, creates it.
|
34 |
-
*/
|
35 |
-
public static function init() {
|
36 |
-
static $instance = false;
|
37 |
-
|
38 |
-
if ( ! $instance ) {
|
39 |
-
$instance = new Dokan_Template_Settings();
|
40 |
-
}
|
41 |
-
|
42 |
-
return $instance;
|
43 |
-
}
|
44 |
-
|
45 |
/**
|
46 |
* Show Seller Enable Error Message
|
47 |
*
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan settings Class
|
9 |
*
|
10 |
* @author weDves
|
11 |
*/
|
12 |
+
class Settings {
|
13 |
|
14 |
public $currentuser;
|
15 |
public $profile_info;
|
22 |
* @return void
|
23 |
*/
|
24 |
function __construct() {
|
|
|
25 |
add_action( 'dokan_settings_content_inside_before', array( $this, 'show_enable_seller_message' ) );
|
26 |
add_action( 'dokan_settings_content_area_header', array( $this, 'render_settings_header' ), 10 );
|
27 |
add_action( 'dokan_settings_content_area_header', array( $this, 'render_settings_help' ), 15 );
|
30 |
add_action( 'dokan_settings_content', array( $this, 'render_settings_content' ), 10 );
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* Show Seller Enable Error Message
|
35 |
*
|
classes/template-withdraw.php → includes/Dashboard/Templates/Withdraw.php
RENAMED
@@ -1,18 +1,29 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Dashboard Withdraw class
|
5 |
*
|
6 |
-
* @author weDevs
|
7 |
-
*
|
8 |
* @since 2.4
|
9 |
-
*
|
10 |
-
* @package dokan
|
11 |
*/
|
12 |
-
class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
|
17 |
/**
|
18 |
* Load Autometically When class initiate
|
@@ -22,289 +33,309 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
22 |
* @since 2.4
|
23 |
*/
|
24 |
public function __construct() {
|
|
|
|
|
|
|
25 |
|
26 |
-
$
|
27 |
-
|
28 |
-
$this->current_status = isset( $get_data['type'] ) ? $get_data['type'] : 'pending';
|
29 |
|
30 |
-
add_action( 'template_redirect', array( $this, '
|
31 |
add_action( 'dokan_withdraw_content_inside_before', array( $this, 'show_seller_enable_message' ) );
|
32 |
-
add_action( 'dokan_withdraw_content_area_header', array( $this, 'withdraw_header_render' )
|
33 |
-
add_action( 'dokan_withdraw_content', array( $this, 'render_withdraw_error' ), 10 );
|
34 |
add_action( 'dokan_withdraw_content', array( $this, 'withdraw_status_filter' ), 15 );
|
35 |
add_action( 'dokan_withdraw_content', array( $this, 'show_seller_balance' ), 5 );
|
36 |
add_action( 'dokan_withdraw_content', array( $this, 'withdraw_form_and_listing' ), 20 );
|
37 |
-
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
-
*
|
|
|
|
|
42 |
*
|
43 |
-
*
|
44 |
-
*
|
45 |
*/
|
46 |
-
public
|
47 |
-
|
48 |
-
|
49 |
-
if ( ! $instance ) {
|
50 |
-
$instance = new Dokan_Template_Withdraw();
|
51 |
-
}
|
52 |
-
|
53 |
-
return $instance;
|
54 |
}
|
55 |
|
56 |
/**
|
57 |
-
*
|
58 |
*
|
59 |
-
* @since
|
60 |
*
|
61 |
-
* @return
|
62 |
*/
|
63 |
-
public function
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
dokan_seller_not_enabled_notice();
|
68 |
}
|
|
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
-
*
|
73 |
-
*
|
74 |
-
* @since 2.4
|
75 |
*
|
76 |
* @return void
|
77 |
*/
|
78 |
-
public function
|
79 |
-
|
80 |
-
|
81 |
-
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
82 |
-
dokan_get_template_part('global/dokan-error', '', array(
|
83 |
-
'deleted' => false,
|
84 |
-
'message' => __( 'You have no permission to manage withdraws', 'dokan-lite' ),
|
85 |
-
) );
|
86 |
return;
|
87 |
}
|
88 |
-
}
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
*
|
95 |
-
* @return void
|
96 |
-
*/
|
97 |
-
public function render_withdraw_error() {
|
98 |
-
if ( is_wp_error( self::$validate ) ) {
|
99 |
-
$messages = self::$validate->get_error_messages();
|
100 |
-
|
101 |
-
foreach ( $messages as $message ) {
|
102 |
-
dokan_get_template_part( 'global/dokan-error', '', array(
|
103 |
-
'deleted' => true,
|
104 |
-
'message' => $message,
|
105 |
-
) );
|
106 |
-
}
|
107 |
}
|
108 |
}
|
109 |
|
110 |
/**
|
111 |
-
*
|
112 |
*
|
113 |
-
* @since
|
114 |
*
|
115 |
* @return void
|
116 |
*/
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
return;
|
120 |
}
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
|
127 |
/**
|
128 |
-
*
|
129 |
*
|
130 |
-
* @since
|
131 |
*
|
132 |
* @return void
|
133 |
*/
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
return;
|
137 |
}
|
138 |
|
139 |
-
$
|
140 |
-
$
|
141 |
-
$
|
142 |
|
143 |
-
$
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
|
146 |
-
|
|
|
|
|
147 |
}
|
148 |
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
|
153 |
-
|
154 |
-
'message' =>
|
155 |
-
|
156 |
-
) );
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
-
*
|
161 |
*
|
162 |
* @since 2.4
|
163 |
*
|
164 |
* @return void
|
165 |
*/
|
166 |
-
public function
|
|
|
167 |
|
168 |
-
if (
|
169 |
-
|
170 |
-
} elseif ( $this->current_status == 'approved' ) {
|
171 |
-
$this->user_approved_withdraws( dokan_get_current_user_id() );
|
172 |
-
} elseif ( $this->current_status == 'cancelled' ) {
|
173 |
-
$this->user_cancelled_withdraws( dokan_get_current_user_id() );
|
174 |
}
|
175 |
}
|
176 |
|
177 |
/**
|
178 |
-
*
|
|
|
|
|
|
|
|
|
|
|
179 |
*
|
180 |
* @return void
|
181 |
*/
|
182 |
-
function
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
if ( self::$validate !== false && ! is_wp_error( self::$validate ) ) {
|
187 |
-
$this->insert_withdraw_info();
|
188 |
}
|
189 |
|
190 |
-
$
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
|
193 |
-
|
194 |
/**
|
195 |
-
*
|
|
|
|
|
|
|
|
|
|
|
196 |
*
|
197 |
* @return void
|
198 |
*/
|
199 |
-
function
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
if ( ! wp_verify_nonce( $get_data['_wpnonce'], 'dokan_cancel_withdrow' ) ) {
|
206 |
-
wp_die( esc_attr__( 'Are you cheating?', 'dokan-lite' ) );
|
207 |
-
}
|
208 |
-
|
209 |
-
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
210 |
-
wp_die( esc_attr__( 'You have no permission to do this action', 'dokan-lite' ) );
|
211 |
-
}
|
212 |
-
|
213 |
-
global $current_user, $wpdb;
|
214 |
-
|
215 |
-
$row_id = absint( $get_data['id'] );
|
216 |
-
|
217 |
-
$this->update_status( $row_id, $current_user->ID, 2 );
|
218 |
-
|
219 |
-
wp_redirect( add_query_arg( array(
|
220 |
-
'message' => 'request_cancelled',
|
221 |
-
), dokan_get_navigation_url( 'withdraw' ) ) );
|
222 |
-
}
|
223 |
}
|
224 |
|
225 |
/**
|
226 |
-
*
|
|
|
|
|
227 |
*
|
228 |
* @return void
|
229 |
*/
|
230 |
-
function
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
if ( ! isset( $post_data['withdraw_submit'] ) ) {
|
235 |
-
return false;
|
236 |
-
}
|
237 |
-
|
238 |
-
if ( ! isset( $post_data['dokan_withdraw_nonce'] ) || ! wp_verify_nonce( sanitize_key( $post_data['dokan_withdraw_nonce'] ), 'dokan_withdraw' ) ) {
|
239 |
-
wp_die( esc_attr__( 'Are you cheating?', 'dokan-lite' ) );
|
240 |
-
}
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
|
251 |
-
|
252 |
-
$error->add( 'dokan_empty_withdrad', __( 'Withdraw amount required ', 'dokan-lite' ) );
|
253 |
-
} elseif ( $withdraw_amount > $balance ) {
|
254 |
-
$error->add( 'enough_balance', __( 'You don\'t have enough balance for this request', 'dokan-lite' ) );
|
255 |
-
} elseif ( $withdraw_amount < $limit ) {
|
256 |
-
$error->add( 'dokan_withdraw_amount', sprintf( __( 'Withdraw amount must be greater than %d', 'dokan-lite' ), $this->get_withdraw_limit() ) );
|
257 |
-
}
|
258 |
|
259 |
-
if (
|
260 |
-
$
|
261 |
}
|
262 |
|
263 |
-
if ( $
|
264 |
-
|
265 |
}
|
266 |
|
267 |
-
|
268 |
}
|
269 |
|
270 |
/**
|
271 |
-
*
|
|
|
|
|
272 |
*
|
273 |
* @return void
|
274 |
*/
|
275 |
-
function
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
284 |
-
return;
|
285 |
}
|
286 |
-
|
287 |
-
global $current_user;
|
288 |
-
|
289 |
-
$amount = (float) sanitize_text_field( $post_data['witdraw_amount'] );
|
290 |
-
$method = sanitize_text_field( $post_data['withdraw_method'] );
|
291 |
-
|
292 |
-
$data_info = array(
|
293 |
-
'user_id' => $current_user->ID,
|
294 |
-
'amount' => $amount,
|
295 |
-
'status' => 0,
|
296 |
-
'method' => $method,
|
297 |
-
'ip' => dokan_get_client_ip(),
|
298 |
-
'notes' => '',
|
299 |
-
);
|
300 |
-
|
301 |
-
$update = $this->insert_withdraw( $data_info );
|
302 |
-
|
303 |
-
do_action( 'dokan_after_withdraw_request', $current_user, $amount, $method );
|
304 |
-
|
305 |
-
wp_redirect( add_query_arg( array(
|
306 |
-
'message' => 'request_success',
|
307 |
-
), dokan_get_navigation_url( 'withdraw' ) ) );
|
308 |
}
|
309 |
|
310 |
/**
|
@@ -314,12 +345,12 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
314 |
*
|
315 |
* @return void
|
316 |
*/
|
317 |
-
function withdraw_requests( $user_id ) {
|
318 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
319 |
return;
|
320 |
}
|
321 |
|
322 |
-
$withdraw_requests =
|
323 |
|
324 |
dokan_get_template_part( 'withdraw/pending-request-listing', '', array(
|
325 |
'withdraw_requests' => $withdraw_requests,
|
@@ -331,7 +362,7 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
331 |
*
|
332 |
* @return void
|
333 |
*/
|
334 |
-
function show_alert_messages() {
|
335 |
$get_data = wp_unslash( $_GET );
|
336 |
|
337 |
$type = isset( $get_data['message'] ) ? sanitize_text_field( $get_data['message'] ) : '';
|
@@ -369,64 +400,50 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
369 |
*
|
370 |
* @return void
|
371 |
*/
|
372 |
-
function withdraw_form(
|
|
|
373 |
|
374 |
$get_data = wp_unslash( $_GET ); // WPCS: CSRF ok
|
375 |
$post_data = wp_unslash( $_POST ); // WPCS: CSRF ok
|
376 |
|
377 |
-
global $current_user;
|
378 |
-
|
379 |
-
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
380 |
-
return;
|
381 |
-
}
|
382 |
-
|
383 |
// show alert messages
|
384 |
$this->show_alert_messages();
|
385 |
|
386 |
-
|
|
|
|
|
|
|
|
|
387 |
|
388 |
if ( $balance < 0 ) {
|
389 |
-
|
390 |
-
|
391 |
-
'message' => sprintf( __( 'You have already withdrawn %s. This amount will be deducted from your balance.', 'dokan-lite' ), wc_price( $balance ) ),
|
392 |
-
) );
|
393 |
}
|
394 |
|
395 |
-
if (
|
396 |
|
397 |
$req_success = isset( $get_data['message'] ) ? true : false;
|
398 |
|
399 |
if ( ! $req_success ) {
|
400 |
-
$
|
401 |
|
402 |
-
|
403 |
-
'deleted' => false,
|
404 |
-
'message' => $pending_warning,
|
405 |
-
) );
|
406 |
}
|
407 |
|
408 |
$this->withdraw_requests( $current_user->ID );
|
409 |
-
return;
|
410 |
|
411 |
-
|
412 |
-
|
413 |
-
dokan_get_template_part( 'global/dokan-error', '', array(
|
414 |
-
'deleted' => false,
|
415 |
-
'message' => __( 'You don\'t have sufficient balance for a withdraw request!', 'dokan-lite' ),
|
416 |
-
) );
|
417 |
|
|
|
|
|
|
|
418 |
return;
|
419 |
}
|
420 |
|
421 |
$payment_methods = array_intersect( dokan_get_seller_active_withdraw_methods(), dokan_withdraw_get_active_methods() );
|
422 |
|
423 |
-
|
424 |
-
|
425 |
-
$withdraw_method = sanitize_text_field( $post_data['withdraw_method'] );
|
426 |
-
} else {
|
427 |
-
$amount = '';
|
428 |
-
$withdraw_method = '';
|
429 |
-
}
|
430 |
|
431 |
dokan_get_template_part( 'withdraw/request-form', '', array(
|
432 |
'amount' => $amount,
|
@@ -442,7 +459,7 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
442 |
*
|
443 |
* @return [type] [description]
|
444 |
*/
|
445 |
-
function get_all_withdraws( $user_id, $limit = 100, $offset = 0 ) {
|
446 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
447 |
return;
|
448 |
}
|
@@ -465,11 +482,11 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
465 |
*
|
466 |
* @return void
|
467 |
*/
|
468 |
-
function user_approved_withdraws( $user_id ) {
|
469 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
470 |
return;
|
471 |
}
|
472 |
-
$requests =
|
473 |
|
474 |
if ( $requests ) {
|
475 |
|
@@ -478,11 +495,7 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
478 |
) );
|
479 |
|
480 |
} else {
|
481 |
-
|
482 |
-
dokan_get_template_part( 'global/dokan-warning', '', array(
|
483 |
-
'deleted' => false,
|
484 |
-
'message' => __( 'Sorry, no transactions were found!', 'dokan-lite' ),
|
485 |
-
) );
|
486 |
|
487 |
}
|
488 |
}
|
@@ -494,12 +507,12 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
494 |
*
|
495 |
* @return void
|
496 |
*/
|
497 |
-
function user_cancelled_withdraws( $user_id ) {
|
498 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
499 |
return;
|
500 |
}
|
501 |
|
502 |
-
$requests =
|
503 |
|
504 |
if ( $requests ) {
|
505 |
|
@@ -508,12 +521,8 @@ class Dokan_Template_Withdraw extends Dokan_Withdraw {
|
|
508 |
) );
|
509 |
|
510 |
} else {
|
511 |
-
|
512 |
-
|
513 |
-
'deleted' => false,
|
514 |
-
'message' => __( 'Sorry, no transactions were found!', 'dokan-lite' ),
|
515 |
-
) );
|
516 |
}
|
517 |
}
|
518 |
-
|
519 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Dashboard\Templates;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan Dashboard Withdraw class
|
9 |
*
|
|
|
|
|
10 |
* @since 2.4
|
|
|
|
|
11 |
*/
|
12 |
+
class Withdraw {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Current status
|
16 |
+
*
|
17 |
+
* @var null|string
|
18 |
+
*/
|
19 |
+
protected $current_status = null;
|
20 |
|
21 |
+
/**
|
22 |
+
* Error bag
|
23 |
+
*
|
24 |
+
* @var null|\WP_Error;
|
25 |
+
*/
|
26 |
+
protected $errors = null;
|
27 |
|
28 |
/**
|
29 |
* Load Autometically When class initiate
|
33 |
* @since 2.4
|
34 |
*/
|
35 |
public function __construct() {
|
36 |
+
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
|
40 |
+
$this->errors = new WP_Error();
|
|
|
|
|
41 |
|
42 |
+
add_action( 'template_redirect', array( $this, 'handle_request' ) );
|
43 |
add_action( 'dokan_withdraw_content_inside_before', array( $this, 'show_seller_enable_message' ) );
|
44 |
+
add_action( 'dokan_withdraw_content_area_header', array( $this, 'withdraw_header_render' ) );
|
|
|
45 |
add_action( 'dokan_withdraw_content', array( $this, 'withdraw_status_filter' ), 15 );
|
46 |
add_action( 'dokan_withdraw_content', array( $this, 'show_seller_balance' ), 5 );
|
47 |
add_action( 'dokan_withdraw_content', array( $this, 'withdraw_form_and_listing' ), 20 );
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
+
* Add error to error bag
|
52 |
+
*
|
53 |
+
* @since DOKAN_LITE_SINCE
|
54 |
*
|
55 |
+
* @param string $message
|
56 |
+
* @param string $code
|
57 |
*/
|
58 |
+
public function add_error( $message, $code = 'dokan_vendor_dashboard_template_withdraw_error' ) {
|
59 |
+
$this->errors->add( $code, $message );
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
+
* Get current withdraw status
|
64 |
*
|
65 |
+
* @since DOKAN_LITE_SINCE
|
66 |
*
|
67 |
+
* @return string
|
68 |
*/
|
69 |
+
public function get_current_status() {
|
70 |
+
if ( ! isset( $this->current_status ) ) {
|
71 |
+
$get_data = wp_unslash( $_GET );
|
72 |
+
$this->current_status = isset( $get_data['type'] ) ? $get_data['type'] : 'pending';
|
|
|
73 |
}
|
74 |
+
|
75 |
+
return $this->current_status;
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
+
* Handle Withdraw form submission
|
|
|
|
|
80 |
*
|
81 |
* @return void
|
82 |
*/
|
83 |
+
public function handle_request() {
|
84 |
+
if ( empty( $_REQUEST['dokan_handle_withdraw_request'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
return;
|
86 |
}
|
|
|
87 |
|
88 |
+
if ( 'cancel' === $_REQUEST['dokan_handle_withdraw_request'] ) {
|
89 |
+
$this->handle_cancel_request();
|
90 |
+
} else if ( 'approval' == $_REQUEST['dokan_handle_withdraw_request'] ) {
|
91 |
+
$this->handle_approval_request();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
+
* Handle withdraw cancellation request
|
97 |
*
|
98 |
+
* @since DOKAN_LITE_SINCE
|
99 |
*
|
100 |
* @return void
|
101 |
*/
|
102 |
+
protected function handle_cancel_request() {
|
103 |
+
$get_data = wp_unslash( $_GET );
|
104 |
+
|
105 |
+
if ( ! wp_verify_nonce( $get_data['_wpnonce'], 'dokan_cancel_withdraw' ) ) {
|
106 |
+
$this->add_error( esc_html__( 'Are you cheating?', 'dokan-lite' ) );
|
107 |
+
}
|
108 |
+
|
109 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
110 |
+
$this->add_error( esc_html__( 'You have no permission to do this action', 'dokan-lite' ) );
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( empty( $get_data['id'] ) ) {
|
114 |
+
$this->add_error( esc_html__( 'Missing withdraw id.', 'dokan-lite' ) );
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( $this->errors->has_errors() ) {
|
118 |
return;
|
119 |
}
|
120 |
|
121 |
+
$user_id = get_current_user_id();
|
122 |
+
$withdraw_id = absint( $get_data['id'] );
|
123 |
+
|
124 |
+
if ( ! dokan_is_seller_enabled( $user_id ) ) {
|
125 |
+
return $this->add_error( esc_html__( 'Your account is not enabled for selling, please contact the admin', 'dokan-lite' ) );
|
126 |
+
}
|
127 |
+
|
128 |
+
$args = array(
|
129 |
+
'user_id' => $user_id,
|
130 |
+
'id' => $withdraw_id,
|
131 |
+
);
|
132 |
+
|
133 |
+
$validate_request = dokan()->withdraw->is_valid_cancellation_request( $args );
|
134 |
+
|
135 |
+
if ( is_wp_error( $validate_request ) ) {
|
136 |
+
return $this->add_error( $validate_request->get_error_message(), $validate_request->get_code() );
|
137 |
+
}
|
138 |
+
|
139 |
+
$withdraw = dokan()
|
140 |
+
->withdraw
|
141 |
+
->get( $withdraw_id )
|
142 |
+
->set_status( dokan()->withdraw->get_status_code( 'cancelled' ) )
|
143 |
+
->save();
|
144 |
+
|
145 |
+
if ( is_wp_error( $withdraw ) ) {
|
146 |
+
return $this->add_error( $withdraw->get_error_message(), $withdraw->get_code() );
|
147 |
+
}
|
148 |
+
|
149 |
+
wp_redirect( add_query_arg( array(
|
150 |
+
'message' => 'request_cancelled',
|
151 |
+
), dokan_get_navigation_url( 'withdraw' ) ) );
|
152 |
}
|
153 |
|
154 |
/**
|
155 |
+
* Handle withdraw approval request
|
156 |
*
|
157 |
+
* @since DOKAN_LITE_SINCE
|
158 |
*
|
159 |
* @return void
|
160 |
*/
|
161 |
+
protected function handle_approval_request() {
|
162 |
+
$post_data = wp_unslash( $_POST );
|
163 |
+
|
164 |
+
if ( ! isset( $post_data['dokan_withdraw_nonce'] ) || ! wp_verify_nonce( sanitize_key( $post_data['dokan_withdraw_nonce'] ), 'dokan_withdraw' ) ) {
|
165 |
+
$this->add_error( esc_html__( 'Are you cheating?', 'dokan-lite' ) );
|
166 |
+
}
|
167 |
+
|
168 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
169 |
+
$this->add_error( esc_html__( 'You have no permission to do this action', 'dokan-lite' ) );
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( empty( $post_data['withdraw_amount'] ) ) {
|
173 |
+
$this->add_error( esc_html__( 'withdraw_amount is required', 'dokan-lite' ) );
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( empty( $post_data['withdraw_method'] ) ) {
|
177 |
+
$this->add_error( esc_html__( 'withdraw_method is required', 'dokan-lite' ) );
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( $this->errors->has_errors() ) {
|
181 |
return;
|
182 |
}
|
183 |
|
184 |
+
$user_id = get_current_user_id();
|
185 |
+
$amount = (float) $post_data['withdraw_amount'];
|
186 |
+
$method = sanitize_text_field( $post_data['withdraw_method'] );
|
187 |
|
188 |
+
$args = array(
|
189 |
+
'user_id' => $user_id,
|
190 |
+
'amount' => $amount,
|
191 |
+
'method' => $method,
|
192 |
+
);
|
193 |
|
194 |
+
$validate_request = dokan()->withdraw->is_valid_approval_request( $args );
|
195 |
+
|
196 |
+
if ( is_wp_error( $validate_request ) ) {
|
197 |
+
return $this->add_error( $validate_request->get_error_message(), $validate_request->get_error_code() );
|
198 |
}
|
199 |
|
200 |
+
$data = array(
|
201 |
+
'user_id' => $user_id,
|
202 |
+
'amount' => $amount,
|
203 |
+
'status' => dokan()->withdraw->get_status_code( 'pending' ),
|
204 |
+
'method' => $method,
|
205 |
+
'ip' => dokan_get_client_ip(),
|
206 |
+
'note' => '',
|
207 |
+
);
|
208 |
+
|
209 |
+
$withdraw = dokan()->withdraw->create( $data );
|
210 |
+
|
211 |
+
if ( is_wp_error( $withdraw ) ) {
|
212 |
+
return $this->add_error( $withdraw->get_error_message(), $withdraw->get_error_code() );
|
213 |
}
|
214 |
|
215 |
+
wp_redirect( add_query_arg( array(
|
216 |
+
'message' => 'request_success',
|
217 |
+
), dokan_get_navigation_url( 'withdraw' ) ) );
|
|
|
218 |
}
|
219 |
|
220 |
/**
|
221 |
+
* Show Seller Enable Error Message
|
222 |
*
|
223 |
* @since 2.4
|
224 |
*
|
225 |
* @return void
|
226 |
*/
|
227 |
+
public function show_seller_enable_message() {
|
228 |
+
$user_id = get_current_user_id();
|
229 |
|
230 |
+
if ( ! dokan_is_seller_enabled( $user_id ) ) {
|
231 |
+
dokan_seller_not_enabled_notice();
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
}
|
234 |
|
235 |
/**
|
236 |
+
* Print error messages
|
237 |
+
*
|
238 |
+
* @since DOKAN_LITE_SINCE
|
239 |
+
*
|
240 |
+
* @param string $message
|
241 |
+
* @param bool $deleted
|
242 |
*
|
243 |
* @return void
|
244 |
*/
|
245 |
+
protected function show_error_messages( $messages, $deleted = false ) {
|
246 |
+
if ( ! is_array( $messages ) ) {
|
247 |
+
$messages = array( $messages );
|
|
|
|
|
|
|
248 |
}
|
249 |
|
250 |
+
foreach ( $messages as $message ) {
|
251 |
+
dokan_get_template_part( 'global/dokan-error', '', array(
|
252 |
+
'deleted' => $deleted,
|
253 |
+
'message' => $message,
|
254 |
+
) );
|
255 |
+
}
|
256 |
}
|
257 |
|
|
|
258 |
/**
|
259 |
+
* Print warning message
|
260 |
+
*
|
261 |
+
* @since DOKAN_LITE_SINCE
|
262 |
+
*
|
263 |
+
* @param string $message
|
264 |
+
* @param bool $deleted
|
265 |
*
|
266 |
* @return void
|
267 |
*/
|
268 |
+
protected function show_warning_message( $message, $deleted = false ) {
|
269 |
+
dokan_get_template_part( 'global/dokan-warning', '', array(
|
270 |
+
'deleted' => $deleted,
|
271 |
+
'message' => $message,
|
272 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
}
|
274 |
|
275 |
/**
|
276 |
+
* Dokan Withdraw header Template render
|
277 |
+
*
|
278 |
+
* @since 2.4
|
279 |
*
|
280 |
* @return void
|
281 |
*/
|
282 |
+
public function withdraw_header_render() {
|
283 |
+
dokan_get_template_part( 'withdraw/header' );
|
284 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
+
/**
|
287 |
+
* Render WIthdraw Status Filter template
|
288 |
+
*
|
289 |
+
* @since 2.4
|
290 |
+
*
|
291 |
+
* @return void
|
292 |
+
*/
|
293 |
+
public function withdraw_status_filter() {
|
294 |
+
dokan_get_template_part( 'withdraw/status-listing', '', array(
|
295 |
+
'current' => $this->get_current_status(),
|
296 |
+
) );
|
297 |
+
}
|
298 |
|
299 |
+
/**
|
300 |
+
* Show Seller balance
|
301 |
+
*
|
302 |
+
* @since 1.0
|
303 |
+
*
|
304 |
+
* @return void
|
305 |
+
*/
|
306 |
+
public function show_seller_balance() {
|
307 |
+
$balance = dokan_get_seller_balance( dokan_get_current_user_id(), true );
|
308 |
+
$withdraw_limit = dokan_get_option( 'withdraw_limit', 'dokan_withdraw', -1 );
|
309 |
+
$threshold = dokan_get_option( 'withdraw_date_limit', 'dokan_withdraw', -1 );
|
310 |
|
311 |
+
$message = sprintf( __( 'Current Balance: %s ', 'dokan-lite' ), $balance );
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
+
if ( $withdraw_limit != -1 ) {
|
314 |
+
$message .= sprintf( __( '<br>Minimum Withdraw amount: %s ', 'dokan-lite' ), wc_price( $withdraw_limit ) );
|
315 |
}
|
316 |
|
317 |
+
if ( $threshold != -1 ) {
|
318 |
+
$message .= sprintf( __( '<br>Withdraw Threshold: %d days ', 'dokan-lite' ), $threshold );
|
319 |
}
|
320 |
|
321 |
+
$this->show_warning_message( $message );
|
322 |
}
|
323 |
|
324 |
/**
|
325 |
+
* Get Withdraw form and listing
|
326 |
+
*
|
327 |
+
* @since 2.4
|
328 |
*
|
329 |
* @return void
|
330 |
*/
|
331 |
+
public function withdraw_form_and_listing() {
|
332 |
+
if ( $this->get_current_status() == 'pending' ) {
|
333 |
+
$this->withdraw_form();
|
334 |
+
} elseif ( $this->get_current_status() == 'approved' ) {
|
335 |
+
$this->user_approved_withdraws( dokan_get_current_user_id() );
|
336 |
+
} elseif ( $this->get_current_status() == 'cancelled' ) {
|
337 |
+
$this->user_cancelled_withdraws( dokan_get_current_user_id() );
|
|
|
|
|
|
|
338 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
|
341 |
/**
|
345 |
*
|
346 |
* @return void
|
347 |
*/
|
348 |
+
public function withdraw_requests( $user_id ) {
|
349 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
350 |
return;
|
351 |
}
|
352 |
|
353 |
+
$withdraw_requests = dokan()->withdraw->get_withdraw_requests( $user_id );
|
354 |
|
355 |
dokan_get_template_part( 'withdraw/pending-request-listing', '', array(
|
356 |
'withdraw_requests' => $withdraw_requests,
|
362 |
*
|
363 |
* @return void
|
364 |
*/
|
365 |
+
public function show_alert_messages() {
|
366 |
$get_data = wp_unslash( $_GET );
|
367 |
|
368 |
$type = isset( $get_data['message'] ) ? sanitize_text_field( $get_data['message'] ) : '';
|
400 |
*
|
401 |
* @return void
|
402 |
*/
|
403 |
+
public function withdraw_form() {
|
404 |
+
global $current_user;
|
405 |
|
406 |
$get_data = wp_unslash( $_GET ); // WPCS: CSRF ok
|
407 |
$post_data = wp_unslash( $_POST ); // WPCS: CSRF ok
|
408 |
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
// show alert messages
|
410 |
$this->show_alert_messages();
|
411 |
|
412 |
+
if ( $this->errors->has_errors() ) {
|
413 |
+
$this->show_error_messages( $this->errors->get_error_messages() );
|
414 |
+
}
|
415 |
+
|
416 |
+
$balance = dokan()->withdraw->get_user_balance( $current_user->ID );
|
417 |
|
418 |
if ( $balance < 0 ) {
|
419 |
+
$message = sprintf( __( 'You have already withdrawn %s. This amount will be deducted from your balance.', 'dokan-lite' ), wc_price( $balance ) );
|
420 |
+
$this->show_error_messages( $message );
|
|
|
|
|
421 |
}
|
422 |
|
423 |
+
if ( dokan()->withdraw->has_pending_request( $current_user->ID ) ) {
|
424 |
|
425 |
$req_success = isset( $get_data['message'] ) ? true : false;
|
426 |
|
427 |
if ( ! $req_success ) {
|
428 |
+
$message = sprintf( '<p>%s</p><p>%s</p>', __( 'You already have pending withdraw request(s).', 'dokan-lite' ), __( 'Please submit your request after approval or cancellation of your previous request.', 'dokan-lite' ) );
|
429 |
|
430 |
+
$this->show_error_messages( $message );
|
|
|
|
|
|
|
431 |
}
|
432 |
|
433 |
$this->withdraw_requests( $current_user->ID );
|
|
|
434 |
|
435 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
+
} else if ( ! dokan()->withdraw->has_withdraw_balance( $current_user->ID ) ) {
|
438 |
+
$message = __( 'You don\'t have sufficient balance for a withdraw request!', 'dokan-lite' );
|
439 |
+
$this->show_error_messages( $message );
|
440 |
return;
|
441 |
}
|
442 |
|
443 |
$payment_methods = array_intersect( dokan_get_seller_active_withdraw_methods(), dokan_withdraw_get_active_methods() );
|
444 |
|
445 |
+
$amount = '';
|
446 |
+
$withdraw_method = '';
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
dokan_get_template_part( 'withdraw/request-form', '', array(
|
449 |
'amount' => $amount,
|
459 |
*
|
460 |
* @return [type] [description]
|
461 |
*/
|
462 |
+
public function get_all_withdraws( $user_id, $limit = 100, $offset = 0 ) {
|
463 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
464 |
return;
|
465 |
}
|
482 |
*
|
483 |
* @return void
|
484 |
*/
|
485 |
+
public function user_approved_withdraws( $user_id ) {
|
486 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
487 |
return;
|
488 |
}
|
489 |
+
$requests = dokan()->withdraw->get_withdraw_requests( $user_id, 1, 100 );
|
490 |
|
491 |
if ( $requests ) {
|
492 |
|
495 |
) );
|
496 |
|
497 |
} else {
|
498 |
+
$this->show_warning_message( __( 'Sorry, no transactions were found!', 'dokan-lite' ) );
|
|
|
|
|
|
|
|
|
499 |
|
500 |
}
|
501 |
}
|
507 |
*
|
508 |
* @return void
|
509 |
*/
|
510 |
+
public function user_cancelled_withdraws( $user_id ) {
|
511 |
if ( ! current_user_can( 'dokan_manage_withdraw' ) ) {
|
512 |
return;
|
513 |
}
|
514 |
|
515 |
+
$requests = dokan()->withdraw->get_withdraw_requests( $user_id, 2, 100 );
|
516 |
|
517 |
if ( $requests ) {
|
518 |
|
521 |
) );
|
522 |
|
523 |
} else {
|
524 |
+
$message = __( 'Sorry, no transactions were found!', 'dokan-lite' );
|
525 |
+
$this->show_warning_message( $message );
|
|
|
|
|
|
|
526 |
}
|
527 |
}
|
|
|
528 |
}
|
includes/Emails/ContactSeller.php
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Customer Email to vendor from contact form widget.
|
9 |
+
*
|
10 |
+
* @class Dokan_Email_Contact_Seller
|
11 |
+
* @version 2.6.8
|
12 |
+
* @author weDevs
|
13 |
+
* @extends WC_Email
|
14 |
+
*/
|
15 |
+
class ContactSeller extends WC_Email {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor.
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
$this->id = 'dokan_contact_seller';
|
22 |
+
$this->title = __( 'Dokan Contact Vendor', 'dokan-lite' );
|
23 |
+
$this->description = __( 'These emails are sent to a vendor who is contacted by customer via contact form widget ', 'dokan-lite' );
|
24 |
+
$this->template_html = 'emails/contact-seller.php';
|
25 |
+
$this->template_plain = 'emails/plain/contact-seller.php';
|
26 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
27 |
+
|
28 |
+
// Triggers for this email
|
29 |
+
add_action( 'dokan_trigger_contact_seller_mail', array( $this, 'trigger' ), 30, 4 );
|
30 |
+
|
31 |
+
// Call parent constructor
|
32 |
+
parent::__construct();
|
33 |
+
|
34 |
+
// Other settings
|
35 |
+
$this->recipient = 'vendor@ofthe.product';
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get email subject.
|
40 |
+
*
|
41 |
+
* @since 3.1.0
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function get_default_subject() {
|
45 |
+
return __( '[{customer_name}] sent you a message from your store at - {site_name}', 'dokan-lite' );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get email heading.
|
50 |
+
*
|
51 |
+
* @since 3.1.0
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function get_default_heading() {
|
55 |
+
return __( '{customer_name} - Sent a message from {site_name}', 'dokan-lite' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Trigger the this email.
|
60 |
+
*/
|
61 |
+
public function trigger( $seller_email, $contact_name, $contact_email, $contact_message ) {
|
62 |
+
|
63 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
$seller = get_user_by( 'email', $seller_email );
|
68 |
+
|
69 |
+
$this->find['seller_name'] = '{seller_name}';
|
70 |
+
$this->find['customer_name'] = '{customer_name}';
|
71 |
+
$this->find['customer_email'] = '{customer_email}';
|
72 |
+
$this->find['message'] = '{message}';
|
73 |
+
$this->find['site_name'] = '{site_name}';
|
74 |
+
$this->find['site_url'] = '{site_url}';
|
75 |
+
|
76 |
+
$this->replace['seller_name'] = $seller->display_name;
|
77 |
+
$this->replace['customer_name'] = $contact_name;
|
78 |
+
$this->replace['customer_email'] = $contact_email;
|
79 |
+
$this->replace['message'] = $contact_message;
|
80 |
+
$this->replace['site_name'] = $this->get_from_name();
|
81 |
+
$this->replace['site_url'] = site_url();
|
82 |
+
|
83 |
+
$this->setup_locale();
|
84 |
+
$this->send( $seller_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
85 |
+
$this->restore_locale();
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get content html.
|
90 |
+
*
|
91 |
+
* @access public
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
public function get_content_html() {
|
95 |
+
ob_start();
|
96 |
+
wc_get_template( $this->template_html, array(
|
97 |
+
'email_heading' => $this->get_heading(),
|
98 |
+
'sent_to_admin' => true,
|
99 |
+
'plain_text' => false,
|
100 |
+
'email' => $this,
|
101 |
+
'data' => $this->replace
|
102 |
+
), 'dokan/', $this->template_base );
|
103 |
+
return ob_get_clean();
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Get content plain.
|
109 |
+
*
|
110 |
+
* @access public
|
111 |
+
* @return string
|
112 |
+
*/
|
113 |
+
public function get_content_plain() {
|
114 |
+
ob_start();
|
115 |
+
wc_get_template( $this->template_html, array(
|
116 |
+
'email_heading' => $this->get_heading(),
|
117 |
+
'sent_to_admin' => true,
|
118 |
+
'plain_text' => true,
|
119 |
+
'email' => $this,
|
120 |
+
'data' => $this->replace
|
121 |
+
), 'dokan/', $this->template_base );
|
122 |
+
return ob_get_clean();
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Initialize settings form fields.
|
127 |
+
*/
|
128 |
+
public function init_form_fields() {
|
129 |
+
$this->form_fields = array(
|
130 |
+
'enabled' => array(
|
131 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
132 |
+
'type' => 'checkbox',
|
133 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
134 |
+
'default' => 'yes',
|
135 |
+
),
|
136 |
+
|
137 |
+
'subject' => array(
|
138 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
139 |
+
'type' => 'text',
|
140 |
+
'desc_tip' => true,
|
141 |
+
/* translators: %s: list of placeholders */
|
142 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{seller_name}, {customer_name}, {site_name}</code>' ),
|
143 |
+
'placeholder' => $this->get_default_subject(),
|
144 |
+
'default' => '',
|
145 |
+
),
|
146 |
+
'heading' => array(
|
147 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
148 |
+
'type' => 'text',
|
149 |
+
'desc_tip' => true,
|
150 |
+
/* translators: %s: list of placeholders */
|
151 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{seller_name}, {customer_name}, {site_name}</code>' ),
|
152 |
+
'placeholder' => $this->get_default_heading(),
|
153 |
+
'default' => '',
|
154 |
+
),
|
155 |
+
'email_type' => array(
|
156 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
157 |
+
'type' => 'select',
|
158 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
159 |
+
'default' => 'html',
|
160 |
+
'class' => 'email_type wc-enhanced-select',
|
161 |
+
'options' => $this->get_email_type_options(),
|
162 |
+
'desc_tip' => true,
|
163 |
+
),
|
164 |
+
);
|
165 |
+
}
|
166 |
+
}
|
includes/{class-email.php → Emails/Manager.php}
RENAMED
@@ -1,15 +1,16 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Dokan email handler class
|
4 |
*
|
5 |
* @package Dokan
|
6 |
*/
|
7 |
-
class
|
8 |
|
9 |
/**
|
10 |
* Load autometically when class initiate
|
11 |
-
*
|
12 |
-
* @since 3.0.0
|
13 |
*/
|
14 |
public function __construct() {
|
15 |
//Dokan Email filters for WC Email
|
@@ -18,29 +19,13 @@ class Dokan_Email {
|
|
18 |
add_filter( 'woocommerce_email_actions' , array( $this, 'register_email_actions' ) );
|
19 |
}
|
20 |
|
21 |
-
/**
|
22 |
-
* Initializes the Dokan_Email() class
|
23 |
-
*
|
24 |
-
* Checks for an existing Dokan_Email() instance
|
25 |
-
* and if it doesn't find one, creates it.
|
26 |
-
*/
|
27 |
-
public static function init() {
|
28 |
-
static $instance = false;
|
29 |
-
|
30 |
-
if ( ! $instance ) {
|
31 |
-
$instance = new self;
|
32 |
-
}
|
33 |
-
|
34 |
-
return $instance;
|
35 |
-
}
|
36 |
-
|
37 |
/**
|
38 |
* Get from name for email.
|
39 |
*
|
40 |
* @access public
|
41 |
* @return string
|
42 |
*/
|
43 |
-
function get_from_name() {
|
44 |
return wp_specialchars_decode( esc_html( get_option( 'woocommerce_email_from_name' ) ), ENT_QUOTES );
|
45 |
}
|
46 |
|
@@ -50,7 +35,7 @@ class Dokan_Email {
|
|
50 |
* @access public
|
51 |
* @return string
|
52 |
*/
|
53 |
-
function get_from_address() {
|
54 |
return sanitize_email( get_option( 'woocommerce_email_from_address' ) );
|
55 |
}
|
56 |
|
@@ -59,7 +44,7 @@ class Dokan_Email {
|
|
59 |
*
|
60 |
* @return string
|
61 |
*/
|
62 |
-
function admin_email() {
|
63 |
return apply_filters( 'dokan_email_admin_mail', get_option( 'admin_email' ) );
|
64 |
}
|
65 |
|
@@ -68,7 +53,7 @@ class Dokan_Email {
|
|
68 |
*
|
69 |
* @return string
|
70 |
*/
|
71 |
-
function get_user_agent() {
|
72 |
$agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ): '';
|
73 |
return substr( $agent, 0, 150 );
|
74 |
}
|
@@ -80,7 +65,7 @@ class Dokan_Email {
|
|
80 |
*
|
81 |
* @return string
|
82 |
*/
|
83 |
-
function currency_symbol( $amount ) {
|
84 |
$price = sprintf( get_woocommerce_price_format(), get_woocommerce_currency_symbol(), $amount );
|
85 |
|
86 |
return html_entity_decode( $price );
|
@@ -95,15 +80,15 @@ class Dokan_Email {
|
|
95 |
*
|
96 |
* @return $wc_emails
|
97 |
*/
|
98 |
-
function load_dokan_emails( $wc_emails ) {
|
99 |
-
$wc_emails['Dokan_Email_New_Product']
|
100 |
-
$wc_emails['Dokan_Email_New_Product_Pending']
|
101 |
-
$wc_emails['Dokan_Email_Product_Published']
|
102 |
-
$wc_emails['Dokan_Email_New_Seller']
|
103 |
-
$wc_emails['
|
104 |
-
$wc_emails['Dokan_Email_Withdraw_Approved']
|
105 |
-
$wc_emails['Dokan_Email_Withdraw_Cancelled']
|
106 |
-
$wc_emails['Dokan_Email_Contact_Seller']
|
107 |
|
108 |
return apply_filters( 'dokan_email_classes', $wc_emails );
|
109 |
}
|
@@ -119,7 +104,7 @@ class Dokan_Email {
|
|
119 |
*
|
120 |
* @return string
|
121 |
*/
|
122 |
-
function set_email_template_directory( $template_dir, $template ) {
|
123 |
|
124 |
$dokan_emails = apply_filters( 'dokan_email_list',
|
125 |
array(
|
@@ -152,7 +137,7 @@ class Dokan_Email {
|
|
152 |
*
|
153 |
* @return $actions
|
154 |
*/
|
155 |
-
function register_email_actions( $actions ) {
|
156 |
|
157 |
$dokan_email_actions = apply_filters( 'dokan_email_actions', array(
|
158 |
'dokan_new_product_added',
|
@@ -182,7 +167,7 @@ class Dokan_Email {
|
|
182 |
*
|
183 |
* @return void
|
184 |
*/
|
185 |
-
function contact_seller( $seller_email, $from_name, $from_email, $message ) {
|
186 |
ob_start();
|
187 |
dokan_get_template_part( 'emails/contact-seller' );
|
188 |
$body = ob_get_clean();
|
@@ -232,7 +217,7 @@ class Dokan_Email {
|
|
232 |
*
|
233 |
* @return void
|
234 |
*/
|
235 |
-
function dokan_refund_seller_mail( $seller_mail, $order_id, $status, $amount, $refund_reason ) {
|
236 |
ob_start();
|
237 |
dokan_get_template_part( 'emails/refund-seller-mail' );
|
238 |
$body = ob_get_clean();
|
@@ -272,7 +257,7 @@ class Dokan_Email {
|
|
272 |
*
|
273 |
* @return @void
|
274 |
*/
|
275 |
-
function dokan_refund_request( $order_id ) {
|
276 |
ob_start();
|
277 |
dokan_get_template_part( 'emails/refund-request' );
|
278 |
$body = ob_get_clean();
|
@@ -307,7 +292,7 @@ class Dokan_Email {
|
|
307 |
*
|
308 |
* @return string
|
309 |
*/
|
310 |
-
function prepare_withdraw( $body, $user, $amount, $method, $note = '' ) {
|
311 |
$find = array(
|
312 |
'%username%',
|
313 |
'%amount%',
|
@@ -342,7 +327,7 @@ class Dokan_Email {
|
|
342 |
* @param float $amount
|
343 |
* @param string $method
|
344 |
*/
|
345 |
-
function new_withdraw_request( $user, $amount, $method ) {
|
346 |
ob_start();
|
347 |
dokan_get_template_part( 'emails/withdraw-new' );
|
348 |
$body = ob_get_clean();
|
@@ -363,7 +348,7 @@ class Dokan_Email {
|
|
363 |
*
|
364 |
* @return 3.0.0
|
365 |
*/
|
366 |
-
function withdraw_request_approve( $user_id, $amount, $method ) {
|
367 |
ob_start();
|
368 |
dokan_get_template_part( 'emails/withdraw-approve' );
|
369 |
$body = ob_get_clean();
|
@@ -376,7 +361,6 @@ class Dokan_Email {
|
|
376 |
do_action( 'after_withdraw_request_approve', $user->user_email, $subject, $body );
|
377 |
}
|
378 |
|
379 |
-
|
380 |
/**
|
381 |
* Send email to user once a order has been cancelled
|
382 |
*
|
@@ -387,7 +371,7 @@ class Dokan_Email {
|
|
387 |
*
|
388 |
* @since 3.0.0
|
389 |
*/
|
390 |
-
function withdraw_request_cancel( $user_id, $amount, $method, $note = '' ) {
|
391 |
ob_start();
|
392 |
dokan_get_template_part( 'emails/withdraw-cancel' );
|
393 |
$body = ob_get_clean();
|
@@ -407,7 +391,7 @@ class Dokan_Email {
|
|
407 |
*
|
408 |
* @return void
|
409 |
*/
|
410 |
-
function new_seller_registered_mail( $seller_id ) {
|
411 |
|
412 |
ob_start();
|
413 |
dokan_get_template_part( 'emails/new-seller-registered' );
|
@@ -446,7 +430,7 @@ class Dokan_Email {
|
|
446 |
*
|
447 |
* @return void
|
448 |
*/
|
449 |
-
function new_product_added( $product_id, $status = 'pending' ) {
|
450 |
$template = 'emails/new-product-pending';
|
451 |
|
452 |
if ( $status == 'publish' ) {
|
@@ -499,7 +483,7 @@ class Dokan_Email {
|
|
499 |
*
|
500 |
* @return void
|
501 |
*/
|
502 |
-
function product_published( $post, $seller ) {
|
503 |
ob_start();
|
504 |
dokan_get_template_part( 'emails/product-published' );
|
505 |
$body = ob_get_clean();
|
@@ -544,7 +528,7 @@ class Dokan_Email {
|
|
544 |
*
|
545 |
* @return void
|
546 |
*/
|
547 |
-
function send( $to, $subject, $message, $headers = array() ) {
|
548 |
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
549 |
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
550 |
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
/**
|
6 |
* Dokan email handler class
|
7 |
*
|
8 |
* @package Dokan
|
9 |
*/
|
10 |
+
class Manager {
|
11 |
|
12 |
/**
|
13 |
* Load autometically when class initiate
|
|
|
|
|
14 |
*/
|
15 |
public function __construct() {
|
16 |
//Dokan Email filters for WC Email
|
19 |
add_filter( 'woocommerce_email_actions' , array( $this, 'register_email_actions' ) );
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Get from name for email.
|
24 |
*
|
25 |
* @access public
|
26 |
* @return string
|
27 |
*/
|
28 |
+
public function get_from_name() {
|
29 |
return wp_specialchars_decode( esc_html( get_option( 'woocommerce_email_from_name' ) ), ENT_QUOTES );
|
30 |
}
|
31 |
|
35 |
* @access public
|
36 |
* @return string
|
37 |
*/
|
38 |
+
public function get_from_address() {
|
39 |
return sanitize_email( get_option( 'woocommerce_email_from_address' ) );
|
40 |
}
|
41 |
|
44 |
*
|
45 |
* @return string
|
46 |
*/
|
47 |
+
public function admin_email() {
|
48 |
return apply_filters( 'dokan_email_admin_mail', get_option( 'admin_email' ) );
|
49 |
}
|
50 |
|
53 |
*
|
54 |
* @return string
|
55 |
*/
|
56 |
+
public function get_user_agent() {
|
57 |
$agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ): '';
|
58 |
return substr( $agent, 0, 150 );
|
59 |
}
|
65 |
*
|
66 |
* @return string
|
67 |
*/
|
68 |
+
public function currency_symbol( $amount ) {
|
69 |
$price = sprintf( get_woocommerce_price_format(), get_woocommerce_currency_symbol(), $amount );
|
70 |
|
71 |
return html_entity_decode( $price );
|
80 |
*
|
81 |
* @return $wc_emails
|
82 |
*/
|
83 |
+
public function load_dokan_emails( $wc_emails ) {
|
84 |
+
$wc_emails['Dokan_Email_New_Product'] = new NewProduct();
|
85 |
+
$wc_emails['Dokan_Email_New_Product_Pending'] = new NewProductPending();
|
86 |
+
$wc_emails['Dokan_Email_Product_Published'] = new ProductPublished();
|
87 |
+
$wc_emails['Dokan_Email_New_Seller'] = new NewSeller();
|
88 |
+
$wc_emails['Dokan_Email_Vendor_Withdraw_Request'] = new VendorWithdrawRequest();
|
89 |
+
$wc_emails['Dokan_Email_Withdraw_Approved'] = new WithdrawApproved();
|
90 |
+
$wc_emails['Dokan_Email_Withdraw_Cancelled'] = new WithdrawCancelled();
|
91 |
+
$wc_emails['Dokan_Email_Contact_Seller'] = new ContactSeller();
|
92 |
|
93 |
return apply_filters( 'dokan_email_classes', $wc_emails );
|
94 |
}
|
104 |
*
|
105 |
* @return string
|
106 |
*/
|
107 |
+
public function set_email_template_directory( $template_dir, $template ) {
|
108 |
|
109 |
$dokan_emails = apply_filters( 'dokan_email_list',
|
110 |
array(
|
137 |
*
|
138 |
* @return $actions
|
139 |
*/
|
140 |
+
public function register_email_actions( $actions ) {
|
141 |
|
142 |
$dokan_email_actions = apply_filters( 'dokan_email_actions', array(
|
143 |
'dokan_new_product_added',
|
167 |
*
|
168 |
* @return void
|
169 |
*/
|
170 |
+
public function contact_seller( $seller_email, $from_name, $from_email, $message ) {
|
171 |
ob_start();
|
172 |
dokan_get_template_part( 'emails/contact-seller' );
|
173 |
$body = ob_get_clean();
|
217 |
*
|
218 |
* @return void
|
219 |
*/
|
220 |
+
public function dokan_refund_seller_mail( $seller_mail, $order_id, $status, $amount, $refund_reason ) {
|
221 |
ob_start();
|
222 |
dokan_get_template_part( 'emails/refund-seller-mail' );
|
223 |
$body = ob_get_clean();
|
257 |
*
|
258 |
* @return @void
|
259 |
*/
|
260 |
+
public function dokan_refund_request( $order_id ) {
|
261 |
ob_start();
|
262 |
dokan_get_template_part( 'emails/refund-request' );
|
263 |
$body = ob_get_clean();
|
292 |
*
|
293 |
* @return string
|
294 |
*/
|
295 |
+
public function prepare_withdraw( $body, $user, $amount, $method, $note = '' ) {
|
296 |
$find = array(
|
297 |
'%username%',
|
298 |
'%amount%',
|
327 |
* @param float $amount
|
328 |
* @param string $method
|
329 |
*/
|
330 |
+
public function new_withdraw_request( $user, $amount, $method ) {
|
331 |
ob_start();
|
332 |
dokan_get_template_part( 'emails/withdraw-new' );
|
333 |
$body = ob_get_clean();
|
348 |
*
|
349 |
* @return 3.0.0
|
350 |
*/
|
351 |
+
public function withdraw_request_approve( $user_id, $amount, $method ) {
|
352 |
ob_start();
|
353 |
dokan_get_template_part( 'emails/withdraw-approve' );
|
354 |
$body = ob_get_clean();
|
361 |
do_action( 'after_withdraw_request_approve', $user->user_email, $subject, $body );
|
362 |
}
|
363 |
|
|
|
364 |
/**
|
365 |
* Send email to user once a order has been cancelled
|
366 |
*
|
371 |
*
|
372 |
* @since 3.0.0
|
373 |
*/
|
374 |
+
public function withdraw_request_cancel( $user_id, $amount, $method, $note = '' ) {
|
375 |
ob_start();
|
376 |
dokan_get_template_part( 'emails/withdraw-cancel' );
|
377 |
$body = ob_get_clean();
|
391 |
*
|
392 |
* @return void
|
393 |
*/
|
394 |
+
public function new_seller_registered_mail( $seller_id ) {
|
395 |
|
396 |
ob_start();
|
397 |
dokan_get_template_part( 'emails/new-seller-registered' );
|
430 |
*
|
431 |
* @return void
|
432 |
*/
|
433 |
+
public function new_product_added( $product_id, $status = 'pending' ) {
|
434 |
$template = 'emails/new-product-pending';
|
435 |
|
436 |
if ( $status == 'publish' ) {
|
483 |
*
|
484 |
* @return void
|
485 |
*/
|
486 |
+
public function product_published( $post, $seller ) {
|
487 |
ob_start();
|
488 |
dokan_get_template_part( 'emails/product-published' );
|
489 |
$body = ob_get_clean();
|
528 |
*
|
529 |
* @return void
|
530 |
*/
|
531 |
+
public function send( $to, $subject, $message, $headers = array() ) {
|
532 |
add_filter( 'wp_mail_from', array( $this, 'get_from_address' ) );
|
533 |
add_filter( 'wp_mail_from_name', array( $this, 'get_from_name' ) );
|
534 |
|
includes/Emails/NewProduct.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* New Product Email.
|
9 |
+
*
|
10 |
+
* An email sent to the admin when a new Product is created by vendor.
|
11 |
+
*
|
12 |
+
* @class Dokan_Email_New_Product
|
13 |
+
* @version 2.6.8
|
14 |
+
* @author weDevs
|
15 |
+
* @extends WC_Email
|
16 |
+
*/
|
17 |
+
class NewProduct extends WC_Email {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
$this->id = 'new_product';
|
24 |
+
$this->title = __( 'Dokan New Product', 'dokan-lite' );
|
25 |
+
$this->description = __( 'New Product emails are sent to chosen recipient(s) when a new product is created by vendors.', 'dokan-lite' );
|
26 |
+
$this->template_html = 'emails/new-product.php';
|
27 |
+
$this->template_plain = 'emails/plain/new-product.php';
|
28 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
29 |
+
|
30 |
+
// Triggers for this email
|
31 |
+
add_action( 'dokan_new_product_added', array( $this, 'trigger' ), 30, 2 );
|
32 |
+
|
33 |
+
// Call parent constructor
|
34 |
+
parent::__construct();
|
35 |
+
|
36 |
+
// Other settings
|
37 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get email subject.
|
42 |
+
*
|
43 |
+
* @since 3.1.0
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_default_subject() {
|
47 |
+
return __( '[{site_name}] A New product is added by ({seller_name}) - {product_title}', 'dokan-lite' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get email heading.
|
52 |
+
*
|
53 |
+
* @since 3.1.0
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function get_default_heading() {
|
57 |
+
return __( 'New product added by Vendor {seller_name}', 'dokan-lite' );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Trigger the sending of this email.
|
62 |
+
*
|
63 |
+
* @param int $product_id The product ID.
|
64 |
+
* @param array $postdata.
|
65 |
+
*/
|
66 |
+
public function trigger( $product_id, $postdata ) {
|
67 |
+
|
68 |
+
if ( dokan_get_option( 'product_add_mail', 'dokan_general', 'on' ) != 'on' ) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( dokan_get_new_post_status() == 'pending' ) {
|
73 |
+
do_action( 'dokan_email_trigger_new_pending_product', $product_id, $postdata );
|
74 |
+
return;
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
+
$product = wc_get_product( $product_id );
|
82 |
+
$seller_id = get_post_field( 'post_author', $product_id );
|
83 |
+
$seller = get_user_by( 'id', $seller_id );
|
84 |
+
$category = wp_get_post_terms( dokan_get_prop( $product, 'id' ), 'product_cat', array( 'fields' => 'names' ) );
|
85 |
+
$category_name = $category ? reset( $category ) : 'N/A';
|
86 |
+
|
87 |
+
if ( is_a( $product, 'WC_Product' ) ) {
|
88 |
+
$this->object = $product;
|
89 |
+
|
90 |
+
$this->find['product-title'] = '{product_title}';
|
91 |
+
$this->find['price'] = '{price}';
|
92 |
+
$this->find['seller-name'] = '{seller_name}';
|
93 |
+
$this->find['seller_url'] = '{seller_url}';
|
94 |
+
$this->find['category'] = '{category}';
|
95 |
+
$this->find['product_link'] = '{product_link}';
|
96 |
+
$this->find['site_name'] = '{site_name}';
|
97 |
+
$this->find['site_url'] = '{site_url}';
|
98 |
+
|
99 |
+
$this->replace['product-title'] = $product->get_title();
|
100 |
+
$this->replace['price'] = $product->get_price();
|
101 |
+
$this->replace['seller-name'] = $seller->display_name;
|
102 |
+
$this->replace['seller_url'] = dokan_get_store_url( $seller->ID );
|
103 |
+
$this->replace['category'] = $category_name;
|
104 |
+
$this->replace['product_link'] = admin_url( 'post.php?action=edit&post=' . $product_id );
|
105 |
+
$this->replace['site_name'] = $this->get_from_name();
|
106 |
+
$this->replace['site_url'] = site_url();
|
107 |
+
}
|
108 |
+
|
109 |
+
$this->setup_locale();
|
110 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
111 |
+
$this->restore_locale();
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get content html.
|
116 |
+
*
|
117 |
+
* @access public
|
118 |
+
* @return string
|
119 |
+
*/
|
120 |
+
public function get_content_html() {
|
121 |
+
ob_start();
|
122 |
+
wc_get_template( $this->template_html, array(
|
123 |
+
'product' => $this->object,
|
124 |
+
'email_heading' => $this->get_heading(),
|
125 |
+
'sent_to_admin' => true,
|
126 |
+
'plain_text' => false,
|
127 |
+
'email' => $this,
|
128 |
+
'data' => $this->replace
|
129 |
+
), 'dokan/', $this->template_base );
|
130 |
+
return ob_get_clean();
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Get content plain.
|
136 |
+
*
|
137 |
+
* @access public
|
138 |
+
* @return string
|
139 |
+
*/
|
140 |
+
public function get_content_plain() {
|
141 |
+
ob_start();
|
142 |
+
wc_get_template( $this->template_html, array(
|
143 |
+
'product' => $this->object,
|
144 |
+
'email_heading' => $this->get_heading(),
|
145 |
+
'sent_to_admin' => true,
|
146 |
+
'plain_text' => true,
|
147 |
+
'email' => $this,
|
148 |
+
'data' => $this->replace
|
149 |
+
), 'dokan/', $this->template_base );
|
150 |
+
return ob_get_clean();
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Initialise settings form fields.
|
155 |
+
*/
|
156 |
+
public function init_form_fields() {
|
157 |
+
$this->form_fields = array(
|
158 |
+
'enabled' => array(
|
159 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
160 |
+
'type' => 'checkbox',
|
161 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
162 |
+
'default' => 'yes',
|
163 |
+
),
|
164 |
+
'recipient' => array(
|
165 |
+
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
166 |
+
'type' => 'text',
|
167 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
168 |
+
'placeholder' => '',
|
169 |
+
'default' => '',
|
170 |
+
'desc_tip' => true,
|
171 |
+
),
|
172 |
+
'subject' => array(
|
173 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
174 |
+
'type' => 'text',
|
175 |
+
'desc_tip' => true,
|
176 |
+
/* translators: %s: list of placeholders */
|
177 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
178 |
+
'placeholder' => $this->get_default_subject(),
|
179 |
+
'default' => '',
|
180 |
+
),
|
181 |
+
'heading' => array(
|
182 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
183 |
+
'type' => 'text',
|
184 |
+
'desc_tip' => true,
|
185 |
+
/* translators: %s: list of placeholders */
|
186 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
187 |
+
'placeholder' => $this->get_default_heading(),
|
188 |
+
'default' => '',
|
189 |
+
),
|
190 |
+
'email_type' => array(
|
191 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
192 |
+
'type' => 'select',
|
193 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
194 |
+
'default' => 'html',
|
195 |
+
'class' => 'email_type wc-enhanced-select',
|
196 |
+
'options' => $this->get_email_type_options(),
|
197 |
+
'desc_tip' => true,
|
198 |
+
),
|
199 |
+
);
|
200 |
+
}
|
201 |
+
}
|
includes/Emails/NewProductPending.php
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* New Product Email.
|
9 |
+
*
|
10 |
+
* An email sent to the admin when a new Product is created by vendor.
|
11 |
+
*
|
12 |
+
* @class Dokan_Email_New_Product_Pending
|
13 |
+
* @version 2.6.8
|
14 |
+
* @package Dokan/Classes/Emails
|
15 |
+
* @author weDevs
|
16 |
+
* @extends WC_Email
|
17 |
+
*/
|
18 |
+
class NewProductPending extends WC_Email {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Constructor.
|
22 |
+
*/
|
23 |
+
public function __construct() {
|
24 |
+
$this->id = 'new_product_pending';
|
25 |
+
$this->title = __( 'Dokan New Pending Product', 'dokan-lite' );
|
26 |
+
$this->description = __( 'New Pending Product emails are sent to chosen recipient(s) when a new product is created by vendors.', 'dokan-lite' );
|
27 |
+
$this->template_html = 'emails/new-product-pending.php';
|
28 |
+
$this->template_plain = 'emails/plain/new-product-pending.php';
|
29 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
30 |
+
|
31 |
+
// Triggers for this email
|
32 |
+
add_action( 'dokan_email_trigger_new_pending_product', array( $this, 'trigger' ), 30, 2 );
|
33 |
+
|
34 |
+
// Call parent constructor
|
35 |
+
parent::__construct();
|
36 |
+
|
37 |
+
// Other settings
|
38 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get email subject.
|
43 |
+
*
|
44 |
+
* @since 3.1.0
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_default_subject() {
|
48 |
+
return __( '[{site_title}] A New product is pending from ({seller_name}) - {product_title}', 'dokan-lite' );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get email heading.
|
53 |
+
*
|
54 |
+
* @since 3.1.0
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function get_default_heading() {
|
58 |
+
return __( 'New pending product added by Vendor {seller_name}', 'dokan-lite' );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Trigger the sending of this email.
|
63 |
+
*
|
64 |
+
* @param int $product_id The product ID.
|
65 |
+
* @param array $postdata.
|
66 |
+
*/
|
67 |
+
public function trigger( $product_id, $postdata ) {
|
68 |
+
|
69 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
|
73 |
+
$product = wc_get_product( $product_id );
|
74 |
+
$seller_id = get_post_field( 'post_author', $product_id );
|
75 |
+
$seller = get_user_by( 'id', $seller_id );
|
76 |
+
$category = wp_get_post_terms( dokan_get_prop( $product, 'id' ), 'product_cat', array( 'fields' => 'names' ) );
|
77 |
+
$category_name = $category ? reset( $category ) : 'N/A';
|
78 |
+
|
79 |
+
if ( is_a( $product, 'WC_Product' ) ) {
|
80 |
+
$this->object = $product;
|
81 |
+
|
82 |
+
$this->find['product-title'] = '{product_title}';
|
83 |
+
$this->find['price'] = '{price}';
|
84 |
+
$this->find['seller-name'] = '{seller_name}';
|
85 |
+
$this->find['seller_url'] = '{seller_url}';
|
86 |
+
$this->find['category'] = '{category}';
|
87 |
+
$this->find['product_link'] = '{product_link}';
|
88 |
+
$this->find['site_name'] = '{site_name}';
|
89 |
+
$this->find['site_url'] = '{site_url}';
|
90 |
+
|
91 |
+
$this->replace['product-title'] = $product->get_title();
|
92 |
+
$this->replace['price'] = $product->get_price();
|
93 |
+
$this->replace['seller-name'] = $seller->display_name;
|
94 |
+
$this->replace['seller_url'] = dokan_get_store_url( $seller->ID );
|
95 |
+
$this->replace['category'] = $category_name;
|
96 |
+
$this->replace['product_link'] = admin_url( 'post.php?action=edit&post=' . $product_id );
|
97 |
+
$this->replace['site_name'] = $this->get_from_name();
|
98 |
+
$this->replace['site_url'] = site_url();
|
99 |
+
}
|
100 |
+
|
101 |
+
$this->setup_locale();
|
102 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
103 |
+
$this->restore_locale();
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get content html.
|
108 |
+
*
|
109 |
+
* @access public
|
110 |
+
* @return string
|
111 |
+
*/
|
112 |
+
public function get_content_html() {
|
113 |
+
ob_start();
|
114 |
+
wc_get_template( $this->template_html, array(
|
115 |
+
'product' => $this->object,
|
116 |
+
'email_heading' => $this->get_heading(),
|
117 |
+
'sent_to_admin' => true,
|
118 |
+
'plain_text' => false,
|
119 |
+
'email' => $this,
|
120 |
+
'data' => $this->replace
|
121 |
+
), 'dokan/', $this->template_base );
|
122 |
+
return ob_get_clean();
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Get content plain.
|
128 |
+
*
|
129 |
+
* @access public
|
130 |
+
* @return string
|
131 |
+
*/
|
132 |
+
public function get_content_plain() {
|
133 |
+
ob_start();
|
134 |
+
wc_get_template( $this->template_html, array(
|
135 |
+
'product' => $this->object,
|
136 |
+
'email_heading' => $this->get_heading(),
|
137 |
+
'sent_to_admin' => true,
|
138 |
+
'plain_text' => true,
|
139 |
+
'email' => $this,
|
140 |
+
'data' => $this->replace
|
141 |
+
), 'dokan/', $this->template_base );
|
142 |
+
return ob_get_clean();
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Initialise settings form fields.
|
147 |
+
*/
|
148 |
+
public function init_form_fields() {
|
149 |
+
$this->form_fields = array(
|
150 |
+
'enabled' => array(
|
151 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
152 |
+
'type' => 'checkbox',
|
153 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
154 |
+
'default' => 'yes',
|
155 |
+
),
|
156 |
+
'recipient' => array(
|
157 |
+
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
158 |
+
'type' => 'text',
|
159 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
160 |
+
'placeholder' => '',
|
161 |
+
'default' => '',
|
162 |
+
'desc_tip' => true,
|
163 |
+
),
|
164 |
+
'subject' => array(
|
165 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
166 |
+
'type' => 'text',
|
167 |
+
'desc_tip' => true,
|
168 |
+
/* translators: %s: list of placeholders */
|
169 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_title}, {product_title}, {seller_name}</code>' ),
|
170 |
+
'placeholder' => $this->get_default_subject(),
|
171 |
+
'default' => '',
|
172 |
+
),
|
173 |
+
'heading' => array(
|
174 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
175 |
+
'type' => 'text',
|
176 |
+
'desc_tip' => true,
|
177 |
+
/* translators: %s: list of placeholders */
|
178 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_title}, {product_title}, {seller_name}</code>' ),
|
179 |
+
'placeholder' => $this->get_default_heading(),
|
180 |
+
'default' => '',
|
181 |
+
),
|
182 |
+
'email_type' => array(
|
183 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
184 |
+
'type' => 'select',
|
185 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
186 |
+
'default' => 'html',
|
187 |
+
'class' => 'email_type wc-enhanced-select',
|
188 |
+
'options' => $this->get_email_type_options(),
|
189 |
+
'desc_tip' => true,
|
190 |
+
),
|
191 |
+
);
|
192 |
+
}
|
193 |
+
}
|
includes/Emails/NewSeller.php
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* New Seller Email.
|
9 |
+
*
|
10 |
+
* @version 2.6.6
|
11 |
+
* @package Dokan/Classes/Emails
|
12 |
+
* @author weDevs
|
13 |
+
* @extends WC_Email
|
14 |
+
*/
|
15 |
+
class NewSeller extends WC_Email {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor.
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
$this->id = 'dokan_new_seller';
|
22 |
+
$this->title = __( 'Dokan New Seller Registered', 'dokan-lite' );
|
23 |
+
$this->description = __( 'These emails are sent to chosen recipient(s) when a new vendor registers in marketplace', 'dokan-lite' );
|
24 |
+
$this->template_html = 'emails/new-seller-registered.php';
|
25 |
+
$this->template_plain = 'emails/plain/new-seller-registered.php';
|
26 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
27 |
+
|
28 |
+
// Triggers for this email
|
29 |
+
add_action( 'dokan_new_seller_created', array( $this, 'trigger' ), 30, 2 );
|
30 |
+
|
31 |
+
// Call parent constructor
|
32 |
+
parent::__construct();
|
33 |
+
|
34 |
+
// Other settings
|
35 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get email subject.
|
40 |
+
*
|
41 |
+
* @since 3.1.0
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function get_default_subject() {
|
45 |
+
return __( '[{site_name}] A New vendor has registered', 'dokan-lite' );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get email heading.
|
50 |
+
*
|
51 |
+
* @since 3.1.0
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function get_default_heading() {
|
55 |
+
return __( 'New Vendor Registered - {seller_name}', 'dokan-lite' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Trigger the sending of this email.
|
60 |
+
*
|
61 |
+
* @param int $product_id The product ID.
|
62 |
+
* @param array $postdata.
|
63 |
+
*/
|
64 |
+
public function trigger( $user_id, $dokan_settings ) {
|
65 |
+
|
66 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
$seller = get_user_by( 'id', $user_id );
|
71 |
+
$this->object = $seller;
|
72 |
+
$this->find['seller_name'] = '{seller_name}';
|
73 |
+
$this->find['store_url'] = '{store_url}';
|
74 |
+
$this->find['store_name'] = '{store_name}';
|
75 |
+
$this->find['seller_edit'] = '{seller_edit}';
|
76 |
+
$this->find['site_name'] = '{site_name}';
|
77 |
+
$this->find['site_url'] = '{site_url}';
|
78 |
+
|
79 |
+
$this->replace['seller_name'] = $seller->display_name;
|
80 |
+
$this->replace['store_url'] = dokan_get_store_url( $seller->ID );
|
81 |
+
$this->replace['store_name'] = $dokan_settings['store_name'];
|
82 |
+
$this->replace['seller_edit'] = admin_url( 'user-edit.php?user_id=' . $user_id );
|
83 |
+
$this->replace['site_name'] = $this->get_from_name();
|
84 |
+
$this->replace['site_url'] = site_url();
|
85 |
+
|
86 |
+
$this->setup_locale();
|
87 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
88 |
+
$this->restore_locale();
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get content html.
|
93 |
+
*
|
94 |
+
* @access public
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
public function get_content_html() {
|
98 |
+
ob_start();
|
99 |
+
wc_get_template( $this->template_html, array(
|
100 |
+
'seller' => $this->object,
|
101 |
+
'email_heading' => $this->get_heading(),
|
102 |
+
'sent_to_admin' => true,
|
103 |
+
'plain_text' => false,
|
104 |
+
'email' => $this,
|
105 |
+
'data' => $this->replace
|
106 |
+
), 'dokan/', $this->template_base );
|
107 |
+
return ob_get_clean();
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Get content plain.
|
113 |
+
*
|
114 |
+
* @access public
|
115 |
+
* @return string
|
116 |
+
*/
|
117 |
+
public function get_content_plain() {
|
118 |
+
ob_start();
|
119 |
+
wc_get_template( $this->template_html, array(
|
120 |
+
'seller' => $this->object,
|
121 |
+
'email_heading' => $this->get_heading(),
|
122 |
+
'sent_to_admin' => true,
|
123 |
+
'plain_text' => true,
|
124 |
+
'email' => $this,
|
125 |
+
'data' => $this->replace
|
126 |
+
), 'dokan/', $this->template_base );
|
127 |
+
return ob_get_clean();
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Initialise settings form fields.
|
132 |
+
*/
|
133 |
+
public function init_form_fields() {
|
134 |
+
$this->form_fields = array(
|
135 |
+
'enabled' => array(
|
136 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
137 |
+
'type' => 'checkbox',
|
138 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
139 |
+
'default' => 'yes',
|
140 |
+
),
|
141 |
+
'recipient' => array(
|
142 |
+
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
143 |
+
'type' => 'text',
|
144 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
145 |
+
'placeholder' => '',
|
146 |
+
'default' => '',
|
147 |
+
'desc_tip' => true,
|
148 |
+
),
|
149 |
+
'subject' => array(
|
150 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
151 |
+
'type' => 'text',
|
152 |
+
'desc_tip' => true,
|
153 |
+
/* translators: %s: list of placeholders */
|
154 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {store_name}, {seller_name}</code>' ),
|
155 |
+
'placeholder' => $this->get_default_subject(),
|
156 |
+
'default' => '',
|
157 |
+
),
|
158 |
+
'heading' => array(
|
159 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
160 |
+
'type' => 'text',
|
161 |
+
'desc_tip' => true,
|
162 |
+
/* translators: %s: list of placeholders */
|
163 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {store_name}, {seller_name}</code>' ),
|
164 |
+
'placeholder' => $this->get_default_heading(),
|
165 |
+
'default' => '',
|
166 |
+
),
|
167 |
+
'email_type' => array(
|
168 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
169 |
+
'type' => 'select',
|
170 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
171 |
+
'default' => 'html',
|
172 |
+
'class' => 'email_type wc-enhanced-select',
|
173 |
+
'options' => $this->get_email_type_options(),
|
174 |
+
'desc_tip' => true,
|
175 |
+
),
|
176 |
+
);
|
177 |
+
}
|
178 |
+
}
|
includes/Emails/ProductPublished.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* New Product Published Email to vendor.
|
9 |
+
*
|
10 |
+
* An email sent to the vendor when a pending Product is published by admin.
|
11 |
+
*
|
12 |
+
* @class Dokan_Email_Product_Published
|
13 |
+
* @version 2.6.8
|
14 |
+
* @author weDevs
|
15 |
+
* @extends WC_Email
|
16 |
+
*/
|
17 |
+
class ProductPublished extends WC_Email {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
$this->id = 'pending_product_published';
|
24 |
+
$this->title = __( 'Dokan Pending Product Published', 'dokan-lite' );
|
25 |
+
$this->description = __( 'These emails are sent to vendor of the product when a pending product is published.', 'dokan-lite' );
|
26 |
+
$this->template_html = 'emails/product-published.php';
|
27 |
+
$this->template_plain = 'emails/plain/product-published.php';
|
28 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
29 |
+
|
30 |
+
// Triggers for this email
|
31 |
+
add_action( 'dokan_pending_product_published_notification', array( $this, 'trigger' ), 30, 2 );
|
32 |
+
|
33 |
+
// Call parent constructor
|
34 |
+
parent::__construct();
|
35 |
+
|
36 |
+
// Other settings
|
37 |
+
$this->recipient = 'vendor@ofthe.product';
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get email subject.
|
42 |
+
*
|
43 |
+
* @since 3.1.0
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_default_subject() {
|
47 |
+
return __( '[{site_name}] Your product - {product_title} - is now published', 'dokan-lite' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get email heading.
|
52 |
+
*
|
53 |
+
* @since 3.1.0
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function get_default_heading() {
|
57 |
+
return __( '{product_title} - is published', 'dokan-lite' );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Trigger the sending of this email.
|
62 |
+
*
|
63 |
+
* @param int $product_id The product ID.
|
64 |
+
* @param array $postdata.
|
65 |
+
*/
|
66 |
+
public function trigger( $post, $seller ) {
|
67 |
+
|
68 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
$product = wc_get_product( $post->ID );
|
73 |
+
|
74 |
+
if ( is_a( $product, 'WC_Product' ) ) {
|
75 |
+
$this->object = $product;
|
76 |
+
|
77 |
+
$this->find['product-title'] = '{product_title}';
|
78 |
+
$this->find['price'] = '{price}';
|
79 |
+
$this->find['seller-name'] = '{seller_name}';
|
80 |
+
$this->find['product_url'] = '{product_url}';
|
81 |
+
$this->find['product_edit_link'] = '{product_edit_link}';
|
82 |
+
$this->find['site_name'] = '{site_name}';
|
83 |
+
$this->find['site_url'] = '{site_url}';
|
84 |
+
|
85 |
+
$this->replace['product-title'] = $product->get_title();
|
86 |
+
$this->replace['price'] = $product->get_price();
|
87 |
+
$this->replace['seller-name'] = $seller->display_name;
|
88 |
+
$this->replace['product_url'] = get_permalink( $post->ID );
|
89 |
+
$this->replace['product_edit_link'] = dokan_edit_product_url( $post->ID );
|
90 |
+
$this->replace['site_name'] = $this->get_from_name();
|
91 |
+
$this->replace['site_url'] = site_url();
|
92 |
+
}
|
93 |
+
|
94 |
+
$this->setup_locale();
|
95 |
+
$this->send( $seller->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
96 |
+
$this->restore_locale();
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Get content html.
|
101 |
+
*
|
102 |
+
* @access public
|
103 |
+
* @return string
|
104 |
+
*/
|
105 |
+
public function get_content_html() {
|
106 |
+
ob_start();
|
107 |
+
wc_get_template( $this->template_html, array(
|
108 |
+
'product' => $this->object,
|
109 |
+
'email_heading' => $this->get_heading(),
|
110 |
+
'sent_to_admin' => true,
|
111 |
+
'plain_text' => false,
|
112 |
+
'email' => $this,
|
113 |
+
'data' => $this->replace
|
114 |
+
), 'dokan/', $this->template_base );
|
115 |
+
return ob_get_clean();
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Get content plain.
|
121 |
+
*
|
122 |
+
* @access public
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function get_content_plain() {
|
126 |
+
ob_start();
|
127 |
+
wc_get_template( $this->template_html, array(
|
128 |
+
'product' => $this->object,
|
129 |
+
'email_heading' => $this->get_heading(),
|
130 |
+
'sent_to_admin' => true,
|
131 |
+
'plain_text' => true,
|
132 |
+
'email' => $this,
|
133 |
+
'data' => $this->replace
|
134 |
+
), 'dokan/', $this->template_base );
|
135 |
+
return ob_get_clean();
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Initialise settings form fields.
|
140 |
+
*/
|
141 |
+
public function init_form_fields() {
|
142 |
+
$this->form_fields = array(
|
143 |
+
'enabled' => array(
|
144 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
145 |
+
'type' => 'checkbox',
|
146 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
147 |
+
'default' => 'yes',
|
148 |
+
),
|
149 |
+
|
150 |
+
'subject' => array(
|
151 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
152 |
+
'type' => 'text',
|
153 |
+
'desc_tip' => true,
|
154 |
+
/* translators: %s: list of placeholders */
|
155 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
156 |
+
'placeholder' => $this->get_default_subject(),
|
157 |
+
'default' => '',
|
158 |
+
),
|
159 |
+
'heading' => array(
|
160 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
161 |
+
'type' => 'text',
|
162 |
+
'desc_tip' => true,
|
163 |
+
/* translators: %s: list of placeholders */
|
164 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
165 |
+
'placeholder' => $this->get_default_heading(),
|
166 |
+
'default' => '',
|
167 |
+
),
|
168 |
+
'email_type' => array(
|
169 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
170 |
+
'type' => 'select',
|
171 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
172 |
+
'default' => 'html',
|
173 |
+
'class' => 'email_type wc-enhanced-select',
|
174 |
+
'options' => $this->get_email_type_options(),
|
175 |
+
'desc_tip' => true,
|
176 |
+
),
|
177 |
+
);
|
178 |
+
}
|
179 |
+
}
|
includes/{emails/class-dokan-vendor-withdraw-request.php → Emails/VendorWithdrawRequest.php}
RENAMED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
exit;
|
5 |
-
}
|
6 |
|
7 |
-
|
8 |
|
9 |
/**
|
10 |
* New Product Email.
|
@@ -16,7 +14,7 @@ if ( ! class_exists( 'Dokan_Vendor_Withdraw_Request' ) ) :
|
|
16 |
* @author weDevs
|
17 |
* @extends WC_Email
|
18 |
*/
|
19 |
-
class
|
20 |
|
21 |
/**
|
22 |
* Constructor.
|
@@ -65,14 +63,14 @@ class Dokan_Vendor_Withdraw_Request extends WC_Email {
|
|
65 |
* @param int $product_id The product ID.
|
66 |
* @param array $postdata.
|
67 |
*/
|
68 |
-
public function trigger( $
|
|
|
69 |
|
70 |
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
71 |
return;
|
72 |
}
|
73 |
|
74 |
-
$
|
75 |
-
$this->object = $current_user;
|
76 |
$this->find['username'] = '{user_name}';
|
77 |
$this->find['amount'] = '{amount}';
|
78 |
$this->find['method'] = '{method}';
|
@@ -186,7 +184,3 @@ class Dokan_Vendor_Withdraw_Request extends WC_Email {
|
|
186 |
);
|
187 |
}
|
188 |
}
|
189 |
-
|
190 |
-
endif;
|
191 |
-
|
192 |
-
return new Dokan_Vendor_Withdraw_Request();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
|
|
|
|
4 |
|
5 |
+
use WC_Email;
|
6 |
|
7 |
/**
|
8 |
* New Product Email.
|
14 |
* @author weDevs
|
15 |
* @extends WC_Email
|
16 |
*/
|
17 |
+
class VendorWithdrawRequest extends WC_Email {
|
18 |
|
19 |
/**
|
20 |
* Constructor.
|
63 |
* @param int $product_id The product ID.
|
64 |
* @param array $postdata.
|
65 |
*/
|
66 |
+
public function trigger( $user_id, $amount, $method ) {
|
67 |
+
$seller = get_user_by( 'id', $user_id );
|
68 |
|
69 |
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
+
$this->object = $seller;
|
|
|
74 |
$this->find['username'] = '{user_name}';
|
75 |
$this->find['amount'] = '{amount}';
|
76 |
$this->find['method'] = '{method}';
|
184 |
);
|
185 |
}
|
186 |
}
|
|
|
|
|
|
|
|
includes/{emails/class-dokan-withdraw-approved.php → Emails/WithdrawApproved.php}
RENAMED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
exit;
|
5 |
-
}
|
6 |
|
7 |
-
|
8 |
|
9 |
/**
|
10 |
* New Product Email.
|
@@ -16,7 +14,7 @@ if ( ! class_exists( 'Dokan_Email_Withdraw_Approved' ) ) :
|
|
16 |
* @author weDevs
|
17 |
* @extends WC_Email
|
18 |
*/
|
19 |
-
class
|
20 |
|
21 |
/**
|
22 |
* Constructor.
|
@@ -30,7 +28,7 @@ class Dokan_Email_Withdraw_Approved extends WC_Email {
|
|
30 |
$this->template_base = DOKAN_DIR.'/templates/';
|
31 |
|
32 |
// Triggers for this email
|
33 |
-
add_action( 'dokan_withdraw_request_approved', array( $this, 'trigger' ), 30
|
34 |
|
35 |
// Call parent constructor
|
36 |
parent::__construct();
|
@@ -62,15 +60,14 @@ class Dokan_Email_Withdraw_Approved extends WC_Email {
|
|
62 |
/**
|
63 |
* Trigger the sending of this email.
|
64 |
*
|
65 |
-
* @param
|
66 |
-
* @param array $postdata.
|
67 |
*/
|
68 |
-
public function trigger( $
|
69 |
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
-
$seller = get_user_by( 'id', $
|
74 |
$this->object = $seller;
|
75 |
$this->find['username'] = '{user_name}';
|
76 |
$this->find['amount'] = '{amount}';
|
@@ -81,8 +78,8 @@ class Dokan_Email_Withdraw_Approved extends WC_Email {
|
|
81 |
$this->find['site_url'] = '{site_url}';
|
82 |
|
83 |
$this->replace['username'] = $seller->user_login;
|
84 |
-
$this->replace['amount'] = wc_price( $withdraw->
|
85 |
-
$this->replace['method'] = dokan_withdraw_get_method_title( $withdraw->
|
86 |
$this->replace['profile_url'] = admin_url( 'user-edit.php?user_id=' . $seller->ID );
|
87 |
$this->replace['withdraw_page'] = admin_url( 'admin.php?page=dokan-withdraw' );
|
88 |
$this->replace['site_name'] = $this->get_from_name();
|
@@ -175,7 +172,3 @@ class Dokan_Email_Withdraw_Approved extends WC_Email {
|
|
175 |
);
|
176 |
}
|
177 |
}
|
178 |
-
|
179 |
-
endif;
|
180 |
-
|
181 |
-
return new Dokan_Email_Withdraw_Approved();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
|
|
|
|
4 |
|
5 |
+
use WC_Email;
|
6 |
|
7 |
/**
|
8 |
* New Product Email.
|
14 |
* @author weDevs
|
15 |
* @extends WC_Email
|
16 |
*/
|
17 |
+
class WithdrawApproved extends WC_Email {
|
18 |
|
19 |
/**
|
20 |
* Constructor.
|
28 |
$this->template_base = DOKAN_DIR.'/templates/';
|
29 |
|
30 |
// Triggers for this email
|
31 |
+
add_action( 'dokan_withdraw_request_approved', array( $this, 'trigger' ), 30 );
|
32 |
|
33 |
// Call parent constructor
|
34 |
parent::__construct();
|
60 |
/**
|
61 |
* Trigger the sending of this email.
|
62 |
*
|
63 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw.
|
|
|
64 |
*/
|
65 |
+
public function trigger( $withdraw ) {
|
66 |
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
+
$seller = get_user_by( 'id', $withdraw->get_user_id() );
|
71 |
$this->object = $seller;
|
72 |
$this->find['username'] = '{user_name}';
|
73 |
$this->find['amount'] = '{amount}';
|
78 |
$this->find['site_url'] = '{site_url}';
|
79 |
|
80 |
$this->replace['username'] = $seller->user_login;
|
81 |
+
$this->replace['amount'] = wc_price( $withdraw->get_amount() );
|
82 |
+
$this->replace['method'] = dokan_withdraw_get_method_title( $withdraw->get_method() );
|
83 |
$this->replace['profile_url'] = admin_url( 'user-edit.php?user_id=' . $seller->ID );
|
84 |
$this->replace['withdraw_page'] = admin_url( 'admin.php?page=dokan-withdraw' );
|
85 |
$this->replace['site_name'] = $this->get_from_name();
|
172 |
);
|
173 |
}
|
174 |
}
|
|
|
|
|
|
|
|
includes/Emails/WithdrawCancelled.php
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Emails;
|
4 |
+
|
5 |
+
use WC_Email;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Withdraw Request Cancelled
|
9 |
+
*
|
10 |
+
* An email sent to the vendor when a withdrawal request is cancelled by admin.
|
11 |
+
*
|
12 |
+
* @class Dokan_Email_Withdraw_Cancelled
|
13 |
+
* @version 2.6.8
|
14 |
+
* @author weDevs
|
15 |
+
* @extends WC_Email
|
16 |
+
*/
|
17 |
+
class WithdrawCancelled extends WC_Email {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructor.
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
$this->id = 'dokan_vendor_withdraw_cancelled';
|
24 |
+
$this->title = __( 'Dokan Withdraw cancelled', 'dokan-lite' );
|
25 |
+
$this->description = __( 'These emails are sent to vendor when a vendor withdraw request is cancelled', 'dokan-lite' );
|
26 |
+
$this->template_html = 'emails/withdraw-cancel.php';
|
27 |
+
$this->template_plain = 'emails/plain/withdraw-cancel.php';
|
28 |
+
$this->template_base = DOKAN_DIR.'/templates/';
|
29 |
+
|
30 |
+
// Triggers for this email
|
31 |
+
add_action( 'dokan_withdraw_request_cancelled', array( $this, 'trigger' ), 30, 2 );
|
32 |
+
|
33 |
+
// Call parent constructor
|
34 |
+
parent::__construct();
|
35 |
+
|
36 |
+
// Other settings
|
37 |
+
$this->recipient = 'vendor@ofthe.product';
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get email subject.
|
42 |
+
*
|
43 |
+
* @since 3.1.0
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function get_default_subject() {
|
47 |
+
return __( '[{site_name}] Your withdrawal request was cancelled', 'dokan-lite' );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get email heading.
|
52 |
+
*
|
53 |
+
* @since 3.1.0
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function get_default_heading() {
|
57 |
+
return __( 'Withdrawal request for {amount} is cancelled', 'dokan-lite' );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Trigger the sending of this email.
|
62 |
+
*
|
63 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw.
|
64 |
+
*/
|
65 |
+
public function trigger( $withdraw ) {
|
66 |
+
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
$seller = get_user_by( 'id', $withdraw->get_user_id() );
|
71 |
+
$this->object = $seller;
|
72 |
+
$this->find['username'] = '{user_name}';
|
73 |
+
$this->find['amount'] = '{amount}';
|
74 |
+
$this->find['method'] = '{method}';
|
75 |
+
$this->find['profile_url'] = '{profile_url}';
|
76 |
+
$this->find['withdraw_page'] = '{withdraw_page}';
|
77 |
+
$this->find['site_name'] = '{site_name}';
|
78 |
+
$this->find['site_url'] = '{site_url}';
|
79 |
+
$this->find['note'] = '{note}';
|
80 |
+
|
81 |
+
$this->replace['username'] = $seller->user_login;
|
82 |
+
$this->replace['amount'] = wc_price( $withdraw->get_amount() );
|
83 |
+
$this->replace['method'] = dokan_withdraw_get_method_title( $withdraw->get_method() );
|
84 |
+
$this->replace['profile_url'] = admin_url( 'user-edit.php?user_id=' . $seller->ID );
|
85 |
+
$this->replace['withdraw_page'] = admin_url( 'admin.php?page=dokan-withdraw' );
|
86 |
+
$this->replace['site_name'] = $this->get_from_name();
|
87 |
+
$this->replace['site_url'] = site_url();
|
88 |
+
$this->replace['note'] = $withdraw->get_note();
|
89 |
+
|
90 |
+
$this->setup_locale();
|
91 |
+
$this->send( $seller->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
92 |
+
$this->restore_locale();
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Get content html.
|
98 |
+
*
|
99 |
+
* @access public
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
public function get_content_html() {
|
103 |
+
ob_start();
|
104 |
+
wc_get_template( $this->template_html, array(
|
105 |
+
'seller' => $this->object,
|
106 |
+
'email_heading' => $this->get_heading(),
|
107 |
+
'sent_to_admin' => true,
|
108 |
+
'plain_text' => false,
|
109 |
+
'email' => $this,
|
110 |
+
'data' => $this->replace
|
111 |
+
), 'dokan/', $this->template_base );
|
112 |
+
return ob_get_clean();
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get content plain.
|
117 |
+
*
|
118 |
+
* @access public
|
119 |
+
* @return string
|
120 |
+
*/
|
121 |
+
public function get_content_plain() {
|
122 |
+
ob_start();
|
123 |
+
wc_get_template( $this->template_html, array(
|
124 |
+
'seller' => $this->object,
|
125 |
+
'email_heading' => $this->get_heading(),
|
126 |
+
'sent_to_admin' => true,
|
127 |
+
'plain_text' => true,
|
128 |
+
'email' => $this,
|
129 |
+
'data' => $this->replace
|
130 |
+
), 'dokan/', $this->template_base );
|
131 |
+
return ob_get_clean();
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Initialise settings form fields.
|
136 |
+
*/
|
137 |
+
public function init_form_fields() {
|
138 |
+
$this->form_fields = array(
|
139 |
+
'enabled' => array(
|
140 |
+
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
141 |
+
'type' => 'checkbox',
|
142 |
+
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
143 |
+
'default' => 'yes',
|
144 |
+
),
|
145 |
+
'subject' => array(
|
146 |
+
'title' => __( 'Subject', 'dokan-lite' ),
|
147 |
+
'type' => 'text',
|
148 |
+
'desc_tip' => true,
|
149 |
+
/* translators: %s: list of placeholders */
|
150 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name},{amount},{user_name}</code>' ),
|
151 |
+
'placeholder' => $this->get_default_subject(),
|
152 |
+
'default' => '',
|
153 |
+
),
|
154 |
+
'heading' => array(
|
155 |
+
'title' => __( 'Email heading', 'dokan-lite' ),
|
156 |
+
'type' => 'text',
|
157 |
+
'desc_tip' => true,
|
158 |
+
/* translators: %s: list of placeholders */
|
159 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name},{amount},{user_name}</code>' ),
|
160 |
+
'placeholder' => $this->get_default_heading(),
|
161 |
+
'default' => '',
|
162 |
+
),
|
163 |
+
'email_type' => array(
|
164 |
+
'title' => __( 'Email type', 'dokan-lite' ),
|
165 |
+
'type' => 'select',
|
166 |
+
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
167 |
+
'default' => 'html',
|
168 |
+
'class' => 'email_type wc-enhanced-select',
|
169 |
+
'options' => $this->get_email_type_options(),
|
170 |
+
'desc_tip' => true,
|
171 |
+
),
|
172 |
+
);
|
173 |
+
}
|
174 |
+
}
|
includes/{exceptions/class-dokan-exception.php → Exceptions/DokanException.php}
RENAMED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Error code
|
@@ -15,12 +19,15 @@ class Dokan_Exception extends Exception {
|
|
15 |
* Class constructor
|
16 |
*
|
17 |
* @since 2.9.16
|
|
|
|
|
|
|
18 |
*
|
19 |
-
* @param string $error_code
|
20 |
-
* @param string
|
21 |
-
* @param int
|
22 |
*/
|
23 |
-
public function __construct( $error_code, $message, $status_code = 422 ) {
|
24 |
$this->error_code = $error_code;
|
25 |
|
26 |
parent::__construct( $message, $status_code );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Exceptions;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
|
7 |
+
class DokanException extends Exception {
|
8 |
|
9 |
/**
|
10 |
* Error code
|
19 |
* Class constructor
|
20 |
*
|
21 |
* @since 2.9.16
|
22 |
+
* @since DOKAN_LITE_SINCE $error_code can be instance of WP_Error which is
|
23 |
+
* useful for multiple error codes and messages in
|
24 |
+
* a single WP_Error instance.
|
25 |
*
|
26 |
+
* @param string|\WP_Error $error_code Error code string or WP_Error
|
27 |
+
* @param string $message
|
28 |
+
* @param int $status_code
|
29 |
*/
|
30 |
+
public function __construct( $error_code, $message = '', $status_code = 422 ) {
|
31 |
$this->error_code = $error_code;
|
32 |
|
33 |
parent::__construct( $message, $status_code );
|
classes/installer.php → includes/Install/Installer.php
RENAMED
@@ -1,14 +1,18 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan installer class
|
5 |
*
|
6 |
* @author weDevs
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
function do_install() {
|
11 |
-
|
12 |
// installs
|
13 |
$this->user_roles();
|
14 |
$this->setup_pages();
|
@@ -17,11 +21,9 @@ class Dokan_Installer {
|
|
17 |
$this->product_design();
|
18 |
|
19 |
// does it needs any update?
|
20 |
-
if ( dokan()->has_woocommerce() ) {
|
21 |
dokan()->include_backgorund_processing_files();
|
22 |
-
|
23 |
-
$updater = new Dokan_Upgrade();
|
24 |
-
$updater->perform_updates();
|
25 |
}
|
26 |
|
27 |
if ( ! dokan()->has_woocommerce() ) {
|
@@ -29,9 +31,8 @@ class Dokan_Installer {
|
|
29 |
set_transient( 'dokan_theme_version_for_updater', get_option( 'dokan_theme_version', false ) );
|
30 |
}
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
|
36 |
flush_rewrite_rules();
|
37 |
|
@@ -45,38 +46,6 @@ class Dokan_Installer {
|
|
45 |
}
|
46 |
}
|
47 |
|
48 |
-
/**
|
49 |
-
* Perform all the upgrade routines
|
50 |
-
*
|
51 |
-
* @return void
|
52 |
-
*/
|
53 |
-
function do_upgrades() {
|
54 |
-
$installed_version = get_option( 'dokan_theme_version' );
|
55 |
-
|
56 |
-
// may be it's the first install
|
57 |
-
if ( ! $installed_version ) {
|
58 |
-
return false;
|
59 |
-
}
|
60 |
-
|
61 |
-
$dokan_updates = array(
|
62 |
-
'1.2' => 'dokan-upgrade-1.2.php',
|
63 |
-
'2.1' => 'dokan-upgrade-2.1.php',
|
64 |
-
'2.3' => 'dokan-upgrade-2.3.php',
|
65 |
-
'2.4.11' => 'dokan-upgrade-2.4.11.php',
|
66 |
-
'2.4.12' => 'dokan-upgrade-2.4.12.php',
|
67 |
-
);
|
68 |
-
|
69 |
-
foreach ( $dokan_updates as $version => $path ) {
|
70 |
-
if ( version_compare( $installed_version, $version, '<' ) ) {
|
71 |
-
require_once DOKAN_INC_DIR . '/upgrades/' . $path;
|
72 |
-
update_option( 'dokan_theme_version', $version );
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
// finally update to the latest version
|
77 |
-
update_option( 'dokan_theme_version', DOKAN_PLUGIN_VERSION );
|
78 |
-
}
|
79 |
-
|
80 |
/**
|
81 |
* Update WooCommerce mayaccount registration settings
|
82 |
*
|
@@ -118,7 +87,7 @@ class Dokan_Installer {
|
|
118 |
global $wp_roles;
|
119 |
|
120 |
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
121 |
-
$wp_roles = new WP_Roles();
|
122 |
}
|
123 |
|
124 |
add_role( 'seller', __( 'Vendor', 'dokan-lite' ), array(
|
@@ -226,10 +195,10 @@ class Dokan_Installer {
|
|
226 |
) );
|
227 |
}
|
228 |
}
|
229 |
-
}
|
230 |
-
}
|
231 |
-
}
|
232 |
-
}
|
233 |
|
234 |
update_option( 'dokan_pages', $dokan_page_settings );
|
235 |
update_option( 'dokan_pages_created', true );
|
@@ -467,5 +436,4 @@ class Dokan_Installer {
|
|
467 |
|
468 |
return wp_kses_post( $upgrade_notice );
|
469 |
}
|
470 |
-
|
471 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Install;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Install\Upgrade;
|
6 |
+
use WeDevs\Dokan\Rewrites;
|
7 |
+
|
8 |
/**
|
9 |
* Dokan installer class
|
10 |
*
|
11 |
* @author weDevs
|
12 |
*/
|
13 |
+
class Installer {
|
14 |
|
15 |
function do_install() {
|
|
|
16 |
// installs
|
17 |
$this->user_roles();
|
18 |
$this->setup_pages();
|
21 |
$this->product_design();
|
22 |
|
23 |
// does it needs any update?
|
24 |
+
if ( dokan()->has_woocommerce() && dokan()->upgrades->is_upgrade_required() ) {
|
25 |
dokan()->include_backgorund_processing_files();
|
26 |
+
dokan()->upgrades->do_upgrade();
|
|
|
|
|
27 |
}
|
28 |
|
29 |
if ( ! dokan()->has_woocommerce() ) {
|
31 |
set_transient( 'dokan_theme_version_for_updater', get_option( 'dokan_theme_version', false ) );
|
32 |
}
|
33 |
|
34 |
+
$rewrites = new Rewrites();
|
35 |
+
$rewrites->register_rule();
|
|
|
36 |
|
37 |
flush_rewrite_rules();
|
38 |
|
46 |
}
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* Update WooCommerce mayaccount registration settings
|
51 |
*
|
87 |
global $wp_roles;
|
88 |
|
89 |
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
90 |
+
$wp_roles = new \WP_Roles();
|
91 |
}
|
92 |
|
93 |
add_role( 'seller', __( 'Vendor', 'dokan-lite' ), array(
|
195 |
) );
|
196 |
}
|
197 |
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
|
203 |
update_option( 'dokan_pages', $dokan_page_settings );
|
204 |
update_option( 'dokan_pages_created', true );
|
436 |
|
437 |
return wp_kses_post( $upgrade_notice );
|
438 |
}
|
|
|
439 |
}
|
includes/Order/Hooks.php
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace WeDevs\Dokan\Order;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Admin Hooks
|
6 |
+
*
|
7 |
+
* @package dokan
|
8 |
+
*
|
9 |
+
* @since DOKAN_LITE_SINCE
|
10 |
+
*/
|
11 |
+
class Hooks {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Load autometically when class initiate
|
15 |
+
*
|
16 |
+
* @since DOKAN_LITE_SINCE
|
17 |
+
*/
|
18 |
+
public function __construct() {
|
19 |
+
// on order status change
|
20 |
+
add_action( 'woocommerce_order_status_changed', array( $this, 'on_order_status_change' ), 10, 4 );
|
21 |
+
add_action( 'woocommerce_order_status_changed', array( $this, 'on_sub_order_change' ), 99, 3 );
|
22 |
+
|
23 |
+
// create sub-orders
|
24 |
+
add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'split_vendor_orders' ) );
|
25 |
+
|
26 |
+
// order table synced for WooCommerce update order meta
|
27 |
+
add_action( 'woocommerce_checkout_update_order_meta', 'dokan_sync_insert_order', 20 );
|
28 |
+
|
29 |
+
// order table synced for dokan update order meta
|
30 |
+
add_action( 'dokan_checkout_update_order_meta', 'dokan_sync_insert_order' );
|
31 |
+
|
32 |
+
// prevent non-vendor coupons from being added
|
33 |
+
add_filter( 'woocommerce_coupon_is_valid', array( $this, 'ensure_vendor_coupon' ), 10, 2 );
|
34 |
+
|
35 |
+
if ( is_admin() ) {
|
36 |
+
add_action( 'woocommerce_process_shop_order_meta', 'dokan_sync_insert_order' );
|
37 |
+
}
|
38 |
+
|
39 |
+
// restore order stock if it's been reduced by twice
|
40 |
+
add_action( 'woocommerce_reduce_order_stock', array( $this, 'restore_reduced_order_stock' ) );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Update the child order status when a parent order status is changed
|
45 |
+
*
|
46 |
+
* @global object $wpdb
|
47 |
+
*
|
48 |
+
* @param integer $order_id
|
49 |
+
* @param string $old_status
|
50 |
+
* @param string $new_status
|
51 |
+
*
|
52 |
+
* @return void
|
53 |
+
*/
|
54 |
+
public function on_order_status_change( $order_id, $old_status, $new_status, $order ) {
|
55 |
+
global $wpdb;
|
56 |
+
|
57 |
+
// Split order if the order doesn't have parent and sub orders,
|
58 |
+
// and the order is created from dashboard.
|
59 |
+
if ( empty( $order->post_parent ) && empty( $order->get_meta( 'has_sub_order' ) ) && is_admin() ) {
|
60 |
+
// Remove the hook to prevent recursive callas.
|
61 |
+
remove_action( 'woocommerce_order_status_changed', array( $this, 'on_order_status_change' ), 10 );
|
62 |
+
|
63 |
+
// Split the order.
|
64 |
+
dokan()->order->maybe_split_orders( $order_id );
|
65 |
+
|
66 |
+
// Add the hook back.
|
67 |
+
add_action( 'woocommerce_order_status_changed', array( $this, 'on_order_status_change' ), 10, 4 );
|
68 |
+
}
|
69 |
+
|
70 |
+
// make sure order status contains "wc-" prefix
|
71 |
+
if ( stripos( $new_status, 'wc-' ) === false ) {
|
72 |
+
$new_status = 'wc-' . $new_status;
|
73 |
+
}
|
74 |
+
|
75 |
+
// insert on dokan sync table
|
76 |
+
$wpdb->update( $wpdb->prefix . 'dokan_orders',
|
77 |
+
array( 'order_status' => $new_status ),
|
78 |
+
array( 'order_id' => $order_id ),
|
79 |
+
array( '%s' ),
|
80 |
+
array( '%d' )
|
81 |
+
);
|
82 |
+
|
83 |
+
// if any child orders found, change the orders as well
|
84 |
+
$sub_orders = get_children( array( 'post_parent' => $order_id, 'post_type' => 'shop_order' ) );
|
85 |
+
|
86 |
+
if ( $sub_orders ) {
|
87 |
+
foreach ( $sub_orders as $order_post ) {
|
88 |
+
$order = dokan()->order->get( $order_post->ID );
|
89 |
+
$order->update_status( $new_status );
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
// update on vendor-balance table
|
94 |
+
$wpdb->update( $wpdb->prefix . 'dokan_vendor_balance',
|
95 |
+
array( 'status' => $new_status ),
|
96 |
+
array( 'trn_id' => $order_id, 'trn_type' => 'dokan_orders' ),
|
97 |
+
array( '%s' ),
|
98 |
+
array( '%d', '%s' )
|
99 |
+
);
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Mark the parent order as complete when all the child order are completed
|
104 |
+
*
|
105 |
+
* @param integer $order_id
|
106 |
+
* @param string $old_status
|
107 |
+
* @param string $new_status
|
108 |
+
*
|
109 |
+
* @return void
|
110 |
+
*/
|
111 |
+
public function on_sub_order_change( $order_id, $old_status, $new_status ) {
|
112 |
+
$order_post = get_post( $order_id );
|
113 |
+
|
114 |
+
// we are monitoring only child orders
|
115 |
+
if ( $order_post->post_parent === 0 ) {
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
|
119 |
+
// get all the child orders and monitor the status
|
120 |
+
$parent_order_id = $order_post->post_parent;
|
121 |
+
$sub_orders = get_children( array( 'post_parent' => $parent_order_id, 'post_type' => 'shop_order' ) );
|
122 |
+
|
123 |
+
// return if any child order is not completed
|
124 |
+
$all_complete = true;
|
125 |
+
|
126 |
+
if ( $sub_orders ) {
|
127 |
+
foreach ($sub_orders as $sub) {
|
128 |
+
$order = dokan()->order->get( $sub->ID );
|
129 |
+
|
130 |
+
if ( $order->get_status() != 'completed' ) {
|
131 |
+
$all_complete = false;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
// seems like all the child orders are completed
|
137 |
+
// mark the parent order as complete
|
138 |
+
if ( $all_complete ) {
|
139 |
+
$parent_order = dokan()->order->get( $parent_order_id );
|
140 |
+
$parent_order->update_status( 'wc-completed', __( 'Mark parent order completed when all child orders are completed.', 'dokan-lite' ) );
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Split order for vendor
|
146 |
+
*
|
147 |
+
* @since DOKAN_LITE_SINCE
|
148 |
+
*
|
149 |
+
* @return void
|
150 |
+
*/
|
151 |
+
public function split_vendor_orders( $parent_order_id ) {
|
152 |
+
dokan()->order->maybe_split_orders( $parent_order_id );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Ensure vendor coupon
|
157 |
+
*
|
158 |
+
* For consistancy, restrict coupons in cart if only
|
159 |
+
* products from that vendor exists in the cart. Also, a coupon
|
160 |
+
* should be restricted with a product.
|
161 |
+
*
|
162 |
+
* For example: When entering a coupon created by admin is applied, make
|
163 |
+
* sure a product of the admin is in the cart. Otherwise it wouldn't be
|
164 |
+
* possible to distribute the coupon in sub orders.
|
165 |
+
*
|
166 |
+
* @param boolean $valid
|
167 |
+
* @param \WC_Coupon $coupon
|
168 |
+
*
|
169 |
+
* @return boolean|Execption
|
170 |
+
*/
|
171 |
+
public function ensure_vendor_coupon( $valid, $coupon ) {
|
172 |
+
$coupon_id = $coupon->get_id();
|
173 |
+
$vendor_id = get_post_field( 'post_author', $coupon_id );
|
174 |
+
$available_vendors = array();
|
175 |
+
|
176 |
+
if ( ! apply_filters( 'dokan_ensure_vendor_coupon', true ) ) {
|
177 |
+
return $valid;
|
178 |
+
}
|
179 |
+
|
180 |
+
// a coupon must be bound with a product
|
181 |
+
if ( count( $coupon->get_product_ids() ) == 0 ) {
|
182 |
+
throw new Exception( __( 'A coupon must be restricted with a vendor product.', 'dokan-lite' ) );
|
183 |
+
}
|
184 |
+
|
185 |
+
foreach ( WC()->cart->get_cart() as $item ) {
|
186 |
+
$product_id = $item['data']->get_id();
|
187 |
+
|
188 |
+
$available_vendors[] = get_post_field( 'post_author', $product_id );
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( ! in_array( $vendor_id, $available_vendors ) ) {
|
192 |
+
return false;
|
193 |
+
}
|
194 |
+
|
195 |
+
return $valid;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Restore order stock if it's been reduced by twice
|
200 |
+
*
|
201 |
+
* @param object $order
|
202 |
+
*
|
203 |
+
* @return void
|
204 |
+
*/
|
205 |
+
public function restore_reduced_order_stock( $order ) {
|
206 |
+
// seems in rest request, there is no such issue like (stock reduced by twice), so return early
|
207 |
+
if ( defined( 'REST_REQUEST' ) ) {
|
208 |
+
return;
|
209 |
+
}
|
210 |
+
|
211 |
+
$has_sub_order = wp_get_post_parent_id( $order->get_id() );
|
212 |
+
|
213 |
+
// seems it's not a parent order so return early
|
214 |
+
if ( ! $has_sub_order ) {
|
215 |
+
return;
|
216 |
+
}
|
217 |
+
|
218 |
+
// Loop over all items.
|
219 |
+
foreach ( $order->get_items() as $item ) {
|
220 |
+
if ( ! $item->is_type( 'line_item' ) ) {
|
221 |
+
continue;
|
222 |
+
}
|
223 |
+
|
224 |
+
// Only reduce stock once for each item.
|
225 |
+
$product = $item->get_product();
|
226 |
+
$item_stock_reduced = $item->get_meta( '_reduced_stock', true );
|
227 |
+
|
228 |
+
if ( ! $item_stock_reduced || ! $product || ! $product->managing_stock() ) {
|
229 |
+
continue;
|
230 |
+
}
|
231 |
+
|
232 |
+
$item_name = $product->get_formatted_name();
|
233 |
+
$new_stock = wc_update_product_stock( $product, $item_stock_reduced, 'increase' );
|
234 |
+
|
235 |
+
if ( is_wp_error( $new_stock ) ) {
|
236 |
+
/* translators: %s item name. */
|
237 |
+
$order->add_order_note( sprintf( __( 'Unable to restore stock for item %s.', 'dokan-lite' ), $item_name ) );
|
238 |
+
continue;
|
239 |
+
}
|
240 |
+
|
241 |
+
$item->delete_meta_data( '_reduced_stock' );
|
242 |
+
$item->save();
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
includes/{class-order-manager.php → Order/Manager.php}
RENAMED
@@ -1,199 +1,82 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Order Management API
|
5 |
*
|
6 |
* @since 2.8
|
7 |
*/
|
8 |
-
class
|
9 |
-
|
10 |
-
function __construct() {
|
11 |
-
|
12 |
-
// on order status change
|
13 |
-
add_action( 'woocommerce_order_status_changed', array( $this, 'on_order_status_change' ), 10, 4 );
|
14 |
-
add_action( 'woocommerce_order_status_changed', array( $this, 'on_sub_order_change' ), 99, 3 );
|
15 |
-
|
16 |
-
// create sub-orders
|
17 |
-
add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'maybe_split_orders' ) );
|
18 |
-
|
19 |
-
// prevent non-vendor coupons from being added
|
20 |
-
add_filter( 'woocommerce_coupon_is_valid', array( $this, 'ensure_vendor_coupon' ), 10, 2 );
|
21 |
-
|
22 |
-
if ( is_admin() ) {
|
23 |
-
add_action( 'woocommerce_process_shop_order_meta', 'dokan_sync_insert_order' );
|
24 |
-
}
|
25 |
-
|
26 |
-
// restore order stock if it's been reduced by twice
|
27 |
-
add_action( 'woocommerce_reduce_order_stock', array( $this, 'restore_reduced_order_stock' ) );
|
28 |
-
}
|
29 |
|
30 |
/**
|
31 |
-
*
|
32 |
-
*
|
33 |
-
* @global object $wpdb
|
34 |
*
|
35 |
-
* @
|
36 |
-
* @param string $old_status
|
37 |
-
* @param string $new_status
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
-
function
|
42 |
global $wpdb;
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
-
|
71 |
-
|
|
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
$order = wc_get_order( $order_post->ID );
|
76 |
-
$order->update_status( $new_status );
|
77 |
-
}
|
78 |
}
|
79 |
|
80 |
-
|
81 |
-
$wpdb->update( $wpdb->prefix . 'dokan_vendor_balance',
|
82 |
-
array( 'status' => $new_status ),
|
83 |
-
array( 'trn_id' => $order_id, 'trn_type' => 'dokan_orders' ),
|
84 |
-
array( '%s' ),
|
85 |
-
array( '%d', '%s' )
|
86 |
-
);
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
*
|
91 |
*
|
92 |
-
* @
|
93 |
-
* @param string $old_status
|
94 |
-
* @param string $new_status
|
95 |
*
|
96 |
* @return void
|
97 |
*/
|
98 |
-
function
|
99 |
-
|
100 |
-
|
101 |
-
// we are monitoring only child orders
|
102 |
-
if ( $order_post->post_parent === 0 ) {
|
103 |
-
return;
|
104 |
-
}
|
105 |
-
|
106 |
-
// get all the child orders and monitor the status
|
107 |
-
$parent_order_id = $order_post->post_parent;
|
108 |
-
$sub_orders = get_children( array( 'post_parent' => $parent_order_id, 'post_type' => 'shop_order' ) );
|
109 |
-
|
110 |
-
// return if any child order is not completed
|
111 |
-
$all_complete = true;
|
112 |
-
|
113 |
-
if ( $sub_orders ) {
|
114 |
-
foreach ($sub_orders as $sub) {
|
115 |
-
$order = wc_get_order( $sub->ID );
|
116 |
-
|
117 |
-
if ( $order->get_status() != 'completed' ) {
|
118 |
-
$all_complete = false;
|
119 |
-
}
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
// seems like all the child orders are completed
|
124 |
-
// mark the parent order as complete
|
125 |
-
if ( $all_complete ) {
|
126 |
-
$parent_order = wc_get_order( $parent_order_id );
|
127 |
-
$parent_order->update_status( 'wc-completed', __( 'Mark parent order completed when all child orders are completed.', 'dokan-lite' ) );
|
128 |
-
}
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Monitors a new order and attempts to create sub-orders
|
133 |
-
*
|
134 |
-
* If an order contains products from multiple vendor, we can't show the order
|
135 |
-
* to each seller dashboard. That's why we need to divide the main order to
|
136 |
-
* some sub-orders based on the number of sellers.
|
137 |
-
*
|
138 |
-
* @param int $parent_order_id
|
139 |
-
*
|
140 |
-
* @return void
|
141 |
-
*/
|
142 |
-
function maybe_split_orders( $parent_order_id ) {
|
143 |
-
$parent_order = wc_get_order( $parent_order_id );
|
144 |
-
|
145 |
-
dokan_log( sprintf( 'New Order #%d created. Init sub order.', $parent_order_id ) );
|
146 |
-
|
147 |
-
if ( $parent_order->get_meta( 'has_sub_order' ) == true ) {
|
148 |
-
|
149 |
-
$args = array(
|
150 |
-
'post_parent' => $parent_order_id,
|
151 |
-
'post_type' => 'shop_order',
|
152 |
-
'numberposts' => -1,
|
153 |
-
'post_status' => 'any'
|
154 |
-
);
|
155 |
-
|
156 |
-
$child_orders = get_children( $args );
|
157 |
-
|
158 |
-
foreach ( $child_orders as $child ) {
|
159 |
-
wp_delete_post( $child->ID, true );
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
$vendors = dokan_get_sellers_by( $parent_order_id );
|
164 |
-
|
165 |
-
// return if we've only ONE seller
|
166 |
-
if ( count( $vendors ) == 1 ) {
|
167 |
-
dokan_log( '1 vendor only, skipping sub order.');
|
168 |
-
|
169 |
-
$temp = array_keys( $vendors );
|
170 |
-
$seller_id = reset( $temp );
|
171 |
-
|
172 |
-
do_action( 'dokan_create_parent_order', $parent_order, $seller_id );
|
173 |
-
|
174 |
-
$parent_order->update_meta_data( '_dokan_vendor_id', $seller_id );
|
175 |
-
$parent_order->save();
|
176 |
-
|
177 |
-
// if the request is made from rest api then insert the order data to the sync table
|
178 |
-
if ( defined( 'REST_REQUEST' ) ) {
|
179 |
-
do_action( 'dokan_checkout_update_order_meta', $parent_order_id, $seller_id );
|
180 |
-
}
|
181 |
-
|
182 |
-
return;
|
183 |
-
}
|
184 |
-
|
185 |
-
// flag it as it has a suborder
|
186 |
-
$parent_order->update_meta_data( 'has_sub_order', true );
|
187 |
-
$parent_order->save();
|
188 |
-
|
189 |
-
dokan_log( sprintf( 'Got %s vendors, starting sub order.', count( $vendors ) ) );
|
190 |
-
|
191 |
-
// seems like we've got multiple sellers
|
192 |
-
foreach ( $vendors as $seller_id => $seller_products ) {
|
193 |
-
$this->create_sub_order( $parent_order, $seller_id, $seller_products );
|
194 |
-
}
|
195 |
-
|
196 |
-
dokan_log( sprintf( 'Completed sub order for #%d.', $parent_order_id ) );
|
197 |
}
|
198 |
|
199 |
/**
|
@@ -205,8 +88,7 @@ class Dokan_Order_Manager {
|
|
205 |
*
|
206 |
* @return void
|
207 |
*/
|
208 |
-
function create_sub_order( $parent_order, $seller_id, $seller_products ) {
|
209 |
-
|
210 |
dokan_log( 'Creating sub order for vendor: #' . $seller_id );
|
211 |
|
212 |
$bill_ship = array(
|
@@ -218,7 +100,7 @@ class Dokan_Order_Manager {
|
|
218 |
);
|
219 |
|
220 |
try {
|
221 |
-
$order = new WC_Order();
|
222 |
|
223 |
// save billing and shipping address
|
224 |
foreach ( $bill_ship as $key ) {
|
@@ -273,17 +155,17 @@ class Dokan_Order_Manager {
|
|
273 |
}
|
274 |
|
275 |
/**
|
276 |
-
* Create
|
277 |
*
|
278 |
-
* @param
|
279 |
-
* @param
|
280 |
*
|
281 |
* @return void
|
282 |
*/
|
283 |
public function create_line_items( $order, $products ) {
|
284 |
|
285 |
foreach ( $products as $item ) {
|
286 |
-
$product_item = new WC_Order_Item_Product();
|
287 |
|
288 |
$product_item->set_name( $item->get_name() );
|
289 |
$product_item->set_product_id( $item->get_product_id() );
|
@@ -331,12 +213,12 @@ class Dokan_Order_Manager {
|
|
331 |
foreach ( $parent_order->get_taxes() as $tax ) {
|
332 |
$seller_shipping = reset( $shipping );
|
333 |
|
334 |
-
$item = new WC_Order_Item_Tax();
|
335 |
$item->set_props( array(
|
336 |
'rate_id' => $tax->get_rate_id(),
|
337 |
'label' => $tax->get_label(),
|
338 |
'compound' => $tax->get_compound(),
|
339 |
-
'rate_code' => WC_Tax::get_rate_code( $tax->get_rate_id() ),
|
340 |
'tax_total' => $tax_total,
|
341 |
'shipping_tax_total' => is_bool( $seller_shipping ) ? '' : $seller_shipping->get_total_tax()
|
342 |
) );
|
@@ -355,7 +237,7 @@ class Dokan_Order_Manager {
|
|
355 |
*
|
356 |
* @return void
|
357 |
*/
|
358 |
-
function create_shipping( $order, $parent_order ) {
|
359 |
|
360 |
dokan_log( sprintf( '#%d - Creating Shipping.', $order->get_id() ) );
|
361 |
|
@@ -385,7 +267,7 @@ class Dokan_Order_Manager {
|
|
385 |
}
|
386 |
|
387 |
if ( is_a( $shipping_method, 'WC_Order_Item_Shipping' ) ) {
|
388 |
-
$item = new WC_Order_Item_Shipping();
|
389 |
|
390 |
dokan_log( sprintf( '#%d - Adding shipping item.', $order->get_id() ) );
|
391 |
|
@@ -419,9 +301,9 @@ class Dokan_Order_Manager {
|
|
419 |
*
|
420 |
* @return void
|
421 |
*/
|
422 |
-
function create_coupons( $order, $parent_order, $products ) {
|
423 |
$used_coupons = $parent_order->get_items( 'coupon' );
|
424 |
-
$product_ids = array_map(function($item) {
|
425 |
return $item->get_product_id();
|
426 |
}, $products );
|
427 |
|
@@ -430,11 +312,11 @@ class Dokan_Order_Manager {
|
|
430 |
}
|
431 |
|
432 |
foreach ( $used_coupons as $item ) {
|
433 |
-
$coupon = new WC_Coupon( $item->get_code() );
|
434 |
|
435 |
if ( $coupon && !is_wp_error( $coupon ) && array_intersect( $product_ids, $coupon->get_product_ids() ) ) {
|
436 |
|
437 |
-
$new_item = new WC_Order_Item_Coupon();
|
438 |
$new_item->set_props( array(
|
439 |
'code' => $item->get_code(),
|
440 |
'discount' => $item->get_discount(),
|
@@ -451,94 +333,70 @@ class Dokan_Order_Manager {
|
|
451 |
}
|
452 |
|
453 |
/**
|
454 |
-
*
|
455 |
-
*
|
456 |
-
* For consistancy, restrict coupons in cart if only
|
457 |
-
* products from that vendor exists in the cart. Also, a coupon
|
458 |
-
* should be restricted with a product.
|
459 |
*
|
460 |
-
*
|
461 |
-
*
|
462 |
-
*
|
463 |
*
|
464 |
-
* @param
|
465 |
-
* @param \WC_Coupon $coupon
|
466 |
*
|
467 |
-
* @return
|
468 |
*/
|
469 |
-
public function
|
470 |
-
$
|
471 |
-
$vendor_id = get_post_field( 'post_author', $coupon_id );
|
472 |
-
$available_vendors = array();
|
473 |
|
474 |
-
|
475 |
-
return $valid;
|
476 |
-
}
|
477 |
|
478 |
-
|
479 |
-
if ( count( $coupon->get_product_ids() ) == 0 ) {
|
480 |
-
throw new Exception( __( 'A coupon must be restricted with a vendor product.', 'dokan-lite' ) );
|
481 |
-
}
|
482 |
|
483 |
-
|
484 |
-
|
|
|
|
|
|
|
|
|
485 |
|
486 |
-
$
|
487 |
-
}
|
488 |
|
489 |
-
|
490 |
-
|
|
|
491 |
}
|
492 |
|
493 |
-
|
494 |
-
}
|
495 |
|
|
|
|
|
|
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
*
|
500 |
-
* @param object $order
|
501 |
-
*
|
502 |
-
* @return void
|
503 |
-
*/
|
504 |
-
public function restore_reduced_order_stock( $order ) {
|
505 |
-
// seems in rest request, there is no such issue like (stock reduced by twice), so return early
|
506 |
-
if ( defined( 'REST_REQUEST' ) ) {
|
507 |
-
return;
|
508 |
-
}
|
509 |
|
510 |
-
|
511 |
|
512 |
-
|
513 |
-
|
514 |
-
return;
|
515 |
-
}
|
516 |
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
continue;
|
521 |
}
|
522 |
|
523 |
-
|
524 |
-
|
525 |
-
$item_stock_reduced = $item->get_meta( '_reduced_stock', true );
|
526 |
-
|
527 |
-
if ( ! $item_stock_reduced || ! $product || ! $product->managing_stock() ) {
|
528 |
-
continue;
|
529 |
-
}
|
530 |
|
531 |
-
|
532 |
-
|
|
|
533 |
|
534 |
-
|
535 |
-
/* translators: %s item name. */
|
536 |
-
$order->add_order_note( sprintf( __( 'Unable to restore stock for item %s.', 'dokan-lite' ), $item_name ) );
|
537 |
-
continue;
|
538 |
-
}
|
539 |
|
540 |
-
|
541 |
-
|
|
|
542 |
}
|
|
|
|
|
543 |
}
|
544 |
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Order;
|
4 |
+
|
5 |
/**
|
6 |
* Order Management API
|
7 |
*
|
8 |
* @since 2.8
|
9 |
*/
|
10 |
+
class Manager {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
/**
|
13 |
+
* Get all orders
|
|
|
|
|
14 |
*
|
15 |
+
* @since DOKAN_LITE_SINCE
|
|
|
|
|
16 |
*
|
17 |
* @return void
|
18 |
*/
|
19 |
+
public function all( $args = [] ) {
|
20 |
global $wpdb;
|
21 |
|
22 |
+
$default = [
|
23 |
+
'seller_id' => dokan_get_current_user_id(),
|
24 |
+
'customer_id' => null,
|
25 |
+
'status' => 'all',
|
26 |
+
'paged' => 1,
|
27 |
+
'limit' => 10,
|
28 |
+
'date' => null
|
29 |
+
];
|
30 |
+
|
31 |
+
$args = wp_parse_args( $args, $default );
|
32 |
+
|
33 |
+
$offset = ( $args['paged'] - 1 ) * $args['limit'];
|
34 |
+
$cache_group = 'dokan_seller_data_'.$args['seller_id'];
|
35 |
+
$cache_key = 'dokan-seller-orders-' . $args['status'] . '-' . $args['seller_id'];
|
36 |
+
$orders = wp_cache_get( $cache_key, $cache_group );
|
37 |
+
|
38 |
+
$join = $args['customer_id'] ? "LEFT JOIN $wpdb->postmeta pm ON p.ID = pm.post_id" : '';
|
39 |
+
$where = $args['customer_id'] ? sprintf( "pm.meta_key = '_customer_user' AND pm.meta_value = %d AND", $args['customer_id'] ) : '';
|
40 |
+
|
41 |
+
if ( $orders === false ) {
|
42 |
+
$status_where = ( $args['status'] == 'all' ) ? '' : $wpdb->prepare( ' AND order_status = %s', $args['status'] );
|
43 |
+
$date_query = ( $args['date'] ) ? $wpdb->prepare( ' AND DATE( p.post_date ) = %s', $args['date'] ) : '';
|
44 |
+
|
45 |
+
$orders = $wpdb->get_results( $wpdb->prepare( "SELECT do.order_id, p.post_date
|
46 |
+
FROM {$wpdb->prefix}dokan_orders AS do
|
47 |
+
LEFT JOIN $wpdb->posts p ON do.order_id = p.ID
|
48 |
+
{$join}
|
49 |
+
WHERE
|
50 |
+
do.seller_id = %d AND
|
51 |
+
{$where}
|
52 |
+
p.post_status != 'trash'
|
53 |
+
{$date_query}
|
54 |
+
{$status_where}
|
55 |
+
GROUP BY do.order_id
|
56 |
+
ORDER BY p.post_date DESC
|
57 |
+
LIMIT %d, %d", $args['seller_id'], $offset, $args['limit']
|
58 |
+
) );
|
59 |
|
60 |
+
$orders = array_map( function( $order_data ) {
|
61 |
+
return $this->get( $order_data->order_id );
|
62 |
+
}, $orders );
|
63 |
|
64 |
+
wp_cache_set( $cache_key, $orders, $cache_group );
|
65 |
+
dokan_cache_update_group( $cache_key, $cache_group );
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
+
return $orders;
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
+
* Get single order details
|
73 |
*
|
74 |
+
* @since DOKAN_LITE_SINCE
|
|
|
|
|
75 |
*
|
76 |
* @return void
|
77 |
*/
|
78 |
+
public function get( $id ) {
|
79 |
+
return wc_get_order( $id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
/**
|
88 |
*
|
89 |
* @return void
|
90 |
*/
|
91 |
+
public function create_sub_order( $parent_order, $seller_id, $seller_products ) {
|
|
|
92 |
dokan_log( 'Creating sub order for vendor: #' . $seller_id );
|
93 |
|
94 |
$bill_ship = array(
|
100 |
);
|
101 |
|
102 |
try {
|
103 |
+
$order = new \WC_Order();
|
104 |
|
105 |
// save billing and shipping address
|
106 |
foreach ( $bill_ship as $key ) {
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
+
* Create line items for order
|
159 |
*
|
160 |
+
* @param object $order wc_get_order
|
161 |
+
* @param array $products
|
162 |
*
|
163 |
* @return void
|
164 |
*/
|
165 |
public function create_line_items( $order, $products ) {
|
166 |
|
167 |
foreach ( $products as $item ) {
|
168 |
+
$product_item = new \WC_Order_Item_Product();
|
169 |
|
170 |
$product_item->set_name( $item->get_name() );
|
171 |
$product_item->set_product_id( $item->get_product_id() );
|
213 |
foreach ( $parent_order->get_taxes() as $tax ) {
|
214 |
$seller_shipping = reset( $shipping );
|
215 |
|
216 |
+
$item = new \WC_Order_Item_Tax();
|
217 |
$item->set_props( array(
|
218 |
'rate_id' => $tax->get_rate_id(),
|
219 |
'label' => $tax->get_label(),
|
220 |
'compound' => $tax->get_compound(),
|
221 |
+
'rate_code' => \WC_Tax::get_rate_code( $tax->get_rate_id() ),
|
222 |
'tax_total' => $tax_total,
|
223 |
'shipping_tax_total' => is_bool( $seller_shipping ) ? '' : $seller_shipping->get_total_tax()
|
224 |
) );
|
237 |
*
|
238 |
* @return void
|
239 |
*/
|
240 |
+
public function create_shipping( $order, $parent_order ) {
|
241 |
|
242 |
dokan_log( sprintf( '#%d - Creating Shipping.', $order->get_id() ) );
|
243 |
|
267 |
}
|
268 |
|
269 |
if ( is_a( $shipping_method, 'WC_Order_Item_Shipping' ) ) {
|
270 |
+
$item = new \WC_Order_Item_Shipping();
|
271 |
|
272 |
dokan_log( sprintf( '#%d - Adding shipping item.', $order->get_id() ) );
|
273 |
|
301 |
*
|
302 |
* @return void
|
303 |
*/
|
304 |
+
public function create_coupons( $order, $parent_order, $products ) {
|
305 |
$used_coupons = $parent_order->get_items( 'coupon' );
|
306 |
+
$product_ids = array_map( function( $item ) {
|
307 |
return $item->get_product_id();
|
308 |
}, $products );
|
309 |
|
312 |
}
|
313 |
|
314 |
foreach ( $used_coupons as $item ) {
|
315 |
+
$coupon = new \WC_Coupon( $item->get_code() );
|
316 |
|
317 |
if ( $coupon && !is_wp_error( $coupon ) && array_intersect( $product_ids, $coupon->get_product_ids() ) ) {
|
318 |
|
319 |
+
$new_item = new \WC_Order_Item_Coupon();
|
320 |
$new_item->set_props( array(
|
321 |
'code' => $item->get_code(),
|
322 |
'discount' => $item->get_discount(),
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
+
* Monitors a new order and attempts to create sub-orders
|
|
|
|
|
|
|
|
|
337 |
*
|
338 |
+
* If an order contains products from multiple vendor, we can't show the order
|
339 |
+
* to each seller dashboard. That's why we need to divide the main order to
|
340 |
+
* some sub-orders based on the number of sellers.
|
341 |
*
|
342 |
+
* @param int $parent_order_id
|
|
|
343 |
*
|
344 |
+
* @return void
|
345 |
*/
|
346 |
+
public function maybe_split_orders( $parent_order_id ) {
|
347 |
+
$parent_order = dokan()->order->get( $parent_order_id );
|
|
|
|
|
348 |
|
349 |
+
dokan_log( sprintf( 'New Order #%d created. Init sub order.', $parent_order_id ) );
|
|
|
|
|
350 |
|
351 |
+
if ( $parent_order->get_meta( 'has_sub_order' ) == true ) {
|
|
|
|
|
|
|
352 |
|
353 |
+
$args = array(
|
354 |
+
'post_parent' => $parent_order_id,
|
355 |
+
'post_type' => 'shop_order',
|
356 |
+
'numberposts' => -1,
|
357 |
+
'post_status' => 'any'
|
358 |
+
);
|
359 |
|
360 |
+
$child_orders = get_children( $args );
|
|
|
361 |
|
362 |
+
foreach ( $child_orders as $child ) {
|
363 |
+
wp_delete_post( $child->ID, true );
|
364 |
+
}
|
365 |
}
|
366 |
|
367 |
+
$vendors = dokan_get_sellers_by( $parent_order_id );
|
|
|
368 |
|
369 |
+
// return if we've only ONE seller
|
370 |
+
if ( count( $vendors ) == 1 ) {
|
371 |
+
dokan_log( '1 vendor only, skipping sub order.');
|
372 |
|
373 |
+
$temp = array_keys( $vendors );
|
374 |
+
$seller_id = reset( $temp );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
|
376 |
+
do_action( 'dokan_create_parent_order', $parent_order, $seller_id );
|
377 |
|
378 |
+
$parent_order->update_meta_data( '_dokan_vendor_id', $seller_id );
|
379 |
+
$parent_order->save();
|
|
|
|
|
380 |
|
381 |
+
// if the request is made from rest api then insert the order data to the sync table
|
382 |
+
if ( defined( 'REST_REQUEST' ) ) {
|
383 |
+
do_action( 'dokan_checkout_update_order_meta', $parent_order_id, $seller_id );
|
|
|
384 |
}
|
385 |
|
386 |
+
return;
|
387 |
+
}
|
|
|
|
|
|
|
|
|
|
|
388 |
|
389 |
+
// flag it as it has a suborder
|
390 |
+
$parent_order->update_meta_data( 'has_sub_order', true );
|
391 |
+
$parent_order->save();
|
392 |
|
393 |
+
dokan_log( sprintf( 'Got %s vendors, starting sub order.', count( $vendors ) ) );
|
|
|
|
|
|
|
|
|
394 |
|
395 |
+
// seems like we've got multiple sellers
|
396 |
+
foreach ( $vendors as $seller_id => $seller_products ) {
|
397 |
+
dokan()->order->create_sub_order( $parent_order, $seller_id, $seller_products );
|
398 |
}
|
399 |
+
|
400 |
+
dokan_log( sprintf( 'Completed sub order for #%d.', $parent_order_id ) );
|
401 |
}
|
402 |
}
|
includes/{order-functions.php → Order/functions.php}
RENAMED
@@ -7,8 +7,7 @@
|
|
7 |
* @return float
|
8 |
*/
|
9 |
function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
|
10 |
-
|
11 |
-
$order = wc_get_order( $order_id );
|
12 |
$seller_id = dokan_get_seller_id_by_order( $order_id );
|
13 |
$net_amount = dokan_get_seller_earnings_by_order( $order, $seller_id );
|
14 |
$order_shipping = $order->get_total_shipping();
|
@@ -36,6 +35,7 @@ function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
|
|
36 |
|
37 |
return apply_filters( 'dokan_get_seller_amount_from_order', $net_amount, $order, $seller_id );
|
38 |
}
|
|
|
39 |
/**
|
40 |
* Get all the orders from a specific seller
|
41 |
*
|
@@ -271,7 +271,6 @@ function dokan_count_orders( $user_id ) {
|
|
271 |
return $counts;
|
272 |
}
|
273 |
|
274 |
-
|
275 |
/**
|
276 |
* Delete a order row from sync table when a order is deleted from WooCommerce
|
277 |
*
|
@@ -280,7 +279,6 @@ function dokan_count_orders( $user_id ) {
|
|
280 |
*/
|
281 |
function dokan_delete_sync_order( $order_id ) {
|
282 |
global $wpdb;
|
283 |
-
|
284 |
$wpdb->delete( $wpdb->prefix . 'dokan_orders', array( 'order_id' => $order_id ) );
|
285 |
}
|
286 |
|
@@ -294,7 +292,6 @@ function dokan_delete_sync_order( $order_id ) {
|
|
294 |
*/
|
295 |
function dokan_delete_sync_duplicate_order( $order_id, $seller_id ) {
|
296 |
global $wpdb;
|
297 |
-
|
298 |
$wpdb->delete( $wpdb->prefix . 'dokan_orders', array( 'order_id' => $order_id, 'seller_id' => $seller_id ) );
|
299 |
}
|
300 |
|
@@ -315,7 +312,7 @@ function dokan_sync_insert_order( $order_id ) {
|
|
315 |
return;
|
316 |
}
|
317 |
|
318 |
-
$order =
|
319 |
$seller_id = dokan_get_seller_id_by_order( $order_id );
|
320 |
$order_total = $order->get_total();
|
321 |
$order_status = dokan_get_prop( $order, 'status' );
|
@@ -375,10 +372,6 @@ function dokan_sync_insert_order( $order_id ) {
|
|
375 |
);
|
376 |
}
|
377 |
|
378 |
-
add_action( 'woocommerce_checkout_update_order_meta', 'dokan_sync_insert_order', 20 );
|
379 |
-
add_action( 'dokan_checkout_update_order_meta', 'dokan_sync_insert_order' );
|
380 |
-
|
381 |
-
|
382 |
/**
|
383 |
* Get a seller ID based on WooCommerce order.
|
384 |
*
|
@@ -406,13 +399,12 @@ function dokan_get_seller_id_by_order( $order_id ) {
|
|
406 |
|
407 |
if ( count( $seller ) === 1 ) {
|
408 |
$seller_id = absint( reset( $seller )->seller_id );
|
409 |
-
|
410 |
return apply_filters( 'dokan_get_seller_id_by_order', $seller_id, $items );
|
411 |
}
|
412 |
|
413 |
// if seller is not found, try to retrieve it via line items
|
414 |
if ( ! $seller ) {
|
415 |
-
$order =
|
416 |
|
417 |
if ( ! $order instanceof WC_Order ) {
|
418 |
return apply_filters( 'dokan_get_seller_id_by_order', $seller_id, $items );
|
@@ -577,7 +569,6 @@ function dokan_is_sub_order( $order_id ) {
|
|
577 |
return false;
|
578 |
}
|
579 |
|
580 |
-
|
581 |
/**
|
582 |
* Get toal number of orders in Dokan order table
|
583 |
*
|
@@ -605,7 +596,7 @@ function dokan_total_orders() {
|
|
605 |
*/
|
606 |
function dokan_get_sellers_by( $order ) {
|
607 |
if ( ! $order instanceof WC_Order ) {
|
608 |
-
$order =
|
609 |
}
|
610 |
|
611 |
$order_items = $order->get_items();
|
@@ -614,8 +605,9 @@ function dokan_get_sellers_by( $order ) {
|
|
614 |
|
615 |
foreach ( $order_items as $item ) {
|
616 |
$seller_id = get_post_field( 'post_author', $item['product_id'] );
|
|
|
617 |
//New filter hook to modify the seller id at run time.
|
618 |
-
|
619 |
$sellers[$seller_id][] = $item;
|
620 |
}
|
621 |
|
@@ -632,9 +624,7 @@ function dokan_get_sellers_by( $order ) {
|
|
632 |
* @return array $seller_ids
|
633 |
*/
|
634 |
function dokan_get_seller_ids_by( $order_id ) {
|
635 |
-
|
636 |
$sellers = dokan_get_sellers_by( $order_id );
|
637 |
-
|
638 |
return array_unique( array_keys( $sellers ) );
|
639 |
}
|
640 |
|
@@ -670,7 +660,7 @@ function dokan_get_suborder_ids_by( $parent_order_id ) {
|
|
670 |
*/
|
671 |
function dokan_get_admin_commission_by( $order, $context ) {
|
672 |
$context = 'seller' === $context ? $context : 'admin';
|
673 |
-
wc_deprecated_function( 'dokan_get_admin_commission_by', '2.9.21', '
|
674 |
|
675 |
return dokan()->commission->get_earning_by_order( $order, $context );
|
676 |
|
@@ -693,7 +683,6 @@ function dokan_get_admin_commission_by( $order, $context ) {
|
|
693 |
$tax_recipient = dokan_get_option( 'tax_fee_recipient', 'dokan_selling', 'seller' );
|
694 |
|
695 |
foreach ( $order->get_items() as $item_id => $item ) {
|
696 |
-
|
697 |
$refund_t += $order->get_total_refunded_for_item( $item_id );
|
698 |
$commissions[$i]['total_line'] = $item->get_total() - $order->get_total_refunded_for_item( $item_id );
|
699 |
$commissions[$i]['fee_type'] = dokan_get_commission_type( $seller_id, $item['product_id'] );
|
@@ -729,40 +718,36 @@ function dokan_get_admin_commission_by( $order, $context ) {
|
|
729 |
return apply_filters( 'dokan_order_admin_commission', $admin_commission, $order );
|
730 |
}
|
731 |
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
return null;
|
748 |
-
}
|
749 |
-
|
750 |
-
$args = [
|
751 |
-
'customer_id' => $customer_id,
|
752 |
-
'post_type' => 'shop_order',
|
753 |
-
'meta_key' => '_dokan_vendor_id',
|
754 |
-
'meta_value' => $seller_id,
|
755 |
-
'post_status' => array_keys( wc_get_order_statuses() ),
|
756 |
-
'return' => 'ids',
|
757 |
-
'numberposts' => -1,
|
758 |
-
];
|
759 |
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
|
762 |
-
|
763 |
-
}
|
764 |
|
765 |
-
|
|
|
766 |
|
767 |
/**
|
768 |
* Header rows for CSV order export
|
@@ -772,7 +757,7 @@ endif;
|
|
772 |
* @return array
|
773 |
*/
|
774 |
function dokan_order_csv_headers() {
|
775 |
-
|
776 |
'order_id' => __( 'Order No', 'dokan-lite' ),
|
777 |
'order_items' => __( 'Order Items', 'dokan-lite' ),
|
778 |
'order_shipping' => __( 'Shipping method', 'dokan-lite' ),
|
@@ -781,7 +766,6 @@ function dokan_order_csv_headers() {
|
|
781 |
'order_total' => __( 'Order Total', 'dokan-lite' ),
|
782 |
'order_status' => __( 'Order Status', 'dokan-lite' ),
|
783 |
'order_date' => __( 'Order Date', 'dokan-lite' ),
|
784 |
-
|
785 |
'billing_company' => __( 'Billing Company', 'dokan-lite' ),
|
786 |
'billing_first_name' => __( 'Billing First Name', 'dokan-lite' ),
|
787 |
'billing_last_name' => __( 'Billing Last Name', 'dokan-lite' ),
|
@@ -794,7 +778,6 @@ function dokan_order_csv_headers() {
|
|
794 |
'billing_state' => __( 'Billing State', 'dokan-lite' ),
|
795 |
'billing_postcode' => __( 'Billing Postcode', 'dokan-lite' ),
|
796 |
'billing_country' => __( 'Billing Country', 'dokan-lite' ),
|
797 |
-
|
798 |
'shipping_company' => __( 'Shipping Company', 'dokan-lite' ),
|
799 |
'shipping_first_name' => __( 'Shipping First Name', 'dokan-lite' ),
|
800 |
'shipping_last_name' => __( 'Shipping Last Name', 'dokan-lite' ),
|
@@ -805,12 +788,9 @@ function dokan_order_csv_headers() {
|
|
805 |
'shipping_state' => __( 'Shipping State', 'dokan-lite' ),
|
806 |
'shipping_postcode' => __( 'Shipping Postcode', 'dokan-lite' ),
|
807 |
'shipping_country' => __( 'Shipping Country', 'dokan-lite' ),
|
808 |
-
|
809 |
'customer_ip' => __( 'Customer IP', 'dokan-lite' ),
|
810 |
'customer_note' => __( 'Customer Note', 'dokan-lite' ),
|
811 |
-
);
|
812 |
-
|
813 |
-
return apply_filters( 'dokan_csv_export_headers', $headers );
|
814 |
}
|
815 |
|
816 |
/**
|
@@ -833,11 +813,10 @@ function dokan_order_csv_export( $orders, $file = null ) {
|
|
833 |
fputcsv( $output, $headers );
|
834 |
|
835 |
foreach ( $orders as $order ) {
|
836 |
-
$the_order = wc_get_order( $order->order_id );
|
837 |
$line = array();
|
|
|
838 |
|
839 |
foreach ( $headers as $row_key => $label ) {
|
840 |
-
|
841 |
switch ( $row_key ) {
|
842 |
case 'order_id':
|
843 |
$line[ $row_key ] = $the_order->get_id();
|
@@ -965,7 +944,6 @@ function dokan_order_csv_export( $orders, $file = null ) {
|
|
965 |
*/
|
966 |
function dokan_get_seller_id_by_order_id( $id ) {
|
967 |
wc_deprecated_function( 'dokan_get_seller_id_by_order_id', '2.9.10', 'dokan_get_seller_id_by_order' );
|
968 |
-
|
969 |
return dokan_get_seller_id_by_order( $id );
|
970 |
}
|
971 |
|
7 |
* @return float
|
8 |
*/
|
9 |
function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
|
10 |
+
$order = dokan()->order->get( $order_id );
|
|
|
11 |
$seller_id = dokan_get_seller_id_by_order( $order_id );
|
12 |
$net_amount = dokan_get_seller_earnings_by_order( $order, $seller_id );
|
13 |
$order_shipping = $order->get_total_shipping();
|
35 |
|
36 |
return apply_filters( 'dokan_get_seller_amount_from_order', $net_amount, $order, $seller_id );
|
37 |
}
|
38 |
+
|
39 |
/**
|
40 |
* Get all the orders from a specific seller
|
41 |
*
|
271 |
return $counts;
|
272 |
}
|
273 |
|
|
|
274 |
/**
|
275 |
* Delete a order row from sync table when a order is deleted from WooCommerce
|
276 |
*
|
279 |
*/
|
280 |
function dokan_delete_sync_order( $order_id ) {
|
281 |
global $wpdb;
|
|
|
282 |
$wpdb->delete( $wpdb->prefix . 'dokan_orders', array( 'order_id' => $order_id ) );
|
283 |
}
|
284 |
|
292 |
*/
|
293 |
function dokan_delete_sync_duplicate_order( $order_id, $seller_id ) {
|
294 |
global $wpdb;
|
|
|
295 |
$wpdb->delete( $wpdb->prefix . 'dokan_orders', array( 'order_id' => $order_id, 'seller_id' => $seller_id ) );
|
296 |
}
|
297 |
|
312 |
return;
|
313 |
}
|
314 |
|
315 |
+
$order = dokan()->order->get( $order_id );
|
316 |
$seller_id = dokan_get_seller_id_by_order( $order_id );
|
317 |
$order_total = $order->get_total();
|
318 |
$order_status = dokan_get_prop( $order, 'status' );
|
372 |
);
|
373 |
}
|
374 |
|
|
|
|
|
|
|
|
|
375 |
/**
|
376 |
* Get a seller ID based on WooCommerce order.
|
377 |
*
|
399 |
|
400 |
if ( count( $seller ) === 1 ) {
|
401 |
$seller_id = absint( reset( $seller )->seller_id );
|
|
|
402 |
return apply_filters( 'dokan_get_seller_id_by_order', $seller_id, $items );
|
403 |
}
|
404 |
|
405 |
// if seller is not found, try to retrieve it via line items
|
406 |
if ( ! $seller ) {
|
407 |
+
$order = dokan()->order->get( $order_id );
|
408 |
|
409 |
if ( ! $order instanceof WC_Order ) {
|
410 |
return apply_filters( 'dokan_get_seller_id_by_order', $seller_id, $items );
|
569 |
return false;
|
570 |
}
|
571 |
|
|
|
572 |
/**
|
573 |
* Get toal number of orders in Dokan order table
|
574 |
*
|
596 |
*/
|
597 |
function dokan_get_sellers_by( $order ) {
|
598 |
if ( ! $order instanceof WC_Order ) {
|
599 |
+
$order = dokan()->order->get( $order );
|
600 |
}
|
601 |
|
602 |
$order_items = $order->get_items();
|
605 |
|
606 |
foreach ( $order_items as $item ) {
|
607 |
$seller_id = get_post_field( 'post_author', $item['product_id'] );
|
608 |
+
|
609 |
//New filter hook to modify the seller id at run time.
|
610 |
+
$seller_id = apply_filters( 'dokan_get_sellers_by', $seller_id, $item );
|
611 |
$sellers[$seller_id][] = $item;
|
612 |
}
|
613 |
|
624 |
* @return array $seller_ids
|
625 |
*/
|
626 |
function dokan_get_seller_ids_by( $order_id ) {
|
|
|
627 |
$sellers = dokan_get_sellers_by( $order_id );
|
|
|
628 |
return array_unique( array_keys( $sellers ) );
|
629 |
}
|
630 |
|
660 |
*/
|
661 |
function dokan_get_admin_commission_by( $order, $context ) {
|
662 |
$context = 'seller' === $context ? $context : 'admin';
|
663 |
+
wc_deprecated_function( 'dokan_get_admin_commission_by', '2.9.21', 'dokan()->commission->get_earning_by_order()' );
|
664 |
|
665 |
return dokan()->commission->get_earning_by_order( $order, $context );
|
666 |
|
683 |
$tax_recipient = dokan_get_option( 'tax_fee_recipient', 'dokan_selling', 'seller' );
|
684 |
|
685 |
foreach ( $order->get_items() as $item_id => $item ) {
|
|
|
686 |
$refund_t += $order->get_total_refunded_for_item( $item_id );
|
687 |
$commissions[$i]['total_line'] = $item->get_total() - $order->get_total_refunded_for_item( $item_id );
|
688 |
$commissions[$i]['fee_type'] = dokan_get_commission_type( $seller_id, $item['product_id'] );
|
718 |
return apply_filters( 'dokan_order_admin_commission', $admin_commission, $order );
|
719 |
}
|
720 |
|
721 |
+
/**
|
722 |
+
* Get Customer Order IDs by Seller
|
723 |
+
*
|
724 |
+
* @since 2.6.6
|
725 |
+
*
|
726 |
+
* @param int $customer_id
|
727 |
+
*
|
728 |
+
* @param int $seller_id
|
729 |
+
*
|
730 |
+
* @return array|null on failure
|
731 |
+
*/
|
732 |
+
function dokan_get_customer_orders_by_seller( $customer_id, $seller_id ) {
|
733 |
+
if ( ! $customer_id || ! $seller_id ) {
|
734 |
+
return null;
|
735 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
736 |
|
737 |
+
$args = [
|
738 |
+
'customer_id' => $customer_id,
|
739 |
+
'post_type' => 'shop_order',
|
740 |
+
'meta_key' => '_dokan_vendor_id',
|
741 |
+
'meta_value' => $seller_id,
|
742 |
+
'post_status' => array_keys( wc_get_order_statuses() ),
|
743 |
+
'return' => 'ids',
|
744 |
+
'numberposts' => -1,
|
745 |
+
];
|
746 |
|
747 |
+
$orders = wc_get_orders( apply_filters( 'dokan_get_customer_orders_by_seller', $args ) );
|
|
|
748 |
|
749 |
+
return $orders ? $orders : null;
|
750 |
+
}
|
751 |
|
752 |
/**
|
753 |
* Header rows for CSV order export
|
757 |
* @return array
|
758 |
*/
|
759 |
function dokan_order_csv_headers() {
|
760 |
+
return apply_filters( 'dokan_csv_export_headers', array(
|
761 |
'order_id' => __( 'Order No', 'dokan-lite' ),
|
762 |
'order_items' => __( 'Order Items', 'dokan-lite' ),
|
763 |
'order_shipping' => __( 'Shipping method', 'dokan-lite' ),
|
766 |
'order_total' => __( 'Order Total', 'dokan-lite' ),
|
767 |
'order_status' => __( 'Order Status', 'dokan-lite' ),
|
768 |
'order_date' => __( 'Order Date', 'dokan-lite' ),
|
|
|
769 |
'billing_company' => __( 'Billing Company', 'dokan-lite' ),
|
770 |
'billing_first_name' => __( 'Billing First Name', 'dokan-lite' ),
|
771 |
'billing_last_name' => __( 'Billing Last Name', 'dokan-lite' ),
|
778 |
'billing_state' => __( 'Billing State', 'dokan-lite' ),
|
779 |
'billing_postcode' => __( 'Billing Postcode', 'dokan-lite' ),
|
780 |
'billing_country' => __( 'Billing Country', 'dokan-lite' ),
|
|
|
781 |
'shipping_company' => __( 'Shipping Company', 'dokan-lite' ),
|
782 |
'shipping_first_name' => __( 'Shipping First Name', 'dokan-lite' ),
|
783 |
'shipping_last_name' => __( 'Shipping Last Name', 'dokan-lite' ),
|
788 |
'shipping_state' => __( 'Shipping State', 'dokan-lite' ),
|
789 |
'shipping_postcode' => __( 'Shipping Postcode', 'dokan-lite' ),
|
790 |
'shipping_country' => __( 'Shipping Country', 'dokan-lite' ),
|
|
|
791 |
'customer_ip' => __( 'Customer IP', 'dokan-lite' ),
|
792 |
'customer_note' => __( 'Customer Note', 'dokan-lite' ),
|
793 |
+
) );
|
|
|
|
|
794 |
}
|
795 |
|
796 |
/**
|
813 |
fputcsv( $output, $headers );
|
814 |
|
815 |
foreach ( $orders as $order ) {
|
|
|
816 |
$line = array();
|
817 |
+
$the_order = dokan()->order->get( $order->order_id );
|
818 |
|
819 |
foreach ( $headers as $row_key => $label ) {
|
|
|
820 |
switch ( $row_key ) {
|
821 |
case 'order_id':
|
822 |
$line[ $row_key ] = $the_order->get_id();
|
944 |
*/
|
945 |
function dokan_get_seller_id_by_order_id( $id ) {
|
946 |
wc_deprecated_function( 'dokan_get_seller_id_by_order_id', '2.9.10', 'dokan_get_seller_id_by_order' );
|
|
|
947 |
return dokan_get_seller_id_by_order( $id );
|
948 |
}
|
949 |
|
classes/pageviews.php → includes/PageViews.php
RENAMED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Pageviews - for counting product post views.
|
5 |
*/
|
6 |
-
class
|
7 |
|
8 |
private $meta_key = 'pageview';
|
9 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
/**
|
6 |
* Pageviews - for counting product post views.
|
7 |
*/
|
8 |
+
class PageViews {
|
9 |
|
10 |
private $meta_key = 'pageview';
|
11 |
|
includes/{class-dokan-privacy.php → Privacy.php}
RENAMED
@@ -1,4 +1,10 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Privacy/GDPR related functionality which ties into WordPress functionality.
|
4 |
*
|
@@ -15,7 +21,7 @@ if ( ! class_exists( 'WC_Abstract_Privacy' ) ) {
|
|
15 |
/**
|
16 |
* Dokan_Privacy Class.
|
17 |
*/
|
18 |
-
class
|
19 |
|
20 |
/**
|
21 |
* Init - hook into events.
|
@@ -403,5 +409,3 @@ class Dokan_Privacy extends WC_Abstract_Privacy {
|
|
403 |
}
|
404 |
|
405 |
}
|
406 |
-
|
407 |
-
new Dokan_Privacy();
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
+
use WC_Abstract_Privacy;
|
6 |
+
use WP_User;
|
7 |
+
|
8 |
/**
|
9 |
* Privacy/GDPR related functionality which ties into WordPress functionality.
|
10 |
*
|
21 |
/**
|
22 |
* Dokan_Privacy Class.
|
23 |
*/
|
24 |
+
class Privacy extends WC_Abstract_Privacy {
|
25 |
|
26 |
/**
|
27 |
* Init - hook into events.
|
409 |
}
|
410 |
|
411 |
}
|
|
|
|
includes/Product/Hooks.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Product;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Admin Hooks
|
7 |
+
*
|
8 |
+
* @package dokan
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*/
|
12 |
+
class Hooks {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Load autometically when class initiate
|
16 |
+
*
|
17 |
+
* @since DOKAN_LITE_SINCE
|
18 |
+
*/
|
19 |
+
public function __construct() {
|
20 |
+
add_action( 'template_redirect', [ $this, 'bulk_product_status_change' ] );
|
21 |
+
add_action( 'dokan_bulk_product_status_change', [ $this, 'bulk_product_delete' ], 10, 2 );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Change bulk product status in vendor dashboard
|
26 |
+
*
|
27 |
+
* @since 2.8.6
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
function bulk_product_status_change() {
|
32 |
+
if ( ! current_user_can( 'dokan_delete_product' ) ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
$post_data = wp_unslash( $_POST );
|
37 |
+
|
38 |
+
if ( ! isset( $post_data['security'] ) || ! wp_verify_nonce( $post_data['security'], 'bulk_product_status_change' ) ) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
if ( ! isset( $post_data['status'] ) || ! isset( $post_data['bulk_products'] ) ) {
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
|
45 |
+
$status = $post_data['status'];
|
46 |
+
$products = $post_data['bulk_products'];
|
47 |
+
|
48 |
+
// -1 means bluk action option value
|
49 |
+
if ( $status === '-1' ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
do_action( 'dokan_bulk_product_status_change', $status, $products );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Bulk product delete
|
58 |
+
*
|
59 |
+
* @param string $action
|
60 |
+
* @param object $products
|
61 |
+
*
|
62 |
+
* @return void
|
63 |
+
*/
|
64 |
+
function bulk_product_delete( $action, $products ) {
|
65 |
+
if ( 'delete' !== $action || empty( $products ) ) {
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
|
69 |
+
foreach ( $products as $product_id ) {
|
70 |
+
if ( dokan_is_product_author( $product_id ) ) {
|
71 |
+
dokan()->product->delete( $product_id, true );
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
wp_redirect( add_query_arg( array( 'message' => 'product_deleted' ), dokan_get_navigation_url( 'products' ) ) );
|
76 |
+
exit;
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
includes/Product/Manager.php
ADDED
@@ -0,0 +1,639 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Product;
|
4 |
+
|
5 |
+
use WP_Query;
|
6 |
+
use WP_Error;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Product manager Class
|
10 |
+
*
|
11 |
+
* @since 3.0.0
|
12 |
+
*/
|
13 |
+
class Manager {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Get all Product for a vendor
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
public function all( $args = [] ) {
|
23 |
+
$post_statuses = apply_filters( 'dokan_get_product_status', [ 'publish', 'draft', 'pending', 'future' ] );
|
24 |
+
|
25 |
+
$defaults = [
|
26 |
+
'post_type' => 'product',
|
27 |
+
'post_status' => $post_statuses,
|
28 |
+
'posts_per_page' => -1,
|
29 |
+
'orderby' => 'post_date',
|
30 |
+
'order' => 'DESC',
|
31 |
+
'paged' => 1,
|
32 |
+
];
|
33 |
+
|
34 |
+
$args = wp_parse_args( $args, $defaults );
|
35 |
+
|
36 |
+
return new WP_Query( apply_filters( 'dokan_all_products_query', $args ) );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get single product
|
41 |
+
*
|
42 |
+
* @since DOKAN_LITE_SINCE
|
43 |
+
*
|
44 |
+
* @return wc_get_product OBJECT
|
45 |
+
*/
|
46 |
+
public function get( $product_id ) {
|
47 |
+
return wc_get_product( $product_id );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Save Product
|
52 |
+
*
|
53 |
+
* @since DOKAN_LITE_SINCE
|
54 |
+
*
|
55 |
+
* @return product object | wc_get_product
|
56 |
+
*/
|
57 |
+
public function create( $args = [] ) {
|
58 |
+
$id = isset( $args['id'] ) ? absint( $args['id'] ) : 0;
|
59 |
+
|
60 |
+
// Type is the most important part here because we need to be using the correct class and methods.
|
61 |
+
if ( isset( $args['type'] ) ) {
|
62 |
+
$classname = \WC_Product_Factory::get_classname_from_product_type( $args['type'] );
|
63 |
+
|
64 |
+
if ( ! class_exists( $classname ) ) {
|
65 |
+
$classname = 'WC_Product_Simple';
|
66 |
+
}
|
67 |
+
|
68 |
+
$product = new $classname( $id );
|
69 |
+
} elseif ( isset( $args['id'] ) ) {
|
70 |
+
$product = wc_get_product( $id );
|
71 |
+
} else {
|
72 |
+
$product = new \WC_Product_Simple();
|
73 |
+
}
|
74 |
+
|
75 |
+
// Post title.
|
76 |
+
if ( isset( $args['name'] ) ) {
|
77 |
+
$product->set_name( wp_filter_post_kses( $args['name'] ) );
|
78 |
+
}
|
79 |
+
|
80 |
+
// Post content.
|
81 |
+
if ( isset( $args['description'] ) ) {
|
82 |
+
$product->set_description( wp_filter_post_kses( $args['description'] ) );
|
83 |
+
}
|
84 |
+
|
85 |
+
// Post excerpt.
|
86 |
+
if ( isset( $args['short_description'] ) ) {
|
87 |
+
$product->set_short_description( wp_filter_post_kses( $args['short_description'] ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
// Post status.
|
91 |
+
if ( isset( $args['status'] ) ) {
|
92 |
+
$product->set_status( get_post_status_object( $args['status'] ) ? $args['status'] : 'draft' );
|
93 |
+
}
|
94 |
+
|
95 |
+
// Post slug.
|
96 |
+
if ( isset( $args['slug'] ) ) {
|
97 |
+
$product->set_slug( $args['slug'] );
|
98 |
+
}
|
99 |
+
|
100 |
+
// Menu order.
|
101 |
+
if ( isset( $args['menu_order'] ) ) {
|
102 |
+
$product->set_menu_order( $args['menu_order'] );
|
103 |
+
}
|
104 |
+
|
105 |
+
// Comment status.
|
106 |
+
if ( isset( $args['reviews_allowed'] ) ) {
|
107 |
+
$product->set_reviews_allowed( $args['reviews_allowed'] );
|
108 |
+
}
|
109 |
+
|
110 |
+
// Virtual.
|
111 |
+
if ( isset( $args['virtual'] ) ) {
|
112 |
+
$product->set_virtual( $args['virtual'] );
|
113 |
+
}
|
114 |
+
|
115 |
+
// Tax status.
|
116 |
+
if ( isset( $args['tax_status'] ) ) {
|
117 |
+
$product->set_tax_status( $args['tax_status'] );
|
118 |
+
}
|
119 |
+
|
120 |
+
// Tax Class.
|
121 |
+
if ( isset( $args['tax_class'] ) ) {
|
122 |
+
$product->set_tax_class( $args['tax_class'] );
|
123 |
+
}
|
124 |
+
|
125 |
+
// Catalog Visibility.
|
126 |
+
if ( isset( $args['catalog_visibility'] ) ) {
|
127 |
+
$product->set_catalog_visibility( $args['catalog_visibility'] );
|
128 |
+
}
|
129 |
+
|
130 |
+
// Purchase Note.
|
131 |
+
if ( isset( $args['purchase_note'] ) ) {
|
132 |
+
$product->set_purchase_note( wp_kses_post( wp_unslash( $args['purchase_note'] ) ) );
|
133 |
+
}
|
134 |
+
|
135 |
+
// Featured Product.
|
136 |
+
if ( isset( $args['featured'] ) ) {
|
137 |
+
$product->set_featured( $args['featured'] );
|
138 |
+
}
|
139 |
+
|
140 |
+
// Shipping data.
|
141 |
+
$product = $this->save_product_shipping_data( $product, $args );
|
142 |
+
|
143 |
+
// SKU.
|
144 |
+
if ( isset( $args['sku'] ) ) {
|
145 |
+
$product->set_sku( wc_clean( $args['sku'] ) );
|
146 |
+
}
|
147 |
+
|
148 |
+
// Attributes.
|
149 |
+
if ( isset( $args['attributes'] ) ) {
|
150 |
+
$product->set_attributes( $attributes );
|
151 |
+
}
|
152 |
+
|
153 |
+
// Sales and prices.
|
154 |
+
if ( in_array( $product->get_type(), array( 'variable', 'grouped' ), true ) ) {
|
155 |
+
$product->set_regular_price( '' );
|
156 |
+
$product->set_sale_price( '' );
|
157 |
+
$product->set_date_on_sale_to( '' );
|
158 |
+
$product->set_date_on_sale_from( '' );
|
159 |
+
$product->set_price( '' );
|
160 |
+
} else {
|
161 |
+
// Regular Price.
|
162 |
+
if ( isset( $args['regular_price'] ) ) {
|
163 |
+
$product->set_regular_price( $args['regular_price'] );
|
164 |
+
}
|
165 |
+
|
166 |
+
// Sale Price.
|
167 |
+
if ( isset( $args['sale_price'] ) ) {
|
168 |
+
$product->set_sale_price( $args['sale_price'] );
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( isset( $args['date_on_sale_from'] ) ) {
|
172 |
+
$product->set_date_on_sale_from( $args['date_on_sale_from'] );
|
173 |
+
}
|
174 |
+
|
175 |
+
if ( isset( $args['date_on_sale_from_gmt'] ) ) {
|
176 |
+
$product->set_date_on_sale_from( $args['date_on_sale_from_gmt'] ? strtotime( $args['date_on_sale_from_gmt'] ) : null );
|
177 |
+
}
|
178 |
+
|
179 |
+
if ( isset( $args['date_on_sale_to'] ) ) {
|
180 |
+
$product->set_date_on_sale_to( $args['date_on_sale_to'] );
|
181 |
+
}
|
182 |
+
|
183 |
+
if ( isset( $args['date_on_sale_to_gmt'] ) ) {
|
184 |
+
$product->set_date_on_sale_to( $args['date_on_sale_to_gmt'] ? strtotime( $args['date_on_sale_to_gmt'] ) : null );
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
// Product parent ID.
|
189 |
+
if ( isset( $args['parent_id'] ) ) {
|
190 |
+
$product->set_parent_id( $args['parent_id'] );
|
191 |
+
}
|
192 |
+
|
193 |
+
// Sold individually.
|
194 |
+
if ( isset( $args['sold_individually'] ) ) {
|
195 |
+
$product->set_sold_individually( $args['sold_individually'] );
|
196 |
+
}
|
197 |
+
|
198 |
+
// Stock status; stock_status has priority over in_stock.
|
199 |
+
if ( isset( $args['stock_status'] ) ) {
|
200 |
+
$stock_status = $args['stock_status'];
|
201 |
+
} else {
|
202 |
+
$stock_status = $product->get_stock_status();
|
203 |
+
}
|
204 |
+
|
205 |
+
// Stock data.
|
206 |
+
if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) {
|
207 |
+
// Manage stock.
|
208 |
+
if ( isset( $args['manage_stock'] ) ) {
|
209 |
+
$product->set_manage_stock( $args['manage_stock'] );
|
210 |
+
}
|
211 |
+
|
212 |
+
// Backorders.
|
213 |
+
if ( isset( $args['backorders'] ) ) {
|
214 |
+
$product->set_backorders( $args['backorders'] );
|
215 |
+
}
|
216 |
+
|
217 |
+
if ( $product->is_type( 'grouped' ) ) {
|
218 |
+
$product->set_manage_stock( 'no' );
|
219 |
+
$product->set_backorders( 'no' );
|
220 |
+
$product->set_stock_quantity( '' );
|
221 |
+
$product->set_stock_status( $stock_status );
|
222 |
+
} elseif ( $product->is_type( 'external' ) ) {
|
223 |
+
$product->set_manage_stock( 'no' );
|
224 |
+
$product->set_backorders( 'no' );
|
225 |
+
$product->set_stock_quantity( '' );
|
226 |
+
$product->set_stock_status( 'instock' );
|
227 |
+
} elseif ( $product->get_manage_stock() ) {
|
228 |
+
// Stock status is always determined by children so sync later.
|
229 |
+
if ( ! $product->is_type( 'variable' ) ) {
|
230 |
+
$product->set_stock_status( $stock_status );
|
231 |
+
}
|
232 |
+
|
233 |
+
// Stock quantity.
|
234 |
+
if ( isset( $args['stock_quantity'] ) ) {
|
235 |
+
$product->set_stock_quantity( wc_stock_amount( $args['stock_quantity'] ) );
|
236 |
+
} elseif ( isset( $args['inventory_delta'] ) ) {
|
237 |
+
$stock_quantity = wc_stock_amount( $product->get_stock_quantity() );
|
238 |
+
$stock_quantity += wc_stock_amount( $args['inventory_delta'] );
|
239 |
+
$product->set_stock_quantity( wc_stock_amount( $stock_quantity ) );
|
240 |
+
}
|
241 |
+
} else {
|
242 |
+
// Don't manage stock.
|
243 |
+
$product->set_manage_stock( 'no' );
|
244 |
+
$product->set_stock_quantity( '' );
|
245 |
+
$product->set_stock_status( $stock_status );
|
246 |
+
}
|
247 |
+
} elseif ( ! $product->is_type( 'variable' ) ) {
|
248 |
+
$product->set_stock_status( $stock_status );
|
249 |
+
}
|
250 |
+
|
251 |
+
// Upsells.
|
252 |
+
if ( isset( $args['upsell_ids'] ) ) {
|
253 |
+
$upsells = array();
|
254 |
+
$ids = $args['upsell_ids'];
|
255 |
+
|
256 |
+
if ( ! empty( $ids ) ) {
|
257 |
+
foreach ( $ids as $id ) {
|
258 |
+
if ( $id && $id > 0 ) {
|
259 |
+
$upsells[] = $id;
|
260 |
+
}
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
$product->set_upsell_ids( $upsells );
|
265 |
+
}
|
266 |
+
|
267 |
+
// Cross sells.
|
268 |
+
if ( isset( $args['cross_sell_ids'] ) ) {
|
269 |
+
$crosssells = array();
|
270 |
+
$ids = $args['cross_sell_ids'];
|
271 |
+
|
272 |
+
if ( ! empty( $ids ) ) {
|
273 |
+
foreach ( $ids as $id ) {
|
274 |
+
if ( $id && $id > 0 ) {
|
275 |
+
$crosssells[] = $id;
|
276 |
+
}
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
$product->set_cross_sell_ids( $crosssells );
|
281 |
+
}
|
282 |
+
|
283 |
+
// Product categories.
|
284 |
+
if ( isset( $args['categories'] ) && is_array( $args['categories'] ) ) {
|
285 |
+
$product = $this->save_taxonomy_terms( $product, $args['categories'] );
|
286 |
+
}
|
287 |
+
|
288 |
+
// Product tags.
|
289 |
+
if ( isset( $args['tags'] ) && is_array( $args['tags'] ) ) {
|
290 |
+
$product = $this->save_taxonomy_terms( $product, $args['tags'], 'tag' );
|
291 |
+
}
|
292 |
+
|
293 |
+
// Downloadable.
|
294 |
+
if ( isset( $args['downloadable'] ) ) {
|
295 |
+
$product->set_downloadable( $args['downloadable'] );
|
296 |
+
}
|
297 |
+
|
298 |
+
// Downloadable options.
|
299 |
+
if ( $product->get_downloadable() ) {
|
300 |
+
|
301 |
+
// Downloadable files.
|
302 |
+
if ( isset( $args['downloads'] ) && is_array( $args['downloads'] ) ) {
|
303 |
+
$product = $this->save_downloadable_files( $product, $args['downloads'] );
|
304 |
+
}
|
305 |
+
|
306 |
+
// Download limit.
|
307 |
+
if ( isset( $args['download_limit'] ) ) {
|
308 |
+
$product->set_download_limit( $args['download_limit'] );
|
309 |
+
}
|
310 |
+
|
311 |
+
// Download expiry.
|
312 |
+
if ( isset( $args['download_expiry'] ) ) {
|
313 |
+
$product->set_download_expiry( $args['download_expiry'] );
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
// Product url and button text for external products.
|
318 |
+
if ( $product->is_type( 'external' ) ) {
|
319 |
+
if ( isset( $args['external_url'] ) ) {
|
320 |
+
$product->set_product_url( $args['external_url'] );
|
321 |
+
}
|
322 |
+
|
323 |
+
if ( isset( $args['button_text'] ) ) {
|
324 |
+
$product->set_button_text( $args['button_text'] );
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
// Save default attributes for variable products.
|
329 |
+
if ( $product->is_type( 'variable' ) ) {
|
330 |
+
$product = $this->save_default_attributes( $product, $args );
|
331 |
+
}
|
332 |
+
|
333 |
+
// Set children for a grouped product.
|
334 |
+
if ( $product->is_type( 'grouped' ) && isset( $args['grouped_products'] ) ) {
|
335 |
+
$product->set_children( $args['grouped_products'] );
|
336 |
+
}
|
337 |
+
|
338 |
+
// Set featured image id
|
339 |
+
if ( isset( $args['featured_image_id'] ) ) {
|
340 |
+
$product->set_image_id( $args['featured_image_id'] );
|
341 |
+
}
|
342 |
+
|
343 |
+
// Set gallery image ids
|
344 |
+
if ( ! empty( $args['gallery_image_ids'] ) ) {
|
345 |
+
$product->set_gallery_image_ids( $args['gallery_image_ids'] );
|
346 |
+
}
|
347 |
+
|
348 |
+
// Allow set meta_data.
|
349 |
+
if ( ! empty( $args['meta_data'] ) && is_array( $args['meta_data'] ) ) {
|
350 |
+
foreach ( $args['meta_data'] as $meta ) {
|
351 |
+
$product->update_meta_data( $meta['key'], $meta['value'], isset( $meta['id'] ) ? $meta['id'] : '' );
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
if ( ! empty( $args['date_created'] ) ) {
|
356 |
+
$date = rest_parse_date( $args['date_created'] );
|
357 |
+
|
358 |
+
if ( $date ) {
|
359 |
+
$product->set_date_created( $date );
|
360 |
+
}
|
361 |
+
}
|
362 |
+
|
363 |
+
if ( ! empty( $args['date_created_gmt'] ) ) {
|
364 |
+
$date = rest_parse_date( $args['date_created_gmt'], true );
|
365 |
+
|
366 |
+
if ( $date ) {
|
367 |
+
$product->set_date_created( $date );
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
// Set total sales for newly created product
|
372 |
+
if ( ! empty( $id ) ) {
|
373 |
+
$product->set_total_sales(0);
|
374 |
+
}
|
375 |
+
|
376 |
+
$product->save();
|
377 |
+
|
378 |
+
return $product;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Update product data
|
383 |
+
*
|
384 |
+
* @since DOKAN_LITE_SINCE
|
385 |
+
*
|
386 |
+
* @return wc_get_product OBJECT
|
387 |
+
*/
|
388 |
+
public function update( $args = [] ) {
|
389 |
+
$id = isset( $args['id'] ) ? absint( $args['id'] ) : 0;
|
390 |
+
|
391 |
+
if ( empty( $id ) ) {
|
392 |
+
return new WP_Error( 'no-id-found', __( 'No product ID found for updating' ), [ 'status' => 401 ] );
|
393 |
+
}
|
394 |
+
|
395 |
+
return $this->create( $args );
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Delete product data
|
400 |
+
*
|
401 |
+
* @since DOKAN_LITE_SINCE
|
402 |
+
*
|
403 |
+
* @return void
|
404 |
+
*/
|
405 |
+
public function delete( $product_id, $force = false ) {
|
406 |
+
$product = $this->get( $product_id );
|
407 |
+
if ( $product ) {
|
408 |
+
$product->delete( [ 'force_delete' => $force ] );
|
409 |
+
}
|
410 |
+
|
411 |
+
return $product;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Save product shipping data.
|
416 |
+
*
|
417 |
+
* @param WC_Product $product Product instance.
|
418 |
+
* @param array $data Shipping data.
|
419 |
+
* @return WC_Product
|
420 |
+
*/
|
421 |
+
protected function save_product_shipping_data( $product, $data ) {
|
422 |
+
// Virtual.
|
423 |
+
if ( isset( $data['virtual'] ) && true === $data['virtual'] ) {
|
424 |
+
$product->set_weight( '' );
|
425 |
+
$product->set_height( '' );
|
426 |
+
$product->set_length( '' );
|
427 |
+
$product->set_width( '' );
|
428 |
+
} else {
|
429 |
+
if ( isset( $data['weight'] ) ) {
|
430 |
+
$product->set_weight( $data['weight'] );
|
431 |
+
}
|
432 |
+
|
433 |
+
// Height.
|
434 |
+
if ( isset( $data['dimensions']['height'] ) ) {
|
435 |
+
$product->set_height( $data['dimensions']['height'] );
|
436 |
+
}
|
437 |
+
|
438 |
+
// Width.
|
439 |
+
if ( isset( $data['dimensions']['width'] ) ) {
|
440 |
+
$product->set_width( $data['dimensions']['width'] );
|
441 |
+
}
|
442 |
+
|
443 |
+
// Length.
|
444 |
+
if ( isset( $data['dimensions']['length'] ) ) {
|
445 |
+
$product->set_length( $data['dimensions']['length'] );
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
// Shipping class.
|
450 |
+
if ( isset( $data['shipping_class'] ) ) {
|
451 |
+
$data_store = $product->get_data_store();
|
452 |
+
$shipping_class_id = $data_store->get_shipping_class_id_by_slug( wc_clean( $data['shipping_class'] ) );
|
453 |
+
$product->set_shipping_class_id( $shipping_class_id );
|
454 |
+
}
|
455 |
+
|
456 |
+
return $product;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Save taxonomy terms.
|
461 |
+
*
|
462 |
+
* @param WC_Product $product Product instance.
|
463 |
+
* @param array $terms Terms data.
|
464 |
+
* @param string $taxonomy Taxonomy name.
|
465 |
+
* @return WC_Product
|
466 |
+
*/
|
467 |
+
protected function save_taxonomy_terms( $product, $terms, $taxonomy = 'cat' ) {
|
468 |
+
if ( 'cat' === $taxonomy ) {
|
469 |
+
$product->set_category_ids( $terms );
|
470 |
+
} elseif ( 'tag' === $taxonomy ) {
|
471 |
+
$product->set_tag_ids( $terms );
|
472 |
+
}
|
473 |
+
|
474 |
+
return $product;
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Save downloadable files.
|
479 |
+
*
|
480 |
+
* @param WC_Product $product Product instance.
|
481 |
+
* @param array $downloads Downloads data.
|
482 |
+
* @param int $deprecated Deprecated since 3.0.
|
483 |
+
* @return WC_Product
|
484 |
+
*/
|
485 |
+
protected function save_downloadable_files( $product, $downloads ) {
|
486 |
+
$files = array();
|
487 |
+
foreach ( $downloads as $key => $file ) {
|
488 |
+
if ( empty( $file['file'] ) ) {
|
489 |
+
continue;
|
490 |
+
}
|
491 |
+
|
492 |
+
$download = new WC_Product_Download();
|
493 |
+
$download->set_id( $key );
|
494 |
+
$download->set_name( $file['name'] ? $file['name'] : wc_get_filename_from_url( $file['file'] ) );
|
495 |
+
$download->set_file( apply_filters( 'woocommerce_file_download_path', $file['file'], $product, $key ) );
|
496 |
+
$files[] = $download;
|
497 |
+
}
|
498 |
+
$product->set_downloads( $files );
|
499 |
+
|
500 |
+
return $product;
|
501 |
+
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Get featured products
|
505 |
+
*
|
506 |
+
* @since 1.0.0
|
507 |
+
*
|
508 |
+
* @return void
|
509 |
+
*/
|
510 |
+
public function featured( $args = [] ) {
|
511 |
+
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
512 |
+
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
513 |
+
|
514 |
+
$args['tax_query'][] = [
|
515 |
+
'taxonomy' => 'product_visibility',
|
516 |
+
'field' => 'term_taxonomy_id',
|
517 |
+
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
518 |
+
'operator' => 'NOT IN',
|
519 |
+
];
|
520 |
+
|
521 |
+
$args['tax_query'][] = [
|
522 |
+
'taxonomy' => 'product_visibility',
|
523 |
+
'field' => 'term_taxonomy_id',
|
524 |
+
'terms' => $product_visibility_term_ids['featured'],
|
525 |
+
];
|
526 |
+
} else {
|
527 |
+
$args['meta_query'] = [
|
528 |
+
[
|
529 |
+
'key' => '_visibility',
|
530 |
+
'value' => array( 'catalog', 'visible' ),
|
531 |
+
'compare' => 'IN'
|
532 |
+
],
|
533 |
+
[
|
534 |
+
'key' => '_featured',
|
535 |
+
'value' => 'yes'
|
536 |
+
]
|
537 |
+
];
|
538 |
+
}
|
539 |
+
|
540 |
+
return $this->all( apply_filters( 'dokan_featured_products_query', $args ) );
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Get latest product
|
545 |
+
*
|
546 |
+
* @since 1.0.0
|
547 |
+
*
|
548 |
+
* @return void
|
549 |
+
*/
|
550 |
+
public function latest( $args = [] ) {
|
551 |
+
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
552 |
+
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
553 |
+
|
554 |
+
$args['tax_query'] = [
|
555 |
+
'taxonomy' => 'product_visibility',
|
556 |
+
'field' => 'term_taxonomy_id',
|
557 |
+
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
558 |
+
'operator' => 'NOT IN',
|
559 |
+
];
|
560 |
+
} else {
|
561 |
+
$args['meta_query'] = [
|
562 |
+
[
|
563 |
+
'key' => '_visibility',
|
564 |
+
'value' => [ 'catalog', 'visible' ],
|
565 |
+
'compare' => 'IN'
|
566 |
+
]
|
567 |
+
];
|
568 |
+
}
|
569 |
+
|
570 |
+
return $this->all( apply_filters( 'dokan_latest_products_query', $args ) );
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Best Selling Products
|
575 |
+
*
|
576 |
+
* @since 3.0.0
|
577 |
+
*
|
578 |
+
* @return void
|
579 |
+
*/
|
580 |
+
public function best_selling( $args = [] ) {
|
581 |
+
|
582 |
+
$args['meta_key'] = 'total_sales';
|
583 |
+
$args['orderby'] = 'meta_value_num';
|
584 |
+
|
585 |
+
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
586 |
+
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
587 |
+
$args['tax_query'] = [
|
588 |
+
'taxonomy' => 'product_visibility',
|
589 |
+
'field' => 'term_taxonomy_id',
|
590 |
+
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
591 |
+
'operator' => 'NOT IN',
|
592 |
+
];
|
593 |
+
} else {
|
594 |
+
$args['meta_query'] = [
|
595 |
+
[
|
596 |
+
'key' => '_visibility',
|
597 |
+
'value' => array('catalog', 'visible'),
|
598 |
+
'compare' => 'IN'
|
599 |
+
]
|
600 |
+
];
|
601 |
+
}
|
602 |
+
|
603 |
+
return $this->all( apply_filters( 'dokan_best_selling_products_query', $args ) );
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Top rated product
|
608 |
+
*
|
609 |
+
* @since 3.0.0
|
610 |
+
*
|
611 |
+
* @return void
|
612 |
+
*/
|
613 |
+
public function top_rated( $args = array() ) {
|
614 |
+
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
615 |
+
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
616 |
+
|
617 |
+
$args['tax_query'] = [
|
618 |
+
'taxonomy' => 'product_visibility',
|
619 |
+
'field' => 'term_taxonomy_id',
|
620 |
+
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
621 |
+
'operator' => 'NOT IN',
|
622 |
+
];
|
623 |
+
} else {
|
624 |
+
$args['meta_query'] = [
|
625 |
+
[
|
626 |
+
'key' => '_visibility',
|
627 |
+
'value' => [ 'catalog', 'visible' ],
|
628 |
+
'compare' => 'IN'
|
629 |
+
]
|
630 |
+
];
|
631 |
+
}
|
632 |
+
|
633 |
+
add_filter( 'posts_clauses', [ 'WC_Shortcodes', 'order_by_rating_post_clauses' ] );
|
634 |
+
$products = $this->all( apply_filters( 'dokan_top_rated_products_query', $args ) );
|
635 |
+
remove_filter( 'posts_clauses', [ 'WC_Shortcodes', 'order_by_rating_post_clauses' ] );
|
636 |
+
|
637 |
+
return $products;
|
638 |
+
}
|
639 |
+
}
|
includes/{product-functions.php → Product/functions.php}
RENAMED
@@ -17,13 +17,13 @@
|
|
17 |
* @return integer|boolean
|
18 |
*/
|
19 |
function dokan_save_product( $args ) {
|
20 |
-
|
21 |
$defaults = array(
|
22 |
'post_title' => '',
|
23 |
'post_content' => '',
|
24 |
'post_excerpt' => '',
|
25 |
'post_status' => '',
|
26 |
'post_type' => 'product',
|
|
|
27 |
'_visibility' => 'visible',
|
28 |
);
|
29 |
|
@@ -34,8 +34,7 @@ function dokan_save_product( $args ) {
|
|
34 |
}
|
35 |
|
36 |
if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ) {
|
37 |
-
|
38 |
-
if ( $product_cat < 0 ) {
|
39 |
return new WP_Error( 'no-category', __( 'Please select a category', 'dokan-lite' ) );
|
40 |
}
|
41 |
} else {
|
@@ -74,97 +73,42 @@ function dokan_save_product( $args ) {
|
|
74 |
|
75 |
$post_arr = apply_filters( 'dokan_insert_product_post_data', $post_arr, $data );
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
if ( isset( $data['feat_image_id'] ) && ! empty( $data['feat_image_id'] ) ) {
|
83 |
-
set_post_thumbnail( $product_id, absint( $data['feat_image_id'] ) );
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( isset( $data['product_tag'] ) && ! empty( $data['product_tag'] ) ) {
|
87 |
-
$tags_ids = array_map( 'absint', (array) $data['product_tag'] );
|
88 |
-
wp_set_object_terms( $product_id, $tags_ids, 'product_tag' );
|
89 |
-
}
|
90 |
-
|
91 |
-
/** set product category * */
|
92 |
-
if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ) {
|
93 |
-
wp_set_object_terms( $product_id, (int) $data['product_cat'], 'product_cat' );
|
94 |
-
} else {
|
95 |
-
if ( isset( $data['product_cat'] ) && ! empty( $data['product_cat'] ) ) {
|
96 |
-
$cat_ids = array_map( 'absint', (array) $data['product_cat'] );
|
97 |
-
wp_set_object_terms( $product_id, $cat_ids, 'product_cat' );
|
98 |
-
}
|
99 |
-
}
|
100 |
-
if ( isset( $data['product_type'] ) ) {
|
101 |
-
wp_set_object_terms( $product_id, sanitize_text_field( $data['product_type'] ), 'product_type' );
|
102 |
-
} else {
|
103 |
-
wp_set_object_terms( $product_id, 'simple', 'product_type' );
|
104 |
-
}
|
105 |
-
|
106 |
-
// Gallery Images
|
107 |
-
if ( ! empty( $data['product_image_gallery'] ) ) {
|
108 |
-
$attachment_ids = array_filter( explode( ',', wc_clean( $data['product_image_gallery'] ) ) );
|
109 |
-
update_post_meta( $product_id, '_product_image_gallery', implode( ',', $attachment_ids ) );
|
110 |
-
}
|
111 |
-
|
112 |
-
if ( isset( $data['_regular_price'] ) ) {
|
113 |
-
update_post_meta( $product_id, '_regular_price', ( $data['_regular_price'] === '' ) ? '' : wc_format_decimal( $data['_regular_price'] ) );
|
114 |
-
}
|
115 |
-
|
116 |
-
if ( isset( $data['_sale_price'] ) ) {
|
117 |
-
update_post_meta( $product_id, '_sale_price', ( $data['_sale_price'] === '' ? '' : wc_format_decimal( $data['_sale_price'] ) ) );
|
118 |
-
}
|
119 |
-
|
120 |
-
$date_from = isset( $data['_sale_price_dates_from'] ) ? wc_clean( $data['_sale_price_dates_from'] ) : '';
|
121 |
-
$date_to = isset( $data['_sale_price_dates_to'] ) ? wc_clean( $data['_sale_price_dates_to'] ) : '';
|
122 |
-
|
123 |
-
// Dates
|
124 |
-
if ( $date_from ) {
|
125 |
-
update_post_meta( $product_id, '_sale_price_dates_from', strtotime( $date_from ) );
|
126 |
-
} else {
|
127 |
-
update_post_meta( $product_id, '_sale_price_dates_from', '' );
|
128 |
-
}
|
129 |
-
|
130 |
-
if ( $date_to ) {
|
131 |
-
update_post_meta( $product_id, '_sale_price_dates_to', strtotime( '+ 23 hours', strtotime( $date_to ) ) );
|
132 |
-
} else {
|
133 |
-
update_post_meta( $product_id, '_sale_price_dates_to', '' );
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( $date_to && ! $date_from ) {
|
137 |
-
update_post_meta( $product_id, '_sale_price_dates_from', strtotime( 'NOW', current_time( 'timestamp' ) ) );
|
138 |
-
}
|
139 |
-
|
140 |
-
// Update price if on sale
|
141 |
-
if ( '' !== $data['_sale_price'] && '' == $date_to && '' == $date_from ) {
|
142 |
-
update_post_meta( $product_id, '_price', wc_format_decimal( $data['_sale_price'] ) );
|
143 |
-
} else {
|
144 |
-
update_post_meta( $product_id, '_price', ( $data['_regular_price'] === '' ) ? '' : wc_format_decimal( $data['_regular_price'] ) );
|
145 |
-
}
|
146 |
-
|
147 |
-
if ( '' !== $data['_sale_price'] && $date_from && strtotime( $date_from ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) {
|
148 |
-
update_post_meta( $product_id, '_price', wc_format_decimal( $data['_sale_price'] ) );
|
149 |
-
}
|
150 |
-
|
151 |
-
if ( array_key_exists( $data['_visibility'], dokan_get_product_visibility_options() ) ) {
|
152 |
-
update_post_meta( $product_id, '_visibility', sanitize_text_field( $data['_visibility'] ) );
|
153 |
-
} else {
|
154 |
-
update_post_meta( $product_id, '_visibility', 'visible' );
|
155 |
-
}
|
156 |
-
|
157 |
-
if ( ! $is_updating ) {
|
158 |
-
update_post_meta( $product_id, 'total_sales', 0 );
|
159 |
}
|
|
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
|
|
|
168 |
}
|
169 |
|
170 |
return false;
|
@@ -261,41 +205,41 @@ function dokan_product_output_variations() {
|
|
261 |
<?php
|
262 |
$default_attributes = maybe_unserialize( get_post_meta( $post->ID, '_default_attributes', true ) );
|
263 |
|
264 |
-
|
265 |
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
|
271 |
-
|
272 |
|
273 |
-
|
274 |
-
|
275 |
|
276 |
-
|
277 |
-
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
|
295 |
-
|
296 |
-
|
297 |
|
298 |
-
|
299 |
?>
|
300 |
<div class="dokan-clearfix"></div>
|
301 |
|
@@ -517,57 +461,6 @@ function dokan_product_get_row_action( $post ) {
|
|
517 |
return implode( ' | ', $row_action_html );
|
518 |
}
|
519 |
|
520 |
-
/**
|
521 |
-
* Change bulk product status in vendor dashboard
|
522 |
-
*
|
523 |
-
* @since 2.8.6
|
524 |
-
*
|
525 |
-
* @return string
|
526 |
-
*/
|
527 |
-
function dokan_bulk_product_status_change() {
|
528 |
-
if ( ! current_user_can( 'dokan_delete_product' ) ) {
|
529 |
-
return;
|
530 |
-
}
|
531 |
-
|
532 |
-
$post_data = wp_unslash( $_POST );
|
533 |
-
|
534 |
-
if ( ! isset( $post_data['security'] ) || ! wp_verify_nonce( $post_data['security'], 'bulk_product_status_change' ) ) {
|
535 |
-
return;
|
536 |
-
}
|
537 |
-
if ( ! isset( $post_data['status'] ) || ! isset( $post_data['bulk_products'] ) ) {
|
538 |
-
return;
|
539 |
-
}
|
540 |
-
|
541 |
-
$status = $post_data['status'];
|
542 |
-
$products = $post_data['bulk_products'];
|
543 |
-
|
544 |
-
// -1 means bluk action option value
|
545 |
-
if ( $status === '-1' ) {
|
546 |
-
return;
|
547 |
-
}
|
548 |
-
|
549 |
-
do_action( 'dokan_bulk_product_status_change', $status, $products );
|
550 |
-
}
|
551 |
-
|
552 |
-
add_action( 'template_redirect', 'dokan_bulk_product_status_change' );
|
553 |
-
|
554 |
-
add_action( 'dokan_bulk_product_status_change', 'dokan_bulk_product_delete', 10, 2 );
|
555 |
-
|
556 |
-
function dokan_bulk_product_delete( $action, $products ) {
|
557 |
-
if ( 'delete' !== $action || empty( $products ) ) {
|
558 |
-
return;
|
559 |
-
}
|
560 |
-
|
561 |
-
foreach ( $products as $product_id ) {
|
562 |
-
if ( dokan_is_product_author( $product_id ) ) {
|
563 |
-
wp_delete_post( $product_id );
|
564 |
-
}
|
565 |
-
}
|
566 |
-
|
567 |
-
wp_redirect( add_query_arg( array( 'message' => 'product_deleted' ), dokan_get_navigation_url( 'products' ) ) );
|
568 |
-
exit;
|
569 |
-
}
|
570 |
-
|
571 |
/**
|
572 |
* Dokan get vendor by product
|
573 |
*
|
@@ -600,7 +493,7 @@ function dokan_get_vendor_by_product( $product ) {
|
|
600 |
/**
|
601 |
* Get translated product stock status
|
602 |
*
|
603 |
-
* @since
|
604 |
*
|
605 |
* @param mix $stock
|
606 |
*
|
17 |
* @return integer|boolean
|
18 |
*/
|
19 |
function dokan_save_product( $args ) {
|
|
|
20 |
$defaults = array(
|
21 |
'post_title' => '',
|
22 |
'post_content' => '',
|
23 |
'post_excerpt' => '',
|
24 |
'post_status' => '',
|
25 |
'post_type' => 'product',
|
26 |
+
'product_tag' => [],
|
27 |
'_visibility' => 'visible',
|
28 |
);
|
29 |
|
34 |
}
|
35 |
|
36 |
if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ) {
|
37 |
+
if ( absint( $data['product_cat'] ) < 0 ) {
|
|
|
38 |
return new WP_Error( 'no-category', __( 'Please select a category', 'dokan-lite' ) );
|
39 |
}
|
40 |
} else {
|
73 |
|
74 |
$post_arr = apply_filters( 'dokan_insert_product_post_data', $post_arr, $data );
|
75 |
|
76 |
+
if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ) {
|
77 |
+
$cat_ids[] = $data['product_cat'];
|
78 |
+
} else {
|
79 |
+
if ( ! empty( $data['product_cat'] ) ) {
|
80 |
+
$cat_ids = array_map( 'absint', (array) $data['product_cat'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
+
}
|
83 |
|
84 |
+
$post_data = [
|
85 |
+
'id' => $is_updating ? $post_arr['ID'] : '',
|
86 |
+
'name' => $post_arr['post_title'],
|
87 |
+
'type' => 'simple',
|
88 |
+
'description' => $post_arr['post_content'],
|
89 |
+
'short_description' => $post_arr['post_excerpt'],
|
90 |
+
'status' => $post_status,
|
91 |
+
'featured_image_id' => absint( $data['feat_image_id'] ),
|
92 |
+
'gallery_image_ids' => array_filter( explode( ',', wc_clean( $data['product_image_gallery'] ) ) ),
|
93 |
+
'tags' => array_map( 'absint', (array) $data['product_tag'] ),
|
94 |
+
'categories' => $cat_ids,
|
95 |
+
'regular_price' => $data['_regular_price'] === '' ? '' : wc_format_decimal( $data['_regular_price'] ),
|
96 |
+
'sale_price' => $data['_sale_price'] === '' ? '' : wc_format_decimal( $data['_sale_price'] ),
|
97 |
+
'date_on_sale_from' => isset( $data['_sale_price_dates_from'] ) ? wc_clean( $data['_sale_price_dates_from'] ) : '',
|
98 |
+
'date_on_sale_to' => isset( $data['_sale_price_dates_to'] ) ? wc_clean( $data['_sale_price_dates_to'] ) : '',
|
99 |
+
'catalog_visibility' => array_key_exists( $data['_visibility'], dokan_get_product_visibility_options() ) ? sanitize_text_field( $data['_visibility'] ) : 'visible'
|
100 |
+
];
|
101 |
+
|
102 |
+
$product = dokan()->product->create( $post_data );
|
103 |
+
|
104 |
+
if ( ! $is_updating ) {
|
105 |
+
do_action( 'dokan_new_product_added', $product->get_id(), $data );
|
106 |
+
} else {
|
107 |
+
do_action( 'dokan_product_updated', $product->get_id(), $data );
|
108 |
+
}
|
109 |
|
110 |
+
if ( $product ) {
|
111 |
+
return $product->get_id();
|
112 |
}
|
113 |
|
114 |
return false;
|
205 |
<?php
|
206 |
$default_attributes = maybe_unserialize( get_post_meta( $post->ID, '_default_attributes', true ) );
|
207 |
|
208 |
+
foreach ( $attributes as $attribute ) {
|
209 |
|
210 |
+
// Only deal with attributes that are variations
|
211 |
+
if ( ! $attribute['is_variation'] ) {
|
212 |
+
continue;
|
213 |
+
}
|
214 |
|
215 |
+
echo '<div class="dokan-variation-default-select dokan-w5 float-none">';
|
216 |
|
217 |
+
// Get current value for variation (if set)
|
218 |
+
$variation_selected_value = isset( $default_attributes[ sanitize_title( $attribute['name'] ) ] ) ? $default_attributes[ sanitize_title( $attribute['name'] ) ] : '';
|
219 |
|
220 |
+
// Name will be something like attribute_pa_color
|
221 |
+
echo '<select class="dokan-form-control" name="default_attribute_' . esc_attr( sanitize_title( $attribute['name'] ) ) . '" data-current="' . esc_attr( $variation_selected_value ) . '"><option value="">' . esc_html__( 'No default', 'dokan-lite' ) . ' ' . esc_html( wc_attribute_label( $attribute['name'] ) ) . '…</option>';
|
222 |
|
223 |
+
// Get terms for attribute taxonomy or value if its a custom attribute
|
224 |
+
if ( $attribute['is_taxonomy'] ) {
|
225 |
+
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
|
226 |
|
227 |
+
foreach ( $post_terms as $term ) {
|
228 |
+
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
|
229 |
+
}
|
230 |
+
} else {
|
231 |
+
$options = wc_get_text_attributes( $attribute['value'] );
|
232 |
|
233 |
+
foreach ( $options as $option ) {
|
234 |
+
$selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( $variation_selected_value, sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false );
|
235 |
+
echo '<option ' . esc_attr( $selected ) . ' value="' . esc_attr( $option ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
|
236 |
+
}
|
237 |
+
}
|
238 |
|
239 |
+
echo '</select>';
|
240 |
+
echo '</div>';
|
241 |
|
242 |
+
}
|
243 |
?>
|
244 |
<div class="dokan-clearfix"></div>
|
245 |
|
461 |
return implode( ' | ', $row_action_html );
|
462 |
}
|
463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
/**
|
465 |
* Dokan get vendor by product
|
466 |
*
|
493 |
/**
|
494 |
* Get translated product stock status
|
495 |
*
|
496 |
+
* @since DOKAN_LITE_SINCE
|
497 |
*
|
498 |
* @param mix $stock
|
499 |
*
|
includes/{api/admin/class-dashboard-controller.php → REST/AdminDashboardController.php}
RENAMED
@@ -1,5 +1,11 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Admin Dashboard
|
5 |
*
|
@@ -7,7 +13,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Route base.
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
use WP_REST_Server;
|
7 |
+
use WeDevs\Dokan\Abstracts\DokanRESTAdminController;
|
8 |
+
|
9 |
/**
|
10 |
* Admin Dashboard
|
11 |
*
|
13 |
*
|
14 |
* @package dokan
|
15 |
*/
|
16 |
+
class AdminDashboardController extends DokanRESTAdminController {
|
17 |
|
18 |
/**
|
19 |
* Route base.
|
includes/{api/admin/class-misc-controller.php → REST/AdminMiscController.php}
RENAMED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Admin Dashboard
|
5 |
*
|
@@ -7,7 +12,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Route base.
|
@@ -22,7 +27,6 @@ class Dokan_REST_Admin_Misc_Controller extends Dokan_REST_Admin_Controller {
|
|
22 |
* @return void
|
23 |
*/
|
24 |
public function register_routes() {
|
25 |
-
|
26 |
register_rest_route( $this->namespace, '/help', array(
|
27 |
array(
|
28 |
'methods' => WP_REST_Server::READABLE,
|
@@ -39,7 +43,7 @@ class Dokan_REST_Admin_Misc_Controller extends Dokan_REST_Admin_Controller {
|
|
39 |
* @return WP_REST_Response
|
40 |
*/
|
41 |
public function get_help() {
|
42 |
-
require_once DOKAN_INC_DIR . '/
|
43 |
|
44 |
$help = dokan_admin_get_help();
|
45 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WP_REST_Server;
|
6 |
+
use WeDevs\Dokan\Abstracts\DokanRESTAdminController;
|
7 |
+
|
8 |
/**
|
9 |
* Admin Dashboard
|
10 |
*
|
12 |
*
|
13 |
* @package dokan
|
14 |
*/
|
15 |
+
class AdminMiscController extends DokanRESTAdminController {
|
16 |
|
17 |
/**
|
18 |
* Route base.
|
27 |
* @return void
|
28 |
*/
|
29 |
public function register_routes() {
|
|
|
30 |
register_rest_route( $this->namespace, '/help', array(
|
31 |
array(
|
32 |
'methods' => WP_REST_Server::READABLE,
|
43 |
* @return WP_REST_Response
|
44 |
*/
|
45 |
public function get_help() {
|
46 |
+
require_once DOKAN_INC_DIR . '/Admin/functions.php';
|
47 |
|
48 |
$help = dokan_admin_get_help();
|
49 |
|
includes/{api/admin/class-report-controller.php → REST/AdminReportController.php}
RENAMED
@@ -1,5 +1,11 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Admin Dashboard
|
5 |
*
|
@@ -7,7 +13,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Route base.
|
@@ -47,7 +53,7 @@ class Dokan_REST_Admin_Report_Controller extends Dokan_REST_Admin_Controller {
|
|
47 |
* @return void
|
48 |
*/
|
49 |
public function get_summary( $request ) {
|
50 |
-
require_once DOKAN_INC_DIR . '/
|
51 |
|
52 |
$params = $request->get_params();
|
53 |
|
@@ -77,7 +83,7 @@ class Dokan_REST_Admin_Report_Controller extends Dokan_REST_Admin_Controller {
|
|
77 |
* @return void
|
78 |
*/
|
79 |
public function get_overview( $request ) {
|
80 |
-
require_once DOKAN_INC_DIR . '/
|
81 |
|
82 |
$params = $request->get_params();
|
83 |
|
@@ -108,7 +114,6 @@ class Dokan_REST_Admin_Report_Controller extends Dokan_REST_Admin_Controller {
|
|
108 |
|
109 |
// fillup real datea
|
110 |
foreach ( $data as $row ) {
|
111 |
-
|
112 |
if ( 'month' == $group_by ) {
|
113 |
$date = new DateTime( $row->order_date );
|
114 |
$date->modify( 'first day of this month' );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use DateTime;
|
6 |
+
use WP_REST_Server;
|
7 |
+
use WeDevs\Dokan\Abstracts\DokanRESTAdminController;
|
8 |
+
|
9 |
/**
|
10 |
* Admin Dashboard
|
11 |
*
|
13 |
*
|
14 |
* @package dokan
|
15 |
*/
|
16 |
+
class AdminReportController extends DokanRESTAdminController {
|
17 |
|
18 |
/**
|
19 |
* Route base.
|
53 |
* @return void
|
54 |
*/
|
55 |
public function get_summary( $request ) {
|
56 |
+
require_once DOKAN_INC_DIR . '/Admin/functions.php';
|
57 |
|
58 |
$params = $request->get_params();
|
59 |
|
83 |
* @return void
|
84 |
*/
|
85 |
public function get_overview( $request ) {
|
86 |
+
require_once DOKAN_INC_DIR . '/Admin/functions.php';
|
87 |
|
88 |
$params = $request->get_params();
|
89 |
|
114 |
|
115 |
// fillup real datea
|
116 |
foreach ( $data as $row ) {
|
|
|
117 |
if ( 'month' == $group_by ) {
|
118 |
$date = new DateTime( $row->order_date );
|
119 |
$date->modify( 'first day of this month' );
|
includes/{class-api-manager.php → REST/Manager.php}
RENAMED
@@ -1,9 +1,11 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* API_Registrar class
|
5 |
*/
|
6 |
-
class
|
7 |
|
8 |
/**
|
9 |
* Class dir and class name mapping
|
@@ -20,19 +22,16 @@ class Dokan_API_Manager {
|
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
-
require_once DOKAN_DIR . '/includes/api/admin/class-admin-controller.php';
|
24 |
-
|
25 |
$this->class_map = apply_filters( 'dokan_rest_api_class_map', array(
|
26 |
-
DOKAN_DIR . '/includes/
|
27 |
-
DOKAN_DIR . '/includes/
|
28 |
-
DOKAN_DIR . '/includes/
|
29 |
-
DOKAN_DIR . '/includes/
|
30 |
-
DOKAN_DIR . '/includes/
|
31 |
-
DOKAN_DIR . '/includes/
|
32 |
-
DOKAN_DIR . '/includes/
|
33 |
-
DOKAN_DIR . '/includes/
|
34 |
-
DOKAN_DIR . '/includes/
|
35 |
-
DOKAN_DIR . '/includes/api/class-settings-controller.php' => 'Dokan_REST_Settings_Controller',
|
36 |
) );
|
37 |
|
38 |
// Init REST API routes.
|
@@ -54,7 +53,6 @@ class Dokan_API_Manager {
|
|
54 |
* @since 1.2.0
|
55 |
*/
|
56 |
public function register_rest_routes() {
|
57 |
-
|
58 |
foreach ( $this->class_map as $file_name => $controller ) {
|
59 |
require_once $file_name;
|
60 |
$this->$controller = new $controller();
|
@@ -101,6 +99,10 @@ class Dokan_API_Manager {
|
|
101 |
unset( $data['store_open_close'] );
|
102 |
}
|
103 |
|
|
|
|
|
|
|
|
|
104 |
return $data;
|
105 |
}
|
106 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
/**
|
6 |
* API_Registrar class
|
7 |
*/
|
8 |
+
class Manager {
|
9 |
|
10 |
/**
|
11 |
* Class dir and class name mapping
|
22 |
return;
|
23 |
}
|
24 |
|
|
|
|
|
25 |
$this->class_map = apply_filters( 'dokan_rest_api_class_map', array(
|
26 |
+
DOKAN_DIR . '/includes/REST/AdminReportController.php' => 'WeDevs\Dokan\REST\AdminReportController',
|
27 |
+
DOKAN_DIR . '/includes/REST/AdminDashboardController.php' => 'WeDevs\Dokan\REST\AdminDashboardController',
|
28 |
+
DOKAN_DIR . '/includes/REST/AdminMiscController.php' => 'WeDevs\Dokan\REST\AdminMiscController',
|
29 |
+
DOKAN_DIR . '/includes/REST/StoreController.php' => '\WeDevs\Dokan\REST\StoreController',
|
30 |
+
DOKAN_DIR . '/includes/REST/ProductController.php' => '\WeDevs\Dokan\REST\ProductController',
|
31 |
+
DOKAN_DIR . '/includes/REST/ProductAttributeController.php' => '\WeDevs\Dokan\REST\ProductAttributeController',
|
32 |
+
DOKAN_DIR . '/includes/REST/ProductAttributeTermsController.php' => '\WeDevs\Dokan\REST\ProductAttributeTermsController',
|
33 |
+
DOKAN_DIR . '/includes/REST/OrderController.php' => '\WeDevs\Dokan\REST\OrderController',
|
34 |
+
DOKAN_DIR . '/includes/REST/WithdrawController.php' => '\WeDevs\Dokan\REST\WithdrawController',
|
|
|
35 |
) );
|
36 |
|
37 |
// Init REST API routes.
|
53 |
* @since 1.2.0
|
54 |
*/
|
55 |
public function register_rest_routes() {
|
|
|
56 |
foreach ( $this->class_map as $file_name => $controller ) {
|
57 |
require_once $file_name;
|
58 |
$this->$controller = new $controller();
|
99 |
unset( $data['store_open_close'] );
|
100 |
}
|
101 |
|
102 |
+
if ( empty( $data['show_email'] ) ) {
|
103 |
+
unset( $data['email'] );
|
104 |
+
}
|
105 |
+
|
106 |
return $data;
|
107 |
}
|
108 |
|
includes/{api/class-order-controller.php → REST/OrderController.php}
RENAMED
@@ -1,5 +1,11 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Order Controller Class
|
5 |
*
|
@@ -7,7 +13,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Endpoint namespace
|
@@ -804,7 +810,7 @@ class Dokan_REST_Order_Controller extends Dokan_REST_Controller{
|
|
804 |
* @return void
|
805 |
*/
|
806 |
public function after_order_create( $object, $request ) {
|
807 |
-
dokan()->
|
808 |
}
|
809 |
|
810 |
/**
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
use WP_REST_Server;
|
7 |
+
use WeDevs\Dokan\Abstracts\DokanRESTController;
|
8 |
+
|
9 |
/**
|
10 |
* Dokan Order Controller Class
|
11 |
*
|
13 |
*
|
14 |
* @package dokan
|
15 |
*/
|
16 |
+
class OrderController extends DokanRESTController {
|
17 |
|
18 |
/**
|
19 |
* Endpoint namespace
|
810 |
* @return void
|
811 |
*/
|
812 |
public function after_order_create( $object, $request ) {
|
813 |
+
dokan()->order->maybe_split_orders( $object->get_id() );
|
814 |
}
|
815 |
|
816 |
/**
|
includes/{api/class-product-attribute-controller.php → REST/ProductAttributeController.php}
RENAMED
@@ -1,26 +1,11 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* REST API Product Attributes controller
|
4 |
-
*
|
5 |
-
* Handles requests to the products/attributes endpoint.
|
6 |
-
*
|
7 |
-
* @author WooThemes
|
8 |
-
* @category API
|
9 |
-
* @package WooCommerce/API
|
10 |
-
* @since 3.0.0
|
11 |
-
*/
|
12 |
-
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
class Dokan_REST_Product_Attribute_Controller extends WC_REST_Product_Attributes_V1_Controller {
|
24 |
|
25 |
/**
|
26 |
* Endpoint namespace.
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WC_REST_Product_Attributes_V1_Controller;
|
6 |
+
use WP_Error;
|
7 |
+
|
8 |
+
class ProductAttributeController extends WC_REST_Product_Attributes_V1_Controller {
|
|
|
9 |
|
10 |
/**
|
11 |
* Endpoint namespace.
|
includes/{api/class-product-attribute-terms-controller.php → REST/ProductAttributeTermsController.php}
RENAMED
@@ -1,26 +1,11 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* REST API Product Attribute Terms controller
|
4 |
-
*
|
5 |
-
* Handles requests to the products/attributes/<attribute_id>/terms endpoint.
|
6 |
-
*
|
7 |
-
* @author WooThemes
|
8 |
-
* @category API
|
9 |
-
* @package WooCommerce/API
|
10 |
-
* @since 2.6.0
|
11 |
-
*/
|
12 |
-
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
class Dokan_REST_Product_Attribute_Terms_Controller extends WC_REST_Product_Attribute_Terms_V1_Controller {
|
24 |
|
25 |
/**
|
26 |
* Endpoint namespace.
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WC_REST_Product_Attribute_Terms_V1_Controller;
|
6 |
+
use WP_Error;
|
7 |
+
|
8 |
+
class ProductAttributeTermsController extends WC_REST_Product_Attribute_Terms_V1_Controller {
|
|
|
9 |
|
10 |
/**
|
11 |
* Endpoint namespace.
|
includes/{api/class-product-controller.php → REST/ProductController.php}
RENAMED
@@ -1,5 +1,16 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Store API Controller
|
5 |
*
|
@@ -7,7 +18,7 @@
|
|
7 |
*
|
8 |
* @author weDevs <info@wedevs.com>
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Endpoint namespace
|
@@ -35,17 +46,6 @@ class Dokan_REST_Product_Controller extends Dokan_REST_Controller {
|
|
35 |
*/
|
36 |
protected $post_status = array( 'publish', 'pending', 'draft' );
|
37 |
|
38 |
-
/**
|
39 |
-
* Constructor function
|
40 |
-
*
|
41 |
-
* @since 2.7.0
|
42 |
-
*
|
43 |
-
* @return void
|
44 |
-
*/
|
45 |
-
public function __construct() {
|
46 |
-
# code...
|
47 |
-
}
|
48 |
-
|
49 |
/**
|
50 |
* Register all routes releated with stores
|
51 |
*
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WC_Product_Attribute;
|
6 |
+
use WC_Product_Download;
|
7 |
+
use WC_Product_Factory;
|
8 |
+
use WC_Product_Simple;
|
9 |
+
use WC_REST_Exception;
|
10 |
+
use WP_Error;
|
11 |
+
use WP_REST_Server;
|
12 |
+
use WeDevs\Dokan\Abstracts\DokanRESTController;
|
13 |
+
|
14 |
/**
|
15 |
* Store API Controller
|
16 |
*
|
18 |
*
|
19 |
* @author weDevs <info@wedevs.com>
|
20 |
*/
|
21 |
+
class ProductController extends DokanRESTController {
|
22 |
|
23 |
/**
|
24 |
* Endpoint namespace
|
46 |
*/
|
47 |
protected $post_status = array( 'publish', 'pending', 'draft' );
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* Register all routes releated with stores
|
51 |
*
|
includes/{api/class-store-controller.php → REST/StoreController.php}
RENAMED
@@ -1,5 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Store API Controller
|
5 |
*
|
@@ -7,7 +16,7 @@
|
|
7 |
*
|
8 |
* @author weDevs <info@wedevs.com>
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Endpoint namespace
|
@@ -480,7 +489,7 @@ class Dokan_REST_Store_Controller extends WP_REST_Controller {
|
|
480 |
|
481 |
$total_count = $query->found_posts;
|
482 |
} else {
|
483 |
-
$dokan_template_reviews =
|
484 |
$post_type = 'product';
|
485 |
$limit = (int) $params['per_page'];
|
486 |
$paged = (int) ( $params['page'] - 1 ) * $params['per_page'];
|
@@ -716,7 +725,7 @@ class Dokan_REST_Store_Controller extends WP_REST_Controller {
|
|
716 |
$params = $request->get_params();
|
717 |
$vendor = dokan()->vendor->get( $params['id'] );
|
718 |
|
719 |
-
if ( ! $vendor instanceof
|
720 |
return rest_ensure_response(
|
721 |
new WP_Error(
|
722 |
'vendor_not_found',
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Vendor\Vendor;
|
6 |
+
use Dokan_REST_Product_Controller;
|
7 |
+
use WP_Error;
|
8 |
+
use WP_Query;
|
9 |
+
use WP_REST_Controller;
|
10 |
+
use WP_REST_Server;
|
11 |
+
|
12 |
/**
|
13 |
* Store API Controller
|
14 |
*
|
16 |
*
|
17 |
* @author weDevs <info@wedevs.com>
|
18 |
*/
|
19 |
+
class StoreController extends WP_REST_Controller {
|
20 |
|
21 |
/**
|
22 |
* Endpoint namespace
|
489 |
|
490 |
$total_count = $query->found_posts;
|
491 |
} else {
|
492 |
+
$dokan_template_reviews = dokan_pro()->review;
|
493 |
$post_type = 'product';
|
494 |
$limit = (int) $params['per_page'];
|
495 |
$paged = (int) ( $params['page'] - 1 ) * $params['per_page'];
|
725 |
$params = $request->get_params();
|
726 |
$vendor = dokan()->vendor->get( $params['id'] );
|
727 |
|
728 |
+
if ( ! $vendor instanceof Vendor || ! $vendor->get_id() ) {
|
729 |
return rest_ensure_response(
|
730 |
new WP_Error(
|
731 |
'vendor_not_found',
|
includes/REST/WithdrawController.php
ADDED
@@ -0,0 +1,762 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\REST;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use WP_Error;
|
7 |
+
use WP_REST_Controller;
|
8 |
+
use WP_REST_Server;
|
9 |
+
use WeDevs\Dokan\Exceptions\DokanException;
|
10 |
+
use WeDevs\Dokan\Traits\RESTResponseError;
|
11 |
+
|
12 |
+
class WithdrawController extends WP_REST_Controller {
|
13 |
+
|
14 |
+
use RESTResponseError;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Endpoint namespace.
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
protected $namespace = 'dokan/v1';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Route base.
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
protected $rest_base = 'withdraw';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Register all routes releated with stores
|
32 |
+
*
|
33 |
+
* @return void
|
34 |
+
*/
|
35 |
+
public function register_routes() {
|
36 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base, [
|
37 |
+
[
|
38 |
+
'methods' => WP_REST_Server::READABLE,
|
39 |
+
'callback' => [ $this, 'get_items' ],
|
40 |
+
'args' => array_merge( $this->get_collection_params(), [
|
41 |
+
'ids' => [
|
42 |
+
'description' => __( 'IDs of withdraws', 'dokan-lite' ),
|
43 |
+
'type' => 'array',
|
44 |
+
'context' => [ 'view' ],
|
45 |
+
'items' => [
|
46 |
+
'type' => 'integer',
|
47 |
+
],
|
48 |
+
],
|
49 |
+
] ),
|
50 |
+
'permission_callback' => [ $this, 'get_items_permissions_check' ],
|
51 |
+
],
|
52 |
+
[
|
53 |
+
'methods' => WP_REST_Server::CREATABLE,
|
54 |
+
'callback' => [ $this, 'create_item' ],
|
55 |
+
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
|
56 |
+
'permission_callback' => [ $this, 'create_item_permissions_check' ],
|
57 |
+
],
|
58 |
+
] );
|
59 |
+
|
60 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)/', [
|
61 |
+
'args' => [
|
62 |
+
'id' => [
|
63 |
+
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
64 |
+
'type' => 'integer',
|
65 |
+
'validate_callback' => [ $this, 'withdraw_exists' ],
|
66 |
+
],
|
67 |
+
],
|
68 |
+
[
|
69 |
+
'methods' => WP_REST_Server::READABLE,
|
70 |
+
'callback' => [ $this, 'get_item' ],
|
71 |
+
'permission_callback' => [ $this, 'get_item_permissions_check' ],
|
72 |
+
],
|
73 |
+
[
|
74 |
+
'methods' => WP_REST_Server::EDITABLE,
|
75 |
+
'callback' => [ $this, 'update_item' ],
|
76 |
+
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
|
77 |
+
'permission_callback' => [ $this, 'update_item_permissions_check' ],
|
78 |
+
],
|
79 |
+
[
|
80 |
+
'methods' => WP_REST_Server::DELETABLE,
|
81 |
+
'callback' => [ $this, 'delete_item' ],
|
82 |
+
'permission_callback' => [ $this, 'delete_item_permissions_check' ],
|
83 |
+
],
|
84 |
+
|
85 |
+
] );
|
86 |
+
|
87 |
+
$batch_items_schema = $this->get_public_batch_schema();
|
88 |
+
register_rest_route( $this->namespace, '/' . $this->rest_base . '/batch', [
|
89 |
+
[
|
90 |
+
'methods' => WP_REST_Server::EDITABLE,
|
91 |
+
'callback' => [ $this, 'batch_items' ],
|
92 |
+
'permission_callback' => [ $this, 'batch_items_permissions_check' ],
|
93 |
+
'args' => $batch_items_schema['properties'],
|
94 |
+
],
|
95 |
+
'schema' => [ $this, 'get_public_batch_schema' ],
|
96 |
+
] );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Check permission for getting withdraw
|
101 |
+
*
|
102 |
+
* @since 2.8.0
|
103 |
+
*
|
104 |
+
* @return bool
|
105 |
+
*/
|
106 |
+
public function get_items_permissions_check( $request ) {
|
107 |
+
return current_user_can( 'dokan_manage_withdraw' );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check permission for get a withdraw
|
112 |
+
*
|
113 |
+
* @since DOKAN_LITE_SINCE
|
114 |
+
*
|
115 |
+
* @param \WP_Request $request
|
116 |
+
*
|
117 |
+
* @return bool
|
118 |
+
*/
|
119 |
+
public function get_item_permissions_check( $request ) {
|
120 |
+
if ( current_user_can( 'manage_woocommerce' ) ) {
|
121 |
+
return true;
|
122 |
+
}
|
123 |
+
|
124 |
+
$withdraw = dokan()->withdraw->get( $request['id'] );
|
125 |
+
|
126 |
+
if ( $withdraw ) {
|
127 |
+
$user_id = get_current_user_id();
|
128 |
+
return $withdraw->get_user_id() === $user_id;
|
129 |
+
}
|
130 |
+
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Check permission for creating a withdraw request
|
136 |
+
*
|
137 |
+
* @since DOKAN_LITE_SINCE
|
138 |
+
*
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
public function create_item_permissions_check( $request ) {
|
142 |
+
return current_user_can( 'manage_woocommerce' ) || current_user_can( 'dokan_manage_withdraw' );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Check permission for update a withdraw
|
147 |
+
*
|
148 |
+
* @since DOKAN_LITE_SINCE
|
149 |
+
*
|
150 |
+
* @param \WP_Request $request
|
151 |
+
*
|
152 |
+
* @return bool
|
153 |
+
*/
|
154 |
+
public function update_item_permissions_check( $request ) {
|
155 |
+
return $this->get_item_permissions_check( $request );
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Check permission for deleting withdraw
|
160 |
+
*
|
161 |
+
* @since 2.8.0
|
162 |
+
*
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
public function delete_item_permissions_check( $request ) {
|
166 |
+
return current_user_can( 'manage_woocommerce' );
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Check permission for getting withdraw
|
171 |
+
*
|
172 |
+
* @since 2.8.0
|
173 |
+
*
|
174 |
+
* @return bool
|
175 |
+
*/
|
176 |
+
public function batch_items_permissions_check() {
|
177 |
+
return current_user_can( 'manage_woocommerce' );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Validate a withdraw is exists
|
182 |
+
*
|
183 |
+
* @since DOKAN_LITE_SINCE
|
184 |
+
*
|
185 |
+
* @param int $id
|
186 |
+
*
|
187 |
+
* @return bool|\WP_Error
|
188 |
+
*/
|
189 |
+
public function withdraw_exists( $id ) {
|
190 |
+
try {
|
191 |
+
$withdraw = dokan()->withdraw->get( $id );
|
192 |
+
|
193 |
+
if ( $withdraw ) {
|
194 |
+
return true;
|
195 |
+
}
|
196 |
+
|
197 |
+
throw new DokanException( 'dokan_rest_withdraw_error', __( 'Withdraw not found', 'dokan-lite' ), 404 );
|
198 |
+
} catch ( Exception $e ) {
|
199 |
+
return $this->send_response_error( $e );
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Get user data
|
205 |
+
*
|
206 |
+
* @since 2.8.0
|
207 |
+
*
|
208 |
+
* @return return object
|
209 |
+
*/
|
210 |
+
public function get_user_data( $user_id ) {
|
211 |
+
$vendor = dokan()->vendor->get( $user_id );
|
212 |
+
|
213 |
+
return $vendor->to_array();
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Get withdraws
|
218 |
+
*
|
219 |
+
* @since DOKAN_LITE_SINCE
|
220 |
+
*
|
221 |
+
* @return \WP_REST_Response
|
222 |
+
*/
|
223 |
+
public function get_items( $request ) {
|
224 |
+
$args = [
|
225 |
+
'status' => dokan()->withdraw->get_status_code( $request['status'] ),
|
226 |
+
'paginate' => true,
|
227 |
+
'page' => $request['page'],
|
228 |
+
'limit' => $request['per_page'],
|
229 |
+
];
|
230 |
+
|
231 |
+
$user_id = null;
|
232 |
+
|
233 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
234 |
+
// Vendors can only see their own requests
|
235 |
+
$user_id = dokan_get_current_user_id();
|
236 |
+
|
237 |
+
if ( empty( $user_id ) ) {
|
238 |
+
return new WP_Error( 'dokan_rest_withdraw_no_vendor_found', __( 'No vendor found', 'dokan-lite' ), [ 'status' => 404 ] );
|
239 |
+
}
|
240 |
+
|
241 |
+
} else if ( isset( $request['user_id'] ) ) {
|
242 |
+
// Allow manager to filter request with user or vendor id
|
243 |
+
$user_id = $request['user_id'];
|
244 |
+
}
|
245 |
+
|
246 |
+
if ( $user_id ) {
|
247 |
+
$args['user_id'] = $user_id;
|
248 |
+
}
|
249 |
+
|
250 |
+
if ( isset( $request['ids'] ) ) {
|
251 |
+
$args['ids'] = $request['ids'];
|
252 |
+
}
|
253 |
+
|
254 |
+
$withdraws = dokan()->withdraw->all( $args );
|
255 |
+
|
256 |
+
$data = [];
|
257 |
+
foreach ( $withdraws->withdraws as $withdraw ) {
|
258 |
+
$item = $this->prepare_item_for_response( $withdraw, $request );
|
259 |
+
$data[] = $this->prepare_response_for_collection( $item );
|
260 |
+
}
|
261 |
+
|
262 |
+
$response = rest_ensure_response( $data );
|
263 |
+
$withdraw_count = dokan_get_withdraw_count();
|
264 |
+
|
265 |
+
$response->header( 'X-Status-Pending', $withdraw_count['pending'] );
|
266 |
+
$response->header( 'X-Status-Completed', $withdraw_count['completed'] );
|
267 |
+
$response->header( 'X-Status-Cancelled', $withdraw_count['cancelled'] );
|
268 |
+
|
269 |
+
$response = $this->format_collection_response( $response, $request, $withdraws->total );
|
270 |
+
return $response;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Make a withdraw request
|
275 |
+
*
|
276 |
+
* @since DOKAN_LITE_SINCE
|
277 |
+
*
|
278 |
+
* @return \WP_REST_Response
|
279 |
+
*/
|
280 |
+
public function create_item( $request ) {
|
281 |
+
try {
|
282 |
+
// vendors are only allowed to set amount and method params
|
283 |
+
$user_id = dokan_get_current_user_id();
|
284 |
+
|
285 |
+
if ( current_user_can( 'manage_woocommerce' ) ) {
|
286 |
+
// A user could be both wc manager and a vendor. In that case,
|
287 |
+
// we should allow to set `user_id` param for that manager.
|
288 |
+
if ( isset( $request['user_id'] ) ) {
|
289 |
+
$user_id = $request['user_id'];
|
290 |
+
|
291 |
+
if ( ! user_can( $user_id, 'dokan_manage_withdraw' ) ) {
|
292 |
+
throw new DokanException( 'dokan_rest_withdraw_error', __( 'User does not have permission to withdraw', 'dokan-lite' ), 401 );
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
$note = $request['note'];
|
297 |
+
} else {
|
298 |
+
$note = '';
|
299 |
+
}
|
300 |
+
|
301 |
+
if ( empty( $user_id ) ) {
|
302 |
+
throw new DokanException( 'dokan_rest_withdraw_error', __( 'No vendor found', 'dokan-lite' ), 404 );
|
303 |
+
}
|
304 |
+
|
305 |
+
$args = [
|
306 |
+
'user_id' => $user_id,
|
307 |
+
'amount' => $request['amount'],
|
308 |
+
'date' => current_time( 'mysql' ),
|
309 |
+
'method' => $request['method'],
|
310 |
+
'note' => $note,
|
311 |
+
'ip' => dokan_get_client_ip(),
|
312 |
+
];
|
313 |
+
|
314 |
+
$validate_request = dokan()->withdraw->is_valid_approval_request( $args );
|
315 |
+
|
316 |
+
if ( is_wp_error( $validate_request ) ) {
|
317 |
+
throw new DokanException( 'dokan_rest_withdraw_error', $validate_request->get_error_message(), 400 );
|
318 |
+
}
|
319 |
+
|
320 |
+
$withdraw = dokan()->withdraw->create( $args );
|
321 |
+
|
322 |
+
if ( is_wp_error( $withdraw ) ) {
|
323 |
+
throw new DokanException( $withdraw->get_error_code(), $withdraw->get_error_message(), 400 );
|
324 |
+
}
|
325 |
+
|
326 |
+
$response = $this->prepare_item_for_response( $withdraw, $request );
|
327 |
+
$response = rest_ensure_response( $response );
|
328 |
+
|
329 |
+
$response->set_status( 201 );
|
330 |
+
$response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $withdraw->get_id() ) ) );
|
331 |
+
|
332 |
+
return $response;
|
333 |
+
} catch ( Exception $e ) {
|
334 |
+
return $this->send_response_error( $e );
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Get a withdraw
|
340 |
+
*
|
341 |
+
* @since DOKAN_LITE_SINCE
|
342 |
+
*
|
343 |
+
* @param \WP_Request $request
|
344 |
+
*
|
345 |
+
* @return \WP_REST_Response
|
346 |
+
*/
|
347 |
+
public function get_item( $request ) {
|
348 |
+
// No need to try-catch here, `withdraw_exists` will handle that
|
349 |
+
$withdraw = dokan()->withdraw->get( $request['id'] );
|
350 |
+
$data = $this->prepare_item_for_response( $withdraw, $request );
|
351 |
+
|
352 |
+
return rest_ensure_response( $data );
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Cancel withdraw status
|
357 |
+
*
|
358 |
+
* @since DOKAN_LITE_SINCE
|
359 |
+
*
|
360 |
+
* @return void
|
361 |
+
*/
|
362 |
+
public function update_item( $request ) {
|
363 |
+
try {
|
364 |
+
global $wpdb;
|
365 |
+
|
366 |
+
$withdraw = dokan()->withdraw->get( $request['id'] );
|
367 |
+
|
368 |
+
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
369 |
+
$validate_request = dokan()->withdraw->is_valid_cancellation_request( $withdraw->get_withdraw() );
|
370 |
+
|
371 |
+
if ( is_wp_error( $validate_request ) ) {
|
372 |
+
throw new DokanException( 'dokan_rest_withdraw_error', $validate_request->get_error_message(), 422 );
|
373 |
+
}
|
374 |
+
|
375 |
+
// Vendors are allowed to cancel request only
|
376 |
+
$withdraw->set_status( dokan()->withdraw->get_status_code( 'cancelled' ) );
|
377 |
+
} else {
|
378 |
+
if ( isset( $request['user_id'] ) ) {
|
379 |
+
$withdraw->set_user_id( $request['user_id'] );
|
380 |
+
}
|
381 |
+
|
382 |
+
if ( isset( $request['amount'] ) ) {
|
383 |
+
$withdraw->set_amount( $request['amount'] );
|
384 |
+
}
|
385 |
+
|
386 |
+
if ( isset( $request['status'] ) ) {
|
387 |
+
if ( 'approved' === $request['status'] ) {
|
388 |
+
$validate_request = dokan()->withdraw->is_valid_approval_request( $withdraw->get_withdraw() );
|
389 |
+
|
390 |
+
if ( is_wp_error( $validate_request ) ) {
|
391 |
+
throw new DokanException( 'dokan_rest_withdraw_error', $validate_request->get_error_message(), 422 );
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
$withdraw->set_status( dokan()->withdraw->get_status_code( $request['status'] ) );
|
396 |
+
}
|
397 |
+
|
398 |
+
if ( isset( $request['method'] ) ) {
|
399 |
+
$withdraw->set_method( $request['method'] );
|
400 |
+
}
|
401 |
+
|
402 |
+
if ( isset( $request['note'] ) ) {
|
403 |
+
$withdraw->set_note( $request['note'] );
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
$withdraw = $withdraw->save();
|
408 |
+
|
409 |
+
if ( is_wp_error( $withdraw ) ) {
|
410 |
+
throw new DokanException( $withdraw->get_error_code(), $withdraw->get_error_message(), 500 );
|
411 |
+
}
|
412 |
+
|
413 |
+
$response = $this->prepare_item_for_response( $withdraw, $request );
|
414 |
+
|
415 |
+
return rest_ensure_response( $response );
|
416 |
+
} catch ( Exception $e ) {
|
417 |
+
return $this->send_response_error( $e );
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
/**
|
422 |
+
* Delete a withdraw
|
423 |
+
*
|
424 |
+
* @since DOKAN_LITE_SINCE
|
425 |
+
*
|
426 |
+
* @return \WP_REST_Request
|
427 |
+
*/
|
428 |
+
public function delete_item( $request ) {
|
429 |
+
try {
|
430 |
+
$withdraw = dokan()->withdraw->get( $request['id'] );
|
431 |
+
|
432 |
+
$withdraw = $withdraw->delete();
|
433 |
+
|
434 |
+
if ( is_wp_error( $withdraw ) ) {
|
435 |
+
throw new DokanException( $withdraw->get_error_code(), $withdraw->get_error_message(), 500 );
|
436 |
+
}
|
437 |
+
|
438 |
+
$response = $this->prepare_item_for_response( $withdraw, $request );
|
439 |
+
|
440 |
+
return rest_ensure_response( $response );
|
441 |
+
|
442 |
+
} catch ( Exception $e ) {
|
443 |
+
return $this->send_response_error( $e );
|
444 |
+
}
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Approve, Pending and cancel bulk action
|
449 |
+
*
|
450 |
+
* JSON data format for sending to API
|
451 |
+
* {
|
452 |
+
* "approved" : [
|
453 |
+
* "1", "9", "7"
|
454 |
+
* ],
|
455 |
+
* "pending" : [
|
456 |
+
* "2"
|
457 |
+
* ],
|
458 |
+
* "delete" : [
|
459 |
+
* "4"
|
460 |
+
* ],
|
461 |
+
* "cancelled" : [
|
462 |
+
* "5"
|
463 |
+
* ]
|
464 |
+
* }
|
465 |
+
*
|
466 |
+
* @since 2.8.0
|
467 |
+
*
|
468 |
+
* @return void
|
469 |
+
*/
|
470 |
+
public function batch_items( $request ) {
|
471 |
+
$success = [];
|
472 |
+
$failed = [];
|
473 |
+
|
474 |
+
foreach ( $request['approved'] as $id ) {
|
475 |
+
$withdraw = dokan()->withdraw->get( $id );
|
476 |
+
|
477 |
+
if ( ! $withdraw ) {
|
478 |
+
$failed['approved'][] = $id;
|
479 |
+
} else {
|
480 |
+
$validate_request = dokan()->withdraw->is_valid_approval_request( $withdraw->get_withdraw() );
|
481 |
+
|
482 |
+
if ( is_wp_error( $validate_request ) ) {
|
483 |
+
$failed['approved'][] = $id;
|
484 |
+
} else {
|
485 |
+
$withdraw->set_status( dokan()->withdraw->get_status_code( 'approved' ) );
|
486 |
+
$withdraw = $withdraw->save();
|
487 |
+
|
488 |
+
if ( is_wp_error( $withdraw ) ) {
|
489 |
+
$failed['approved'][] = $id;
|
490 |
+
} else {
|
491 |
+
$success['approved'][] = $id;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
}
|
495 |
+
}
|
496 |
+
|
497 |
+
foreach ( $request['cancelled'] as $id ) {
|
498 |
+
$withdraw = dokan()->withdraw->get( $id );
|
499 |
+
|
500 |
+
if ( ! $withdraw ) {
|
501 |
+
$failed['cancelled'][] = $id;
|
502 |
+
} else {
|
503 |
+
$validate_request = dokan()->withdraw->is_valid_cancellation_request( $withdraw->get_withdraw() );
|
504 |
+
|
505 |
+
if ( is_wp_error( $validate_request ) ) {
|
506 |
+
$failed['cancelled'][] = $id;
|
507 |
+
} else {
|
508 |
+
$withdraw->set_status( dokan()->withdraw->get_status_code( 'cancelled' ) );
|
509 |
+
$withdraw = $withdraw->save();
|
510 |
+
|
511 |
+
if ( is_wp_error( $withdraw ) ) {
|
512 |
+
$failed['cancelled'][] = $id;
|
513 |
+
} else {
|
514 |
+
$success['cancelled'][] = $id;
|
515 |
+
}
|
516 |
+
}
|
517 |
+
}
|
518 |
+
}
|
519 |
+
|
520 |
+
foreach ( $request['delete'] as $id ) {
|
521 |
+
$withdraw = dokan()->withdraw->get( $id );
|
522 |
+
|
523 |
+
if ( ! $withdraw ) {
|
524 |
+
$failed['delete'][] = $id;
|
525 |
+
} else {
|
526 |
+
$withdraw = $withdraw->delete();
|
527 |
+
|
528 |
+
if ( is_wp_error( $withdraw ) ) {
|
529 |
+
$failed['delete'][] = $id;
|
530 |
+
} else {
|
531 |
+
$success['delete'][] = $id;
|
532 |
+
}
|
533 |
+
}
|
534 |
+
}
|
535 |
+
|
536 |
+
return rest_ensure_response( [
|
537 |
+
'success' => $success,
|
538 |
+
'failed' => $failed,
|
539 |
+
] );
|
540 |
+
}
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Prepare data for response
|
544 |
+
*
|
545 |
+
* @since 2.8.0
|
546 |
+
*
|
547 |
+
* @return data
|
548 |
+
*/
|
549 |
+
public function prepare_item_for_response( $withdraw, $request ) {
|
550 |
+
$methods = dokan_withdraw_get_methods();
|
551 |
+
$data = [
|
552 |
+
'id' => absint( $withdraw->get_id() ),
|
553 |
+
'user' => $this->get_user_data( $withdraw->get_user_id() ),
|
554 |
+
'amount' => floatval( $withdraw->get_amount() ),
|
555 |
+
'created' => mysql_to_rfc3339( $withdraw->get_date() ),
|
556 |
+
'status' => dokan()->withdraw->get_status_name( $withdraw->get_status() ),
|
557 |
+
'method' => $withdraw->get_method(),
|
558 |
+
'method_title' => array_key_exists( $withdraw->get_method(), $methods ) ? $methods[ $withdraw->get_method() ] : $withdraw->get_method(),
|
559 |
+
'note' => $withdraw->get_note(),
|
560 |
+
'ip' => $withdraw->get_ip()
|
561 |
+
];
|
562 |
+
|
563 |
+
$response = rest_ensure_response( $data );
|
564 |
+
$response->add_links( $this->prepare_links( $withdraw, $request ) );
|
565 |
+
|
566 |
+
return apply_filters( "dokan_rest_prepare_withdraw_object", $response, $withdraw, $request );
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Format item's collection for response
|
571 |
+
*
|
572 |
+
* @param object $response
|
573 |
+
* @param object $request
|
574 |
+
* @param array $items
|
575 |
+
* @param int $total_items
|
576 |
+
*
|
577 |
+
* @return object
|
578 |
+
*/
|
579 |
+
public function format_collection_response( $response, $request, $total_items ) {
|
580 |
+
if ( $total_items === 0 ) {
|
581 |
+
return $response;
|
582 |
+
}
|
583 |
+
|
584 |
+
// Store pagation values for headers then unset for count query.
|
585 |
+
$per_page = (int) ( ! empty( $request['per_page'] ) ? $request['per_page'] : 20 );
|
586 |
+
$page = (int) ( ! empty( $request['page'] ) ? $request['page'] : 1 );
|
587 |
+
|
588 |
+
$response->header( 'X-WP-Total', (int) $total_items );
|
589 |
+
|
590 |
+
$max_pages = ceil( $total_items / $per_page );
|
591 |
+
|
592 |
+
$response->header( 'X-WP-TotalPages', (int) $max_pages );
|
593 |
+
$base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ) );
|
594 |
+
|
595 |
+
if ( $page > 1 ) {
|
596 |
+
$prev_page = $page - 1;
|
597 |
+
|
598 |
+
if ( $prev_page > $max_pages ) {
|
599 |
+
$prev_page = $max_pages;
|
600 |
+
}
|
601 |
+
|
602 |
+
$prev_link = add_query_arg( 'page', $prev_page, $base );
|
603 |
+
$response->link_header( 'prev', $prev_link );
|
604 |
+
}
|
605 |
+
|
606 |
+
if ( $max_pages > $page ) {
|
607 |
+
|
608 |
+
$next_page = $page + 1;
|
609 |
+
$next_link = add_query_arg( 'page', $next_page, $base );
|
610 |
+
$response->link_header( 'next', $next_link );
|
611 |
+
}
|
612 |
+
|
613 |
+
return $response;
|
614 |
+
}
|
615 |
+
|
616 |
+
/**
|
617 |
+
* Prepare links for the request.
|
618 |
+
*
|
619 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $object Object data.
|
620 |
+
* @param WP_REST_Request $request Request object.
|
621 |
+
*
|
622 |
+
* @return array Links for the given post.
|
623 |
+
*/
|
624 |
+
protected function prepare_links( $withdraw, $request ) {
|
625 |
+
$links = [
|
626 |
+
'self' => [
|
627 |
+
'href' => rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $withdraw->get_id() ) ),
|
628 |
+
],
|
629 |
+
'collection' => [
|
630 |
+
'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ),
|
631 |
+
],
|
632 |
+
];
|
633 |
+
|
634 |
+
return $links;
|
635 |
+
}
|
636 |
+
|
637 |
+
/**
|
638 |
+
* Item schema
|
639 |
+
*
|
640 |
+
* @since DOKAN_LITE
|
641 |
+
*
|
642 |
+
* @return array
|
643 |
+
*/
|
644 |
+
public function get_item_schema() {
|
645 |
+
$schema = [
|
646 |
+
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
647 |
+
'title' => 'Withdraw',
|
648 |
+
'type' => 'object',
|
649 |
+
'properties' => [
|
650 |
+
'id' => [
|
651 |
+
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
652 |
+
'type' => 'integer',
|
653 |
+
'context' => [ 'view', 'edit' ],
|
654 |
+
'readonly' => true,
|
655 |
+
],
|
656 |
+
'user' => [
|
657 |
+
'description' => __( 'Requested User', 'dokan-lite' ),
|
658 |
+
'type' => 'object',
|
659 |
+
'context' => [ 'view' ],
|
660 |
+
'readonly' => true,
|
661 |
+
],
|
662 |
+
'user_id' => [
|
663 |
+
'required' => false,
|
664 |
+
'description' => __( 'Requested User ID', 'dokan-lite' ),
|
665 |
+
'type' => 'integer',
|
666 |
+
'context' => [ 'edit' ],
|
667 |
+
],
|
668 |
+
'amount' => [
|
669 |
+
'required' => true,
|
670 |
+
'description' => __( 'The amount of discount. Should always be numeric, even if setting a percentage.', 'dokan-lite' ),
|
671 |
+
'type' => 'string',
|
672 |
+
'context' => [ 'view', 'edit' ],
|
673 |
+
],
|
674 |
+
'created_date' => [
|
675 |
+
'description' => __( "The date the withdraw request has beed created in the site's timezone.", 'dokan-lite' ),
|
676 |
+
'type' => 'date-time',
|
677 |
+
'context' => [ 'view' ],
|
678 |
+
'readonly' => true,
|
679 |
+
],
|
680 |
+
'status' => [
|
681 |
+
'required' => false,
|
682 |
+
'description' => __( "Withdraw status", 'dokan-lite' ),
|
683 |
+
'type' => 'string',
|
684 |
+
'enum' => [ 'pending', 'approved', 'cancelled' ],
|
685 |
+
'context' => [ 'view', 'edit' ],
|
686 |
+
'default' => 'pending',
|
687 |
+
],
|
688 |
+
'method' => [
|
689 |
+
'required' => true,
|
690 |
+
'description' => __( "Withdraw Method", 'dokan-lite' ),
|
691 |
+
'type' => 'string',
|
692 |
+
'enum' => array_keys( dokan_withdraw_register_methods() ),
|
693 |
+
'context' => [ 'view', 'edit' ],
|
694 |
+
],
|
695 |
+
'note' => [
|
696 |
+
'required' => false,
|
697 |
+
'description' => __( "Withdraw Notes", 'dokan-lite' ),
|
698 |
+
'type' => 'string',
|
699 |
+
'context' => [ 'view', 'edit' ],
|
700 |
+
'default' => '',
|
701 |
+
],
|
702 |
+
'ip' => [
|
703 |
+
'description' => __( "User IP", 'dokan-lite' ),
|
704 |
+
'type' => 'string',
|
705 |
+
'context' => [ 'view' ],
|
706 |
+
'readonly' => true,
|
707 |
+
],
|
708 |
+
],
|
709 |
+
];
|
710 |
+
|
711 |
+
return $this->add_additional_fields_schema( $schema );
|
712 |
+
}
|
713 |
+
|
714 |
+
/**
|
715 |
+
* Schema for batch processing
|
716 |
+
*
|
717 |
+
* @since DOKAN_LITE_SINCE
|
718 |
+
*
|
719 |
+
* @return array
|
720 |
+
*/
|
721 |
+
public function get_public_batch_schema() {
|
722 |
+
$schema = [
|
723 |
+
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
724 |
+
'title' => 'batch',
|
725 |
+
'type' => 'object',
|
726 |
+
'properties' => [
|
727 |
+
'approved' => [
|
728 |
+
'required' => false,
|
729 |
+
'description' => __( 'List of withdraw IDs to be approved', 'dokan-lite' ),
|
730 |
+
'type' => 'array',
|
731 |
+
'context' => [ 'edit' ],
|
732 |
+
'default' => [],
|
733 |
+
'items' => [
|
734 |
+
'type' => 'integer',
|
735 |
+
],
|
736 |
+
],
|
737 |
+
'cancelled' => [
|
738 |
+
'required' => false,
|
739 |
+
'description' => __( 'List of withdraw IDs to be cancelled', 'dokan-lite' ),
|
740 |
+
'type' => 'array',
|
741 |
+
'context' => [ 'edit' ],
|
742 |
+
'default' => [],
|
743 |
+
'items' => [
|
744 |
+
'type' => 'integer',
|
745 |
+
],
|
746 |
+
],
|
747 |
+
'delete' => [
|
748 |
+
'required' => false,
|
749 |
+
'description' => __( 'List of withdraw IDs to be deleted', 'dokan-lite' ),
|
750 |
+
'type' => 'array',
|
751 |
+
'context' => [ 'edit' ],
|
752 |
+
'default' => [],
|
753 |
+
'items' => [
|
754 |
+
'type' => 'integer',
|
755 |
+
],
|
756 |
+
]
|
757 |
+
],
|
758 |
+
];
|
759 |
+
|
760 |
+
return $schema;
|
761 |
+
}
|
762 |
+
}
|
includes/{class-registration.php → Registration.php}
RENAMED
@@ -1,17 +1,17 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Vendor Registration
|
5 |
*
|
6 |
* @since 2.8
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
function __construct() {
|
11 |
-
|
12 |
-
/* Register vendor registration shortcode */
|
13 |
-
add_shortcode( 'dokan-vendor-registration', array( $this, 'render_shortcode' ) );
|
14 |
-
|
15 |
// validate registration
|
16 |
add_filter( 'woocommerce_process_registration_errors', array( $this, 'validate_registration' ) );
|
17 |
add_filter( 'woocommerce_registration_errors', array( $this, 'validate_registration' ) );
|
@@ -21,32 +21,6 @@ class Dokan_Registration {
|
|
21 |
add_action( 'woocommerce_created_customer', array( $this, 'save_vendor_info' ), 10, 2 );
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* Vendor regsitration form shortcode callback
|
26 |
-
*
|
27 |
-
* @return string
|
28 |
-
*/
|
29 |
-
public function render_shortcode() {
|
30 |
-
|
31 |
-
if ( is_user_logged_in() ) {
|
32 |
-
esc_html_e( 'You are already logged in', 'dokan-lite' );
|
33 |
-
return;
|
34 |
-
}
|
35 |
-
|
36 |
-
Dokan_Assets::load_form_validate_script();
|
37 |
-
|
38 |
-
wp_enqueue_script( 'dokan-form-validate' );
|
39 |
-
wp_enqueue_script( 'dokan-vendor-registration' );
|
40 |
-
|
41 |
-
ob_start();
|
42 |
-
$postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok.
|
43 |
-
|
44 |
-
dokan_get_template_part( 'account/vendor-registration', false, array( 'postdata' => $postdata ) );
|
45 |
-
$content = ob_get_clean();
|
46 |
-
|
47 |
-
return apply_filters( 'dokan_vendor_reg_form', $content );
|
48 |
-
}
|
49 |
-
|
50 |
/**
|
51 |
* Validate vendor registration
|
52 |
*
|
@@ -55,7 +29,6 @@ class Dokan_Registration {
|
|
55 |
* @return \WP_Error
|
56 |
*/
|
57 |
function validate_registration( $error ) {
|
58 |
-
|
59 |
if ( is_checkout() ) {
|
60 |
return $error;
|
61 |
}
|
@@ -143,9 +116,15 @@ class Dokan_Registration {
|
|
143 |
return;
|
144 |
}
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
$dokan_settings = array(
|
147 |
'store_name' => sanitize_text_field( wp_unslash( $post_data['shopname'] ) ),
|
148 |
-
'social' =>
|
149 |
'payment' => array(),
|
150 |
'phone' => sanitize_text_field( wp_unslash( $post_data['phone'] ) ),
|
151 |
'show_email' => 'no',
|
@@ -155,6 +134,28 @@ class Dokan_Registration {
|
|
155 |
'banner' => 0,
|
156 |
);
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
update_user_meta( $user_id, 'dokan_profile_settings', $dokan_settings );
|
159 |
update_user_meta( $user_id, 'dokan_store_name', $dokan_settings['store_name'] );
|
160 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
|
7 |
/**
|
8 |
* Vendor Registration
|
9 |
*
|
10 |
* @since 2.8
|
11 |
*/
|
12 |
+
class Registration {
|
13 |
|
14 |
function __construct() {
|
|
|
|
|
|
|
|
|
15 |
// validate registration
|
16 |
add_filter( 'woocommerce_process_registration_errors', array( $this, 'validate_registration' ) );
|
17 |
add_filter( 'woocommerce_registration_errors', array( $this, 'validate_registration' ) );
|
21 |
add_action( 'woocommerce_created_customer', array( $this, 'save_vendor_info' ), 10, 2 );
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* Validate vendor registration
|
26 |
*
|
29 |
* @return \WP_Error
|
30 |
*/
|
31 |
function validate_registration( $error ) {
|
|
|
32 |
if ( is_checkout() ) {
|
33 |
return $error;
|
34 |
}
|
116 |
return;
|
117 |
}
|
118 |
|
119 |
+
$social_profiles = array();
|
120 |
+
|
121 |
+
foreach ( dokan_get_social_profile_fields() as $key => $item ) {
|
122 |
+
$social_profiles[$key] = '';
|
123 |
+
}
|
124 |
+
|
125 |
$dokan_settings = array(
|
126 |
'store_name' => sanitize_text_field( wp_unslash( $post_data['shopname'] ) ),
|
127 |
+
'social' => $social_profiles,
|
128 |
'payment' => array(),
|
129 |
'phone' => sanitize_text_field( wp_unslash( $post_data['phone'] ) ),
|
130 |
'show_email' => 'no',
|
134 |
'banner' => 0,
|
135 |
);
|
136 |
|
137 |
+
// Intially add values on profile completion progress bar
|
138 |
+
$dokan_settings['profile_completion']['store_name'] = 10;
|
139 |
+
$dokan_settings['profile_completion']['phone'] = 10;
|
140 |
+
$dokan_settings['profile_completion']['next_todo'] = 'banner_val';
|
141 |
+
$dokan_settings['profile_completion']['progress'] = 20;
|
142 |
+
$dokan_settings['profile_completion']['progress_vals'] = array(
|
143 |
+
'banner_val' => 15,
|
144 |
+
'profile_picture_val' => 15,
|
145 |
+
'store_name_val' => 10,
|
146 |
+
'address_val' => 10,
|
147 |
+
'phone_val' => 10,
|
148 |
+
'map_val' => 15,
|
149 |
+
'payment_method_val' => 15,
|
150 |
+
'social_val' => array(
|
151 |
+
'fb' => 2,
|
152 |
+
'gplus' => 2,
|
153 |
+
'twitter' => 2,
|
154 |
+
'youtube' => 2,
|
155 |
+
'linkedin' => 2,
|
156 |
+
),
|
157 |
+
);
|
158 |
+
|
159 |
update_user_meta( $user_id, 'dokan_profile_settings', $dokan_settings );
|
160 |
update_user_meta( $user_id, 'dokan_store_name', $dokan_settings['store_name'] );
|
161 |
|
classes/rewrites.php → includes/Rewrites.php
RENAMED
@@ -1,11 +1,13 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Dokan rewrite rules class
|
5 |
*
|
6 |
* @package Dokan
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
public $query_vars = array();
|
11 |
public $custom_store_url = '';
|
@@ -27,25 +29,6 @@ class Dokan_Rewrites {
|
|
27 |
add_filter( 'woocommerce_get_breadcrumb', array( $this, 'store_page_breadcrumb' ) );
|
28 |
}
|
29 |
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Initializes the Dokan_Rewrites() class
|
33 |
-
*
|
34 |
-
* @since 2.5.2
|
35 |
-
*
|
36 |
-
* Checks for an existing Dokan_Rewrites() instance
|
37 |
-
* and if it doesn't find one, creates it.
|
38 |
-
*/
|
39 |
-
public static function init() {
|
40 |
-
static $instance = false;
|
41 |
-
|
42 |
-
if ( ! $instance ) {
|
43 |
-
$instance = new Dokan_Rewrites();
|
44 |
-
}
|
45 |
-
|
46 |
-
return $instance;
|
47 |
-
}
|
48 |
-
|
49 |
/**
|
50 |
* Generate breadcrumb for store page
|
51 |
*
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
/**
|
6 |
* Dokan rewrite rules class
|
7 |
*
|
8 |
* @package Dokan
|
9 |
*/
|
10 |
+
class Rewrites {
|
11 |
|
12 |
public $query_vars = array();
|
13 |
public $custom_store_url = '';
|
29 |
add_filter( 'woocommerce_get_breadcrumb', array( $this, 'store_page_breadcrumb' ) );
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Generate breadcrumb for store page
|
34 |
*
|
includes/Shortcodes/BestSellingProduct.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class BestSellingProduct extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-best-selling-product';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Render best selling products
|
13 |
+
*
|
14 |
+
* @param array $atts
|
15 |
+
*
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
function render_shortcode( $atts ) {
|
19 |
+
/**
|
20 |
+
* Filter return the number of best selling product per page.
|
21 |
+
*
|
22 |
+
* @since 2.2
|
23 |
+
*
|
24 |
+
* @param array
|
25 |
+
*/
|
26 |
+
$atts_val = shortcode_atts( apply_filters( 'dokan_best_selling_product_per_page', array(
|
27 |
+
'no_of_product' => 8,
|
28 |
+
'seller_id' => ''
|
29 |
+
), $atts ), $atts );
|
30 |
+
|
31 |
+
ob_start();
|
32 |
+
?>
|
33 |
+
<ul class="products">
|
34 |
+
<?php
|
35 |
+
$best_selling_query = dokan_get_best_selling_products( $atts_val['no_of_product'], $atts_val['seller_id'] );
|
36 |
+
?>
|
37 |
+
<?php while ( $best_selling_query->have_posts() ) : $best_selling_query->the_post(); ?>
|
38 |
+
|
39 |
+
<?php wc_get_template_part( 'content', 'product' ); ?>
|
40 |
+
|
41 |
+
<?php endwhile; ?>
|
42 |
+
</ul>
|
43 |
+
<?php
|
44 |
+
|
45 |
+
return ob_get_clean();
|
46 |
+
}
|
47 |
+
}
|
includes/Shortcodes/Dashboard.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class Dashboard extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-dashboard';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Load template files
|
13 |
+
*
|
14 |
+
* Based on the query vars, load the appropriate template files
|
15 |
+
* in the frontend user dashboard.
|
16 |
+
*
|
17 |
+
* @param array $atts
|
18 |
+
*
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
public function render_shortcode( $atts ) {
|
22 |
+
global $wp;
|
23 |
+
|
24 |
+
if ( ! function_exists( 'WC' ) ) {
|
25 |
+
return sprintf( __( 'Please install <a href="%s"><strong>WooCommerce</strong></a> plugin first', 'dokan-lite' ), 'http://wordpress.org/plugins/woocommerce/' );
|
26 |
+
}
|
27 |
+
|
28 |
+
if ( ! dokan_is_user_seller( get_current_user_id() ) ) {
|
29 |
+
return __( 'You have no permission to view this page', 'dokan-lite' );
|
30 |
+
}
|
31 |
+
|
32 |
+
ob_start();
|
33 |
+
|
34 |
+
if ( isset( $wp->query_vars['products'] ) ) {
|
35 |
+
if ( ! current_user_can( 'dokan_view_product_menu' ) ) {
|
36 |
+
dokan_get_template_part( 'global/no-permission' );
|
37 |
+
} else {
|
38 |
+
dokan_get_template_part( 'products/products' );
|
39 |
+
}
|
40 |
+
|
41 |
+
return ob_get_clean();
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( isset( $wp->query_vars['new-product'] ) ) {
|
45 |
+
if ( ! current_user_can( 'dokan_add_product' ) ) {
|
46 |
+
dokan_get_template_part( 'global/no-permission' );
|
47 |
+
} else {
|
48 |
+
do_action( 'dokan_render_new_product_template', $wp->query_vars );
|
49 |
+
}
|
50 |
+
|
51 |
+
return ob_get_clean();
|
52 |
+
}
|
53 |
+
|
54 |
+
if ( isset( $wp->query_vars['orders'] ) ) {
|
55 |
+
if ( ! current_user_can( 'dokan_view_order_menu' ) ) {
|
56 |
+
dokan_get_template_part( 'global/no-permission' );
|
57 |
+
} else {
|
58 |
+
dokan_get_template_part( 'orders/orders' );
|
59 |
+
}
|
60 |
+
|
61 |
+
return ob_get_clean();
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( isset( $wp->query_vars['withdraw'] ) ) {
|
65 |
+
if ( ! current_user_can( 'dokan_view_withdraw_menu' ) ) {
|
66 |
+
dokan_get_template_part( 'global/no-permission' );
|
67 |
+
} else {
|
68 |
+
dokan_get_template_part( 'withdraw/withdraw' );
|
69 |
+
}
|
70 |
+
|
71 |
+
return ob_get_clean();
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( isset( $wp->query_vars['settings'] ) ) {
|
75 |
+
dokan_get_template_part('settings/store');
|
76 |
+
|
77 |
+
return ob_get_clean();
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( isset( $wp->query_vars['page'] ) ) {
|
81 |
+
if ( ! current_user_can( 'dokan_view_overview_menu' ) ) {
|
82 |
+
dokan_get_template_part( 'global/no-permission' );
|
83 |
+
} else {
|
84 |
+
dokan_get_template_part( 'dashboard/dashboard' );
|
85 |
+
}
|
86 |
+
|
87 |
+
return ob_get_clean();
|
88 |
+
}
|
89 |
+
if ( isset( $wp->query_vars['edit-account'] ) ) {
|
90 |
+
dokan_get_template_part( 'dashboard/edit-account' );
|
91 |
+
|
92 |
+
return ob_get_clean();
|
93 |
+
}
|
94 |
+
|
95 |
+
do_action( 'dokan_load_custom_template', $wp->query_vars );
|
96 |
+
|
97 |
+
return ob_get_clean();
|
98 |
+
}
|
99 |
+
}
|
includes/Shortcodes/MyOrders.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class MyOrders extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-my-orders';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Render my orders page
|
13 |
+
*
|
14 |
+
* @return string
|
15 |
+
*/
|
16 |
+
public function render_shortcode( $atts ) {
|
17 |
+
if ( ! is_user_logged_in() ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
ob_start();
|
22 |
+
|
23 |
+
dokan_get_template_part( 'my-orders' );
|
24 |
+
|
25 |
+
return ob_get_clean();
|
26 |
+
}
|
27 |
+
}
|
includes/Shortcodes/Shortcodes.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Shortcodes\BestSellingProduct;
|
6 |
+
use WeDevs\Dokan\Shortcodes\Dashboard;
|
7 |
+
use WeDevs\Dokan\Shortcodes\MyOrders;
|
8 |
+
use WeDevs\Dokan\Shortcodes\Stores;
|
9 |
+
use WeDevs\Dokan\Shortcodes\TopRatedProduct;
|
10 |
+
use WeDevs\Dokan\Shortcodes\VendorRegistration;
|
11 |
+
|
12 |
+
class Shortcodes {
|
13 |
+
|
14 |
+
private $shortcodes = [];
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Register Dokan shortcodes
|
18 |
+
*
|
19 |
+
* @since DOKAN_LITE_SINCE
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function __construct() {
|
24 |
+
$this->shortcodes = apply_filters( 'dokan_shortcodes', [
|
25 |
+
'dokan-dashboard' => new Dashboard(),
|
26 |
+
'dokan-best-selling-product' => new BestSellingProduct(),
|
27 |
+
'dokan-top-rated-product' => new TopRatedProduct(),
|
28 |
+
'dokan-my-orders' => new MyOrders(),
|
29 |
+
'dokan-stores' => new Stores(),
|
30 |
+
'dokan-vendor-registration' => new VendorRegistration(),
|
31 |
+
] );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get registered shortcode classes
|
36 |
+
*
|
37 |
+
* @since DOKAN_LITE_SINCE
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_shortcodes() {
|
42 |
+
return $this->shortcodes;
|
43 |
+
}
|
44 |
+
}
|
includes/Shortcodes/Stores.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class Stores extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-stores';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Displays the store lists
|
13 |
+
*
|
14 |
+
* @since 2.4
|
15 |
+
*
|
16 |
+
* @param array $atts
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public function render_shortcode( $atts ) {
|
21 |
+
$defaults = array(
|
22 |
+
'per_page' => 10,
|
23 |
+
'search' => 'yes',
|
24 |
+
'per_row' => 3,
|
25 |
+
'featured' => 'no'
|
26 |
+
);
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Filter return the number of store listing number per page.
|
30 |
+
*
|
31 |
+
* @since 2.2
|
32 |
+
*
|
33 |
+
* @param array
|
34 |
+
*/
|
35 |
+
$attr = shortcode_atts( apply_filters( 'dokan_store_listing_per_page', $defaults ), $atts );
|
36 |
+
$paged = (int) is_front_page() ? max( 1, get_query_var( 'page' ) ) : max( 1, get_query_var( 'paged' ) );
|
37 |
+
$limit = $attr['per_page'];
|
38 |
+
$offset = ( $paged - 1 ) * $limit;
|
39 |
+
|
40 |
+
$seller_args = array(
|
41 |
+
'number' => $limit,
|
42 |
+
'offset' => $offset
|
43 |
+
);
|
44 |
+
|
45 |
+
$_get_data = wp_unslash( $_GET );
|
46 |
+
|
47 |
+
// if search is enabled, perform a search
|
48 |
+
if ( 'yes' == $attr['search'] ) {
|
49 |
+
if ( ! empty( $_get_data['dokan_seller_search'] ) ) {
|
50 |
+
$seller_args['meta_query'] = [
|
51 |
+
[
|
52 |
+
'key' => 'dokan_store_name',
|
53 |
+
'value' => wc_clean( $_get_data['dokan_seller_search'] ),
|
54 |
+
'compare' => 'LIKE'
|
55 |
+
]
|
56 |
+
];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( $attr['featured'] == 'yes' ) {
|
61 |
+
$seller_args['featured'] = 'yes';
|
62 |
+
}
|
63 |
+
|
64 |
+
$sellers = dokan_get_sellers( apply_filters( 'dokan_seller_listing_args', $seller_args, $_GET ) );
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Filter for store listing args
|
68 |
+
*
|
69 |
+
* @since 2.4.9
|
70 |
+
*/
|
71 |
+
$template_args = apply_filters( 'dokan_store_list_args', array(
|
72 |
+
'sellers' => $sellers,
|
73 |
+
'limit' => $limit,
|
74 |
+
'offset' => $offset,
|
75 |
+
'paged' => $paged,
|
76 |
+
'image_size' => 'full',
|
77 |
+
'search' => $attr['search'],
|
78 |
+
'per_row' => $attr['per_row']
|
79 |
+
) );
|
80 |
+
|
81 |
+
ob_start();
|
82 |
+
dokan_get_template_part( 'store-lists', false, $template_args );
|
83 |
+
$content = ob_get_clean();
|
84 |
+
|
85 |
+
return apply_filters( 'dokan_seller_listing', $content, $attr );
|
86 |
+
}
|
87 |
+
}
|
includes/Shortcodes/TopRatedProduct.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class TopRatedProduct extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-top-rated-product';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Render top rated products via shortcode
|
13 |
+
*
|
14 |
+
* @param array $atts
|
15 |
+
*
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
public function render_shortcode( $atts ) {
|
19 |
+
/**
|
20 |
+
* Filter return the number of top rated product per page.
|
21 |
+
*
|
22 |
+
* @since 2.2
|
23 |
+
*
|
24 |
+
* @param array
|
25 |
+
*/
|
26 |
+
$per_page = shortcode_atts( apply_filters( 'dokan_top_rated_product_per_page', array(
|
27 |
+
'no_of_product' => 8
|
28 |
+
), $atts ), $atts );
|
29 |
+
|
30 |
+
ob_start();
|
31 |
+
?>
|
32 |
+
<ul class="products">
|
33 |
+
<?php
|
34 |
+
$best_selling_query = dokan_get_top_rated_products();
|
35 |
+
|
36 |
+
while ( $best_selling_query->have_posts() ) {
|
37 |
+
$best_selling_query->the_post();
|
38 |
+
|
39 |
+
wc_get_template_part( 'content', 'product' );
|
40 |
+
}
|
41 |
+
?>
|
42 |
+
</ul>
|
43 |
+
<?php
|
44 |
+
|
45 |
+
return ob_get_clean();
|
46 |
+
}
|
47 |
+
}
|
includes/Shortcodes/VendorRegistration.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Shortcodes;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanShortcode;
|
6 |
+
|
7 |
+
class VendorRegistration extends DokanShortcode {
|
8 |
+
|
9 |
+
protected $shortcode = 'dokan-vendor-registration';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Vendor regsitration form shortcode callback
|
13 |
+
*
|
14 |
+
* @return string
|
15 |
+
*/
|
16 |
+
public function render_shortcode( $atts ) {
|
17 |
+
if ( is_user_logged_in() ) {
|
18 |
+
esc_html_e( 'You are already logged in', 'dokan-lite' );
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
dokan()->scripts->load_form_validate_script();
|
23 |
+
|
24 |
+
wp_enqueue_script( 'dokan-form-validate' );
|
25 |
+
wp_enqueue_script( 'dokan-vendor-registration' );
|
26 |
+
|
27 |
+
ob_start();
|
28 |
+
$postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok.
|
29 |
+
|
30 |
+
dokan_get_template_part( 'account/vendor-registration', false, array( 'postdata' => $postdata ) );
|
31 |
+
$content = ob_get_clean();
|
32 |
+
|
33 |
+
return apply_filters( 'dokan_vendor_reg_form', $content );
|
34 |
+
}
|
35 |
+
}
|
includes/{theme-support/class-divi.php → ThemeSupport/Divi.php}
RENAMED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Divi Theme Support
|
5 |
*
|
@@ -7,7 +9,7 @@
|
|
7 |
*
|
8 |
* @since 3.0
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* The constructor
|
@@ -64,5 +66,3 @@ class Dokan_Theme_Support_Divi {
|
|
64 |
return $classes;
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
-
return new Dokan_Theme_Support_Divi();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
/**
|
6 |
* Divi Theme Support
|
7 |
*
|
9 |
*
|
10 |
* @since 3.0
|
11 |
*/
|
12 |
+
class Divi {
|
13 |
|
14 |
/**
|
15 |
* The constructor
|
66 |
return $classes;
|
67 |
}
|
68 |
}
|
|
|
|
includes/ThemeSupport/Electro.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Electro Theme Support
|
7 |
+
*
|
8 |
+
* @see https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624?ref=wedevs
|
9 |
+
*
|
10 |
+
* @since 2.9.30
|
11 |
+
*/
|
12 |
+
class Electro {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The constructor
|
16 |
+
*/
|
17 |
+
function __construct() {
|
18 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'store_listing_style' ], 100 );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Reset store listing style
|
23 |
+
*
|
24 |
+
* @since 2.9.30
|
25 |
+
*
|
26 |
+
* @return void
|
27 |
+
*/
|
28 |
+
public function store_listing_style() {
|
29 |
+
if ( ! dokan_is_store_listing() ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data {margin-top: 10px}';
|
34 |
+
$style .= '#dokan-seller-listing-wrap .dokan-btn-theme.dokan-follow-store-button {border: 1px solid; padding: 7px 12px 7px 12px}';
|
35 |
+
|
36 |
+
wp_add_inline_style( 'dokan-style', $style );
|
37 |
+
}
|
38 |
+
}
|
includes/ThemeSupport/Enfold.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Enfold Theme Support
|
7 |
+
*
|
8 |
+
* @see https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?ref=wedevs
|
9 |
+
*
|
10 |
+
* @since 2.9.30
|
11 |
+
*/
|
12 |
+
class Enfold {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The constructor
|
16 |
+
*/
|
17 |
+
function __construct() {
|
18 |
+
add_filter( 'avia_layout_filter', [ $this, 'filter_layout_classes' ] );
|
19 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'store_listing_style' ], 100 );
|
20 |
+
add_filter( 'avf_enqueue_wp_mediaelement', '__return_true' );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Filter layout class
|
25 |
+
*
|
26 |
+
* @since 2.9.30
|
27 |
+
*
|
28 |
+
* @param array $classes
|
29 |
+
*
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
public function filter_layout_classes( $classes ) {
|
33 |
+
if ( dokan_is_store_listing() && ! empty( $classes['current'] ) ) {
|
34 |
+
$classes['current'] = [ 'content' => 'av-content-full alpha', 'sidebar' => 'hidden', 'meta' => '','entry' => '', 'main' => '' ];
|
35 |
+
}
|
36 |
+
|
37 |
+
return $classes;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Reset store listing style
|
42 |
+
*
|
43 |
+
* @since 2.9.30
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function store_listing_style() {
|
48 |
+
if ( ! dokan_is_store_listing() ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
|
52 |
+
add_filter( 'avf_sidebar_position', '__return_false' );
|
53 |
+
|
54 |
+
$style = '.container .av-content-full.units {border: 0}';
|
55 |
+
$style .= '.content .entry-content-wrapper {padding: 0}';
|
56 |
+
$style .= '#dokan-seller-listing-wrap .store-banner a {position: unset !important}';
|
57 |
+
$style .= '#dokan-store-listing-filter-wrap .right .item select {width: 130px; display: inline-block; color: #000; font-size: 14px; border-radius: 3px; padding: 11px 20px}';
|
58 |
+
$style .= '#dokan-store-listing-filter-wrap .right .item form.sort-by.item {display: inline-block}';
|
59 |
+
$style .= '#top label {font-weight: normal; font-size: 14px}';
|
60 |
+
$style .= '.template-page .entry-content-wrapper h2 a {text-transform: capitalize !important}';
|
61 |
+
$style .= '#dokan-seller-listing-wrap .dokan-single-seller .store-content .store-data-container .store-data {margin-top: 15px}';
|
62 |
+
|
63 |
+
|
64 |
+
wp_add_inline_style( 'dokan-style', $style );
|
65 |
+
}
|
66 |
+
}
|
includes/{theme-support/class-flatsome.php → ThemeSupport/Flatsome.php}
RENAMED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Flatsome Theme Support
|
5 |
*
|
@@ -7,7 +9,7 @@
|
|
7 |
*
|
8 |
* @since 3.0
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* The constructor
|
@@ -32,7 +34,7 @@ class Dokan_Theme_Support_Flatsome {
|
|
32 |
return;
|
33 |
}
|
34 |
|
35 |
-
|
36 |
wp_enqueue_script( 'dokan-vendor-registration' );
|
37 |
}
|
38 |
|
@@ -102,34 +104,15 @@ class Dokan_Theme_Support_Flatsome {
|
|
102 |
|
103 |
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 a {text-decoration: none}';
|
104 |
$style .= '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 {font-size: 24px; margin: 20px 0 10px 0}';
|
105 |
-
$style .= '#dokan-store-listing-filter-form-wrap:before {top: -74px; height: 0}';
|
106 |
-
$style .= 'form.sort-by.item {margin-bottom: 0}';
|
107 |
-
$style .= '#dokan-store-listing-filter-wrap .left .store-count {margin-bottom: 0}';
|
108 |
-
$style .= '#dokan-store-listing-filter-wrap .right .sort-by.item label {display: inline-block}';
|
109 |
-
$style .= '#dokan-store-listing-filter-wrap .right #stores_orderby {height:auto; border-radius: 3px; box-shadow: none; margin-bottom: 0; display: inline-block; width: auto}';
|
110 |
$style .= '#dokan-store-listing-filter-wrap .right .item button, #dokan-store-listing-filter-form-wrap .apply-filter #apply-filter-btn {text-transform: capitalize}';
|
111 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item .dokan-icons {z-index: 10}';
|
112 |
$style .= '#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-footer[class] button {text-transform: capitalize}';
|
113 |
-
$style .= '#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class] {font-size: 14px}';
|
114 |
-
$style .= '.store-lists-other-filter-wrap .dokan-geolocation-location-filters .location-address .locate-icon, .dokan-geolocation-location-filters .location-address .locate-loader {top: 40%;}';
|
115 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars a {border: none; margin: 0}';
|
116 |
$style .= '#dokan-seller-listing-wrap .dokan-btn-theme.dokan-follow-store-button {text-transform: capitalize}';
|
117 |
|
118 |
-
|
119 |
-
$style .= '@media (max-width: 414px) { #dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {margin: 0}';
|
120 |
-
$style .= '#dokan-store-listing-filter-wrap .right {margin-top: 15px}';
|
121 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 15px}';
|
122 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {padding: 8px 15px 8px 16px}';
|
123 |
-
$style .= '}';
|
124 |
-
|
125 |
-
$style .= '@media (max-width: 375px) { ';
|
126 |
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 14px}';
|
127 |
$style .= '}';
|
128 |
|
129 |
wp_add_inline_style( 'dokan-style', $style );
|
130 |
-
wp_enqueue_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', '', WC_VERSION, 'all' );
|
131 |
}
|
132 |
|
133 |
}
|
134 |
-
|
135 |
-
return new Dokan_Theme_Support_Flatsome();
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
/**
|
6 |
* Flatsome Theme Support
|
7 |
*
|
9 |
*
|
10 |
* @since 3.0
|
11 |
*/
|
12 |
+
class Flatsome {
|
13 |
|
14 |
/**
|
15 |
* The constructor
|
34 |
return;
|
35 |
}
|
36 |
|
37 |
+
dokan()->scripts->load_form_validate_script();
|
38 |
wp_enqueue_script( 'dokan-vendor-registration' );
|
39 |
}
|
40 |
|
104 |
|
105 |
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 a {text-decoration: none}';
|
106 |
$style .= '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 {font-size: 24px; margin: 20px 0 10px 0}';
|
|
|
|
|
|
|
|
|
|
|
107 |
$style .= '#dokan-store-listing-filter-wrap .right .item button, #dokan-store-listing-filter-form-wrap .apply-filter #apply-filter-btn {text-transform: capitalize}';
|
|
|
108 |
$style .= '#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-footer[class] button {text-transform: capitalize}';
|
|
|
|
|
|
|
109 |
$style .= '#dokan-seller-listing-wrap .dokan-btn-theme.dokan-follow-store-button {text-transform: capitalize}';
|
110 |
|
111 |
+
$style .= '@media (max-width: 414px) { ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 14px}';
|
113 |
$style .= '}';
|
114 |
|
115 |
wp_add_inline_style( 'dokan-style', $style );
|
|
|
116 |
}
|
117 |
|
118 |
}
|
|
|
|
includes/ThemeSupport/Manager.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Dokan Theme Support
|
7 |
+
*
|
8 |
+
* @since 3.0
|
9 |
+
*
|
10 |
+
* @package Dokan
|
11 |
+
*/
|
12 |
+
class Manager {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Constructor
|
16 |
+
*/
|
17 |
+
public function __construct() {
|
18 |
+
$this->include_support();
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Include supported theme compatibility
|
23 |
+
*
|
24 |
+
* @return void
|
25 |
+
*/
|
26 |
+
private function include_support() {
|
27 |
+
$supported_themes = apply_filters( 'dokan_load_theme_support_files', [
|
28 |
+
'storefront' => Storefront::class,
|
29 |
+
'flatsome' => Flatsome::class,
|
30 |
+
'divi' => Divi::class,
|
31 |
+
'rehub' => Rehub::class,
|
32 |
+
'electro' => Electro::class,
|
33 |
+
'enfold' => Enfold::class,
|
34 |
+
] );
|
35 |
+
|
36 |
+
$theme = $this->format( strtolower( get_template() ) );
|
37 |
+
|
38 |
+
if ( array_key_exists( $theme, $supported_themes ) && class_exists( $supported_themes[ $theme ] ) ) {
|
39 |
+
new $supported_themes[ $theme ]();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Format theme name. ( Remove `-theme` from the string )
|
45 |
+
*
|
46 |
+
* @since 2.9.30
|
47 |
+
*
|
48 |
+
* @param string $string
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
private function format( $string ) {
|
53 |
+
if ( false !== strpos( $string, '-theme' ) ) {
|
54 |
+
$string = substr( $string, 0, strlen( $string ) - 6 );
|
55 |
+
}
|
56 |
+
|
57 |
+
return $string;
|
58 |
+
}
|
59 |
+
}
|
includes/ThemeSupport/Rehub.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Rehub Theme Support
|
7 |
+
*
|
8 |
+
* @since 2.9.17
|
9 |
+
*/
|
10 |
+
class Rehub {
|
11 |
+
/**
|
12 |
+
* The constructor
|
13 |
+
*/
|
14 |
+
public function __construct() {
|
15 |
+
add_filter( 'dokan_load_hamburger_menu', [ $this, 'load_hamburger_menu'] );
|
16 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'set_content_type' ] );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Remove hamburger menu
|
21 |
+
*
|
22 |
+
* @since 2.9.17
|
23 |
+
*
|
24 |
+
* @return boolean
|
25 |
+
*/
|
26 |
+
public function load_hamburger_menu() {
|
27 |
+
return false;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Make store listing page full width
|
32 |
+
*
|
33 |
+
* @since DOKAN_LITE_SINCE
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function set_content_type() {
|
38 |
+
if ( ! dokan_is_store_listing() ) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
$style = '.dokan-single-seller .store-content .store-data p {margin: 0}';
|
43 |
+
$style .= '.dokan-single-seller .store-content .store-data h2 {margin: 20px 0 15px 0}';
|
44 |
+
|
45 |
+
wp_add_inline_style( 'dokan-style', $style );
|
46 |
+
|
47 |
+
if ( 'full_width' !== get_post_meta( get_the_ID(), 'content_type', true ) ) {
|
48 |
+
update_post_meta( get_the_ID(), 'content_type', 'full_width' );
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
includes/ThemeSupport/Storefront.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\ThemeSupport;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Storefront Theme Support
|
7 |
+
*
|
8 |
+
* @see https://woocommerce.com/storefront/
|
9 |
+
*
|
10 |
+
* @since 3.0
|
11 |
+
*/
|
12 |
+
class Storefront {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The constructor
|
16 |
+
*/
|
17 |
+
function __construct() {
|
18 |
+
add_action( 'storefront_page_after', [ $this, 'remove_sidebar'], 5 );
|
19 |
+
add_filter( 'body_class', [ $this, 'full_width_page'] );
|
20 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'reset_style' ] );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Remove sidebar from store and dashboard page
|
25 |
+
*
|
26 |
+
* @return void
|
27 |
+
*/
|
28 |
+
public function remove_sidebar() {
|
29 |
+
if ( dokan_is_store_page() || dokan_is_seller_dashboard() ) {
|
30 |
+
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Makes the store and dashboard page full width
|
36 |
+
*
|
37 |
+
* @param array $classes
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function full_width_page( $classes ) {
|
42 |
+
|
43 |
+
if ( dokan_is_store_page() || dokan_is_seller_dashboard() ) {
|
44 |
+
|
45 |
+
if ( ! in_array( 'page-template-template-fullwidth-php', $classes ) ) {
|
46 |
+
$classes[] = 'page-template-template-fullwidth-php';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
return $classes;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Reset style
|
55 |
+
*
|
56 |
+
* @since 2.9.30
|
57 |
+
*
|
58 |
+
* @return void
|
59 |
+
*/
|
60 |
+
public function reset_style() {
|
61 |
+
if ( ! dokan_is_store_listing() ) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 a {text-decoration: none}';
|
66 |
+
$style .= '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 {font-size: 24px; margin: 20px 0 10px 0}';
|
67 |
+
|
68 |
+
wp_add_inline_style( 'dokan-style', $style );
|
69 |
+
}
|
70 |
+
}
|
classes/tracker.php → includes/Tracker.php
RENAMED
@@ -1,12 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* Dokan tracker
|
5 |
*
|
6 |
* @since 2.4.11
|
7 |
* @since 2.8.7 Using AppSero\Insights for tracking
|
8 |
*/
|
9 |
-
class
|
10 |
|
11 |
public $insights = null;
|
12 |
|
@@ -18,7 +20,6 @@ class Dokan_Tracker {
|
|
18 |
* @return void
|
19 |
*/
|
20 |
public function __construct() {
|
21 |
-
|
22 |
$this->appsero_init_tracker_dokan();
|
23 |
}
|
24 |
|
@@ -30,12 +31,7 @@ class Dokan_Tracker {
|
|
30 |
* @return void
|
31 |
*/
|
32 |
public function appsero_init_tracker_dokan() {
|
33 |
-
|
34 |
-
if ( ! class_exists( 'Appsero\Client' ) ) {
|
35 |
-
require_once DOKAN_LIB_DIR . '/appsero/Client.php';
|
36 |
-
}
|
37 |
-
|
38 |
-
$client = new Appsero\Client( '559bcc0d-21b4-4b34-8317-3e072badf46d', 'Dokan Multivendor Marketplace', DOKAN_FILE );
|
39 |
|
40 |
$this->insights = $client->insights();
|
41 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan;
|
4 |
+
|
5 |
/**
|
6 |
* Dokan tracker
|
7 |
*
|
8 |
* @since 2.4.11
|
9 |
* @since 2.8.7 Using AppSero\Insights for tracking
|
10 |
*/
|
11 |
+
class Tracker {
|
12 |
|
13 |
public $insights = null;
|
14 |
|
20 |
* @return void
|
21 |
*/
|
22 |
public function __construct() {
|
|
|
23 |
$this->appsero_init_tracker_dokan();
|
24 |
}
|
25 |
|
31 |
* @return void
|
32 |
*/
|
33 |
public function appsero_init_tracker_dokan() {
|
34 |
+
$client = new \Appsero\Client( '559bcc0d-21b4-4b34-8317-3e072badf46d', 'Dokan Multivendor Marketplace', DOKAN_FILE );
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
$this->insights = $client->insights();
|
37 |
|
includes/Traits/AjaxResponseError.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Traits;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use WP_Error;
|
7 |
+
use WeDevs\Dokan\Exceptions\DokanException;
|
8 |
+
|
9 |
+
trait AjaxResponseError {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Send Ajax error response
|
13 |
+
*
|
14 |
+
* @since DOKAN_LITE_SINCE
|
15 |
+
*
|
16 |
+
* @param \Exception $e
|
17 |
+
* @param string $default_message
|
18 |
+
*
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
protected static function send_response_error( Exception $e, $default_message = '' ) {
|
22 |
+
if ( $e instanceof DokanException ) {
|
23 |
+
$error_code = $e->get_error_code();
|
24 |
+
|
25 |
+
if ( $error_code instanceof WP_Error ) {
|
26 |
+
wp_send_json_error( $error_code, 400 );
|
27 |
+
}
|
28 |
+
|
29 |
+
wp_send_json_error( $e->get_message(), $e->get_status_code() );
|
30 |
+
}
|
31 |
+
|
32 |
+
$default_message = $default_message ? $default_message : __( 'Something went wrong', 'dokan-lite' );
|
33 |
+
wp_send_json_error( $default_message, 422 );
|
34 |
+
}
|
35 |
+
}
|
includes/Traits/ChainableContainer.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Traits;
|
4 |
+
|
5 |
+
trait ChainableContainer {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Contains chainable class instances
|
9 |
+
*
|
10 |
+
* @var array
|
11 |
+
*/
|
12 |
+
protected $container = [];
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Magic getter to get chainable container instance
|
16 |
+
*
|
17 |
+
* @since DOKAN_LITE_SINCE
|
18 |
+
*
|
19 |
+
* @param string $prop
|
20 |
+
*
|
21 |
+
* @return mixed
|
22 |
+
*/
|
23 |
+
public function __get( $prop ) {
|
24 |
+
if ( array_key_exists( $prop, $this->container ) ) {
|
25 |
+
return $this->container[ $prop ];
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
includes/Traits/RESTResponseError.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Traits;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use WP_Error;
|
7 |
+
use WeDevs\Dokan\Exceptions\DokanException;
|
8 |
+
|
9 |
+
trait RESTResponseError {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Send REST error response
|
13 |
+
*
|
14 |
+
* @since DOKAN_LITE_SINCE
|
15 |
+
*
|
16 |
+
* @param \Exception $e
|
17 |
+
* @param string $default_message
|
18 |
+
*
|
19 |
+
* @return \WP_Error
|
20 |
+
*/
|
21 |
+
protected function send_response_error( Exception $e, $default_message = '' ) {
|
22 |
+
if ( $e instanceof DokanException ) {
|
23 |
+
return new WP_Error(
|
24 |
+
$e->get_error_code(),
|
25 |
+
$e->get_message(),
|
26 |
+
[ 'status' => $e->get_status_code() ]
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
$default_message = $default_message ? $default_message : __( 'Something went wrong', 'dokan-lite' );
|
31 |
+
|
32 |
+
return new WP_Error(
|
33 |
+
'something_went_wrong',
|
34 |
+
$default_message,
|
35 |
+
[ 'status' => 422 ]
|
36 |
+
);
|
37 |
+
}
|
38 |
+
}
|
includes/Traits/Singleton.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Traits;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Singleton Trait
|
7 |
+
*
|
8 |
+
* @since 1.0.0
|
9 |
+
*/
|
10 |
+
trait Singleton {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Singleton class instance holder
|
14 |
+
*
|
15 |
+
* @since 1.0.0
|
16 |
+
*
|
17 |
+
* @var object
|
18 |
+
*/
|
19 |
+
protected static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Make a class instance
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
*
|
26 |
+
* @return object
|
27 |
+
*/
|
28 |
+
public static function instance() {
|
29 |
+
if ( ! isset( static::$instance ) && ! ( static::$instance instanceof static ) ) {
|
30 |
+
static::$instance = new static();
|
31 |
+
|
32 |
+
if ( method_exists( static::$instance, 'boot' ) ) {
|
33 |
+
static::$instance->boot();
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
return static::$instance;
|
38 |
+
}
|
39 |
+
}
|
includes/Upgrade/AdminNotice.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use WeDevs\Dokan\Exceptions\DokanException;
|
7 |
+
use WeDevs\Dokan\Traits\AjaxResponseError;
|
8 |
+
|
9 |
+
class AdminNotice {
|
10 |
+
|
11 |
+
use AjaxResponseError;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Show admin notice to upgrade Dokan
|
15 |
+
*
|
16 |
+
* @since DOKAN_LITE_SINCE
|
17 |
+
*
|
18 |
+
* @return void
|
19 |
+
*/
|
20 |
+
public static function show_notice() {
|
21 |
+
if ( ! current_user_can( 'update_plugins' ) || dokan()->upgrades->has_ongoing_process() ) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( ! dokan()->upgrades->is_upgrade_required() ) {
|
26 |
+
/**
|
27 |
+
* Fires when upgrade is not required
|
28 |
+
*
|
29 |
+
* @since DOKAN_LITE_SINCE
|
30 |
+
*/
|
31 |
+
do_action( 'dokan_upgrade_is_not_required' );
|
32 |
+
return;
|
33 |
+
}
|
34 |
+
|
35 |
+
dokan_get_template_part( 'upgrade-notice' );
|
36 |
+
wp_enqueue_style( 'dokan-upgrade', DOKAN_PLUGIN_ASSEST . '/css/dokan-upgrade.css', [], DOKAN_PLUGIN_VERSION );
|
37 |
+
wp_localize_script( 'dokan-vue-vendor', 'dokan', dokan()->scripts->get_admin_localized_scripts() );
|
38 |
+
wp_enqueue_script( 'dokan-upgrade', DOKAN_PLUGIN_ASSEST . '/js/dokan-upgrade.js', [ 'jquery', 'dokan-vue-vendor', 'dokan-vue-bootstrap' ], DOKAN_PLUGIN_VERSION, true );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Ajax handler method to initiate Dokan upgrade process
|
43 |
+
*
|
44 |
+
* @since DOKAN_LITE_SINCE
|
45 |
+
*
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public static function do_upgrade() {
|
49 |
+
check_ajax_referer( 'dokan_admin' );
|
50 |
+
|
51 |
+
try {
|
52 |
+
if ( ! current_user_can( 'update_plugins' ) ) {
|
53 |
+
throw new DokanException( 'dokan_ajax_upgrade_error', __( 'You are not authorize to perform this operation.', 'dokan-lite' ), 403 );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( dokan()->upgrades->has_ongoing_process() ) {
|
57 |
+
throw new DokanException( 'dokan_ajax_upgrade_error', __( 'There is an upgrading process going on.', 'dokan-lite' ), 400 );
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( ! dokan()->upgrades->is_upgrade_required() ) {
|
61 |
+
throw new DokanException( 'dokan_ajax_upgrade_error', __( 'Update is not required.', 'dokan-lite' ), 400 );
|
62 |
+
}
|
63 |
+
|
64 |
+
dokan()->upgrades->do_upgrade();
|
65 |
+
|
66 |
+
wp_send_json_success( [ 'success' => true ], 201 );
|
67 |
+
} catch ( Exception $e ) {
|
68 |
+
self::send_response_error( $e );
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
includes/Upgrade/Hooks.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade;
|
4 |
+
|
5 |
+
class Hooks {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class constructor
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
public function __construct() {
|
15 |
+
add_filter( 'dokan_upgrade_is_upgrade_required', [ Upgrades::class, 'is_upgrade_required' ], 1 );
|
16 |
+
add_filter( 'dokan_upgrade_upgrades', [ Upgrades::class, 'get_upgrades' ], 1 );
|
17 |
+
add_action( 'admin_notices', [ AdminNotice::class, 'show_notice' ] );
|
18 |
+
add_action( 'wp_ajax_dokan_do_upgrade', [ AdminNotice::class, 'do_upgrade' ] );
|
19 |
+
add_action( 'dokan_upgrade_is_not_required', [ Upgrades::class, 'update_db_dokan_version' ] );
|
20 |
+
add_action( 'dokan_upgrade_finished', [ Upgrades::class, 'update_db_dokan_version' ] );
|
21 |
+
}
|
22 |
+
}
|
includes/Upgrade/Manager.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade;
|
4 |
+
|
5 |
+
class Manager {
|
6 |
+
|
7 |
+
private $is_upgrading_db_key = 'dokan_is_upgrading';
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Checks if update is required or not
|
11 |
+
*
|
12 |
+
* @since DOKAN_LITE_SINCE
|
13 |
+
*
|
14 |
+
* @return bool
|
15 |
+
*/
|
16 |
+
public function is_upgrade_required() {
|
17 |
+
/**
|
18 |
+
* Filter to upgrade is required or not
|
19 |
+
*
|
20 |
+
* @since DOKAN_LITE_SINCE
|
21 |
+
*
|
22 |
+
* @param bool $is_required Is upgrade required
|
23 |
+
*/
|
24 |
+
return apply_filters( 'dokan_upgrade_is_upgrade_required', false );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Checks for any ongoing process
|
29 |
+
*
|
30 |
+
* @since DOKAN_LITE_SINCE
|
31 |
+
*
|
32 |
+
* @return bool
|
33 |
+
*/
|
34 |
+
public function has_ongoing_process() {
|
35 |
+
return !! get_option( $this->is_upgrading_db_key, false );
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get upgradable upgrades
|
40 |
+
*
|
41 |
+
* @since DOKAN_LITE_SINCE
|
42 |
+
*
|
43 |
+
* @return array
|
44 |
+
*/
|
45 |
+
public function get_upgrades() {
|
46 |
+
$upgrades = get_option( $this->is_upgrading_db_key, null );
|
47 |
+
|
48 |
+
if ( ! empty( $upgrades ) ) {
|
49 |
+
return $upgrades;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Filter upgrades
|
54 |
+
*
|
55 |
+
* @since DOKAN_LITE_SINCE
|
56 |
+
*
|
57 |
+
* @var array
|
58 |
+
*/
|
59 |
+
$upgrades = apply_filters( 'dokan_upgrade_upgrades', [] );
|
60 |
+
|
61 |
+
uksort( $upgrades, function ( $a, $b ) {
|
62 |
+
return version_compare( $b, $a, '<' );
|
63 |
+
} );
|
64 |
+
|
65 |
+
update_option( $this->is_upgrading_db_key, $upgrades, false );
|
66 |
+
|
67 |
+
return $upgrades;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Run upgrades
|
72 |
+
*
|
73 |
+
* This will execute every method found in a
|
74 |
+
* upgrader class, execute `run` method defined
|
75 |
+
* in `DokanUpgrader` abstract class and then finally,
|
76 |
+
* `update_db_version` will update the db version
|
77 |
+
* reference in database.
|
78 |
+
*
|
79 |
+
* @since DOKAN_LITE_SINCE
|
80 |
+
*
|
81 |
+
* @return void
|
82 |
+
*/
|
83 |
+
public function do_upgrade() {
|
84 |
+
$upgrades = $this->get_upgrades();
|
85 |
+
|
86 |
+
foreach ( $upgrades as $version => $upgraders ) {
|
87 |
+
foreach ( $upgraders as $upgrader ) {
|
88 |
+
$required_version = null;
|
89 |
+
|
90 |
+
if ( is_array( $upgrader ) ) {
|
91 |
+
$required_version = $upgrader['require'];
|
92 |
+
$upgrader = $upgrader['upgrader'];
|
93 |
+
}
|
94 |
+
|
95 |
+
call_user_func( [ $upgrader, 'run' ], $required_version );
|
96 |
+
call_user_func( [ $upgrader, 'update_db_version' ] );
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
delete_option( $this->is_upgrading_db_key );
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Fires after finish the upgrading
|
104 |
+
*
|
105 |
+
* At this point plugin should update the
|
106 |
+
* db version key to version constant like DOKAN_PLUGIN_VERSION
|
107 |
+
*
|
108 |
+
* @since DOKAN_LITE_SINCE
|
109 |
+
*/
|
110 |
+
do_action( 'dokan_upgrade_finished' );
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
includes/Upgrade/Upgrades.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade;
|
4 |
+
|
5 |
+
class Upgrades {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Dokan Lite upgraders
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
private static $upgrades = [
|
15 |
+
'1.2' => Upgrades\V_1_2::class,
|
16 |
+
'2.1' => Upgrades\V_2_1::class,
|
17 |
+
'2.3' => Upgrades\V_2_3::class,
|
18 |
+
'2.4.11' => Upgrades\V_2_4_11::class,
|
19 |
+
'2.4.12' => Upgrades\V_2_4_12::class,
|
20 |
+
'2.5.7' => Upgrades\V_2_5_7::class,
|
21 |
+
'2.6.9' => Upgrades\V_2_6_9::class,
|
22 |
+
'2.7.3' => Upgrades\V_2_7_3::class,
|
23 |
+
'2.7.6' => Upgrades\V_2_7_6::class,
|
24 |
+
'2.8.0' => Upgrades\V_2_8_0::class,
|
25 |
+
'2.8.3' => Upgrades\V_2_8_3::class,
|
26 |
+
'2.8.6' => Upgrades\V_2_8_6::class,
|
27 |
+
'2.9.4' => Upgrades\V_2_9_4::class,
|
28 |
+
'2.9.13' => Upgrades\V_2_9_13::class,
|
29 |
+
'2.9.16' => Upgrades\V_2_9_16::class,
|
30 |
+
'2.9.19' => Upgrades\V_2_9_19::class,
|
31 |
+
'2.9.23' => Upgrades\V_2_9_23::class,
|
32 |
+
];
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get DB installed version number
|
36 |
+
*
|
37 |
+
* @since DOKAN_LITE_SINCE
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public static function get_db_installed_version() {
|
42 |
+
return get_option( dokan()->get_db_version_key(), null );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Checks if upgrade is required or not
|
47 |
+
*
|
48 |
+
* @since DOKAN_LITE_SINCE
|
49 |
+
*
|
50 |
+
* @param bool $is_required
|
51 |
+
*
|
52 |
+
* @return bool
|
53 |
+
*/
|
54 |
+
public static function is_upgrade_required( $is_required = false ) {
|
55 |
+
$installed_version = self::get_db_installed_version();
|
56 |
+
$upgrade_versions = array_keys( self::$upgrades );
|
57 |
+
|
58 |
+
if ( $installed_version && version_compare( $installed_version, end( $upgrade_versions ), '<' ) ) {
|
59 |
+
return true;
|
60 |
+
}
|
61 |
+
|
62 |
+
return $is_required;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Update Dokan DB version
|
67 |
+
*
|
68 |
+
* @since DOKAN_LITE_SINCE
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
public static function update_db_dokan_version() {
|
73 |
+
$installed_version = self::get_db_installed_version();
|
74 |
+
|
75 |
+
if ( version_compare( $installed_version, DOKAN_PLUGIN_VERSION, '<' ) ) {
|
76 |
+
update_option( dokan()->get_db_version_key(), DOKAN_PLUGIN_VERSION );
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get upgrades
|
82 |
+
*
|
83 |
+
* @since DOKAN_LITE_SINCE
|
84 |
+
*
|
85 |
+
* @param array $upgrades
|
86 |
+
*
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
public static function get_upgrades( $upgrades = [] ) {
|
90 |
+
if ( ! self::is_upgrade_required() ) {
|
91 |
+
return $upgrades;
|
92 |
+
}
|
93 |
+
|
94 |
+
$installed_version = self::get_db_installed_version();
|
95 |
+
|
96 |
+
foreach ( self::$upgrades as $version => $class_name ) {
|
97 |
+
if ( version_compare( $installed_version , $version, '<' ) ) {
|
98 |
+
$upgrades[ $version ][] = $class_name;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return $upgrades;
|
103 |
+
}
|
104 |
+
}
|
includes/{upgrades/background-processes/class_dokan_update_2_8_3_vendor_balance.php → Upgrade/Upgrades/BackgroundProcesses/V_2_8_3_VendorBalance.php}
RENAMED
@@ -1,22 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Update vendor and product geolocation data
|
7 |
*
|
8 |
* @since 2.8.6
|
9 |
*/
|
10 |
-
class
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Action
|
14 |
-
*
|
15 |
-
* @since 2.8.6
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
protected $action = 'dokan_update_2_8_3_vendor_balance';
|
20 |
|
21 |
/**
|
22 |
* Perform updates
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanBackgroundProcesses;
|
6 |
|
7 |
/**
|
8 |
* Update vendor and product geolocation data
|
9 |
*
|
10 |
* @since 2.8.6
|
11 |
*/
|
12 |
+
class V_2_8_3_VendorBalance extends DokanBackgroundProcesses {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Perform updates
|
includes/{upgrades/background-processes/class_dokan_update_2_9_16_store_settings.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_16_StoreSettings.php}
RENAMED
@@ -1,22 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Dokan 2.9.16 updater class
|
7 |
*
|
8 |
* @since 2.9.16
|
9 |
*/
|
10 |
-
class
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Action
|
14 |
-
*
|
15 |
-
* @since 2.9.16
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
protected $action = 'dokan_update_2_9_16_store_settings';
|
20 |
|
21 |
/**
|
22 |
* Perform updates
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanBackgroundProcesses;
|
6 |
|
7 |
/**
|
8 |
* Dokan 2.9.16 updater class
|
9 |
*
|
10 |
* @since 2.9.16
|
11 |
*/
|
12 |
+
class V_2_9_16_StoreSettings extends DokanBackgroundProcesses {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Perform updates
|
includes/{upgrades/background-processes/class_dokan_update_2_9_23_store_name.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_23_StoreName.php}
RENAMED
@@ -1,22 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Dokan store name updater class
|
7 |
*
|
8 |
* @since 2.9.23
|
9 |
*/
|
10 |
-
class
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Action
|
14 |
-
*
|
15 |
-
* @since 2.9.23
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
protected $action = 'dokan_update_2_9_23_store_name';
|
20 |
|
21 |
/**
|
22 |
* Perform updates
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanBackgroundProcesses;
|
6 |
|
7 |
/**
|
8 |
* Dokan store name updater class
|
9 |
*
|
10 |
* @since 2.9.23
|
11 |
*/
|
12 |
+
class V_2_9_23_StoreName extends DokanBackgroundProcesses {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Perform updates
|
includes/{upgrades/background-processes/class_dokan_update_2_9_4_order_post_author.php → Upgrade/Upgrades/BackgroundProcesses/V_2_9_4_OrderPostAuthor.php}
RENAMED
@@ -1,22 +1,15 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* Dokan 2.9.4 updater class
|
7 |
*
|
8 |
* @since 2.9.4
|
9 |
*/
|
10 |
-
class
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Action
|
14 |
-
*
|
15 |
-
* @since 2.9.4
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
protected $action = 'dokan_update_2_9_4_order_post_author';
|
20 |
|
21 |
/**
|
22 |
* Perform updates
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanBackgroundProcesses;
|
6 |
|
7 |
/**
|
8 |
* Dokan 2.9.4 updater class
|
9 |
*
|
10 |
* @since 2.9.4
|
11 |
*/
|
12 |
+
class V_2_9_4_OrderPostAuthor extends DokanBackgroundProcesses {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
/**
|
15 |
* Perform updates
|
includes/Upgrade/Upgrades/V_1_2.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_1_2 extends DokanUpgrader {
|
8 |
+
|
9 |
+
public static function generate_sync_table() {
|
10 |
+
dokan_generate_sync_table();
|
11 |
+
}
|
12 |
+
}
|
includes/Upgrade/Upgrades/V_2_1.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_1 extends DokanUpgrader {
|
8 |
+
|
9 |
+
public static function create_announcement_table() {
|
10 |
+
$dokan_installer = new \WeDevs\Dokan\Install\Installer();
|
11 |
+
$dokan_installer->create_announcement_table();
|
12 |
+
}
|
13 |
+
}
|
includes/Upgrade/Upgrades/V_2_3.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WP_Query;
|
6 |
+
use WP_User_Query;
|
7 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
8 |
+
|
9 |
+
class V_2_3 extends DokanUpgrader {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Upgrade necessary meta for
|
13 |
+
* new product design
|
14 |
+
*
|
15 |
+
* @since 2.3
|
16 |
+
*
|
17 |
+
* @return void
|
18 |
+
*/
|
19 |
+
public static function upgrade_product_meta() {
|
20 |
+
$args = [
|
21 |
+
'post_type' => 'product',
|
22 |
+
'posts_per_page' => -1,
|
23 |
+
];
|
24 |
+
|
25 |
+
$product_query = new WP_Query( $args );
|
26 |
+
|
27 |
+
if ( $product_query->posts ) {
|
28 |
+
foreach ($product_query->posts as $post ) {
|
29 |
+
$product = wc_get_product( $post->ID );
|
30 |
+
|
31 |
+
if ( get_post_meta( $post->ID, '_product_attributes', true ) ) {
|
32 |
+
update_post_meta( $post->ID, '_has_attribute', 'yes' );
|
33 |
+
}
|
34 |
+
|
35 |
+
if ( $product->has_child() ) {
|
36 |
+
update_post_meta( $post->ID, '_create_variation', 'yes' );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Upgrade store meta for sellers
|
45 |
+
* and replace old address meta with new address meta
|
46 |
+
*
|
47 |
+
* @since 2.3
|
48 |
+
*
|
49 |
+
* @return void
|
50 |
+
*/
|
51 |
+
public static function upgrade_store_meta() {
|
52 |
+
$query = new WP_User_Query( [
|
53 |
+
'role' => 'seller',
|
54 |
+
] );
|
55 |
+
$sellers = $query->get_results();
|
56 |
+
|
57 |
+
$default_settings = [
|
58 |
+
'store_name' => '',
|
59 |
+
'location' => '',
|
60 |
+
'find_address' => '',
|
61 |
+
'banner' => '',
|
62 |
+
'phone' => '',
|
63 |
+
'show_email' => '',
|
64 |
+
'gravatar' => '',
|
65 |
+
'payment' => [],
|
66 |
+
'social' => []
|
67 |
+
];
|
68 |
+
|
69 |
+
foreach ( $sellers as $seller ) {
|
70 |
+
$current_settings = dokan_get_store_info( $seller->ID );
|
71 |
+
$current_settings = wp_parse_args($current_settings, $default_settings);
|
72 |
+
$old_address = $current_settings['address'];
|
73 |
+
|
74 |
+
$new_address = [
|
75 |
+
'street_1' => $old_address,
|
76 |
+
'street_2' => '',
|
77 |
+
'city' => '',
|
78 |
+
'zip' => '',
|
79 |
+
'country' => '',
|
80 |
+
'state' => ''
|
81 |
+
];
|
82 |
+
|
83 |
+
$current_settings['address'] = $new_address;
|
84 |
+
update_user_meta( $seller->ID, 'dokan_profile_settings', $current_settings );
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
includes/Upgrade/Upgrades/V_2_4_11.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_4_11 extends DokanUpgrader {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Upgrade capabilities for sellers
|
11 |
+
*
|
12 |
+
* @since 2.4.11
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
public static function upgrade_seller_capability() {
|
17 |
+
global $wp_roles;
|
18 |
+
$wp_roles->add_cap( 'seller', 'edit_shop_orders' );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Add new table for refund request
|
23 |
+
*
|
24 |
+
* @since 2.4.11
|
25 |
+
*
|
26 |
+
* @return void
|
27 |
+
*/
|
28 |
+
public static function create_refund_table() {
|
29 |
+
global $wpdb;
|
30 |
+
include_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
31 |
+
$sql = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}dokan_refund` (
|
32 |
+
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
33 |
+
`order_id` bigint(20) unsigned NOT NULL,
|
34 |
+
`seller_id` bigint(20) NOT NULL,
|
35 |
+
`refund_amount` float(11) NOT NULL,
|
36 |
+
`refund_reason` text NULL,
|
37 |
+
`item_qtys` varchar(50) NULL,
|
38 |
+
`item_totals` varchar(50) NULL,
|
39 |
+
`item_tax_totals` varchar(50) NULL,
|
40 |
+
`restock_items` varchar(10) NULL,
|
41 |
+
`date` timestamp NOT NULL,
|
42 |
+
`status` int(1) NOT NULL,
|
43 |
+
`method` varchar(30) NOT NULL,
|
44 |
+
PRIMARY KEY (id)
|
45 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
|
46 |
+
|
47 |
+
dbDelta( $sql );
|
48 |
+
}
|
49 |
+
}
|
includes/Upgrade/Upgrades/V_2_4_12.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WP_User_Query;
|
6 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
7 |
+
|
8 |
+
class V_2_4_12 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Upgrade meta for sellers
|
12 |
+
*
|
13 |
+
* @since 2.4.12
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
public static function upgrade_seller_meta() {
|
18 |
+
$query = new WP_User_Query( [
|
19 |
+
'role' => 'seller',
|
20 |
+
] );
|
21 |
+
|
22 |
+
$sellers = $query->get_results();
|
23 |
+
|
24 |
+
foreach ( $sellers as $seller ) {
|
25 |
+
$store_info = dokan_get_store_info( $seller->ID );
|
26 |
+
update_user_meta( $seller->ID, 'dokan_store_name', esc_html( $store_info['store_name'] ) );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
includes/Upgrade/Upgrades/V_2_5_7.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_5_7 extends DokanUpgrader {
|
8 |
+
|
9 |
+
public static function remove_notice_meta() {
|
10 |
+
delete_option( 'dokan_4th_yr_aniv_44_perc_discount_tracking_notice' );
|
11 |
+
}
|
12 |
+
}
|
includes/Upgrade/Upgrades/V_2_6_9.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WP_Query;
|
6 |
+
use WP_Term_Query;
|
7 |
+
use WP_User_Query;
|
8 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
9 |
+
|
10 |
+
class V_2_6_9 extends DokanUpgrader {
|
11 |
+
|
12 |
+
public static function update_user_capability() {
|
13 |
+
$role = get_role( 'seller' );
|
14 |
+
$role->add_cap( 'edit_product' );
|
15 |
+
}
|
16 |
+
|
17 |
+
public static function replace_seller_commission() {
|
18 |
+
$seller_percentage = dokan_get_seller_percentage();
|
19 |
+
$options = get_option( 'dokan_selling' );
|
20 |
+
$options['admin_percentage'] = 100 - (float) $seller_percentage;
|
21 |
+
update_option( 'dokan_selling', $options );
|
22 |
+
}
|
23 |
+
|
24 |
+
public static function replace_seller_commission_by_seller() {
|
25 |
+
$args = [
|
26 |
+
'role' => 'seller',
|
27 |
+
'meta_query' => [
|
28 |
+
[
|
29 |
+
'key' => 'dokan_seller_percentage',
|
30 |
+
'value' => '',
|
31 |
+
'compare' => '!='
|
32 |
+
]
|
33 |
+
]
|
34 |
+
];
|
35 |
+
|
36 |
+
$user_query = new WP_User_Query( $args );
|
37 |
+
$sellers = $user_query->get_results();
|
38 |
+
foreach ( $sellers as $s ) {
|
39 |
+
$seller_percentage = get_user_meta( $s->ID, 'dokan_seller_percentage', true );
|
40 |
+
$admin_percentage = 100 - (int) $seller_percentage;
|
41 |
+
update_user_meta( $s->ID, 'dokan_admin_percentage', $admin_percentage );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
public static function replace_product_commissions() {
|
46 |
+
$args = [
|
47 |
+
'post_type' => 'product',
|
48 |
+
'meta_query' => [
|
49 |
+
[
|
50 |
+
'key' => '_per_product_commission',
|
51 |
+
'value' => '',
|
52 |
+
'compare' => '!='
|
53 |
+
]
|
54 |
+
]
|
55 |
+
];
|
56 |
+
|
57 |
+
$query = new WP_Query( $args );
|
58 |
+
$products = $query->get_posts();
|
59 |
+
|
60 |
+
foreach ( $products as $p ) {
|
61 |
+
$seller_commission = get_post_meta( $p->ID, '_per_product_commission' );
|
62 |
+
$admin_commission = 100 - (float) $seller_commission;
|
63 |
+
update_post_meta( $p->ID, '_per_product_admin_commission', $admin_commission );
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
public static function replace_category_commission_meta() {
|
68 |
+
$args = [
|
69 |
+
'taxonomy' => 'product_cat',
|
70 |
+
'hide_empty' => true,
|
71 |
+
'meta_key' => 'per_category_commission'
|
72 |
+
];
|
73 |
+
|
74 |
+
$the_query = new WP_Term_Query( $args );
|
75 |
+
$terms = $the_query->get_terms();
|
76 |
+
|
77 |
+
foreach ( $terms as $t ) {
|
78 |
+
$admin_commission = 100 - (int) get_term_meta( $t->term_id, 'per_category_commission', true );
|
79 |
+
update_term_meta( $t->term_id, 'per_category_admin_commission', $admin_commission );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
includes/Upgrade/Upgrades/V_2_7_3.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WP_Query;
|
6 |
+
use WP_Roles;
|
7 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
8 |
+
|
9 |
+
class V_2_7_3 extends DokanUpgrader {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Save admin fee as meta for existing sub-orders
|
13 |
+
*/
|
14 |
+
public static function update_order_meta(){
|
15 |
+
$args = [
|
16 |
+
'post_type' => 'shop_order',
|
17 |
+
'posts_per_page' => -1,
|
18 |
+
'post_status' => 'any',
|
19 |
+
'meta_query' => [
|
20 |
+
[
|
21 |
+
'key' => 'has_sub_order',
|
22 |
+
'compare' => 'NOT EXISTS',
|
23 |
+
],
|
24 |
+
[
|
25 |
+
'key' => '_dokan_admin_fee',
|
26 |
+
'compare' => 'NOT EXISTS',
|
27 |
+
],
|
28 |
+
]
|
29 |
+
];
|
30 |
+
|
31 |
+
$query = new WP_Query( $args );
|
32 |
+
|
33 |
+
foreach ( $query->posts as $sub_order ) {
|
34 |
+
$order = wc_get_order( $sub_order->ID );
|
35 |
+
$admin_fee = dokan_get_admin_commission_by( $order, dokan_get_seller_id_by_order( $sub_order->ID ) );
|
36 |
+
update_post_meta( $sub_order->ID , '_dokan_admin_fee', $admin_fee );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Modify column structure to support upto 4 decimals
|
42 |
+
*/
|
43 |
+
public static function update_table_structure(){
|
44 |
+
global $wpdb;
|
45 |
+
|
46 |
+
$wpdb->query(
|
47 |
+
"ALTER TABLE `{$wpdb->prefix}dokan_orders`
|
48 |
+
MODIFY COLUMN order_total float(11,4)"
|
49 |
+
);
|
50 |
+
|
51 |
+
$wpdb->query(
|
52 |
+
"ALTER TABLE `{$wpdb->prefix}dokan_orders`
|
53 |
+
MODIFY COLUMN net_amount float(11,4)"
|
54 |
+
);
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Update seller capabilities
|
60 |
+
*
|
61 |
+
* @since 2.7.3
|
62 |
+
*
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
+
public static function update_user_capabilities() {
|
66 |
+
global $wp_roles;
|
67 |
+
|
68 |
+
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
69 |
+
$wp_roles = new WP_Roles();
|
70 |
+
}
|
71 |
+
|
72 |
+
$capabilities = [];
|
73 |
+
$all_cap = dokan_get_all_caps();
|
74 |
+
|
75 |
+
foreach( $all_cap as $key=>$cap ) {
|
76 |
+
$capabilities = array_merge( $capabilities, array_keys( $cap ) );
|
77 |
+
}
|
78 |
+
|
79 |
+
foreach ( $capabilities as $key => $capability ) {
|
80 |
+
$wp_roles->add_cap( 'seller', $capability );
|
81 |
+
$wp_roles->add_cap( 'administrator', $capability );
|
82 |
+
$wp_roles->add_cap( 'shop_manager', $capability );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
includes/Upgrade/Upgrades/V_2_7_6.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WP_Roles;
|
6 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
7 |
+
|
8 |
+
class V_2_7_6 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Modify ip column to support the max possible length of IPv6
|
12 |
+
*/
|
13 |
+
public static function update_table_structure(){
|
14 |
+
global $wpdb;
|
15 |
+
|
16 |
+
$wpdb->query(
|
17 |
+
"ALTER TABLE `{$wpdb->prefix}dokan_withdraw`
|
18 |
+
MODIFY COLUMN ip varchar(50) NOT NULL"
|
19 |
+
);
|
20 |
+
}
|
21 |
+
|
22 |
+
public static function update_user_capabilities() {
|
23 |
+
global $wp_roles;
|
24 |
+
|
25 |
+
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
26 |
+
$wp_roles = new WP_Roles();
|
27 |
+
}
|
28 |
+
|
29 |
+
$caps = array(
|
30 |
+
'publish_posts' => true,
|
31 |
+
'edit_posts' => true,
|
32 |
+
'delete_published_posts' => true,
|
33 |
+
'edit_published_posts' => true,
|
34 |
+
'delete_posts' => true,
|
35 |
+
'manage_categories' => true,
|
36 |
+
'moderate_comments' => true,
|
37 |
+
'unfiltered_html' => true,
|
38 |
+
'upload_files' => true,
|
39 |
+
'edit_shop_orders' => true,
|
40 |
+
'edit_product' => true,
|
41 |
+
'read_product' => true,
|
42 |
+
'delete_product' => true,
|
43 |
+
'edit_products' => true,
|
44 |
+
'publish_products' => true,
|
45 |
+
'read_private_products' => true,
|
46 |
+
'delete_products' => true,
|
47 |
+
'delete_products' => true,
|
48 |
+
'delete_private_products' => true,
|
49 |
+
'delete_published_products' => true,
|
50 |
+
'delete_published_products' => true,
|
51 |
+
'edit_private_products' => true,
|
52 |
+
'edit_published_products' => true,
|
53 |
+
'manage_product_terms' => true,
|
54 |
+
'delete_product_terms' => true,
|
55 |
+
'assign_product_terms' => true,
|
56 |
+
);
|
57 |
+
|
58 |
+
foreach ( $caps as $cap => $val ) {
|
59 |
+
$wp_roles->add_cap( 'seller', $cap );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
includes/Upgrade/Upgrades/V_2_8_0.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_8_0 extends DokanUpgrader {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Remove product_style option from database
|
11 |
+
*/
|
12 |
+
public static function remove_product_style_option() {
|
13 |
+
delete_option( 'product_style' );
|
14 |
+
}
|
15 |
+
}
|
includes/Upgrade/Upgrades/V_2_8_3.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
use WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses\V_2_8_3_VendorBalance;
|
7 |
+
|
8 |
+
class V_2_8_3 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Add new table for vendor-balance
|
12 |
+
*
|
13 |
+
* @since 2.8.3
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
public static function create_vendor_balance_table_283() {
|
18 |
+
$processor = new V_2_8_3_VendorBalance();
|
19 |
+
|
20 |
+
$args = [
|
21 |
+
'updating' => 'vendor_balance_table',
|
22 |
+
];
|
23 |
+
|
24 |
+
$processor->push_to_queue( $args )->dispatch_process();
|
25 |
+
}
|
26 |
+
}
|
includes/Upgrade/Upgrades/V_2_8_6.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_8_6 extends DokanUpgrader {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Update extra fee recipient settings
|
11 |
+
*
|
12 |
+
* @since 2.8.6
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
public static function update_fees_recipient() {
|
17 |
+
$options = get_option( 'dokan_general', [] );
|
18 |
+
$options['shipping_fee_recipient'] = ! empty( $options['extra_fee_recipient'] ) ? $options['extra_fee_recipient'] : 'seller';
|
19 |
+
$options['tax_fee_recipient'] = ! empty( $options['extra_fee_recipient'] ) ? $options['extra_fee_recipient'] : 'seller';
|
20 |
+
|
21 |
+
update_option( 'dokan_general', $options );
|
22 |
+
}
|
23 |
+
}
|
includes/Upgrade/Upgrades/V_2_9_13.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_9_13 extends DokanUpgrader {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Update single product multi vendor module table
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
public static function update_spmv_product_map_table() {
|
15 |
+
global $wpdb;
|
16 |
+
|
17 |
+
$map_table = $wpdb->prefix . 'dokan_product_map';
|
18 |
+
|
19 |
+
if ( $wpdb->get_var( $wpdb->prepare("show tables like %s", $map_table ) ) !== $map_table ) {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
$columns = $wpdb->get_results( "describe {$map_table}" );
|
24 |
+
|
25 |
+
$columns = array_filter( $columns, function ( $column ) {
|
26 |
+
return 'visibility' === $column->Field;
|
27 |
+
} );
|
28 |
+
|
29 |
+
if ( empty( $columns ) ) {
|
30 |
+
$wpdb->query(
|
31 |
+
"alter table {$map_table} add column visibility tinyint(1) default 1"
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
35 |
+
}
|
includes/Upgrade/Upgrades/V_2_9_16.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
use WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses\V_2_9_16_StoreSettings;
|
7 |
+
|
8 |
+
class V_2_9_16 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Update update store settings
|
12 |
+
*
|
13 |
+
* @since 2.9.16
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
public static function update_store_settings() {
|
18 |
+
$processor = new V_2_9_16_StoreSettings();
|
19 |
+
|
20 |
+
$args = [
|
21 |
+
'updating' => 'store_settings',
|
22 |
+
'paged' => 0
|
23 |
+
];
|
24 |
+
|
25 |
+
$processor->push_to_queue( $args )->dispatch_process();
|
26 |
+
}
|
27 |
+
}
|
includes/Upgrade/Upgrades/V_2_9_19.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
|
7 |
+
class V_2_9_19 extends DokanUpgrader {
|
8 |
+
|
9 |
+
public static function dokan_update_admin_settings_next() {
|
10 |
+
$field_map = [
|
11 |
+
'dokan_general' => [
|
12 |
+
'shipping_fee_recipient' => [ 'shipping_fee_recipient', 'dokan_selling' ],
|
13 |
+
'tax_fee_recipient' => [ 'tax_fee_recipient', 'dokan_selling' ],
|
14 |
+
'store_open_close' => [ 'store_open_close', 'dokan_appearance' ],
|
15 |
+
'store_map' => [ 'store_map', 'dokan_appearance' ],
|
16 |
+
'gmap_api_key' => [ 'gmap_api_key', 'dokan_appearance' ],
|
17 |
+
'contact_seller' => [ 'contact_seller', 'dokan_appearance' ],
|
18 |
+
'enable_theme_store_sidebar' => [ 'enable_theme_store_sidebar', 'dokan_appearance' ],
|
19 |
+
'seller_review_manage' => [ 'seller_review_manage', 'dokan_selling' ],
|
20 |
+
'store_banner_width' => [ 'store_banner_width', 'dokan_appearance' ],
|
21 |
+
'store_banner_height' => [ 'store_banner_height', 'dokan_appearance' ],
|
22 |
+
],
|
23 |
+
'dokan_appearance' => [
|
24 |
+
'setup_wizard_logo_url' => [ 'setup_wizard_logo_url', 'dokan_general' ],
|
25 |
+
],
|
26 |
+
'dokan_selling' => [
|
27 |
+
'enable_shipstation_logging' => [ 'enable_shipstation_logging', 'dokan_general' ],
|
28 |
+
],
|
29 |
+
];
|
30 |
+
|
31 |
+
$options_to_save = [];
|
32 |
+
|
33 |
+
foreach ( $field_map as $old_section => $map ) {
|
34 |
+
$old_settings = get_option( $old_section, [] );
|
35 |
+
|
36 |
+
foreach ( $map as $old_option => $rearranged_option ) {
|
37 |
+
if ( isset( $old_settings[ $old_option ] ) ) {
|
38 |
+
$new_option_option = $rearranged_option[0];
|
39 |
+
$new_section = $rearranged_option[1];
|
40 |
+
|
41 |
+
if ( ! isset( $options_to_save[ $old_section ] ) ) {
|
42 |
+
$options_to_save[ $old_section ] = $old_settings;
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( ! isset( $options_to_save[ $new_section ] ) ) {
|
46 |
+
$options_to_save[ $new_section ] = get_option( $new_section, [] );
|
47 |
+
}
|
48 |
+
|
49 |
+
$options_to_save[ $new_section ][ $new_option_option ] = $old_settings[ $old_option ];
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
foreach ( $options_to_save as $section => $value ) {
|
55 |
+
update_option( $section, $value );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
includes/Upgrade/Upgrades/V_2_9_23.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
use WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses\V_2_9_23_StoreName;
|
7 |
+
|
8 |
+
class V_2_9_23 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Update update store settings
|
12 |
+
*
|
13 |
+
* @since 2.9.23
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
public static function dokan_update_store_name() {
|
18 |
+
$processor = new V_2_9_23_StoreName();
|
19 |
+
|
20 |
+
$args = array(
|
21 |
+
'updating' => 'store_name',
|
22 |
+
'paged' => 0
|
23 |
+
);
|
24 |
+
|
25 |
+
$processor->push_to_queue( $args )->dispatch_process();
|
26 |
+
}
|
27 |
+
}
|
includes/Upgrade/Upgrades/V_2_9_4.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Upgrade\Upgrades;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Abstracts\DokanUpgrader;
|
6 |
+
use WeDevs\Dokan\Upgrade\Upgrades\BackgroundProcesses\V_2_9_4_OrderPostAuthor;
|
7 |
+
|
8 |
+
class V_2_9_4 extends DokanUpgrader {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Update post_author id for shop_orders
|
12 |
+
*
|
13 |
+
* @since 2.9.4
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
public static function update_shop_order_post_author() {
|
18 |
+
$processor = new V_2_9_4_OrderPostAuthor();
|
19 |
+
|
20 |
+
$args = [
|
21 |
+
'updating' => 'shop_order_post_author',
|
22 |
+
'paged' => 0
|
23 |
+
];
|
24 |
+
|
25 |
+
$processor->push_to_queue( $args )->dispatch_process();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Update refund table structure
|
30 |
+
*
|
31 |
+
* @return void
|
32 |
+
*/
|
33 |
+
public static function update_refund_table() {
|
34 |
+
global $wpdb;
|
35 |
+
|
36 |
+
$table_name = $wpdb->prefix . 'dokan_refund';
|
37 |
+
|
38 |
+
if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $table_name ) ) !== $table_name ) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
$columns = [ 'item_qtys', 'item_totals', 'item_tax_totals' ];
|
43 |
+
|
44 |
+
foreach ( $columns as $column ) {
|
45 |
+
$wpdb->query( "ALTER TABLE `{$wpdb->prefix}dokan_refund` MODIFY COLUMN `{$column}` varchar(200)" );
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
includes/{class-vendor-manager.php → Vendor/Manager.php}
RENAMED
@@ -1,11 +1,17 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Vendor Manager Class
|
5 |
*
|
6 |
* @since 2.6.10
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/**
|
11 |
* Total vendors found
|
@@ -109,7 +115,7 @@ class Dokan_Vendor_Manager {
|
|
109 |
* @return object|vednor instance
|
110 |
*/
|
111 |
public function get( $vendor ) {
|
112 |
-
return new
|
113 |
}
|
114 |
|
115 |
/**
|
@@ -162,7 +168,7 @@ class Dokan_Vendor_Manager {
|
|
162 |
|
163 |
$vendor = dokan()->vendor->get( $vendor_id );
|
164 |
|
165 |
-
if ( ! $vendor instanceof
|
166 |
return new WP_Error(
|
167 |
'unable_to_create_vendor',
|
168 |
__( 'Unable to create vendor', 'dokan-lite' ),
|
@@ -280,7 +286,7 @@ class Dokan_Vendor_Manager {
|
|
280 |
$vendor->update_meta( 'dokan_publishing', 'no' );
|
281 |
}
|
282 |
|
283 |
-
if ( isset( $data['admin_commission'] ) && is_numeric( $data['admin_commission'] ) ) {
|
284 |
$vendor->update_meta( 'dokan_admin_percentage', $data['admin_commission'] );
|
285 |
}
|
286 |
|
@@ -318,6 +324,10 @@ class Dokan_Vendor_Manager {
|
|
318 |
$vendor->set_enable_tnc( 'off' );
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
321 |
if ( ! empty( $data['icon'] ) ) {
|
322 |
$vendor->set_icon( $data['icon'] );
|
323 |
}
|
@@ -377,10 +387,10 @@ class Dokan_Vendor_Manager {
|
|
377 |
}
|
378 |
|
379 |
if ( ! empty( $data['store_open_close']['time'] ) ) {
|
380 |
-
$
|
381 |
|
382 |
-
if ( is_array( $
|
383 |
-
$vendor->set_store_times( $
|
384 |
}
|
385 |
}
|
386 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Vendor;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
use WP_User_Query;
|
7 |
+
use WeDevs\Dokan\Vendor\Vendor;
|
8 |
+
|
9 |
/**
|
10 |
* Vendor Manager Class
|
11 |
*
|
12 |
* @since 2.6.10
|
13 |
*/
|
14 |
+
class Manager {
|
15 |
|
16 |
/**
|
17 |
* Total vendors found
|
115 |
* @return object|vednor instance
|
116 |
*/
|
117 |
public function get( $vendor ) {
|
118 |
+
return new Vendor( $vendor );
|
119 |
}
|
120 |
|
121 |
/**
|
168 |
|
169 |
$vendor = dokan()->vendor->get( $vendor_id );
|
170 |
|
171 |
+
if ( ! $vendor instanceof Vendor || $vendor->get_id() === 0 ) {
|
172 |
return new WP_Error(
|
173 |
'unable_to_create_vendor',
|
174 |
__( 'Unable to create vendor', 'dokan-lite' ),
|
286 |
$vendor->update_meta( 'dokan_publishing', 'no' );
|
287 |
}
|
288 |
|
289 |
+
if ( isset( $data['admin_commission'] ) && ( is_numeric( $data['admin_commission'] ) || '' === $data['admin_commission'] ) ) {
|
290 |
$vendor->update_meta( 'dokan_admin_percentage', $data['admin_commission'] );
|
291 |
}
|
292 |
|
324 |
$vendor->set_enable_tnc( 'off' );
|
325 |
}
|
326 |
|
327 |
+
if ( ! empty( $data['store_tnc'] ) ) {
|
328 |
+
$vendor->set_store_tnc( $data['store_tnc'] );
|
329 |
+
}
|
330 |
+
|
331 |
if ( ! empty( $data['icon'] ) ) {
|
332 |
$vendor->set_icon( $data['icon'] );
|
333 |
}
|
387 |
}
|
388 |
|
389 |
if ( ! empty( $data['store_open_close']['time'] ) ) {
|
390 |
+
$store_time = $data['store_open_close']['time'];
|
391 |
|
392 |
+
if ( is_array( $store_time ) && is_callable( [ $vendor, 'set_store_times' ] ) ) {
|
393 |
+
$vendor->set_store_times( $store_time );
|
394 |
}
|
395 |
}
|
396 |
|
classes/seller-setup-wizard.php → includes/Vendor/SetupWizard.php
RENAMED
@@ -1,8 +1,14 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Seller setup wizard class
|
4 |
*/
|
5 |
-
class
|
6 |
/** @var string Currenct Step */
|
7 |
protected $step = '';
|
8 |
|
@@ -340,8 +346,18 @@ class Dokan_Seller_Setup_Wizard extends Dokan_Setup_Wizard {
|
|
340 |
$dokan_settings['address'] = isset( $_POST['address'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['address'] ) ) : array();
|
341 |
$dokan_settings['show_email'] = isset( $_POST['show_email'] ) ? 'yes' : 'no';
|
342 |
|
343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
|
|
|
|
|
345 |
do_action( 'dokan_seller_wizard_store_field_save', $this );
|
346 |
|
347 |
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
@@ -361,21 +377,19 @@ class Dokan_Seller_Setup_Wizard extends Dokan_Setup_Wizard {
|
|
361 |
<?php
|
362 |
foreach ( $methods as $method_key ) {
|
363 |
$method = dokan_withdraw_get_method( $method_key );
|
364 |
-
|
365 |
-
|
366 |
-
<
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
</tr>
|
375 |
-
<?php
|
376 |
}
|
377 |
|
378 |
-
|
379 |
?>
|
380 |
</table>
|
381 |
<p class="wc-setup-actions step">
|
@@ -425,12 +439,24 @@ class Dokan_Seller_Setup_Wizard extends Dokan_Setup_Wizard {
|
|
425 |
$dokan_settings['payment']['paypal'] = array(
|
426 |
'email' => sanitize_email( $posted_data['settings']['paypal']['email'] ),
|
427 |
);
|
|
|
|
|
428 |
}
|
429 |
|
430 |
if ( isset( $posted_data['settings']['skrill'] ) ) {
|
431 |
$dokan_settings['payment']['skrill'] = array(
|
432 |
'email' => sanitize_email( $posted_data['settings']['skrill']['email'] ),
|
433 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
}
|
435 |
|
436 |
update_user_meta( $this->store_id, 'dokan_profile_settings', $dokan_settings );
|
1 |
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Vendor;
|
4 |
+
|
5 |
+
use WC_Countries;
|
6 |
+
use WeDevs\Dokan\Admin\SetupWizard as DokanSetupWizard;
|
7 |
+
|
8 |
/**
|
9 |
* Seller setup wizard class
|
10 |
*/
|
11 |
+
class SetupWizard extends DokanSetupWizard {
|
12 |
/** @var string Currenct Step */
|
13 |
protected $step = '';
|
14 |
|
346 |
$dokan_settings['address'] = isset( $_POST['address'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['address'] ) ) : array();
|
347 |
$dokan_settings['show_email'] = isset( $_POST['show_email'] ) ? 'yes' : 'no';
|
348 |
|
349 |
+
// Check address and add manually values on Profile Completion also increase progress value
|
350 |
+
if ( $dokan_settings['address'] ) {
|
351 |
+
$dokan_settings['profile_completion']['address'] = 10;
|
352 |
+
$profile_settings = get_user_meta( $this->store_id, 'dokan_profile_settings', true );
|
353 |
+
|
354 |
+
if ( ! empty( $profile_settings['profile_completion']['progress'] ) ) {
|
355 |
+
$dokan_settings['profile_completion']['progress'] = $profile_settings['profile_completion']['progress'] + 10;
|
356 |
+
}
|
357 |
+
}
|
358 |
|
359 |
+
update_user_meta( $this->store_id, 'dokan_profile_settings', $dokan_settings );
|
360 |
+
|
361 |
do_action( 'dokan_seller_wizard_store_field_save', $this );
|
362 |
|
363 |
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
377 |
<?php
|
378 |
foreach ( $methods as $method_key ) {
|
379 |
$method = dokan_withdraw_get_method( $method_key );
|
380 |
+
if ( isset( $method['callback'] ) && is_callable( $method['callback'] ) ) {
|
381 |
+
?>
|
382 |
+
<tr>
|
383 |
+
<th scope="row"><label><?php echo esc_html( $method['title'] ); ?></label></th>
|
384 |
+
<td>
|
385 |
+
<?php call_user_func( $method['callback'], $store_info ); ?>
|
386 |
+
</td>
|
387 |
+
</tr>
|
388 |
+
<?php
|
389 |
+
}
|
|
|
|
|
390 |
}
|
391 |
|
392 |
+
do_action( 'dokan_seller_wizard_payment_setup_field', $this );
|
393 |
?>
|
394 |
</table>
|
395 |
<p class="wc-setup-actions step">
|
439 |
$dokan_settings['payment']['paypal'] = array(
|
440 |
'email' => sanitize_email( $posted_data['settings']['paypal']['email'] ),
|
441 |
);
|
442 |
+
$dokan_settings['profile_completion']['paypal'] = 15;
|
443 |
+
$dokan_settings['profile_completion']['skrill'] = 0;
|
444 |
}
|
445 |
|
446 |
if ( isset( $posted_data['settings']['skrill'] ) ) {
|
447 |
$dokan_settings['payment']['skrill'] = array(
|
448 |
'email' => sanitize_email( $posted_data['settings']['skrill']['email'] ),
|
449 |
);
|
450 |
+
$dokan_settings['profile_completion']['skrill'] = 15;
|
451 |
+
$dokan_settings['profile_completion']['paypal'] = 0;
|
452 |
+
}
|
453 |
+
|
454 |
+
// Check any payment methods setups and add manually value on Profile Completion also increase progress value
|
455 |
+
if ( isset( $posted_data['settings']['paypal'] ) || isset( $posted_data['settings']['skrill'] ) ) {
|
456 |
+
$profile_settings = get_user_meta( $this->store_id, 'dokan_profile_settings', true );
|
457 |
+
if ( ! empty( $profile_settings['profile_completion']['progress'] ) ) {
|
458 |
+
$dokan_settings['profile_completion']['progress'] = $profile_settings['profile_completion']['progress'] + 15;
|
459 |
+
}
|
460 |
}
|
461 |
|
462 |
update_user_meta( $this->store_id, 'dokan_profile_settings', $dokan_settings );
|
includes/{class-store-lists-filter.php → Vendor/StoreListsFilter.php}
RENAMED
@@ -1,15 +1,13 @@
|
|
1 |
<?php
|
2 |
-
use Dokan\Traits\Singleton;
|
3 |
|
4 |
-
|
5 |
|
6 |
/**
|
7 |
* Store Lists Class
|
8 |
*
|
9 |
* @since 2.9.30
|
10 |
*/
|
11 |
-
class
|
12 |
-
use Singleton;
|
13 |
|
14 |
/**
|
15 |
* WP_User_Query holder
|
@@ -32,18 +30,7 @@ class Dokan_Store_Lists_Filter {
|
|
32 |
*
|
33 |
* @return void
|
34 |
*/
|
35 |
-
public function
|
36 |
-
$this->hooks();
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Init hooks
|
41 |
-
*
|
42 |
-
* @since 2.9.30
|
43 |
-
*
|
44 |
-
* @return void
|
45 |
-
*/
|
46 |
-
public function hooks() {
|
47 |
$this->maybe_disable_stote_lists_filter();
|
48 |
|
49 |
wp_enqueue_style( 'dashicons' );
|
1 |
<?php
|
|
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Vendor;
|
4 |
|
5 |
/**
|
6 |
* Store Lists Class
|
7 |
*
|
8 |
* @since 2.9.30
|
9 |
*/
|
10 |
+
class StoreListsFilter {
|
|
|
11 |
|
12 |
/**
|
13 |
* WP_User_Query holder
|
30 |
*
|
31 |
* @return void
|
32 |
*/
|
33 |
+
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
$this->maybe_disable_stote_lists_filter();
|
35 |
|
36 |
wp_enqueue_style( 'dashicons' );
|
includes/{class-vendor.php → Vendor/Vendor.php}
RENAMED
@@ -1,11 +1,15 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Vendor
|
5 |
*
|
6 |
* @since 2.6.10
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/**
|
11 |
* The vendor ID
|
@@ -524,6 +528,17 @@ class Dokan_Vendor {
|
|
524 |
return $products;
|
525 |
}
|
526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
/**
|
528 |
* Get the total sales amount of this vendor
|
529 |
*
|
@@ -577,7 +592,7 @@ class Dokan_Vendor {
|
|
577 |
$this->id, $on_date, $trn_type, $refund_status ) );
|
578 |
|
579 |
$earnings = $debit_balance->earnings - $credit_balance->earnings;
|
580 |
-
$result = new stdClass;
|
581 |
$result->earnings = $earnings;
|
582 |
} else {
|
583 |
$result = $wpdb->get_row( $wpdb->prepare(
|
@@ -855,6 +870,19 @@ class Dokan_Vendor {
|
|
855 |
$this->set_prop( 'enable_tnc', wc_clean( $value ) );
|
856 |
}
|
857 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
858 |
/**
|
859 |
* Set gravatar
|
860 |
*
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Vendor;
|
4 |
+
|
5 |
+
use WP_Query;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan Vendor
|
9 |
*
|
10 |
* @since 2.6.10
|
11 |
*/
|
12 |
+
class Vendor {
|
13 |
|
14 |
/**
|
15 |
* The vendor ID
|
528 |
return $products;
|
529 |
}
|
530 |
|
531 |
+
/**
|
532 |
+
* Get vendor orders
|
533 |
+
*
|
534 |
+
* @since DOKAN_LITE_SINCE
|
535 |
+
*
|
536 |
+
* @return wc_get_order objects
|
537 |
+
*/
|
538 |
+
public function get_orders( $args = [] ) {
|
539 |
+
return dokan()->order->all( $args );
|
540 |
+
}
|
541 |
+
|
542 |
/**
|
543 |
* Get the total sales amount of this vendor
|
544 |
*
|
592 |
$this->id, $on_date, $trn_type, $refund_status ) );
|
593 |
|
594 |
$earnings = $debit_balance->earnings - $credit_balance->earnings;
|
595 |
+
$result = new \stdClass;
|
596 |
$result->earnings = $earnings;
|
597 |
} else {
|
598 |
$result = $wpdb->get_row( $wpdb->prepare(
|
870 |
$this->set_prop( 'enable_tnc', wc_clean( $value ) );
|
871 |
}
|
872 |
|
873 |
+
/**
|
874 |
+
* Set store tnc
|
875 |
+
*
|
876 |
+
* @since DOKAN_LITE_SINCE
|
877 |
+
*
|
878 |
+
* @param string
|
879 |
+
*
|
880 |
+
* @return void
|
881 |
+
*/
|
882 |
+
public function set_store_tnc( $value ) {
|
883 |
+
$this->set_prop( 'store_tnc', wc_clean( $value ) );
|
884 |
+
}
|
885 |
+
|
886 |
/**
|
887 |
* Set gravatar
|
888 |
*
|
includes/Walkers/Category.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Walkers;
|
4 |
+
|
5 |
+
use Walker;
|
6 |
+
|
7 |
+
class Category extends Walker {
|
8 |
+
|
9 |
+
public $tree_type = 'category';
|
10 |
+
public $db_fields = array('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
|
11 |
+
|
12 |
+
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
13 |
+
$indent = str_repeat( "\t", $depth );
|
14 |
+
|
15 |
+
if ( $depth == 0 ) {
|
16 |
+
$output .= $indent . '<ul class="children level-' . $depth . '">' . "\n";
|
17 |
+
} else {
|
18 |
+
$output .= "$indent<ul class='children level-$depth'>\n";
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
public function end_lvl( &$output, $depth = 0, $args = array() ) {
|
23 |
+
$indent = str_repeat( "\t", $depth );
|
24 |
+
|
25 |
+
if ( $depth == 0 ) {
|
26 |
+
$output .= "$indent</ul> <!-- .sub-category -->\n";
|
27 |
+
} else {
|
28 |
+
$output .= "$indent</ul>\n";
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
33 |
+
extract( $args );
|
34 |
+
$indent = str_repeat( "\t\r", $depth );
|
35 |
+
|
36 |
+
if ( $depth == 0 ) {
|
37 |
+
$caret = $args['has_children'] ? ' <span class="caret-icon"><i class="fa fa-angle-right" aria-hidden="true"></i></span>' : '';
|
38 |
+
$class_name = $args['has_children'] ? ' class="has-children parent-cat-wrap"' : ' class="parent-cat-wrap"';
|
39 |
+
$output .= $indent . '<li' . $class_name . '><a href="'. get_term_link( $category ) .'">' . $category->name . $caret . '</a>' . "\n";
|
40 |
+
} else {
|
41 |
+
$caret = $args['has_children'] ? ' <span class="caret-icon"><i class="fa fa-angle-right" aria-hidden="true"></i></span>' : '';
|
42 |
+
$class_name = $args['has_children'] ? ' class="has-children"' : '';
|
43 |
+
$output .= $indent . '<li' . $class_name . '><a href="' . get_term_link( $category ) . '">' . $category->name . $caret . '</a>';
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
public function end_el( &$output, $category, $depth = 0, $args = array() ) {
|
48 |
+
$indent = str_repeat( "\t", $depth );
|
49 |
+
|
50 |
+
if ( $depth == 1 ) {
|
51 |
+
$output .= "$indent</li><!-- .sub-block -->\n";
|
52 |
+
} else {
|
53 |
+
$output .= "$indent</li>\n";
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
includes/Walkers/CategoryDropdownSingle.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Walkers;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Walkers\TaxonomyDropdown;
|
6 |
+
|
7 |
+
class CategoryDropdownSingle extends TaxonomyDropdown {
|
8 |
+
|
9 |
+
private $post_id = '';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @see Walker::$db_fields
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
var $db_fields = array('parent' => 'parent', 'id' => 'term_id');
|
16 |
+
|
17 |
+
public function __construct( $post_id ) {
|
18 |
+
$this->post_id = $post_id;
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
23 |
+
if ( defined( 'DOKAN_PRO_PLUGIN_VERSION' ) && version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '<' ) ) {
|
24 |
+
$commission_val = dokan_get_seller_percentage( dokan_get_current_user_id(), $this->post_id, $category->term_id );
|
25 |
+
$commission_type = dokan_get_commission_type( dokan_get_current_user_id(), $this->post_id, $category->term_id );
|
26 |
+
} else {
|
27 |
+
$commission_val = dokan()->commission->get_earning_by_product( $this->post_id );
|
28 |
+
|
29 |
+
if ( is_wp_error( $commission_val ) ) {
|
30 |
+
$commission_val = 0;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
$pad = str_repeat( ' ', $depth * 3 );
|
35 |
+
$cat_name = apply_filters( 'list_cats', $category->name, $category );
|
36 |
+
$output .= "\t<option class=\"level-$depth\" value=\"" . $category->term_id . "\"";
|
37 |
+
|
38 |
+
if ( defined( 'DOKAN_PRO_PLUGIN_VERSION' ) && version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '<' ) ) {
|
39 |
+
$output .= ' data-commission="' . $commission_val . '" data-commission_type="' . $commission_type . '"';
|
40 |
+
} else {
|
41 |
+
$output .= ' data-commission="' . $commission_val . '" data-product-id="' . $this->post_id . '"';
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( $category->term_id == $args['selected'] ) {
|
45 |
+
$output .= ' selected="selected"';
|
46 |
+
}
|
47 |
+
|
48 |
+
$output .= '>';
|
49 |
+
$output .= $pad . $cat_name;
|
50 |
+
$output .= "</option>\n";
|
51 |
+
}
|
52 |
+
}
|
includes/{widgets/store-menu-category.php → Walkers/StoreCategory.php}
RENAMED
@@ -1,15 +1,19 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Category walker for generating dokan store category
|
5 |
*/
|
6 |
-
class
|
7 |
|
8 |
-
function __construct( $seller_id ) {
|
9 |
$this->store_url = dokan_get_store_url ( $seller_id );
|
10 |
}
|
11 |
|
12 |
-
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
13 |
extract( $args );
|
14 |
$indent = str_repeat( "\t", $depth );
|
15 |
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Walkers;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Walkers\Category;
|
6 |
+
|
7 |
/**
|
8 |
* Category walker for generating dokan store category
|
9 |
*/
|
10 |
+
class StoreCategory extends Category {
|
11 |
|
12 |
+
public function __construct( $seller_id ) {
|
13 |
$this->store_url = dokan_get_store_url ( $seller_id );
|
14 |
}
|
15 |
|
16 |
+
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
17 |
extract( $args );
|
18 |
$indent = str_repeat( "\t", $depth );
|
19 |
|
includes/Walkers/TaxonomyDropdown.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Walkers;
|
4 |
+
|
5 |
+
use Walker;
|
6 |
+
|
7 |
+
class TaxonomyDropdown extends Walker {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @see Walker::$tree_type
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
public $tree_type = 'category';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @see Walker::$db_fields
|
17 |
+
* @var array
|
18 |
+
*/
|
19 |
+
public $db_fields = array('parent' => 'parent', 'id' => 'term_id');
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Post id
|
23 |
+
*
|
24 |
+
* @var int
|
25 |
+
*/
|
26 |
+
private $post_id = '';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor method
|
30 |
+
*
|
31 |
+
* @param int $post_id
|
32 |
+
*/
|
33 |
+
public function __construct( $post_id = 0 ) {
|
34 |
+
$this->post_id = $post_id;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Start element
|
39 |
+
*
|
40 |
+
* @param string $output
|
41 |
+
* @param object $category
|
42 |
+
* @param int $depth
|
43 |
+
* @param array $args
|
44 |
+
* @param int $id
|
45 |
+
*
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
49 |
+
if ( defined( 'DOKAN_PRO_PLUGIN_VERSION' ) && version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '<' ) ) {
|
50 |
+
$commission_val = dokan_get_seller_percentage( dokan_get_current_user_id(), $this->post_id, $category->term_id );
|
51 |
+
$commission_type = dokan_get_commission_type( dokan_get_current_user_id(), $this->post_id, $category->term_id );
|
52 |
+
} else {
|
53 |
+
$commission_val = dokan()->commission->get_earning_by_product( $this->post_id );
|
54 |
+
|
55 |
+
if ( is_wp_error( $commission_val ) ) {
|
56 |
+
$commission_val = 0;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
$pad = str_repeat( ' ', $depth * 3 );
|
61 |
+
$cat_name = apply_filters( 'list_cats', $category->name, $category );
|
62 |
+
$output .= "\<option class=\"level-$depth\" value=\"" . $category->term_id . "\"";
|
63 |
+
|
64 |
+
if ( defined( 'DOKAN_PRO_PLUGIN_VERSION' ) && version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '<' ) ) {
|
65 |
+
$output .= ' data-commission="' . $commission_val . '" data-commission_type="' . $commission_type . '"';
|
66 |
+
} else {
|
67 |
+
$output .= ' data-commission="' . $commission_val . '" data-product-id="' . $this->post_id . '"';
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( in_array( $category->term_id, $args['selected'] ) ) {
|
71 |
+
$output .= ' selected="selected"';
|
72 |
+
}
|
73 |
+
|
74 |
+
$output .= '>';
|
75 |
+
$output .= $pad . $cat_name;
|
76 |
+
|
77 |
+
if ( $args['show_count'] ) {
|
78 |
+
$output .= ' (' . $category->count . ')';
|
79 |
+
}
|
80 |
+
|
81 |
+
$output .= "</option>\n";
|
82 |
+
}
|
83 |
+
}
|
includes/{widgets/bestselling-product.php → Widgets/BestSellingProducts.php}
RENAMED
@@ -1,7 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
6 |
/**
|
7 |
* Constructor
|
@@ -96,5 +99,4 @@ class Dokan_Best_Selling_Widget extends WP_Widget {
|
|
96 |
|
97 |
return $instance;
|
98 |
}
|
99 |
-
|
100 |
-
} // class Dokan best selling product widget
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
+
class BestSellingProducts extends WP_Widget {
|
8 |
|
9 |
/**
|
10 |
* Constructor
|
99 |
|
100 |
return $instance;
|
101 |
}
|
102 |
+
}
|
|
includes/Widgets/Manager.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
+
|
5 |
+
use WeDevs\Dokan\Traits\ChainableContainer;
|
6 |
+
|
7 |
+
class Manager {
|
8 |
+
|
9 |
+
use ChainableContainer;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class constructor
|
13 |
+
*
|
14 |
+
* @since DOKAN_LITE_SINCE
|
15 |
+
*
|
16 |
+
* @return void
|
17 |
+
*/
|
18 |
+
public function __construct() {
|
19 |
+
$dokan_widgets = apply_filters( 'dokan_widgets', [
|
20 |
+
'best_selling_products' => 'WeDevs\Dokan\Widgets\BestSellingProducts',
|
21 |
+
'product_category_menu' => 'WeDevs\Dokan\Widgets\ProductCategoryMenu',
|
22 |
+
'store_contact_form' => 'WeDevs\Dokan\Widgets\StoreContactForm',
|
23 |
+
'store_location' => 'WeDevs\Dokan\Widgets\StoreLocation',
|
24 |
+
'store_category_menu' => 'WeDevs\Dokan\Widgets\StoreCategoryMenu',
|
25 |
+
'toprated_products' => 'WeDevs\Dokan\Widgets\TopratedProducts',
|
26 |
+
'store_open_close' => 'WeDevs\Dokan\Widgets\StoreOpenClose',
|
27 |
+
] );
|
28 |
+
|
29 |
+
foreach ( $dokan_widgets as $widget_id => $widget_class ) {
|
30 |
+
register_widget( $widget_class );
|
31 |
+
}
|
32 |
+
|
33 |
+
$this->container = $dokan_widgets;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Check if widget class exists
|
38 |
+
*
|
39 |
+
* @since DOKAN_LITE_SINCE
|
40 |
+
*
|
41 |
+
* @param string $widget_id
|
42 |
+
*
|
43 |
+
* @return bool
|
44 |
+
*/
|
45 |
+
public function is_exists( $widget_id ) {
|
46 |
+
return isset( $this->container[ $widget_id ] ) && class_exists( $this->container[ $widget_id ] );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get widget id from widget class
|
51 |
+
*
|
52 |
+
* @since DOKAN_LITE_SINCE
|
53 |
+
*
|
54 |
+
* @param string $widget_class
|
55 |
+
*
|
56 |
+
* @return bool|string Returns widget id if found, outherwise returns false
|
57 |
+
*/
|
58 |
+
public function get_id( $widget_class ) {
|
59 |
+
return array_search( $widget_class, $this->container );
|
60 |
+
}
|
61 |
+
}
|
includes/{widgets/menu-category.php → Widgets/ProductCategoryMenu.php}
RENAMED
@@ -1,67 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
* Category walker for generating dokan category
|
5 |
-
*/
|
6 |
-
class Dokan_Category_Walker extends Walker {
|
7 |
-
|
8 |
-
var $tree_type = 'category';
|
9 |
-
var $db_fields = array('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
|
10 |
-
|
11 |
-
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
12 |
-
$indent = str_repeat( "\t", $depth );
|
13 |
-
|
14 |
-
if ( $depth == 0 ) {
|
15 |
-
$output .= $indent . '<ul class="children level-' . $depth . '">' . "\n";
|
16 |
-
} else {
|
17 |
-
$output .= "$indent<ul class='children level-$depth'>\n";
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
22 |
-
$indent = str_repeat( "\t", $depth );
|
23 |
-
|
24 |
-
if ( $depth == 0 ) {
|
25 |
-
$output .= "$indent</ul> <!-- .sub-category -->\n";
|
26 |
-
} else {
|
27 |
-
$output .= "$indent</ul>\n";
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
32 |
-
extract( $args );
|
33 |
-
$indent = str_repeat( "\t\r", $depth );
|
34 |
-
|
35 |
-
if ( $depth == 0 ) {
|
36 |
-
$caret = $args['has_children'] ? ' <span class="caret-icon"><i class="fa fa-angle-right" aria-hidden="true"></i></span>' : '';
|
37 |
-
$class_name = $args['has_children'] ? ' class="has-children parent-cat-wrap"' : ' class="parent-cat-wrap"';
|
38 |
-
$output .= $indent . '<li' . $class_name . '><a href="'. get_term_link( $category ) .'">' . $category->name . $caret . '</a>' . "\n";
|
39 |
-
} else {
|
40 |
-
$caret = $args['has_children'] ? ' <span class="caret-icon"><i class="fa fa-angle-right" aria-hidden="true"></i></span>' : '';
|
41 |
-
$class_name = $args['has_children'] ? ' class="has-children"' : '';
|
42 |
-
$output .= $indent . '<li' . $class_name . '><a href="' . get_term_link( $category ) . '">' . $category->name . $caret . '</a>';
|
43 |
-
}
|
44 |
-
}
|
45 |
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
$output .= "$indent</li><!-- .sub-block -->\n";
|
51 |
-
} else {
|
52 |
-
$output .= "$indent</li>\n";
|
53 |
-
}
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
if ( ! class_exists( 'Dokan_Category_Widget' ) ) :
|
58 |
-
|
59 |
-
/**
|
60 |
-
* new WordPress Widget format
|
61 |
-
* Wordpress 2.8 and above
|
62 |
-
* @see http://codex.wordpress.org/Widgets_API#Developing_Widgets
|
63 |
-
*/
|
64 |
-
class Dokan_Category_Widget extends WP_Widget {
|
65 |
|
66 |
/**
|
67 |
* Constructor
|
@@ -80,7 +24,7 @@ class Dokan_Category_Widget extends WP_Widget {
|
|
80 |
* @param array An array of settings for this widget instance
|
81 |
* @return void Echoes it's output
|
82 |
**/
|
83 |
-
function widget( $args, $instance ) {
|
84 |
extract( $args, EXTR_SKIP );
|
85 |
|
86 |
$title = apply_filters( 'widget_title', $instance['title'] );
|
@@ -106,7 +50,7 @@ class Dokan_Category_Widget extends WP_Widget {
|
|
106 |
'selected_cats' => ''
|
107 |
);
|
108 |
|
109 |
-
$walker = new
|
110 |
echo "<ul>";
|
111 |
echo call_user_func_array( array(&$walker, 'walk'), array( $categories, 0, array()) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
112 |
echo "</ul>";
|
@@ -152,8 +96,7 @@ class Dokan_Category_Widget extends WP_Widget {
|
|
152 |
* @param array An array of the previous settings
|
153 |
* @return array The validated and (if necessary) amended settings
|
154 |
**/
|
155 |
-
function update( $new_instance, $old_instance ) {
|
156 |
-
|
157 |
// update logic goes here
|
158 |
$updated_instance = $new_instance;
|
159 |
return $updated_instance;
|
@@ -165,7 +108,7 @@ class Dokan_Category_Widget extends WP_Widget {
|
|
165 |
* @param array An array of the current settings for this widget
|
166 |
* @return void Echoes it's output
|
167 |
**/
|
168 |
-
function form( $instance ) {
|
169 |
$instance = wp_parse_args( (array) $instance, array(
|
170 |
'title' => __( 'Product Category', 'dokan-lite' )
|
171 |
) );
|
@@ -179,5 +122,3 @@ class Dokan_Category_Widget extends WP_Widget {
|
|
179 |
<?php
|
180 |
}
|
181 |
}
|
182 |
-
|
183 |
-
endif;
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
use WP_Widget;
|
6 |
+
use WeDevs\Dokan\Walkers\Category as CategoryWalker;
|
7 |
|
8 |
+
class ProductCategoryMenu extends WP_Widget {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
/**
|
11 |
* Constructor
|
24 |
* @param array An array of settings for this widget instance
|
25 |
* @return void Echoes it's output
|
26 |
**/
|
27 |
+
public function widget( $args, $instance ) {
|
28 |
extract( $args, EXTR_SKIP );
|
29 |
|
30 |
$title = apply_filters( 'widget_title', $instance['title'] );
|
50 |
'selected_cats' => ''
|
51 |
);
|
52 |
|
53 |
+
$walker = new CategoryWalker();
|
54 |
echo "<ul>";
|
55 |
echo call_user_func_array( array(&$walker, 'walk'), array( $categories, 0, array()) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
56 |
echo "</ul>";
|
96 |
* @param array An array of the previous settings
|
97 |
* @return array The validated and (if necessary) amended settings
|
98 |
**/
|
99 |
+
public function update( $new_instance, $old_instance ) {
|
|
|
100 |
// update logic goes here
|
101 |
$updated_instance = $new_instance;
|
102 |
return $updated_instance;
|
108 |
* @param array An array of the current settings for this widget
|
109 |
* @return void Echoes it's output
|
110 |
**/
|
111 |
+
public function form( $instance ) {
|
112 |
$instance = wp_parse_args( (array) $instance, array(
|
113 |
'title' => __( 'Product Category', 'dokan-lite' )
|
114 |
) );
|
122 |
<?php
|
123 |
}
|
124 |
}
|
|
|
|
includes/{widgets/store-menu.php → Widgets/StoreCategoryMenu.php}
RENAMED
@@ -1,11 +1,10 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
class Dokan_Store_Category_Menu extends WP_Widget {
|
9 |
|
10 |
/**
|
11 |
* Constructor
|
@@ -24,7 +23,7 @@ class Dokan_Store_Category_Menu extends WP_Widget {
|
|
24 |
* @param array An array of settings for this widget instance
|
25 |
* @return void Echoes it's output
|
26 |
**/
|
27 |
-
function widget( $args, $instance ) {
|
28 |
if ( dokan_is_store_page() ) {
|
29 |
extract( $args, EXTR_SKIP );
|
30 |
|
@@ -99,7 +98,7 @@ class Dokan_Store_Category_Menu extends WP_Widget {
|
|
99 |
* @param array An array of the previous settings
|
100 |
* @return array The validated and (if necessary) amended settings
|
101 |
**/
|
102 |
-
function update( $new_instance, $old_instance ) {
|
103 |
|
104 |
// update logic goes here
|
105 |
$updated_instance = $new_instance;
|
@@ -112,7 +111,7 @@ class Dokan_Store_Category_Menu extends WP_Widget {
|
|
112 |
* @param array An array of the current settings for this widget
|
113 |
* @return void Echoes it's output
|
114 |
**/
|
115 |
-
function form( $instance ) {
|
116 |
$instance = wp_parse_args( (array) $instance, array(
|
117 |
'title' => __( 'Store Product Category', 'dokan-lite' ),
|
118 |
) );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
+
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
+
class StoreCategoryMenu extends WP_Widget {
|
|
|
8 |
|
9 |
/**
|
10 |
* Constructor
|
23 |
* @param array An array of settings for this widget instance
|
24 |
* @return void Echoes it's output
|
25 |
**/
|
26 |
+
public function widget( $args, $instance ) {
|
27 |
if ( dokan_is_store_page() ) {
|
28 |
extract( $args, EXTR_SKIP );
|
29 |
|
98 |
* @param array An array of the previous settings
|
99 |
* @return array The validated and (if necessary) amended settings
|
100 |
**/
|
101 |
+
public function update( $new_instance, $old_instance ) {
|
102 |
|
103 |
// update logic goes here
|
104 |
$updated_instance = $new_instance;
|
111 |
* @param array An array of the current settings for this widget
|
112 |
* @return void Echoes it's output
|
113 |
**/
|
114 |
+
public function form( $instance ) {
|
115 |
$instance = wp_parse_args( (array) $instance, array(
|
116 |
'title' => __( 'Store Product Category', 'dokan-lite' ),
|
117 |
) );
|
includes/{widgets/store-contact.php → Widgets/StoreContactForm.php}
RENAMED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Store Contact Seller Widget
|
5 |
*
|
@@ -7,7 +11,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Constructor
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
+
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan Store Contact Seller Widget
|
9 |
*
|
11 |
*
|
12 |
* @package dokan
|
13 |
*/
|
14 |
+
class StoreContactForm extends WP_Widget {
|
15 |
|
16 |
/**
|
17 |
* Constructor
|
includes/{widgets/store-location.php → Widgets/StoreLocation.php}
RENAMED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Store Location Widget
|
5 |
*
|
@@ -7,7 +11,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Constructor
|
@@ -27,7 +31,7 @@ class Dokan_Store_Location extends WP_Widget {
|
|
27 |
*
|
28 |
* @return void Echoes it's output
|
29 |
*/
|
30 |
-
function widget( $args, $instance ) {
|
31 |
|
32 |
if ( dokan_is_store_page() ) {
|
33 |
extract( $args, EXTR_SKIP );
|
@@ -75,7 +79,7 @@ class Dokan_Store_Location extends WP_Widget {
|
|
75 |
*
|
76 |
* @return array The validated and (if necessary) amended settings
|
77 |
*/
|
78 |
-
function update( $new_instance, $old_instance ) {
|
79 |
|
80 |
// update logic goes here
|
81 |
$updated_instance = $new_instance;
|
@@ -89,7 +93,7 @@ class Dokan_Store_Location extends WP_Widget {
|
|
89 |
*
|
90 |
* @return void Echoes it's output
|
91 |
*/
|
92 |
-
function form( $instance ) {
|
93 |
$instance = wp_parse_args( (array) $instance, array(
|
94 |
'title' => __( 'Store Location', 'dokan-lite' ),
|
95 |
) );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
+
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan Store Location Widget
|
9 |
*
|
11 |
*
|
12 |
* @package dokan
|
13 |
*/
|
14 |
+
class StoreLocation extends WP_Widget {
|
15 |
|
16 |
/**
|
17 |
* Constructor
|
31 |
*
|
32 |
* @return void Echoes it's output
|
33 |
*/
|
34 |
+
public function widget( $args, $instance ) {
|
35 |
|
36 |
if ( dokan_is_store_page() ) {
|
37 |
extract( $args, EXTR_SKIP );
|
79 |
*
|
80 |
* @return array The validated and (if necessary) amended settings
|
81 |
*/
|
82 |
+
public function update( $new_instance, $old_instance ) {
|
83 |
|
84 |
// update logic goes here
|
85 |
$updated_instance = $new_instance;
|
93 |
*
|
94 |
* @return void Echoes it's output
|
95 |
*/
|
96 |
+
public function form( $instance ) {
|
97 |
$instance = wp_parse_args( (array) $instance, array(
|
98 |
'title' => __( 'Store Location', 'dokan-lite' ),
|
99 |
) );
|
includes/{widgets/store-open-close.php → Widgets/StoreOpenClose.php}
RENAMED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
/**
|
4 |
* Dokan Store Open Close Widget
|
5 |
*
|
@@ -7,7 +11,7 @@
|
|
7 |
*
|
8 |
* @package dokan
|
9 |
*/
|
10 |
-
class
|
11 |
/**
|
12 |
* Constructor
|
13 |
*
|
@@ -26,7 +30,7 @@ class Dokan_Store_Open_Close extends WP_Widget {
|
|
26 |
*
|
27 |
* @return void Echoes it's output
|
28 |
**/
|
29 |
-
function widget( $args, $instance ) {
|
30 |
if ( dokan_is_store_page() ) {
|
31 |
extract( $args, EXTR_SKIP );
|
32 |
|
@@ -82,7 +86,7 @@ class Dokan_Store_Open_Close extends WP_Widget {
|
|
82 |
*
|
83 |
* @return array The validated and (if necessary) amended settings
|
84 |
*/
|
85 |
-
function update( $new_instance, $old_instance ) {
|
86 |
|
87 |
// update logic goes here
|
88 |
$updated_instance = $new_instance;
|
@@ -96,7 +100,7 @@ class Dokan_Store_Open_Close extends WP_Widget {
|
|
96 |
*
|
97 |
* @return void Echoes it's output
|
98 |
*/
|
99 |
-
function form( $instance ) {
|
100 |
$instance = wp_parse_args( (array) $instance, array(
|
101 |
'title' => __( 'Store Time', 'dokan-lite' ),
|
102 |
) );
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
+
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
/**
|
8 |
* Dokan Store Open Close Widget
|
9 |
*
|
11 |
*
|
12 |
* @package dokan
|
13 |
*/
|
14 |
+
class StoreOpenClose extends WP_Widget {
|
15 |
/**
|
16 |
* Constructor
|
17 |
*
|
30 |
*
|
31 |
* @return void Echoes it's output
|
32 |
**/
|
33 |
+
public function widget( $args, $instance ) {
|
34 |
if ( dokan_is_store_page() ) {
|
35 |
extract( $args, EXTR_SKIP );
|
36 |
|
86 |
*
|
87 |
* @return array The validated and (if necessary) amended settings
|
88 |
*/
|
89 |
+
public function update( $new_instance, $old_instance ) {
|
90 |
|
91 |
// update logic goes here
|
92 |
$updated_instance = $new_instance;
|
100 |
*
|
101 |
* @return void Echoes it's output
|
102 |
*/
|
103 |
+
public function form( $instance ) {
|
104 |
$instance = wp_parse_args( (array) $instance, array(
|
105 |
'title' => __( 'Store Time', 'dokan-lite' ),
|
106 |
) );
|
includes/{widgets/top-rated-product.php → Widgets/TopratedProducts.php}
RENAMED
@@ -1,12 +1,15 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
6 |
/**
|
7 |
* Register widget with WordPress.
|
8 |
*/
|
9 |
-
function __construct() {
|
10 |
parent::__construct( 'dokan-top-rated', __( 'Dokan: Top Rated Product Widget', 'dokan-lite'), // Name
|
11 |
array( 'description' => __( 'A Widget for displaying To rated products for dokan', 'dokan-lite' ), 'classname' => 'woocommerce widget_products dokan-top-rated' ) // Args
|
12 |
);
|
1 |
<?php
|
2 |
|
3 |
+
namespace WeDevs\Dokan\Widgets;
|
4 |
|
5 |
+
use WP_Widget;
|
6 |
+
|
7 |
+
class TopratedProducts extends WP_Widget {
|
8 |
|
9 |
/**
|
10 |
* Register widget with WordPress.
|
11 |
*/
|
12 |
+
public function __construct() {
|
13 |
parent::__construct( 'dokan-top-rated', __( 'Dokan: Top Rated Product Widget', 'dokan-lite'), // Name
|
14 |
array( 'description' => __( 'A Widget for displaying To rated products for dokan', 'dokan-lite' ), 'classname' => 'woocommerce widget_products dokan-top-rated' ) // Args
|
15 |
);
|
includes/Withdraw/Export/CSV.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw\Export;
|
4 |
+
|
5 |
+
class CSV {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Witdraws to export
|
9 |
+
*
|
10 |
+
* @var array
|
11 |
+
*/
|
12 |
+
protected $withdraws = [];
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Class constructor
|
16 |
+
*
|
17 |
+
* @since DOKAN_LITE_SINCE
|
18 |
+
*
|
19 |
+
* @param array $withdraws
|
20 |
+
*/
|
21 |
+
public function __construct( $withdraws ) {
|
22 |
+
$this->withdraws = $withdraws;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Export withdraws
|
27 |
+
*
|
28 |
+
* @since DOKAN_LITE_SINCE
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
public function export() {
|
33 |
+
$date = date( 'Y-m-d-H-i-s', strtotime( current_time( 'mysql' ) ) );
|
34 |
+
|
35 |
+
header( 'Content-type: html/csv' );
|
36 |
+
header( 'Content-Disposition: attachment; filename="withdraw-' . $date . '.csv"' );
|
37 |
+
|
38 |
+
$currency = get_option( 'woocommerce_currency' );
|
39 |
+
|
40 |
+
foreach ( $this->withdraws as $withdraw ) {
|
41 |
+
$email = dokan_get_seller_withdraw_mail( $withdraw->get_user_id() );
|
42 |
+
|
43 |
+
echo esc_html( $email ) . ',';
|
44 |
+
echo esc_html( $withdraw->get_amount() ) . ',';
|
45 |
+
echo esc_html( $currency ) . "\n";
|
46 |
+
}
|
47 |
+
|
48 |
+
die();
|
49 |
+
}
|
50 |
+
}
|
includes/Withdraw/Export/Manager.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw\Export;
|
4 |
+
|
5 |
+
|
6 |
+
class Manager {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Withdraws to export
|
10 |
+
*
|
11 |
+
* @var array
|
12 |
+
*/
|
13 |
+
protected $withdraws = [];
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Class constructor
|
17 |
+
*
|
18 |
+
* @since DOKAN_LITE_SINCE
|
19 |
+
*
|
20 |
+
* @param array $args
|
21 |
+
*/
|
22 |
+
public function __construct( $args ) {
|
23 |
+
$this->withdraws = dokan()->withdraw->all( $args );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Export data in CSV
|
28 |
+
*
|
29 |
+
* @since DOKAN_LITE_SINCE
|
30 |
+
*
|
31 |
+
* @return void
|
32 |
+
*/
|
33 |
+
public function csv() {
|
34 |
+
$csv = new CSV( $this->withdraws );
|
35 |
+
$csv->export();
|
36 |
+
}
|
37 |
+
}
|
includes/Withdraw/Hooks.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw;
|
4 |
+
|
5 |
+
class Hooks {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class constructor
|
9 |
+
*
|
10 |
+
* @since DOKAN_LITE_SINCE
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
public function __construct() {
|
15 |
+
add_action( 'dokan_withdraw_status_updated', [ self::class, 'delete_seller_balance_cache' ], 10, 3 );
|
16 |
+
add_action( 'dokan_withdraw_request_approved', [ self::class, 'update_vendor_balance' ], 11 );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Delete seller balance cache after a withdraw update
|
21 |
+
*
|
22 |
+
* @since DOKAN_LITE_SINCE
|
23 |
+
*
|
24 |
+
* @param string $status
|
25 |
+
* @param int $user_id
|
26 |
+
* @param int $id
|
27 |
+
*
|
28 |
+
* @return void
|
29 |
+
*/
|
30 |
+
public static function delete_seller_balance_cache( $status, $user_id, $id ) {
|
31 |
+
wp_cache_delete( 'dokan_seller_balance_' . $user_id );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Update vendor balance after approve a request
|
36 |
+
*
|
37 |
+
* @since DOKAN_LITE_SINCE
|
38 |
+
*
|
39 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $withdraw
|
40 |
+
*
|
41 |
+
* @return void
|
42 |
+
*/
|
43 |
+
public static function update_vendor_balance( $withdraw ) {
|
44 |
+
global $wpdb;
|
45 |
+
|
46 |
+
if ( round( dokan_get_seller_balance( $withdraw->get_user_id(), false ), 2 ) < $withdraw->get_amount() ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$balance_result = $wpdb->get_row( $wpdb->prepare(
|
51 |
+
"select * from {$wpdb->dokan_vendor_balance} where trn_id = %d and trn_type = %s",
|
52 |
+
$withdraw->get_id(),
|
53 |
+
'dokan_withdraw'
|
54 |
+
) );
|
55 |
+
|
56 |
+
if ( empty( $balance_result ) ) {
|
57 |
+
$wpdb->insert(
|
58 |
+
$wpdb->dokan_vendor_balance,
|
59 |
+
array(
|
60 |
+
'vendor_id' => $withdraw->get_user_id(),
|
61 |
+
'trn_id' => $withdraw->get_id(),
|
62 |
+
'trn_type' => 'dokan_withdraw',
|
63 |
+
'perticulars' => 'Approve withdraw request',
|
64 |
+
'debit' => 0,
|
65 |
+
'credit' => $withdraw->get_amount(),
|
66 |
+
'status' => 'approved',
|
67 |
+
'trn_date' => $withdraw->get_date(),
|
68 |
+
'balance_date' => current_time( 'mysql' ),
|
69 |
+
),
|
70 |
+
array(
|
71 |
+
'%d',
|
72 |
+
'%d',
|
73 |
+
'%s',
|
74 |
+
'%s',
|
75 |
+
'%f',
|
76 |
+
'%f',
|
77 |
+
'%s',
|
78 |
+
'%s',
|
79 |
+
'%s',
|
80 |
+
)
|
81 |
+
);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
includes/Withdraw/Manager.php
ADDED
@@ -0,0 +1,437 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
use WeDevs\Dokan\Withdraw\Withdraws;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Withdraw base class
|
10 |
+
*
|
11 |
+
* @author wedDevs <info@wedevs.com>
|
12 |
+
*
|
13 |
+
* @since 2.4
|
14 |
+
*
|
15 |
+
* @package dokan
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Manager {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Validate approval request
|
22 |
+
*
|
23 |
+
* @since DOKAN_LITE_SINCE
|
24 |
+
*
|
25 |
+
* @param array $args
|
26 |
+
*
|
27 |
+
* @return bool|\WP_Error
|
28 |
+
*/
|
29 |
+
public function is_valid_approval_request( $args ) {
|
30 |
+
$user_id = $args['user_id'];
|
31 |
+
$limit = $this->get_withdraw_limit();
|
32 |
+
$balance = round( dokan_get_seller_balance( $user_id, false ), 2 );
|
33 |
+
$amount = $args['amount'];
|
34 |
+
$method = $args['method'];
|
35 |
+
|
36 |
+
if ( empty( $amount ) ) {
|
37 |
+
return new WP_Error( 'dokan_withdraw_empty', __( 'Withdraw amount required ', 'dokan-lite' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
if ( $amount > $balance ) {
|
41 |
+
return new WP_Error( 'dokan_withdraw_not_enough_balance', __( 'You don\'t have enough balance for this request', 'dokan-lite' ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( $amount < $limit ) {
|
45 |
+
return new WP_Error( 'dokan_withdraw_amount', sprintf( __( 'Withdraw amount must be greater than %d', 'dokan-lite' ), $limit ) );
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! in_array( $method, dokan_get_seller_active_withdraw_methods( $user_id ) ) ) {
|
49 |
+
return new WP_Error( 'dokan_withdraw_invalid_method', __( 'Withdraw method is not active.', 'dokan-lite' ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! dokan_is_seller_enabled( $user_id ) ) {
|
53 |
+
return new WP_Error( 'dokan_withdraw_seller_not_enabled', __( 'Vendor is not enabled for selling, please contact site admin', 'dokan-lite' ) );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( ! empty( $args['id'] ) && isset( $args['status'] ) && absint( $args['status'] ) === dokan()->withdraw->get_status_code( 'approved' ) ) {
|
57 |
+
return new WP_Error( 'dokan_withdraw_already_approved', __( 'Withdraw is already approved.', 'dokan-lite' ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Filter validated withdraw request
|
62 |
+
*
|
63 |
+
* @since DOKAN_LITE_SINCE
|
64 |
+
*
|
65 |
+
* @param bool
|
66 |
+
* @param array $args
|
67 |
+
*/
|
68 |
+
return apply_filters( 'dokan_withdraw_is_valid_request', true, $args );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Validate cancellation request
|
73 |
+
*
|
74 |
+
* @since DOKAN_LITE_SINCE
|
75 |
+
*
|
76 |
+
* @param array $args
|
77 |
+
*
|
78 |
+
* @return bool|\WP_Error
|
79 |
+
*/
|
80 |
+
public function is_valid_cancellation_request( $args ) {
|
81 |
+
global $wpdb;
|
82 |
+
|
83 |
+
$result = $wpdb->get_row( $wpdb->prepare(
|
84 |
+
"select * from {$wpdb->dokan_withdraw} where id = %d and status = %d",
|
85 |
+
$args['id'],
|
86 |
+
$this->get_status_code( 'pending' )
|
87 |
+
) );
|
88 |
+
|
89 |
+
if ( ! empty( $result ) ) {
|
90 |
+
// permission: vendor -> only own && shop_manager
|
91 |
+
if ( ! ( ( $args['user_id'] === absint( $result->user_id ) ) || user_can( $args['user_id'], 'manage_woocommerce' ) ) ) {
|
92 |
+
return new WP_Error( 'dokan_withdraw_cancel_request_invalid_permission', __( 'Invalid permission to cancel the request.', 'dokan-lite' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
return true;
|
96 |
+
}
|
97 |
+
|
98 |
+
return new WP_Error( 'dokan_withdraw_cancel_request_error', __( 'Invalid cancel withdraw request', 'dokan-lite' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Update withdraw status
|
103 |
+
*
|
104 |
+
* @since 2.4
|
105 |
+
*
|
106 |
+
* @param int $id
|
107 |
+
* @param int $user_id
|
108 |
+
* @param string $status
|
109 |
+
*
|
110 |
+
* @return void
|
111 |
+
*/
|
112 |
+
public function update_status( $id, $user_id, $status ) {
|
113 |
+
global $wpdb;
|
114 |
+
|
115 |
+
// 0 -> pending
|
116 |
+
// 1 -> active
|
117 |
+
// 2 -> cancelled
|
118 |
+
|
119 |
+
$updated = $wpdb->update(
|
120 |
+
$wpdb->dokan_withdraw,
|
121 |
+
array(
|
122 |
+
'status' => $status,
|
123 |
+
),
|
124 |
+
array(
|
125 |
+
'id' => $id,
|
126 |
+
'user_id' => $user_id,
|
127 |
+
),
|
128 |
+
array(
|
129 |
+
'%s',
|
130 |
+
),
|
131 |
+
array(
|
132 |
+
'%d',
|
133 |
+
'%d',
|
134 |
+
)
|
135 |
+
);
|
136 |
+
|
137 |
+
if ( $updated !== 1 ) {
|
138 |
+
return new WP_Error( 'dokan_withdraw_unable_to_update', __( 'Could not update withdraw status', 'dokan-lite' ) );
|
139 |
+
}
|
140 |
+
|
141 |
+
do_action( 'dokan_withdraw_status_updated', $status, $user_id, $id );
|
142 |
+
|
143 |
+
return true;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Insert an withdraw approval request
|
148 |
+
*
|
149 |
+
* @param array $data
|
150 |
+
*
|
151 |
+
* @return bool|\WP_Error
|
152 |
+
*/
|
153 |
+
public function insert_withdraw( $args = array() ) {
|
154 |
+
global $wpdb;
|
155 |
+
|
156 |
+
$data = array(
|
157 |
+
'user_id' => $args['user_id'],
|
158 |
+
'amount' => $args['amount'],
|
159 |
+
'date' => current_time( 'mysql' ),
|
160 |
+
'status' => $args['status'],
|
161 |
+
'method' => $args['method'],
|
162 |
+
'note' => $args['notes'],
|
163 |
+
'ip' => $args['ip'],
|
164 |
+
);
|
165 |
+
|
166 |
+
$format = array( '%d', '%f', '%s', '%d', '%s', '%s', '%s' );
|
167 |
+
|
168 |
+
$inserted = $wpdb->insert( $wpdb->dokan_withdraw, $data, $format );
|
169 |
+
|
170 |
+
if ( $inserted !== 1 ) {
|
171 |
+
return new WP_Error( 'dokan_withdraw_unable_to_insert', __( 'Could not add new withdraw approval request.', 'dokan-lite' ) );
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* After completed withdraw request
|
176 |
+
*
|
177 |
+
* @since DOKAN_LITE_SINCE move action from template class to here.
|
178 |
+
* Change first param from global $current_user
|
179 |
+
* to dynamic $user_id
|
180 |
+
*
|
181 |
+
* @param int $user_id
|
182 |
+
* @param float $amount
|
183 |
+
* @param string $method
|
184 |
+
*/
|
185 |
+
do_action( 'dokan_after_withdraw_request', $data['user_id'], $data['amount'], $data['method'] );
|
186 |
+
|
187 |
+
return true;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Check if a user has already pending withdraw request
|
192 |
+
*
|
193 |
+
* @param integer $user_id
|
194 |
+
*
|
195 |
+
* @return boolean
|
196 |
+
*/
|
197 |
+
public function has_pending_request( $user_id ) {
|
198 |
+
global $wpdb;
|
199 |
+
|
200 |
+
$wpdb->dokan_withdraw = $wpdb->prefix . 'dokan_withdraw';
|
201 |
+
|
202 |
+
$status = $wpdb->get_results(
|
203 |
+
$wpdb->prepare(
|
204 |
+
"SELECT id
|
205 |
+
FROM $wpdb->dokan_withdraw
|
206 |
+
WHERE user_id = %d AND status = 0",
|
207 |
+
$user_id
|
208 |
+
)
|
209 |
+
);
|
210 |
+
|
211 |
+
if ( $status ) {
|
212 |
+
return true;
|
213 |
+
}
|
214 |
+
|
215 |
+
return false;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Get withdraw request of a user
|
220 |
+
*
|
221 |
+
* @param integer $user_id
|
222 |
+
* @param integer $status
|
223 |
+
* @param integer $limit
|
224 |
+
* @param integer $offset
|
225 |
+
*
|
226 |
+
* @return array
|
227 |
+
*/
|
228 |
+
public function get_withdraw_requests( $user_id = '', $status = 0, $limit = 10, $offset = 0 ) {
|
229 |
+
global $wpdb;
|
230 |
+
|
231 |
+
if ( empty( $user_id ) ) {
|
232 |
+
$result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->dokan_withdraw} WHERE status = %d LIMIT %d, %d", $status, $offset, $limit ) );
|
233 |
+
} else {
|
234 |
+
$result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->dokan_withdraw} WHERE user_id = %d AND status = %d LIMIT %d, %d", $user_id, $status, $offset, $limit ) );
|
235 |
+
}
|
236 |
+
|
237 |
+
return $result;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Get status code by status type
|
242 |
+
*
|
243 |
+
* @param string
|
244 |
+
*
|
245 |
+
* @return integer
|
246 |
+
*/
|
247 |
+
public function get_status_code( $status ) {
|
248 |
+
switch ( $status ) {
|
249 |
+
case 'pending':
|
250 |
+
return 0;
|
251 |
+
break;
|
252 |
+
|
253 |
+
case 'completed':
|
254 |
+
case 'approved':
|
255 |
+
return 1;
|
256 |
+
break;
|
257 |
+
|
258 |
+
case 'cancelled':
|
259 |
+
return 2;
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
|
263 |
+
return null;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Get withdraw status from code
|
268 |
+
*
|
269 |
+
* @since DOKAN_LITE_SINCE
|
270 |
+
*
|
271 |
+
* @param int $code
|
272 |
+
*
|
273 |
+
* @return string
|
274 |
+
*/
|
275 |
+
public function get_status_name( $code ) {
|
276 |
+
switch ( absint( $code ) ) {
|
277 |
+
case 0:
|
278 |
+
return 'pending';
|
279 |
+
break;
|
280 |
+
|
281 |
+
case 1:
|
282 |
+
return 'approved';
|
283 |
+
break;
|
284 |
+
|
285 |
+
case 2:
|
286 |
+
return 'cancelled';
|
287 |
+
break;
|
288 |
+
}
|
289 |
+
|
290 |
+
return null;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Get list of withdraws
|
295 |
+
*
|
296 |
+
* @since DOKAN_LITE_SINCE
|
297 |
+
*
|
298 |
+
* @param array $args
|
299 |
+
*
|
300 |
+
* @return array|object
|
301 |
+
*/
|
302 |
+
public function all( $args = array() ) {
|
303 |
+
$withdraws = new Withdraws( $args );
|
304 |
+
|
305 |
+
if ( empty( $args['paginate'] ) ) {
|
306 |
+
return $withdraws->get_withdraws();
|
307 |
+
} else {
|
308 |
+
return (object) array(
|
309 |
+
'withdraws' => $withdraws->get_withdraws(),
|
310 |
+
'total' => $withdraws->get_total(),
|
311 |
+
'max_num_pages' => $withdraws->get_maximum_num_pages(),
|
312 |
+
);
|
313 |
+
}
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Get a single withdraw
|
318 |
+
*
|
319 |
+
* @since DOKAN_LITE_SINCE
|
320 |
+
*
|
321 |
+
* @param DOKAN_LITE_SINCE $id
|
322 |
+
*
|
323 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|null
|
324 |
+
*/
|
325 |
+
public function get( $id ) {
|
326 |
+
global $wpdb;
|
327 |
+
|
328 |
+
if ( ! is_array( $id ) ) {
|
329 |
+
$result = $wpdb->get_row( $wpdb->prepare(
|
330 |
+
"select * from {$wpdb->dokan_withdraw} where id = %d",
|
331 |
+
$id
|
332 |
+
), ARRAY_A );
|
333 |
+
} else {
|
334 |
+
$attributes = array(
|
335 |
+
'id' => '%d',
|
336 |
+
'user_id' => '%d',
|
337 |
+
'amount' => '%s',
|
338 |
+
'date' => '%s',
|
339 |
+
'status' => '%d',
|
340 |
+
'method' => '%s',
|
341 |
+
'note' => '%s',
|
342 |
+
'ip' => '%s',
|
343 |
+
);
|
344 |
+
|
345 |
+
$fields = array_intersect( array_keys( $attributes ), array_keys( $id ) );
|
346 |
+
|
347 |
+
if ( ! $fields ) {
|
348 |
+
return null;
|
349 |
+
}
|
350 |
+
|
351 |
+
$where = '';
|
352 |
+
$formats = array();
|
353 |
+
foreach ( $fields as $field ) {
|
354 |
+
$where .= ' and ' . $field . '=' . $attributes[ $field ];
|
355 |
+
$formats[] = $id[ $field ];
|
356 |
+
}
|
357 |
+
|
358 |
+
$result = $wpdb->get_row( $wpdb->prepare(
|
359 |
+
"select * from {$wpdb->dokan_withdraw} where 1 = 1 {$where}",
|
360 |
+
...$formats
|
361 |
+
), ARRAY_A );
|
362 |
+
}
|
363 |
+
|
364 |
+
return $result ? new Withdraw( $result ) : null;
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Create a withdraw request
|
369 |
+
*
|
370 |
+
* @since DOKAN_LITE_SINCE
|
371 |
+
*
|
372 |
+
* @param array $args
|
373 |
+
*
|
374 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error
|
375 |
+
*/
|
376 |
+
public function create( $args ) {
|
377 |
+
if ( isset( $args['id'] ) ) {
|
378 |
+
unset( $args['id'] );
|
379 |
+
}
|
380 |
+
|
381 |
+
$withdraw = new Withdraw( $args );
|
382 |
+
|
383 |
+
return $withdraw->save();
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Check if a user has sufficient withdraw balance
|
388 |
+
*
|
389 |
+
* @param integer $user_id
|
390 |
+
*
|
391 |
+
* @return boolean
|
392 |
+
*/
|
393 |
+
public function has_withdraw_balance( $user_id ) {
|
394 |
+
$balance = $this->get_user_balance( $user_id );
|
395 |
+
$withdraw_limit = $this->get_withdraw_limit();
|
396 |
+
|
397 |
+
if ( $balance < $withdraw_limit ) {
|
398 |
+
return false;
|
399 |
+
}
|
400 |
+
|
401 |
+
return true;
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Get the system withdraw limit
|
406 |
+
*
|
407 |
+
* @return integer
|
408 |
+
*/
|
409 |
+
public function get_withdraw_limit() {
|
410 |
+
$limit = dokan_get_option( 'withdraw_limit', 'dokan_withdraw', 0 );
|
411 |
+
return absint( $limit );
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Get a sellers balance
|
416 |
+
*
|
417 |
+
* @param integer $user_id
|
418 |
+
*
|
419 |
+
* @return integer
|
420 |
+
*/
|
421 |
+
public function get_user_balance( $user_id ) {
|
422 |
+
return dokan_get_seller_balance( $user_id, false );
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Export withdraw data
|
427 |
+
*
|
428 |
+
* @since DOKAN_LITE_SINCE
|
429 |
+
*
|
430 |
+
* @param array $args
|
431 |
+
*
|
432 |
+
* @return \WeDevs\Dokan\Withdraw\Export\Manager
|
433 |
+
*/
|
434 |
+
public function export( $args ) {
|
435 |
+
return new Export\Manager( $args );
|
436 |
+
}
|
437 |
+
}
|
includes/Withdraw/Withdraw.php
ADDED
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
|
7 |
+
class Withdraw {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Witthdraw data
|
11 |
+
*
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
protected $data = [];
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class constructor
|
18 |
+
*
|
19 |
+
* @since DOKAN_LITE_SINCE
|
20 |
+
*
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function __construct( $data = [] ) {
|
24 |
+
$defaults = [
|
25 |
+
'id' => 0,
|
26 |
+
'user_id' => 0,
|
27 |
+
'amount' => 0,
|
28 |
+
'date' => current_time( 'mysql' ),
|
29 |
+
'status' => dokan()->withdraw->get_status_code( 'pending' ),
|
30 |
+
'method' => 'paypal',
|
31 |
+
'note' => '',
|
32 |
+
'ip' => '',
|
33 |
+
];
|
34 |
+
|
35 |
+
$data = wp_parse_args( $data, $defaults );
|
36 |
+
|
37 |
+
$this->data = [
|
38 |
+
'id' => absint( $data['id'] ),
|
39 |
+
'user_id' => absint( $data['user_id'] ),
|
40 |
+
'amount' => $data['amount'],
|
41 |
+
'date' => $data['date'],
|
42 |
+
'status' => absint( $data['status'] ),
|
43 |
+
'method' => $data['method'],
|
44 |
+
'note' => $data['note'],
|
45 |
+
'ip' => $data['ip'],
|
46 |
+
];
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get withdraw data
|
51 |
+
*
|
52 |
+
* @since DOKAN_LITE_SINCE
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_withdraw() {
|
57 |
+
return $this->data;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get withdraw id
|
62 |
+
*
|
63 |
+
* @since DOKAN_LITE_SINCE
|
64 |
+
*
|
65 |
+
* @return int
|
66 |
+
*/
|
67 |
+
public function get_id() {
|
68 |
+
return $this->data['id'];
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get user_id
|
73 |
+
*
|
74 |
+
* @since DOKAN_LITE_SINCE
|
75 |
+
*
|
76 |
+
* @return int
|
77 |
+
*/
|
78 |
+
public function get_user_id() {
|
79 |
+
return $this->data['user_id'];
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get amount
|
84 |
+
*
|
85 |
+
* @since DOKAN_LITE_SINCE
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public function get_amount() {
|
90 |
+
return $this->data['amount'];
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get date
|
95 |
+
*
|
96 |
+
* @since DOKAN_LITE_SINCE
|
97 |
+
*
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function get_date() {
|
101 |
+
return $this->data['date'];
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Get status
|
106 |
+
*
|
107 |
+
* @since DOKAN_LITE_SINCE
|
108 |
+
*
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
public function get_status() {
|
112 |
+
return $this->data['status'];
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get ip
|
117 |
+
*
|
118 |
+
* @since DOKAN_LITE_SINCE
|
119 |
+
*
|
120 |
+
* @return string
|
121 |
+
*/
|
122 |
+
public function get_method() {
|
123 |
+
return $this->data['method'];
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Get note
|
128 |
+
*
|
129 |
+
* @since DOKAN_LITE_SINCE
|
130 |
+
*
|
131 |
+
* @return string
|
132 |
+
*/
|
133 |
+
public function get_note() {
|
134 |
+
return $this->data['note'];
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Get ip
|
139 |
+
*
|
140 |
+
* @since DOKAN_LITE_SINCE
|
141 |
+
*
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function get_ip() {
|
145 |
+
return $this->data['ip'];
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Set user_id
|
150 |
+
*
|
151 |
+
* @since DOKAN_LITE_SINCE
|
152 |
+
*
|
153 |
+
* @param int $user_id
|
154 |
+
*
|
155 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
156 |
+
*/
|
157 |
+
public function set_user_id( $user_id ) {
|
158 |
+
$this->data['user_id'] = $user_id;
|
159 |
+
return $this;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Set amount
|
164 |
+
*
|
165 |
+
* @since DOKAN_LITE_SINCE
|
166 |
+
*
|
167 |
+
* @param string $amount
|
168 |
+
*
|
169 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
170 |
+
*/
|
171 |
+
public function set_amount( $amount ) {
|
172 |
+
$this->data['amount'] = $amount;
|
173 |
+
return $this;
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Set date
|
178 |
+
*
|
179 |
+
* @since DOKAN_LITE_SINCE
|
180 |
+
*
|
181 |
+
* @param string $date
|
182 |
+
*
|
183 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
184 |
+
*/
|
185 |
+
public function set_date( $date ) {
|
186 |
+
$this->data['date'] = $date;
|
187 |
+
return $this;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Set status
|
192 |
+
*
|
193 |
+
* @since DOKAN_LITE_SINCE
|
194 |
+
*
|
195 |
+
* @param string $status
|
196 |
+
*
|
197 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
198 |
+
*/
|
199 |
+
public function set_status( $status ) {
|
200 |
+
$this->data['status'] = $status;
|
201 |
+
return $this;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Set method
|
206 |
+
*
|
207 |
+
* @since DOKAN_LITE_SINCE
|
208 |
+
*
|
209 |
+
* @param string $method
|
210 |
+
*
|
211 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
212 |
+
*/
|
213 |
+
public function set_method( $method ) {
|
214 |
+
$this->data['method'] = $method;
|
215 |
+
return $this;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Set note
|
220 |
+
*
|
221 |
+
* @since DOKAN_LITE_SINCE
|
222 |
+
*
|
223 |
+
* @param string $note
|
224 |
+
*
|
225 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
226 |
+
*/
|
227 |
+
public function set_note( $note ) {
|
228 |
+
$this->data['note'] = $note;
|
229 |
+
return $this;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Set ip
|
234 |
+
*
|
235 |
+
* @since DOKAN_LITE_SINCE
|
236 |
+
*
|
237 |
+
* @param string $ip
|
238 |
+
*
|
239 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw
|
240 |
+
*/
|
241 |
+
public function set_ip( $ip ) {
|
242 |
+
$this->data['ip'] = $ip;
|
243 |
+
return $this;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Create or update a withdraw
|
248 |
+
*
|
249 |
+
* @since DOKAN_LITE_SINCE
|
250 |
+
*
|
251 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error
|
252 |
+
*/
|
253 |
+
public function save() {
|
254 |
+
if ( ! $this->data['id'] ) {
|
255 |
+
return $this->create();
|
256 |
+
} else {
|
257 |
+
return $this->update();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Create or add a withdraw request
|
263 |
+
*
|
264 |
+
* @since DOKAN_LITE_SINCE
|
265 |
+
*
|
266 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error
|
267 |
+
*/
|
268 |
+
protected function create() {
|
269 |
+
global $wpdb;
|
270 |
+
|
271 |
+
unset( $this->data['id'] );
|
272 |
+
|
273 |
+
$inserted = $wpdb->insert(
|
274 |
+
$wpdb->dokan_withdraw,
|
275 |
+
$this->data,
|
276 |
+
[ '%d', '%s', '%s', '%d', '%s', '%s', '%s' ]
|
277 |
+
);
|
278 |
+
|
279 |
+
if ( $inserted !== 1 ) {
|
280 |
+
return new WP_Error( 'dokan_withdraw_create_error', __( 'Could not create new withdraw', 'dokan-lite' ) );
|
281 |
+
}
|
282 |
+
|
283 |
+
$withdraw = dokan()->withdraw->get( $wpdb->insert_id );
|
284 |
+
|
285 |
+
/**
|
286 |
+
* After completed withdraw request
|
287 |
+
*
|
288 |
+
* @since DOKAN_LITE_SINCE
|
289 |
+
*
|
290 |
+
* @param int $user_id
|
291 |
+
* @param float $amount
|
292 |
+
* @param string $method
|
293 |
+
*/
|
294 |
+
do_action( 'dokan_withdraw_created', $withdraw );
|
295 |
+
|
296 |
+
return $withdraw;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Update a withdraw
|
301 |
+
*
|
302 |
+
* @since DOKAN_LITE_SINCE
|
303 |
+
*
|
304 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error
|
305 |
+
*/
|
306 |
+
protected function update() {
|
307 |
+
global $wpdb;
|
308 |
+
|
309 |
+
$updated = $wpdb->update(
|
310 |
+
$wpdb->dokan_withdraw,
|
311 |
+
[
|
312 |
+
'user_id' => $this->get_user_id(),
|
313 |
+
'amount' => $this->get_amount(),
|
314 |
+
'date' => $this->get_date(),
|
315 |
+
'status' => $this->get_status(),
|
316 |
+
'method' => $this->get_method(),
|
317 |
+
'note' => $this->get_note(),
|
318 |
+
'ip' => $this->get_ip(),
|
319 |
+
],
|
320 |
+
[ 'id' => $this->get_id() ],
|
321 |
+
[ '%d', '%s', '%s', '%d', '%s', '%s', '%s' ],
|
322 |
+
[ '%d' ]
|
323 |
+
);
|
324 |
+
|
325 |
+
if ( $updated !== 1 ) {
|
326 |
+
return new WP_Error( 'dokan_withdraw_update_error', __( 'Could not update withdraw', 'dokan-lite' ) );
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Action based on withdraw status
|
331 |
+
*
|
332 |
+
* @since DOKAN_LITE_SINCE
|
333 |
+
*
|
334 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $this
|
335 |
+
*/
|
336 |
+
do_action( 'dokan_withdraw_request_' . dokan()->withdraw->get_status_name( $this->get_status() ), $this );
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Fires after update a withdraw
|
340 |
+
*
|
341 |
+
* @since DOKAN_LITE_SINCE
|
342 |
+
*
|
343 |
+
* @param \WeDevs\Dokan\Withdraw\Withdraw $this
|
344 |
+
*/
|
345 |
+
do_action( 'dokan_withdraw_updated', $this );
|
346 |
+
|
347 |
+
return $this;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Delete a withdraw
|
352 |
+
*
|
353 |
+
* @since DOKAN_LITE_SINCE
|
354 |
+
*
|
355 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraw|\WP_Error
|
356 |
+
*/
|
357 |
+
public function delete() {
|
358 |
+
global $wpdb;
|
359 |
+
|
360 |
+
$deleted = $wpdb->delete(
|
361 |
+
$wpdb->dokan_withdraw,
|
362 |
+
[ 'id' => $this->data['id'] ],
|
363 |
+
[ '%d' ]
|
364 |
+
);
|
365 |
+
|
366 |
+
if ( ! $deleted ) {
|
367 |
+
return new WP_Error( 'dokan_withdraw_delete_error', __( 'Could not delete withdraw', 'dokan-lite' ) );
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Fires after delete a withdraw
|
372 |
+
*
|
373 |
+
* @since DOKAN_LITE_SINCE
|
374 |
+
*
|
375 |
+
* @param array $data
|
376 |
+
*/
|
377 |
+
do_action( 'dokan_withdraw_deleted', $this );
|
378 |
+
|
379 |
+
return $this;
|
380 |
+
}
|
381 |
+
}
|
includes/Withdraw/Withdraws.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WeDevs\Dokan\Withdraw;
|
4 |
+
|
5 |
+
class Withdraws {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Query arguments
|
9 |
+
*
|
10 |
+
* @var array
|
11 |
+
*/
|
12 |
+
protected $args = [];
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Withdraw results
|
16 |
+
*
|
17 |
+
* @var array
|
18 |
+
*/
|
19 |
+
protected $withdraws = [];
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Total withdraw found
|
23 |
+
*
|
24 |
+
* @var null|int
|
25 |
+
*/
|
26 |
+
protected $total = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Maximum number of pages
|
30 |
+
*
|
31 |
+
* @var null|int
|
32 |
+
*/
|
33 |
+
protected $max_num_pages = null;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Class constructor
|
37 |
+
*
|
38 |
+
* @since DOKAN_LITE_SINCE
|
39 |
+
*
|
40 |
+
* @param array $args
|
41 |
+
*
|
42 |
+
* @return void
|
43 |
+
*/
|
44 |
+
public function __construct( $args = [] ) {
|
45 |
+
$defaults = [
|
46 |
+
'limit' => 10,
|
47 |
+
'page' => 1,
|
48 |
+
'no_found_rows' => false,
|
49 |
+
];
|
50 |
+
|
51 |
+
$this->args = wp_parse_args( $args, $defaults );
|
52 |
+
$this->query();
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get withdraws
|
57 |
+
*
|
58 |
+
* @since DOKAN_LITE_SINCE
|
59 |
+
*
|
60 |
+
* @return array
|
61 |
+
*/
|
62 |
+
public function get_withdraws() {
|
63 |
+
return $this->withdraws;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Query withdraws
|
68 |
+
*
|
69 |
+
* @since DOKAN_LITE_SINCE
|
70 |
+
*
|
71 |
+
* @return \WeDevs\Dokan\Withdraw\Withdraws
|
72 |
+
*/
|
73 |
+
public function query() {
|
74 |
+
global $wpdb;
|
75 |
+
|
76 |
+
$args = $this->args;
|
77 |
+
|
78 |
+
// @note: empty variables may use in future
|
79 |
+
$fields = '*';
|
80 |
+
$join = '';
|
81 |
+
$where = '';
|
82 |
+
$groupby = '';
|
83 |
+
$orderby = '';
|
84 |
+
$limits = '';
|
85 |
+
$query_args = [ 1, 1 ];
|
86 |
+
|
87 |
+
if ( isset( $args['ids'] ) && is_array( $args['ids'] ) ) {
|
88 |
+
$ids = array_map( 'absint', $args['ids'] );
|
89 |
+
$ids = array_filter( $ids );
|
90 |
+
|
91 |
+
$placeholders = [];
|
92 |
+
foreach ( $ids as $id ) {
|
93 |
+
$placeholders[] = '%d';
|
94 |
+
$query_args[] = $id;
|
95 |
+
}
|
96 |
+
|
97 |
+
$where .= ' and id in ( ' . implode( ',', $placeholders ) . ' )';
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( isset( $args['user_id'] ) ) {
|
101 |
+
$where .= ' and user_id = %d';
|
102 |
+
$query_args[] = $args['user_id'];
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( isset( $args['amount'] ) ) {
|
106 |
+
$where .= ' and amount = %s';
|
107 |
+
$query_args[] = $args['amount'];
|
108 |
+
}
|
109 |
+
|
110 |
+
if ( isset( $args['date'] ) ) {
|
111 |
+
$where .= ' and date = %s';
|
112 |
+
$query_args[] = $args['date'];
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( isset( $args['status'] ) ) {
|
116 |
+
$where .= ' and status = %d';
|
117 |
+
$query_args[] = $args['status'];
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( isset( $args['method'] ) ) {
|
121 |
+
$where .= ' and method = %s';
|
122 |
+
$query_args[] = $args['method'];
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( isset( $args['ip'] ) ) {
|
126 |
+
$where .= ' and ip = %s';
|
127 |
+
$query_args[] = $args['ip'];
|
128 |
+
}
|
129 |
+
|
130 |
+
if ( ! empty( $args['limit'] ) ) {
|
131 |
+
$limit = absint( $args['limit'] );
|
132 |
+
$page = absint( $args['page'] );
|
133 |
+
$page = $page ? $page : 1;
|
134 |
+
$offset = ( $page - 1 ) * $limit;
|
135 |
+
|
136 |
+
$limits = 'LIMIT %d, %d';
|
137 |
+
$query_args[] = $offset;
|
138 |
+
$query_args[] = $limit;
|
139 |
+
}
|
140 |
+
|
141 |
+
$found_rows = '';
|
142 |
+
if ( ! $args['no_found_rows'] && ! empty( $limits ) ) {
|
143 |
+
$found_rows = 'SQL_CALC_FOUND_ROWS';
|
144 |
+
}
|
145 |
+
|
146 |
+
$withdraws = $wpdb->get_results( $wpdb->prepare(
|
147 |
+
"SELECT $found_rows $fields FROM {$wpdb->dokan_withdraw} $join WHERE %d=%d $where $groupby $orderby $limits",
|
148 |
+
...$query_args
|
149 |
+
), ARRAY_A );
|
150 |
+
|
151 |
+
if ( ! empty( $withdraws ) ) {
|
152 |
+
foreach ( $withdraws as $withdraw ) {
|
153 |
+
$this->withdraws[] = new Withdraw( $withdraw );
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Get total number of withdraws
|
162 |
+
*
|
163 |
+
* @since DOKAN_LITE_SINCE
|
164 |
+
*
|
165 |
+
* @return int
|
166 |
+
*/
|
167 |
+
public function get_total() {
|
168 |
+
global $wpdb;
|
169 |
+
|
170 |
+
if ( ! isset( $this->total ) ) {
|
171 |
+
$this->total = absint( $wpdb->get_var( "SELECT FOUND_ROWS()" ) );
|
172 |
+
}
|
173 |
+
|
174 |
+
return $this->total;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Get maximum number of pages
|
179 |
+
*
|
180 |
+
* @since DOKAN_LITE_SINCE
|
181 |
+
*
|
182 |
+
* @return int
|
183 |
+
*/
|
184 |
+
public function get_maximum_num_pages() {
|
185 |
+
$total = $this->get_total();
|
186 |
+
|
187 |
+
if ( ! $this->max_num_pages && $total && ! empty( $this->args['limit'] ) ) {
|
188 |
+
$limit = absint( $this->args['limit'] );
|
189 |
+
$this->max_num_pages = ceil( $total / $limit );
|
190 |
+
}
|
191 |
+
|
192 |
+
return $this->max_num_pages;
|
193 |
+
}
|
194 |
+
}
|
includes/{withdraw-functions.php → Withdraw/functions.php}
RENAMED
@@ -1,21 +1,22 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
-
* Get default withdraw methods
|
|
|
|
|
5 |
*
|
6 |
* @return array
|
7 |
*/
|
8 |
function dokan_withdraw_register_methods() {
|
9 |
-
$methods =
|
10 |
-
'paypal' =>
|
11 |
'title' => __( 'PayPal', 'dokan-lite' ),
|
12 |
'callback' => 'dokan_withdraw_method_paypal'
|
13 |
-
|
14 |
-
'bank' =>
|
15 |
'title' => __( 'Bank Transfer', 'dokan-lite' ),
|
16 |
'callback' => 'dokan_withdraw_method_bank'
|
17 |
-
|
18 |
-
|
19 |
|
20 |
return apply_filters( 'dokan_withdraw_methods', $methods );
|
21 |
}
|
@@ -26,10 +27,10 @@ function dokan_withdraw_register_methods() {
|
|
26 |
* @return array
|
27 |
*/
|
28 |
function dokan_withdraw_get_methods() {
|
29 |
-
$methods =
|
30 |
$registered = dokan_withdraw_register_methods();
|
31 |
|
32 |
-
foreach ($registered as $key => $value) {
|
33 |
$methods[$key] = $value['title'];
|
34 |
}
|
35 |
|
@@ -37,30 +38,34 @@ function dokan_withdraw_get_methods() {
|
|
37 |
}
|
38 |
|
39 |
/**
|
40 |
-
* Get active withdraw methods.
|
41 |
-
*
|
42 |
-
* Default is paypal
|
43 |
*
|
44 |
* @return array
|
45 |
*/
|
46 |
function dokan_withdraw_get_active_methods() {
|
47 |
-
$methods = dokan_get_option( 'withdraw_methods', 'dokan_withdraw',
|
48 |
-
|
49 |
return $methods;
|
50 |
}
|
51 |
|
52 |
/**
|
53 |
* Get active withdraw methods for seller.
|
|
|
|
|
|
|
|
|
|
|
54 |
* @return array
|
55 |
*/
|
56 |
-
function dokan_get_seller_active_withdraw_methods() {
|
57 |
-
$
|
|
|
|
|
58 |
$paypal = isset( $payment_methods[0]['payment']['paypal']['email'] ) && $payment_methods[0]['payment']['paypal']['email'] !== false ? 'paypal' : '';
|
59 |
$bank = isset( $payment_methods[0]['payment']['bank']['ac_number'] ) && $payment_methods[0]['payment']['bank']['ac_number'] !== '' ? 'bank' : '';
|
60 |
$skrill = isset( $payment_methods[0]['payment']['skrill']['email'] ) && $payment_methods[0]['payment']['skrill']['email'] !== false ? 'skrill' : '';
|
61 |
|
62 |
-
$payment_methods =
|
63 |
-
$active_payment_methods =
|
64 |
|
65 |
foreach ( $payment_methods as $payment_method ) {
|
66 |
if ( ! empty( $payment_method ) ) {
|
@@ -213,7 +218,7 @@ function dokan_withdraw_method_bank( $store_settings ) {
|
|
213 |
* @global WPDB $wpdb
|
214 |
* @return array
|
215 |
*/
|
216 |
-
function dokan_get_withdraw_count( $user_id =
|
217 |
global $wpdb;
|
218 |
|
219 |
$cache_key = 'dokan_withdraw_count-' . $user_id;
|
@@ -245,39 +250,33 @@ function dokan_get_withdraw_count( $user_id = '' ) {
|
|
245 |
}
|
246 |
|
247 |
/**
|
248 |
-
* Get active
|
249 |
*
|
250 |
-
*
|
251 |
*
|
252 |
* @return array
|
253 |
*/
|
254 |
function dokan_withdraw_get_active_order_status() {
|
255 |
-
$order_status
|
256 |
-
|
257 |
-
/**
|
258 |
-
* wc-refunded status is not visible in dokan order status for withdraw settings (backend).
|
259 |
-
* But it's needed for report and other calculations.
|
260 |
-
*
|
261 |
-
* @var array
|
262 |
-
*/
|
263 |
-
$active_status = [ 'wc-refunded' ];
|
264 |
|
265 |
foreach ( $order_status as $key => $status ) {
|
266 |
if ( ! empty( $status ) ) {
|
267 |
-
$
|
268 |
-
array_push( $active_status, strtolower( $key ) );
|
269 |
}
|
270 |
}
|
271 |
|
272 |
-
return apply_filters( 'dokan_withdraw_active_status', $
|
273 |
}
|
274 |
|
275 |
/**
|
276 |
-
*
|
|
|
277 |
* @param array array
|
278 |
*/
|
279 |
function dokan_withdraw_get_active_order_status_in_comma() {
|
280 |
$order_status = dokan_withdraw_get_active_order_status();
|
281 |
-
$status
|
|
|
282 |
return $status;
|
283 |
}
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
+
* Get default withdraw methods for vendor
|
4 |
+
*
|
5 |
+
* @since 1.0.0
|
6 |
*
|
7 |
* @return array
|
8 |
*/
|
9 |
function dokan_withdraw_register_methods() {
|
10 |
+
$methods = [
|
11 |
+
'paypal' => [
|
12 |
'title' => __( 'PayPal', 'dokan-lite' ),
|
13 |
'callback' => 'dokan_withdraw_method_paypal'
|
14 |
+
],
|
15 |
+
'bank' => [
|
16 |
'title' => __( 'Bank Transfer', 'dokan-lite' ),
|
17 |
'callback' => 'dokan_withdraw_method_bank'
|
18 |
+
]
|
19 |
+
];
|
20 |
|
21 |
return apply_filters( 'dokan_withdraw_methods', $methods );
|
22 |
}
|
27 |
* @return array
|
28 |
*/
|
29 |
function dokan_withdraw_get_methods() {
|
30 |
+
$methods = [];
|
31 |
$registered = dokan_withdraw_register_methods();
|
32 |
|
33 |
+
foreach ( $registered as $key => $value ) {
|
34 |
$methods[$key] = $value['title'];
|
35 |
}
|
36 |
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
+
* Get active withdraw methods.( Default is paypal )
|
|
|
|
|
42 |
*
|
43 |
* @return array
|
44 |
*/
|
45 |
function dokan_withdraw_get_active_methods() {
|
46 |
+
$methods = dokan_get_option( 'withdraw_methods', 'dokan_withdraw', [ 'paypal' ] );
|
|
|
47 |
return $methods;
|
48 |
}
|
49 |
|
50 |
/**
|
51 |
* Get active withdraw methods for seller.
|
52 |
+
*
|
53 |
+
* @since DOKAN_LITE_SINCE add $vendor_id param
|
54 |
+
*
|
55 |
+
* @param int $vendor_id Seller vendor id
|
56 |
+
*
|
57 |
* @return array
|
58 |
*/
|
59 |
+
function dokan_get_seller_active_withdraw_methods( $vendor_id = 0 ) {
|
60 |
+
$vendor_id = $vendor_id ? $vendor_id : dokan_get_current_user_id();
|
61 |
+
|
62 |
+
$payment_methods = get_user_meta( $vendor_id, 'dokan_profile_settings' );
|
63 |
$paypal = isset( $payment_methods[0]['payment']['paypal']['email'] ) && $payment_methods[0]['payment']['paypal']['email'] !== false ? 'paypal' : '';
|
64 |
$bank = isset( $payment_methods[0]['payment']['bank']['ac_number'] ) && $payment_methods[0]['payment']['bank']['ac_number'] !== '' ? 'bank' : '';
|
65 |
$skrill = isset( $payment_methods[0]['payment']['skrill']['email'] ) && $payment_methods[0]['payment']['skrill']['email'] !== false ? 'skrill' : '';
|
66 |
|
67 |
+
$payment_methods = [ $paypal, $bank, $skrill ];
|
68 |
+
$active_payment_methods = [];
|
69 |
|
70 |
foreach ( $payment_methods as $payment_method ) {
|
71 |
if ( ! empty( $payment_method ) ) {
|
218 |
* @global WPDB $wpdb
|
219 |
* @return array
|
220 |
*/
|
221 |
+
function dokan_get_withdraw_count( $user_id = null ) {
|
222 |
global $wpdb;
|
223 |
|
224 |
$cache_key = 'dokan_withdraw_count-' . $user_id;
|
250 |
}
|
251 |
|
252 |
/**
|
253 |
+
* Get active withdraw order status.
|
254 |
*
|
255 |
+
* Default is 'completed', 'processing', 'on-hold'
|
256 |
*
|
257 |
* @return array
|
258 |
*/
|
259 |
function dokan_withdraw_get_active_order_status() {
|
260 |
+
$order_status = dokan_get_option( 'withdraw_order_status', 'dokan_withdraw', [ 'wc-completed' ] );
|
261 |
+
$saving_status = [ 'wc-refunded' ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
foreach ( $order_status as $key => $status ) {
|
264 |
if ( ! empty( $status ) ) {
|
265 |
+
$saving_status[] = $status;
|
|
|
266 |
}
|
267 |
}
|
268 |
|
269 |
+
return apply_filters( 'dokan_withdraw_active_status', $saving_status );
|
270 |
}
|
271 |
|
272 |
/**
|
273 |
+
* Get comma seperated value from "dokan_withdraw_get_active_order_status()" return array
|
274 |
+
*
|
275 |
* @param array array
|
276 |
*/
|
277 |
function dokan_withdraw_get_active_order_status_in_comma() {
|
278 |
$order_status = dokan_withdraw_get_active_order_status();
|
279 |
+
$status = "'" . implode("', '", $order_status ) . "'";
|
280 |
+
|
281 |
return $status;
|
282 |
}
|
includes/admin/class-admin.php
DELETED
@@ -1,378 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* WordPress settings API For Dokan Admin Settings class
|
5 |
-
*
|
6 |
-
* @author Tareq Hasan
|
7 |
-
*/
|
8 |
-
class Dokan_Admin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Constructor for the Dokan_Admin class
|
12 |
-
*
|
13 |
-
* Sets up all the appropriate hooks and actions
|
14 |
-
* within our plugin.
|
15 |
-
*
|
16 |
-
* @return void
|
17 |
-
*/
|
18 |
-
function __construct() {
|
19 |
-
|
20 |
-
add_action( 'admin_init', array($this, 'do_updates' ) );
|
21 |
-
|
22 |
-
add_action( 'admin_menu', array($this, 'admin_menu') );
|
23 |
-
|
24 |
-
add_action( 'admin_notices', array($this, 'update_notice' ) );
|
25 |
-
|
26 |
-
add_action( 'admin_notices', array( $this, 'promotional_offer' ) );
|
27 |
-
|
28 |
-
add_action( 'wp_before_admin_bar_render', array( $this, 'dokan_admin_toolbar' ) );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Added promotion notice
|
33 |
-
*
|
34 |
-
* @since 2.5.6
|
35 |
-
*
|
36 |
-
* @return void
|
37 |
-
*/
|
38 |
-
public function promotional_offer() {
|
39 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
40 |
-
return;
|
41 |
-
}
|
42 |
-
|
43 |
-
if ( ! isset( $_GET['page'] ) ) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( $_GET['page'] != 'dokan' ) {
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
// check if it has already been dismissed
|
52 |
-
$offer_key = 'dokan_wedevs_19_blackfriday';
|
53 |
-
$offer_start_date = strtotime( '2019-11-20 00:00:01' );
|
54 |
-
$offer_last_date = strtotime( '2019-12-04 23:59:00' );
|
55 |
-
$hide_notice = get_option( $offer_key, 'show' );
|
56 |
-
$offer_link = 'https://wedevs.com/dokan/?add-to-cart=15310&variation_id=15314&attribute_pa_license=professional&coupon_code=BFCM2019';
|
57 |
-
|
58 |
-
if ( 'hide' == $hide_notice || dokan()->is_pro_exists() ) {
|
59 |
-
return;
|
60 |
-
}
|
61 |
-
|
62 |
-
if ( $offer_start_date < current_time( 'timestamp' ) && current_time( 'timestamp' ) < $offer_last_date ) {
|
63 |
-
?>
|
64 |
-
<div class="notice notice-success is-dismissible" id="dokan-christmas-notice">
|
65 |
-
<div class="logo">
|
66 |
-
<img src="<?php echo esc_url( DOKAN_PLUGIN_ASSEST . '/images/promo-logo.png' ); ?>" alt="Dokan">
|
67 |
-
</div>
|
68 |
-
<div class="content">
|
69 |
-
<p class="highlight-magento">Biggest Sale of the year on this</p>
|
70 |
-
<h3><span class="highlight-red">Black Friday</span> & <span class="highlight-blue">Cyber Monday</span></h3>
|
71 |
-
<p class="highlight-magento">Claim your discount on <span class="highlight-red">Dokan Multi-Vendor</span> till 4th December.</p>
|
72 |
-
</div>
|
73 |
-
<div class="call-to-action">
|
74 |
-
<a href="https://wedevs.com/dokan/pricing?utm_campaign=black_friday_&_cyber_monday&utm_medium=banner&utm_source=plugin_dashboard">Save <span class="bold">33%</span></a>
|
75 |
-
<p class="highlight-magento-light">Coupon: <span class="highlight-black">BFCM2019</span></p>
|
76 |
-
</div>
|
77 |
-
</div>
|
78 |
-
|
79 |
-
<style>
|
80 |
-
#dokan-christmas-notice {
|
81 |
-
font-size: 14px;
|
82 |
-
border-left: 1px solid #FEDEDE;
|
83 |
-
background-image: linear-gradient(50deg, #fedede85 50%, #fedede5e);
|
84 |
-
color: #fff;
|
85 |
-
display: flex;
|
86 |
-
border-color: #FEDEDE;
|
87 |
-
}
|
88 |
-
|
89 |
-
#dokan-christmas-notice .logo{
|
90 |
-
text-align: center;
|
91 |
-
text-align: center;
|
92 |
-
margin: 13px 30px 5px 15px;
|
93 |
-
}
|
94 |
-
|
95 |
-
#dokan-christmas-notice .logo img{
|
96 |
-
width: 80%;
|
97 |
-
}
|
98 |
-
|
99 |
-
#dokan-christmas-notice .highlight-red {
|
100 |
-
color: #FC3B7B;
|
101 |
-
}
|
102 |
-
|
103 |
-
#dokan-christmas-notice .highlight-magento {
|
104 |
-
color: #812525;
|
105 |
-
}
|
106 |
-
|
107 |
-
#dokan-christmas-notice .highlight-blue {
|
108 |
-
color: #487FFF;
|
109 |
-
}
|
110 |
-
|
111 |
-
#dokan-christmas-notice .content {
|
112 |
-
margin-top: 5px;
|
113 |
-
}
|
114 |
-
|
115 |
-
#dokan-christmas-notice .content h3 {
|
116 |
-
font-size: 23px;
|
117 |
-
font-weight: normal;
|
118 |
-
margin: 10px 0px 5px;
|
119 |
-
}
|
120 |
-
|
121 |
-
#dokan-christmas-notice .content p {
|
122 |
-
margin: 5px 0px 0px 0px;
|
123 |
-
padding: 0px;
|
124 |
-
letter-spacing: 0.4px;
|
125 |
-
}
|
126 |
-
|
127 |
-
#dokan-christmas-notice .content p:last-child {
|
128 |
-
margin: 11px 0px 0px 0px;
|
129 |
-
}
|
130 |
-
|
131 |
-
#dokan-christmas-notice .call-to-action {
|
132 |
-
margin-left: 8%;
|
133 |
-
margin-top: 36px;
|
134 |
-
}
|
135 |
-
|
136 |
-
#dokan-christmas-notice .call-to-action a {
|
137 |
-
border: none;
|
138 |
-
background: #FF0000;
|
139 |
-
padding: 8px 50px;
|
140 |
-
font-size: 15px;
|
141 |
-
color: #fff;
|
142 |
-
border-radius: 20px;
|
143 |
-
text-decoration: none;
|
144 |
-
display: block;
|
145 |
-
text-align: center;
|
146 |
-
background-image: linear-gradient(46deg, #F2709C 0%, #FF9472 100%);
|
147 |
-
box-shadow: 0 5px 11px 0 rgba(132,0,0,0.13);
|
148 |
-
font-weight: 400;
|
149 |
-
}
|
150 |
-
|
151 |
-
#dokan-christmas-notice .call-to-action a .bold {
|
152 |
-
font-weight: 700;
|
153 |
-
}
|
154 |
-
|
155 |
-
#dokan-christmas-notice .call-to-action p {
|
156 |
-
font-size: 12px;
|
157 |
-
margin-top: 1px;
|
158 |
-
margin-left: 23px;
|
159 |
-
}
|
160 |
-
|
161 |
-
#dokan-christmas-notice .call-to-action .highlight-magento-light {
|
162 |
-
color: #FF85A3;
|
163 |
-
}
|
164 |
-
|
165 |
-
#dokan-christmas-notice .call-to-action .highlight-black {
|
166 |
-
color: #000;
|
167 |
-
}
|
168 |
-
</style>
|
169 |
-
|
170 |
-
<script type='text/javascript'>
|
171 |
-
jQuery('body').on('click', '#dokan-christmas-notice .notice-dismiss', function(e) {
|
172 |
-
e.preventDefault();
|
173 |
-
|
174 |
-
wp.ajax.post( 'dokan-dismiss-christmas-offer-notice', {
|
175 |
-
dokan_christmas_dismissed: true,
|
176 |
-
nonce: '<?php echo esc_attr( wp_create_nonce( 'dokan_admin' ) ); ?>'
|
177 |
-
});
|
178 |
-
});
|
179 |
-
</script>
|
180 |
-
<?php
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Dashboard scripts and styles
|
186 |
-
*
|
187 |
-
* @since 1.0
|
188 |
-
*
|
189 |
-
* @return void
|
190 |
-
*/
|
191 |
-
function dashboard_script() {
|
192 |
-
wp_enqueue_style( 'dokan-admin-css' );
|
193 |
-
wp_enqueue_style( 'jquery-ui' );
|
194 |
-
|
195 |
-
wp_enqueue_script( 'jquery-ui-datepicker' );
|
196 |
-
wp_enqueue_script( 'wp-color-picker' );
|
197 |
-
wp_enqueue_script( 'dokan-flot' );
|
198 |
-
wp_enqueue_script( 'dokan-chart' );
|
199 |
-
|
200 |
-
do_action( 'dokan_enqueue_admin_dashboard_script' );
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Load admin Menu
|
205 |
-
*
|
206 |
-
* @since 1.0
|
207 |
-
*
|
208 |
-
* @return void
|
209 |
-
*/
|
210 |
-
function admin_menu() {
|
211 |
-
global $submenu;
|
212 |
-
|
213 |
-
$menu_position = dokan_admin_menu_position();
|
214 |
-
$capability = dokana_admin_menu_capability();
|
215 |
-
$withdraw = dokan_get_withdraw_count();
|
216 |
-
$withdraw_text = __( 'Withdraw', 'dokan-lite' );
|
217 |
-
$slug = 'dokan';
|
218 |
-
|
219 |
-
if ( $withdraw['pending'] ) {
|
220 |
-
$withdraw_text = sprintf( __( 'Withdraw %s', 'dokan-lite' ), '<span class="awaiting-mod count-1"><span class="pending-count">' . $withdraw['pending'] . '</span></span>' );
|
221 |
-
}
|
222 |
-
|
223 |
-
$dashboard = add_menu_page( __( 'Dokan', 'dokan-lite' ), __( 'Dokan', 'dokan-lite' ), $capability, $slug, array( $this, 'dashboard'), 'data:image/svg+xml;base64,' . base64_encode( '<svg width="58px" height="63px" viewBox="0 0 58 63" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="dokan-icon" fill-rule="nonzero" fill="#9EA3A8"><path d="M5.33867702,3.0997123 C5.33867702,3.0997123 40.6568031,0.833255993 40.6568031,27.7724223 C40.6568031,54.7115885 31.3258879,60.1194199 23.1436827,61.8692575 C23.1436827,61.8692575 57.1718639,69.1185847 57.1718639,31.1804393 C57.1718639,-6.75770611 13.7656892,-1.28321423 5.33867702,3.0997123 Z" id="Shape"></path><path d="M34.0564282,48.9704547 C34.0564282,48.9704547 30.6479606,59.4444826 20.3472329,60.7776922 C10.0465051,62.1109017 8.12571122,57.1530286 0.941565611,57.4946635 C0.941565611,57.4946635 0.357794932,52.5784532 6.1578391,51.8868507 C11.9578833,51.1952482 22.8235504,52.5451229 30.0547743,48.5038314 C30.0547743,48.5038314 34.3294822,46.5206821 35.1674756,45.5624377 L34.0564282,48.9704547 Z" id="Shape"></path><path d="M4.80198462,4.99953596 L4.80198462,17.9733318 L4.80198462,17.9733318 L4.80198462,50.2869992 C5.1617776,50.2053136 5.52640847,50.1413326 5.89420073,50.0953503 C7.92701701,49.903571 9.97004544,49.8089979 12.0143772,49.8120433 C14.1423155,49.8120433 16.4679825,49.7370502 18.7936496,49.5454014 L18.7936496,34.3134818 C18.7936496,29.2472854 18.426439,24.0727656 18.7936496,19.0149018 C19.186126,15.9594324 21.459175,13.3479115 24.697266,12.232198 C27.2835811,11.3792548 30.1586431,11.546047 32.5970015,12.6904888 C20.9498348,5.04953132 7.86207285,4.89954524 4.80198462,4.99953596 Z" id="Shape"></path></g></g></svg>' ), $menu_position );
|
224 |
-
|
225 |
-
if ( current_user_can( $capability ) ) {
|
226 |
-
$submenu[ $slug ][] = array( __( 'Dashboard', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/' );
|
227 |
-
$submenu[ $slug ][] = array( __( 'Withdraw', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/withdraw?status=pending' );
|
228 |
-
|
229 |
-
// if dokan pro not installed or dokan pro is greater than 2.9.14 register the `vendor` sub-menu
|
230 |
-
if ( ! dokan()->is_pro_exists() || version_compare( DOKAN_PRO_PLUGIN_VERSION, '2.9.14', '>' ) ) {
|
231 |
-
$submenu[ $slug ][] = array( __( 'Vendors', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/vendors' );
|
232 |
-
}
|
233 |
-
|
234 |
-
if ( ! dokan()->is_pro_exists() ) {
|
235 |
-
$submenu[ $slug ][] = array( __( 'PRO Features', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/premium' );
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
do_action( 'dokan_admin_menu', $capability, $menu_position );
|
240 |
-
|
241 |
-
if ( current_user_can( $capability ) ) {
|
242 |
-
$submenu[ $slug ][] = array( __( '<span style="color:#f18500">Help</span>', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/help' );
|
243 |
-
$submenu[ $slug ][] = array( __( 'Settings', 'dokan-lite' ), $capability, 'admin.php?page=' . $slug . '#/settings' );
|
244 |
-
}
|
245 |
-
|
246 |
-
add_action( $dashboard, array($this, 'dashboard_script' ) );
|
247 |
-
}
|
248 |
-
|
249 |
-
/**
|
250 |
-
* Load Dashboard Template
|
251 |
-
*
|
252 |
-
* @since 1.0
|
253 |
-
*
|
254 |
-
* @return void
|
255 |
-
*/
|
256 |
-
function dashboard() {
|
257 |
-
echo '<div class="wrap"><div id="dokan-vue-admin"></div></div>';
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Add Menu in Dashboard Top bar
|
262 |
-
*
|
263 |
-
* @return array [top menu bar]
|
264 |
-
*/
|
265 |
-
function dokan_admin_toolbar() {
|
266 |
-
global $wp_admin_bar;
|
267 |
-
|
268 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
269 |
-
return;
|
270 |
-
}
|
271 |
-
|
272 |
-
$args = array(
|
273 |
-
'id' => 'dokan',
|
274 |
-
'title' => __( 'Dokan', 'dokan-lite' ),
|
275 |
-
'href' => admin_url( 'admin.php?page=dokan' )
|
276 |
-
);
|
277 |
-
|
278 |
-
$wp_admin_bar->add_menu( $args );
|
279 |
-
|
280 |
-
$wp_admin_bar->add_menu( array(
|
281 |
-
'id' => 'dokan-dashboard',
|
282 |
-
'parent' => 'dokan',
|
283 |
-
'title' => __( 'Dashboard', 'dokan-lite' ),
|
284 |
-
'href' => admin_url( 'admin.php?page=dokan' )
|
285 |
-
) );
|
286 |
-
|
287 |
-
$wp_admin_bar->add_menu( array(
|
288 |
-
'id' => 'dokan-withdraw',
|
289 |
-
'parent' => 'dokan',
|
290 |
-
'title' => __( 'Withdraw', 'dokan-lite' ),
|
291 |
-
'href' => admin_url( 'admin.php?page=dokan#/withdraw' )
|
292 |
-
) );
|
293 |
-
|
294 |
-
$wp_admin_bar->add_menu( array(
|
295 |
-
'id' => 'dokan-pro-features',
|
296 |
-
'parent' => 'dokan',
|
297 |
-
'title' => __( 'PRO Features', 'dokan-lite' ),
|
298 |
-
'href' => admin_url( 'admin.php?page=dokan#/premium' )
|
299 |
-
) );
|
300 |
-
|
301 |
-
$wp_admin_bar->add_menu( array(
|
302 |
-
'id' => 'dokan-settings',
|
303 |
-
'parent' => 'dokan',
|
304 |
-
'title' => __( 'Settings', 'dokan-lite' ),
|
305 |
-
'href' => admin_url( 'admin.php?page=dokan#/settings' )
|
306 |
-
) );
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Add new or remove toolbar
|
310 |
-
*
|
311 |
-
* @since 2.5.3
|
312 |
-
*/
|
313 |
-
do_action( 'dokan_render_admin_toolbar', $wp_admin_bar );
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Doing Updates and upgrade
|
318 |
-
*
|
319 |
-
* @since 1.0
|
320 |
-
*
|
321 |
-
* @return void
|
322 |
-
*/
|
323 |
-
public function do_updates() {
|
324 |
-
if ( isset( $_GET['dokan_do_update'] ) && 'true' == $_GET['dokan_do_update'] && current_user_can( 'manage_options' ) ) {
|
325 |
-
$installer = new Dokan_Installer();
|
326 |
-
$installer->do_upgrades();
|
327 |
-
}
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Check is dokan need any update
|
332 |
-
*
|
333 |
-
* @since 1.0
|
334 |
-
*
|
335 |
-
* @return boolean
|
336 |
-
*/
|
337 |
-
public function is_dokan_needs_update() {
|
338 |
-
$installed_version = get_option( 'dokan_theme_version' );
|
339 |
-
|
340 |
-
// may be it's the first install
|
341 |
-
if ( ! $installed_version ) {
|
342 |
-
return false;
|
343 |
-
}
|
344 |
-
|
345 |
-
if ( version_compare( $installed_version, '1.2', '<' ) ) {
|
346 |
-
return true;
|
347 |
-
}
|
348 |
-
|
349 |
-
return false;
|
350 |
-
}
|
351 |
-
|
352 |
-
/**
|
353 |
-
* Show update notice in dokan dashboard
|
354 |
-
*
|
355 |
-
* @since 1.0
|
356 |
-
*
|
357 |
-
* @return void
|
358 |
-
*/
|
359 |
-
public function update_notice() {
|
360 |
-
if ( ! $this->is_dokan_needs_update() ) {
|
361 |
-
return;
|
362 |
-
}
|
363 |
-
?>
|
364 |
-
<div id="message" class="updated">
|
365 |
-
<p><?php printf( '<strong>%s – %s</strong>', esc_attr__( 'Dokan Data Update Required', 'dokan-lite' ), esc_attr__( 'We need to update your install to the latest version', 'dokan-lite' ) ); ?></p>
|
366 |
-
<p class="submit"><a href="<?php echo esc_url( add_query_arg( 'dokan_do_update', 'true', admin_url( 'admin.php?page=dokan' ) ) ); ?>" class="dokan-update-btn button-primary"><?php esc_html_e( 'Run the updater', 'dokan-lite' ); ?></a></p>
|
367 |
-
</div>
|
368 |
-
|
369 |
-
<script type="text/javascript">
|
370 |
-
jQuery('.dokan-update-btn').click('click', function(){
|
371 |
-
return confirm( '<?php esc_html_e( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'dokan-lite' ); ?>' );
|
372 |
-
});
|
373 |
-
</script>
|
374 |
-
<?php
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
$settings = new Dokan_Admin();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/class-ajax.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Ajax handling for Dokan in Admin area
|
5 |
-
*
|
6 |
-
* @since 2.2
|
7 |
-
*
|
8 |
-
* @author weDevs <info@wedevs.com>
|
9 |
-
*/
|
10 |
-
class Dokan_Admin_Ajax {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Load autometically all actions
|
14 |
-
*/
|
15 |
-
function __construct() {
|
16 |
-
add_action( 'wp_ajax_dokan-dismiss-christmas-offer-notice', array( $this, 'dismiss_christmas_offer' ) );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Initializes the Dokan_Template_Withdraw class
|
21 |
-
*
|
22 |
-
* Checks for an existing Dokan_Template_Withdraw instance
|
23 |
-
* and if it doesn't find one, creates it.
|
24 |
-
*/
|
25 |
-
public static function init() {
|
26 |
-
static $instance = false;
|
27 |
-
|
28 |
-
if ( ! $instance ) {
|
29 |
-
$instance = new Dokan_Admin_Ajax();
|
30 |
-
}
|
31 |
-
|
32 |
-
return $instance;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Dismiss promotion notice
|
37 |
-
*
|
38 |
-
* @since 2.5.6
|
39 |
-
*
|
40 |
-
* @return void
|
41 |
-
*/
|
42 |
-
public function dismiss_christmas_offer() {
|
43 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
44 |
-
wp_send_json_error( __( 'You have no permission to do that', 'dokan-lite' ) );
|
45 |
-
}
|
46 |
-
|
47 |
-
$nonce = isset( $_POST['nonce'] ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
|
48 |
-
|
49 |
-
if ( ! wp_verify_nonce( $nonce, 'dokan_admin' ) ) {
|
50 |
-
wp_send_json_error( __( 'Invalid nonce', 'dokan-lite' ) );
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( ! empty( $_POST['dokan_christmas_dismissed'] ) ) {
|
54 |
-
$offer_key = 'dokan_wedevs_19_blackfriday';
|
55 |
-
update_option( $offer_key, 'hide' );
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/api/class-settings-controller.php
DELETED
@@ -1,160 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* REST API Settings controller
|
5 |
-
*
|
6 |
-
* Handles requests to the /settings endpoint.
|
7 |
-
*
|
8 |
-
* @author Dokan
|
9 |
-
* @category API
|
10 |
-
* @package Dokan/API
|
11 |
-
* @since 2.8
|
12 |
-
*/
|
13 |
-
if ( !defined( 'ABSPATH' ) ) {
|
14 |
-
exit;
|
15 |
-
}
|
16 |
-
|
17 |
-
class Dokan_REST_Settings_Controller extends WP_REST_Controller {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Endpoint namespace.
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
protected $namespace = 'dokan/v1';
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Route name
|
28 |
-
*
|
29 |
-
* @var string
|
30 |
-
*/
|
31 |
-
protected $base = 'settings';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Register all routes related with settings
|
35 |
-
*
|
36 |
-
* @return void
|
37 |
-
*/
|
38 |
-
public function register_routes() {
|
39 |
-
register_rest_route( $this->namespace, $this->base, array(
|
40 |
-
array(
|
41 |
-
'methods' => WP_REST_Server::READABLE,
|
42 |
-
'callback' => array( $this, 'get_settings' )
|
43 |
-
),
|
44 |
-
array(
|
45 |
-
'methods' => WP_REST_Server::EDITABLE,
|
46 |
-
'callback' => array( $this, 'update_settings' )
|
47 |
-
),
|
48 |
-
) );
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get single settings
|
53 |
-
*
|
54 |
-
* @return void
|
55 |
-
*/
|
56 |
-
public function get_settings( $request ) {
|
57 |
-
|
58 |
-
$seller_id = dokan_get_current_user_id();
|
59 |
-
|
60 |
-
if ( !dokan_is_user_seller( $seller_id ) ) {
|
61 |
-
return new WP_Error( 'invalid_seller', 'Invalid Seller ID', array( 'status' => 404 ) );
|
62 |
-
}
|
63 |
-
|
64 |
-
$data = dokan_get_store_info( $seller_id );
|
65 |
-
|
66 |
-
$response = rest_ensure_response( $data );
|
67 |
-
return $response;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Update Settings
|
72 |
-
*
|
73 |
-
* @param type $request
|
74 |
-
*/
|
75 |
-
public function update_settings( $request ) {
|
76 |
-
|
77 |
-
$seller_id = dokan_get_current_user_id();
|
78 |
-
$prev_dokan_settings = dokan_get_store_info( $seller_id );
|
79 |
-
//update store setttings info
|
80 |
-
$dokan_settings = array(
|
81 |
-
'store_name' => sanitize_text_field( $request['store_name'] ),
|
82 |
-
'store_ppp' => absint( $request['store_ppp'] ),
|
83 |
-
'address' => isset( $request['address'] ) ? sanitize_textarea_field( $request['address'] ) : $prev_dokan_settings['address'],
|
84 |
-
'location' => sanitize_text_field( $request['location'] ),
|
85 |
-
'find_address' => sanitize_text_field( $request['find_address'] ),
|
86 |
-
'banner' => isset( $request['banner'] ) ? absint( $request['banner'] ) : null,
|
87 |
-
'phone' => sanitize_text_field( $request['phone'] ),
|
88 |
-
'show_email' => sanitize_text_field( $request['show_email'] ),
|
89 |
-
'show_more_ptab' => sanitize_text_field( $request['show_more_ptab'] ),
|
90 |
-
'gravatar' => absint( $request['gravatar'] ),
|
91 |
-
'enable_tnc' => isset( $request['enable_tnc'] ) ? sanitize_text_field( $request['enable_tnc'] ) : '',
|
92 |
-
'store_tnc' => isset( $request['store_tnc'] ) ? sanitize_textarea_field( $request['store_tnc'] ) : ''
|
93 |
-
);
|
94 |
-
|
95 |
-
if ( isset( $request['social'] ) ) {
|
96 |
-
$dokan_settings['social'] = array();
|
97 |
-
$social = $request['social'];
|
98 |
-
$social_fields = dokan_get_social_profile_fields();
|
99 |
-
|
100 |
-
if ( is_array( $social ) ) {
|
101 |
-
foreach ( $social as $key => $value ) {
|
102 |
-
if ( isset( $social_fields[$key] ) ) {
|
103 |
-
$dokan_settings['social'][$key] = filter_var( $social[$key], FILTER_VALIDATE_URL );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
$dokan_settings['social'] = wp_parse_args( $dokan_settings['social'], $prev_dokan_settings['social'] );
|
109 |
-
}
|
110 |
-
|
111 |
-
//update payment settings info
|
112 |
-
if ( isset( $request['payment'] ) ) {
|
113 |
-
$dokan_settings['payment'] = array();
|
114 |
-
|
115 |
-
if ( isset( $request['payment']['bank'] ) ) {
|
116 |
-
$bank = $request['payment']['bank'];
|
117 |
-
|
118 |
-
$dokan_settings['payment']['bank'] = array(
|
119 |
-
'ac_name' => isset( $bank['ac_name'] ) ? sanitize_text_field( $bank['ac_name'] ) : '',
|
120 |
-
'ac_number' => isset( $bank['ac_number'] ) ? sanitize_text_field( $bank['ac_number'] ) : '',
|
121 |
-
'bank_name' => isset( $bank['bank_name'] ) ? sanitize_text_field( $bank['bank_name'] ) : '',
|
122 |
-
'bank_addr' => isset( $bank['bank_addr'] ) ? sanitize_text_field( $bank['bank_addr'] ) : '',
|
123 |
-
'routing_number' => isset( $bank['routing_number'] ) ? sanitize_text_field( $bank['routing_number'] ) : '',
|
124 |
-
'iban' => isset( $bank['iban'] ) ? sanitize_text_field( $bank['iban'] ) : '',
|
125 |
-
'swift' => isset( $bank['swift'] ) ? sanitize_text_field( $bank['swift'] ) : '',
|
126 |
-
);
|
127 |
-
}
|
128 |
-
|
129 |
-
if ( isset( $request['payment']['paypal'] ) ) {
|
130 |
-
$paypal = $request['payment']['paypal'];
|
131 |
-
$dokan_settings['payment']['paypal'] = array(
|
132 |
-
'email' => filter_var( $paypal['email'], FILTER_VALIDATE_EMAIL )
|
133 |
-
);
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( isset( $request['payment']['skrill'] ) ) {
|
137 |
-
$skrill = $request['payment']['skrill'];
|
138 |
-
$dokan_settings['payment']['skrill'] = array(
|
139 |
-
'email' => filter_var( $skrill['email'], FILTER_VALIDATE_EMAIL )
|
140 |
-
);
|
141 |
-
}
|
142 |
-
|
143 |
-
$dokan_settings['payment'] = wp_parse_args( $dokan_settings['payment'] , $prev_dokan_settings['payment'] );
|
144 |
-
}
|
145 |
-
|
146 |
-
$dokan_settings = wp_parse_args( $dokan_settings, $prev_dokan_settings );
|
147 |
-
|
148 |
-
$profile_completeness = Dokan_Template_Settings::init()->calculate_profile_completeness_value( $dokan_settings );
|
149 |
-
$dokan_settings['profile_completion'] = $profile_completeness;
|
150 |
-
|
151 |
-
update_user_meta( $seller_id, 'dokan_profile_settings', $dokan_settings );
|
152 |
-
|
153 |
-
do_action( 'dokan_store_profile_saved_via_rest', $seller_id, $dokan_settings, $request );
|
154 |
-
|
155 |
-
$dokan_settings = dokan_get_store_info( $seller_id );
|
156 |
-
|
157 |
-
$response = rest_ensure_response( $dokan_settings );
|
158 |
-
return $response;
|
159 |
-
}
|
160 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/api/class-withdraw-controller.php
DELETED
@@ -1,790 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dokan WIthdraw API Controller
|
5 |
-
*
|
6 |
-
* @since 2.8.0
|
7 |
-
*
|
8 |
-
* @package dokan
|
9 |
-
*/
|
10 |
-
class Dokan_REST_Withdraw_Controller extends WP_REST_Controller {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Endpoint namespace.
|
14 |
-
*
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
protected $namespace = 'dokan/v1';
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Route base.
|
21 |
-
*
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
protected $base = 'withdraw';
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Register all routes releated with stores
|
28 |
-
*
|
29 |
-
* @return void
|
30 |
-
*/
|
31 |
-
public function register_routes() {
|
32 |
-
register_rest_route( $this->namespace, '/' . $this->base, array(
|
33 |
-
'args' => array(
|
34 |
-
'id' => array(
|
35 |
-
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
36 |
-
'type' => 'integer',
|
37 |
-
),
|
38 |
-
),
|
39 |
-
array(
|
40 |
-
'methods' => WP_REST_Server::READABLE,
|
41 |
-
'callback' => array( $this, 'get_withdraws' ),
|
42 |
-
'args' => array_merge( $this->get_collection_params(), array(
|
43 |
-
'status' => array(
|
44 |
-
'type' => 'string',
|
45 |
-
'description' => __( 'Withdraw status', 'dokan-lite' ),
|
46 |
-
'required' => false,
|
47 |
-
),
|
48 |
-
) ),
|
49 |
-
'permission_callback' => array( $this, 'get_withdraw_permissions_check' ),
|
50 |
-
),
|
51 |
-
array(
|
52 |
-
'methods' => WP_REST_Server::CREATABLE,
|
53 |
-
'callback' => array( $this, 'create_withdraw' ),
|
54 |
-
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
|
55 |
-
'permission_callback' => array( $this, 'get_withdraw_permissions_check' ),
|
56 |
-
),
|
57 |
-
) );
|
58 |
-
|
59 |
-
register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\d]+)/', array(
|
60 |
-
'args' => array(
|
61 |
-
'id' => array(
|
62 |
-
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
63 |
-
'type' => 'integer',
|
64 |
-
),
|
65 |
-
),
|
66 |
-
array(
|
67 |
-
'methods' => WP_REST_Server::EDITABLE,
|
68 |
-
'callback' => array( $this, 'change_withdraw_status' ),
|
69 |
-
'args' => array(
|
70 |
-
'status' => array(
|
71 |
-
'type' => 'string',
|
72 |
-
'description' => __( 'Withdraw status', 'dokan-lite' ),
|
73 |
-
'required' => false,
|
74 |
-
)
|
75 |
-
),
|
76 |
-
'permission_callback' => array( $this, 'get_withdraw_permissions_check' ),
|
77 |
-
),
|
78 |
-
|
79 |
-
array(
|
80 |
-
'methods' => WP_REST_Server::DELETABLE,
|
81 |
-
'callback' => array( $this, 'delete_withdraw' ),
|
82 |
-
'permission_callback' => array( $this, 'delete_withdraw_permissions_check' ),
|
83 |
-
),
|
84 |
-
|
85 |
-
) );
|
86 |
-
|
87 |
-
register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\d]+)/note', array(
|
88 |
-
'args' => array(
|
89 |
-
'id' => array(
|
90 |
-
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
91 |
-
'type' => 'integer',
|
92 |
-
),
|
93 |
-
),
|
94 |
-
array(
|
95 |
-
'methods' => WP_REST_Server::EDITABLE,
|
96 |
-
'callback' => array( $this, 'update_withdraw_note' ),
|
97 |
-
'args' => array(
|
98 |
-
'note' => array(
|
99 |
-
'description' => __( 'Withdraw Note', 'dokan-lite' ),
|
100 |
-
'type' => 'string',
|
101 |
-
'required' => false,
|
102 |
-
)
|
103 |
-
),
|
104 |
-
'permission_callback' => array( $this, 'update_withdraw_note_permission' ),
|
105 |
-
),
|
106 |
-
) );
|
107 |
-
|
108 |
-
register_rest_route( $this->namespace, '/' . $this->base . '/balance/', array(
|
109 |
-
array(
|
110 |
-
'methods' => WP_REST_Server::READABLE,
|
111 |
-
'callback' => array( $this, 'get_balance' ),
|
112 |
-
'args' => array(
|
113 |
-
'formatted' => array(
|
114 |
-
'type' => 'boolean',
|
115 |
-
'description' => __( 'Formatted balance', 'dokan-lite' ),
|
116 |
-
'required' => false,
|
117 |
-
)
|
118 |
-
),
|
119 |
-
'permission_callback' => array( $this, 'get_withdraw_permissions_check' ),
|
120 |
-
),
|
121 |
-
) );
|
122 |
-
|
123 |
-
register_rest_route( $this->namespace, '/' . $this->base . '/batch', array(
|
124 |
-
array(
|
125 |
-
'methods' => WP_REST_Server::EDITABLE,
|
126 |
-
'callback' => array( $this, 'batch_items' ),
|
127 |
-
'permission_callback' => array( $this, 'batch_items_permissions_check' ),
|
128 |
-
'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
|
129 |
-
),
|
130 |
-
) );
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Map withdraw status
|
135 |
-
*
|
136 |
-
* @since 2.8.0
|
137 |
-
*
|
138 |
-
* @return array
|
139 |
-
*/
|
140 |
-
protected function get_status( $status ) {
|
141 |
-
$statuses = array(
|
142 |
-
0 => 'pending',
|
143 |
-
1 => 'approved',
|
144 |
-
2 => 'cancelled'
|
145 |
-
);
|
146 |
-
|
147 |
-
if ( is_string( $status ) ) {
|
148 |
-
return array_search( $status, $statuses );
|
149 |
-
} else{
|
150 |
-
return isset( $statuses[$status] ) ? $statuses[$status] : '';
|
151 |
-
}
|
152 |
-
|
153 |
-
return $statuses;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Get withdraws
|
158 |
-
*
|
159 |
-
* @since 2.8.0
|
160 |
-
*
|
161 |
-
* @return object
|
162 |
-
*/
|
163 |
-
public function get_withdraws( $request ) {
|
164 |
-
$store_id = dokan_get_current_user_id();
|
165 |
-
|
166 |
-
if ( empty( $store_id ) ) {
|
167 |
-
return new WP_Error( 'no_store_found', __( 'No vendor found', 'dokan-lite' ), array( 'status' => 404 ) );
|
168 |
-
}
|
169 |
-
|
170 |
-
$status = ! empty( $request['status'] ) ? sanitize_text_field( $request['status'] ) : '';
|
171 |
-
$withdraw = new Dokan_Template_Withdraw();
|
172 |
-
|
173 |
-
$limit = (int) $request['per_page'];
|
174 |
-
$offset = (int) ( $request['page'] - 1 ) * $request['per_page'];
|
175 |
-
|
176 |
-
$withdraw_count = dokan_get_withdraw_count();
|
177 |
-
|
178 |
-
if ( current_user_can( 'manage_options' ) ) {
|
179 |
-
$store_id = '';
|
180 |
-
}
|
181 |
-
|
182 |
-
if ( ! empty( $status ) ) {
|
183 |
-
if ( $status == 'pending' ) {
|
184 |
-
$total_count = $withdraw_count['pending'];
|
185 |
-
} elseif( $status == 'approved' ) {
|
186 |
-
$total_count = $withdraw_count['completed'];
|
187 |
-
} else {
|
188 |
-
$total_count = $withdraw_count['cancelled'];
|
189 |
-
}
|
190 |
-
|
191 |
-
$withdraws = $withdraw->get_withdraw_requests( $store_id, $this->get_status( $status ), $limit, $offset );
|
192 |
-
} else {
|
193 |
-
$withdraws = $withdraw->get_all_withdraws( $store_id, $limit, $offset );
|
194 |
-
$total_count = array_sum( $withdraw_count );
|
195 |
-
}
|
196 |
-
|
197 |
-
$data = array();
|
198 |
-
foreach ( $withdraws as $key => $value ) {
|
199 |
-
$resp = $this->prepare_response_for_object( $value, $request );
|
200 |
-
$data[] = $this->prepare_response_for_collection( $resp );
|
201 |
-
}
|
202 |
-
|
203 |
-
$response = rest_ensure_response( $data );
|
204 |
-
$withdraw_count = dokan_get_withdraw_count();
|
205 |
-
|
206 |
-
$response->header( 'X-Status-Pending', $withdraw_count['pending'] );
|
207 |
-
$response->header( 'X-Status-Completed', $withdraw_count['completed'] );
|
208 |
-
$response->header( 'X-Status-Cancelled', $withdraw_count['cancelled'] );
|
209 |
-
|
210 |
-
$response = $this->format_collection_response( $response, $request, $total_count );
|
211 |
-
return $response;
|
212 |
-
}
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Cancel withdraw status
|
216 |
-
*
|
217 |
-
* @since 2.8.0
|
218 |
-
*
|
219 |
-
* @return void
|
220 |
-
*/
|
221 |
-
public function change_withdraw_status( $request ) {
|
222 |
-
global $wpdb;
|
223 |
-
|
224 |
-
$store_id = dokan_get_current_user_id();
|
225 |
-
|
226 |
-
if ( empty( $request['id'] ) ) {
|
227 |
-
return new WP_Error( 'no_id', __( 'Invalid ID', 'dokan-lite' ), array( 'status' => 404 ) );
|
228 |
-
}
|
229 |
-
|
230 |
-
$request_id = (int) $request['id'];
|
231 |
-
|
232 |
-
if ( empty( $store_id ) ) {
|
233 |
-
return new WP_Error( 'no_store_found', __( 'No vendor found', 'dokan-lite' ), array( 'status' => 404 ) );
|
234 |
-
}
|
235 |
-
|
236 |
-
$status = ! empty( $request['status'] ) ? sanitize_text_field( $request['status'] ) : 'cancelled';
|
237 |
-
|
238 |
-
if ( $status != 'cancelled' && ! current_user_can( 'manage_options' ) ) {
|
239 |
-
return new WP_Error( 'cancel_request', __( 'Vendor can only cancel withdraw request', 'dokan-lite' ), array( 'status' => 400 ) );
|
240 |
-
}
|
241 |
-
|
242 |
-
// $sql = "SELECT * FROM `{$wpdb->prefix}dokan_withdraw` WHERE `id`={$request['id']}";
|
243 |
-
$result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}dokan_withdraw WHERE id=%d", $request_id ) );
|
244 |
-
|
245 |
-
if ( $result->status != '0' && ! current_user_can( 'manage_options' ) ) {
|
246 |
-
return new WP_Error( 'not_cancel_request', __( 'This withdraw is not pending. Only pending request can be cancelled', 'dokan-lite' ), array( 'status' => 400 ) );
|
247 |
-
}
|
248 |
-
|
249 |
-
if ( $result->user_id != $store_id && ! current_user_can( 'manage_options' ) ) {
|
250 |
-
return new WP_Error( 'other_vendor_withdraw', __( 'You can not cancel other vendor withdraw request', 'dokan-lite' ), array( 'status' => 400 ) );
|
251 |
-
}
|
252 |
-
|
253 |
-
$withdraw = new Dokan_Template_Withdraw();
|
254 |
-
|
255 |
-
if ( current_user_can( 'manage_options' ) ) {
|
256 |
-
$user_id = $result->user_id;
|
257 |
-
$status_code = $this->get_status( $status );
|
258 |
-
} else {
|
259 |
-
$user_id = $store_id;
|
260 |
-
$status_code = 2;
|
261 |
-
}
|
262 |
-
|
263 |
-
// if its an approve request and don't have enough balance then return early
|
264 |
-
if ( $status_code === 1 ) {
|
265 |
-
if ( round( dokan_get_seller_balance( $result->user_id, false ), 2 ) < $result->amount ) {
|
266 |
-
return;
|
267 |
-
}
|
268 |
-
|
269 |
-
// $balance_sql = "SELECT * FROM `{$wpdb->prefix}dokan_vendor_balance` WHERE `trn_id`={$request['id']} AND `trn_type` = 'dokan_withdraw'";
|
270 |
-
$balance_result = $wpdb->get_row(
|
271 |
-
$wpdb->prepare( "SELECT * FROM {$wpdb->prefix}dokan_vendor_balance WHERE trn_id=%d AND trn_type = %s", $request_id, 'dokan_withdraw' ) );
|
272 |
-
|
273 |
-
if ( empty( $balance_result ) ) {
|
274 |
-
$wpdb->insert( $wpdb->prefix . 'dokan_vendor_balance',
|
275 |
-
array(
|
276 |
-
'vendor_id' => $user_id,
|
277 |
-
'trn_id' => $request_id,
|
278 |
-
'trn_type' => 'dokan_withdraw',
|
279 |
-
'perticulars' => 'Approve withdraw request',
|
280 |
-
'debit' => 0,
|
281 |
-
'credit' => $result->amount,
|
282 |
-
'status' => 'approved',
|
283 |
-
'trn_date' => current_time( 'mysql' ),
|
284 |
-
'balance_date' => current_time( 'mysql' ),
|
285 |
-
),
|
286 |
-
array(
|
287 |
-
'%d',
|
288 |
-
'%d',
|
289 |
-
'%s',
|
290 |
-
'%s',
|
291 |
-
'%f',
|
292 |
-
'%f',
|
293 |
-
'%s',
|
294 |
-
'%s',
|
295 |
-
'%s',
|
296 |
-
)
|
297 |
-
);
|
298 |
-
}
|
299 |
-
}
|
300 |
-
|
301 |
-
$withdraw->update_status( $request_id, $user_id, $status_code );
|
302 |
-
// $response = $wpdb->get_row( $sql );
|
303 |
-
$response = $result;
|
304 |
-
|
305 |
-
if ( $status_code === 1 ) {
|
306 |
-
do_action( 'dokan_withdraw_request_approved', $user_id, $response );
|
307 |
-
} elseif ( $status_code === 2 ) {
|
308 |
-
do_action( 'dokan_withdraw_request_cancelled', $user_id, $response );
|
309 |
-
}
|
310 |
-
|
311 |
-
return rest_ensure_response( $this->prepare_response_for_object( $response, $request ) );
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Delete a withdraw
|
316 |
-
*
|
317 |
-
* @since 2.8.0
|
318 |
-
*
|
319 |
-
* @return void
|
320 |
-
*/
|
321 |
-
public function delete_withdraw( $request ) {
|
322 |
-
global $wpdb;
|
323 |
-
|
324 |
-
$withdraw_id = !empty( $request['id'] ) ? (int) $request['id'] : 0;
|
325 |
-
|
326 |
-
if ( !$withdraw_id ) {
|
327 |
-
return new WP_Error( 'no_id', __( 'Invalid ID', 'dokan-lite' ), array( 'status' => 404 ) );
|
328 |
-
}
|
329 |
-
|
330 |
-
// $sql = "SELECT * FROM `{$wpdb->prefix}dokan_withdraw` WHERE `id`={$withdraw_id}";
|
331 |
-
$result = $wpdb->get_row(
|
332 |
-
$wpdb->prepare(
|
333 |
-
"SELECT * FROM {$wpdb->prefix}dokan_withdraw WHERE id=%d", $withdraw_id
|
334 |
-
)
|
335 |
-
);
|
336 |
-
|
337 |
-
if ( empty( $result->id ) ) {
|
338 |
-
return new WP_Error( 'no_withdraw', __( 'No withdraw found for deleting', 'dokan-lite' ), array( 'status' => 404 ) );
|
339 |
-
}
|
340 |
-
|
341 |
-
$deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}dokan_withdraw WHERE id = %d", $withdraw_id ) );
|
342 |
-
|
343 |
-
return rest_ensure_response( $this->prepare_response_for_object( $result, $request ) );
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Get balance
|
348 |
-
*
|
349 |
-
* @since 2.8.0
|
350 |
-
*
|
351 |
-
* @return void
|
352 |
-
*/
|
353 |
-
public function get_balance( $request ) {
|
354 |
-
$store_id = dokan_get_current_user_id();
|
355 |
-
|
356 |
-
if ( empty( $store_id ) ) {
|
357 |
-
return new WP_Error( 'no_store_found', __( 'No vendor found', 'dokan-lite' ), array( 'status' => 404 ) );
|
358 |
-
}
|
359 |
-
|
360 |
-
$formatted = false;
|
361 |
-
|
362 |
-
if ( $request['formatted'] ) {
|
363 |
-
$formatted = true;
|
364 |
-
}
|
365 |
-
|
366 |
-
$balance = dokan_get_seller_balance( $store_id, false );
|
367 |
-
$withdraw_limit = dokan_get_option( 'withdraw_limit', 'dokan_withdraw', -1 );
|
368 |
-
$threshold = dokan_get_option( 'withdraw_date_limit', 'dokan_withdraw', -1 );
|
369 |
-
|
370 |
-
$data = array(
|
371 |
-
'current_balance' => $balance,
|
372 |
-
'withdraw_limit' => $withdraw_limit,
|
373 |
-
'withdraw_threshold' => $threshold,
|
374 |
-
);
|
375 |
-
|
376 |
-
return rest_ensure_response( $data );
|
377 |
-
}
|
378 |
-
|
379 |
-
/**
|
380 |
-
* Make a withdraw request
|
381 |
-
*
|
382 |
-
* @since 2.8.0
|
383 |
-
*
|
384 |
-
* @return void
|
385 |
-
*/
|
386 |
-
public function create_withdraw( $request ) {
|
387 |
-
global $wpdb;
|
388 |
-
$store_id = dokan_get_current_user_id();
|
389 |
-
|
390 |
-
if ( empty( $store_id ) ) {
|
391 |
-
return new WP_Error( 'no_store_found', __( 'No vendor found', 'dokan-lite' ), array( 'status' => 404 ) );
|
392 |
-
}
|
393 |
-
|
394 |
-
$amount = (float) $request['amount'];
|
395 |
-
$method = sanitize_text_field( $request['method'] );
|
396 |
-
$notes = sanitize_textarea_field( $request['notes'] );
|
397 |
-
$limit = $this->get_withdraw_limit();
|
398 |
-
$balance = dokan_get_seller_balance( $store_id, false );
|
399 |
-
|
400 |
-
if ( empty( $amount ) ) {
|
401 |
-
return new WP_Error( 'no_amount_found', __( 'Requested amount must be grater than 0', 'dokan-lite' ), array( 'status' => 404 ) );
|
402 |
-
}
|
403 |
-
|
404 |
-
if ( $amount > $balance ) {
|
405 |
-
return new WP_Error( 'enough_balance', __( 'You don\'t have enough balance for this request', 'dokan-lite' ), array( 'status' => 404 ) );
|
406 |
-
}
|
407 |
-
|
408 |
-
if ( $amount < $limit ) {
|
409 |
-
return new WP_Error( 'dokan_withdraw_amount', sprintf( __( 'Withdraw amount must be greater than %d', 'dokan-lite' ), $this->get_withdraw_limit() ), array( 'status' => 404 ) );
|
410 |
-
}
|
411 |
-
|
412 |
-
if ( empty( $method ) ) {
|
413 |
-
return new WP_Error( 'no_payment_method', __( 'Withdraw method must be required', 'dokan-lite' ), array( 'status' => 404 ) );
|
414 |
-
}
|
415 |
-
|
416 |
-
$withdraw = new Dokan_Template_Withdraw();
|
417 |
-
|
418 |
-
$data_info = array(
|
419 |
-
'user_id' => $store_id,
|
420 |
-
'amount' => $amount,
|
421 |
-
'status' => 0,
|
422 |
-
'method' => $method,
|
423 |
-
'ip' => dokan_get_client_ip(),
|
424 |
-
'notes' => $notes
|
425 |
-
);
|
426 |
-
|
427 |
-
$update = $withdraw->insert_withdraw( $data_info );
|
428 |
-
|
429 |
-
if ( ! $update ) {
|
430 |
-
return new WP_Error( 'not_updated', __( 'Does not created withdraw request. Try again', 'dokan-lite' ), array( 'status' => 400 ) );
|
431 |
-
}
|
432 |
-
|
433 |
-
unset( $data_info['user_id'] );
|
434 |
-
|
435 |
-
$data_info['id'] = $wpdb->insert_id;
|
436 |
-
$data_info['user'] = $this->get_user_data( $store_id );
|
437 |
-
$data_info['created'] = mysql_to_rfc3339( date( 'Y-m-d h:i:s' ) );
|
438 |
-
|
439 |
-
return rest_ensure_response( $data_info );
|
440 |
-
}
|
441 |
-
|
442 |
-
/**
|
443 |
-
* Get the system withdraw limit
|
444 |
-
*
|
445 |
-
* @return integer
|
446 |
-
*/
|
447 |
-
function get_withdraw_limit() {
|
448 |
-
return (int) dokan_get_option( 'withdraw_limit', 'dokan_withdraw', 0 );
|
449 |
-
}
|
450 |
-
|
451 |
-
/**
|
452 |
-
* Update withdraw notes
|
453 |
-
*
|
454 |
-
* @since 2.8.0
|
455 |
-
*
|
456 |
-
* @return void
|
457 |
-
*/
|
458 |
-
public function update_withdraw_note( $request ) {
|
459 |
-
global $wpdb;
|
460 |
-
|
461 |
-
$withdraw_id = isset( $request['id'] ) ? (int) $request['id'] : 0;
|
462 |
-
$note = isset( $request['note'] ) ? sanitize_textarea_field( $request['note'] ) : '';
|
463 |
-
|
464 |
-
if ( empty( $withdraw_id ) ) {
|
465 |
-
return new WP_Error( 'no_withdraw', __( 'No withdraw id found', 'dokan-lite' ), array( 'status' => 404 ) );
|
466 |
-
}
|
467 |
-
|
468 |
-
$table_name = $wpdb->prefix . 'dokan_withdraw';
|
469 |
-
$update = $wpdb->update( $table_name, array( 'note' => $note ), array( 'id' => $withdraw_id ) );
|
470 |
-
|
471 |
-
if ( ! $update ) {
|
472 |
-
return new WP_Error( 'note_not_udpated', __( 'Something wrong, Note not updated', 'dokan-lite' ), array( 'status' => 404 ) );
|
473 |
-
}
|
474 |
-
|
475 |
-
// $withdraw = $wpdb->get_row( "SELECT * from {$table_name} WHERE id = $withdraw_id" );
|
476 |
-
$withdraw = $wpdb->get_row( $wpdb->prepare("SELECT * from {$wpdb->prefix}dokan_withdraw WHERE id = %d", $withdraw_id ) );
|
477 |
-
|
478 |
-
$response = $this->prepare_response_for_object( $withdraw, $request );
|
479 |
-
|
480 |
-
return $response;
|
481 |
-
}
|
482 |
-
|
483 |
-
/**
|
484 |
-
* Approve, Pending and cancel bulk action
|
485 |
-
*
|
486 |
-
* JSON data format for sending to API
|
487 |
-
* {
|
488 |
-
* "approved" : [
|
489 |
-
* "1", "9", "7"
|
490 |
-
* ],
|
491 |
-
* "pending" : [
|
492 |
-
* "2"
|
493 |
-
* ],
|
494 |
-
* "delete" : [
|
495 |
-
* "4"
|
496 |
-
* ],
|
497 |
-
* "cancelled" : [
|
498 |
-
* "5"
|
499 |
-
* ]
|
500 |
-
* }
|
501 |
-
*
|
502 |
-
* @since 2.8.0
|
503 |
-
*
|
504 |
-
* @return void
|
505 |
-
*/
|
506 |
-
public function batch_items( $request ) {
|
507 |
-
global $wpdb;
|
508 |
-
|
509 |
-
$params = $request->get_params();
|
510 |
-
|
511 |
-
if ( empty( $params ) ) {
|
512 |
-
return new WP_Error( 'no_item_found', __( 'No items found for bulk updating', 'dokan-lite' ), array( 'status' => 404 ) );
|
513 |
-
}
|
514 |
-
|
515 |
-
$allowed_status = array( 'approved', 'cancelled', 'pending', 'delete' );
|
516 |
-
|
517 |
-
foreach ( $params as $status => $value ) {
|
518 |
-
if ( in_array( $status, $allowed_status ) ) {
|
519 |
-
if ( 'delete' == $status ) {
|
520 |
-
foreach ( $value as $withdraw_id ) {
|
521 |
-
$wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->prefix}dokan_withdraw WHERE id = %d", (int) $withdraw_id ) );
|
522 |
-
}
|
523 |
-
} else {
|
524 |
-
foreach ( $value as $withdraw_id ) {
|
525 |
-
$status_code = $this->get_status( $status );
|
526 |
-
$user = $wpdb->get_row( $wpdb->prepare("SELECT user_id, amount FROM {$wpdb->prefix}dokan_withdraw WHERE id = %d", (int) $withdraw_id ) );
|
527 |
-
|
528 |
-
if ( $status_code === 1 ) {
|
529 |
-
if ( dokan_get_seller_balance( $user->user_id, false ) < $user->amount ) {
|
530 |
-
continue;
|
531 |
-
}
|
532 |
-
|
533 |
-
// $balance_sql = "SELECT * FROM `{$wpdb->prefix}dokan_vendor_balance` WHERE `trn_id`={$withdraw_id} AND `trn_type` = 'dokan_withdraw'";
|
534 |
-
$balance_result = $wpdb->get_row(
|
535 |
-
$wpdb->prepare( "SELECT * FROM {$wpdb->prefix}dokan_vendor_balance WHERE trn_id=%d AND trn_type = 'dokan_withdraw'", (int) $withdraw_id )
|
536 |
-
);
|
537 |
-
|
538 |
-
if ( ! count( $balance_result ) ) {
|
539 |
-
$wpdb->insert( $wpdb->prefix . 'dokan_vendor_balance',
|
540 |
-
array(
|
541 |
-
'vendor_id' => (int) $user->user_id,
|
542 |
-
'trn_id' => (int) $withdraw_id,
|
543 |
-
'trn_type' => 'dokan_withdraw',
|
544 |
-
'perticulars' => 'Approve withdraw request',
|
545 |
-
'debit' => 0,
|
546 |
-
'credit' => (float) $user->amount,
|
547 |
-
'status' => 'approved',
|
548 |
-
'trn_date' => current_time( 'mysql' ),
|
549 |
-
'balance_date' => current_time( 'mysql' ),
|
550 |
-
),
|
551 |
-
array(
|
552 |
-
'%d',
|
553 |
-
'%d',
|
554 |
-
'%s',
|
555 |
-
'%s',
|
556 |
-
'%f',
|
557 |
-
'%f',
|
558 |
-
'%s',
|
559 |
-
'%s',
|
560 |
-
'%s',
|
561 |
-
)
|
562 |
-
);
|
563 |
-
}
|
564 |
-
}
|
565 |
-
|
566 |
-
$wpdb->query( $wpdb->prepare(
|
567 |
-
"UPDATE {$wpdb->prefix}dokan_withdraw
|
568 |
-
SET status = %d WHERE id = %d",
|
569 |
-
(int) $status_code, (int) $withdraw_id
|
570 |
-
) );
|
571 |
-
}
|
572 |
-
}
|
573 |
-
}
|
574 |
-
}
|
575 |
-
|
576 |
-
return true;
|
577 |
-
}
|
578 |
-
|
579 |
-
/**
|
580 |
-
* Prepare data for response
|
581 |
-
*
|
582 |
-
* @since 2.8.0
|
583 |
-
*
|
584 |
-
* @return data
|
585 |
-
*/
|
586 |
-
public function prepare_response_for_object( $object, $request ) {
|
587 |
-
$methods = dokan_withdraw_get_methods();
|
588 |
-
$data = array(
|
589 |
-
'id' => $object->id,
|
590 |
-
'user' => $this->get_user_data( $object->user_id ),
|
591 |
-
'amount' => floatval( $object->amount ),
|
592 |
-
'created' => mysql_to_rfc3339( $object->date ),
|
593 |
-
'status' => $this->get_status( (int) $object->status ),
|
594 |
-
'method' => $object->method,
|
595 |
-
'method_title' => array_key_exists( $object->method, $methods ) ? $methods[ $object->method ] : $object->method,
|
596 |
-
'note' => $object->note,
|
597 |
-
'ip' => $object->ip
|
598 |
-
);
|
599 |
-
|
600 |
-
$response = rest_ensure_response( $data );
|
601 |
-
$response->add_links( $this->prepare_links( $object, $request ) );
|
602 |
-
|
603 |
-
return apply_filters( "dokan_rest_prepare_withdraw_object", $response, $object, $request );
|
604 |
-
}
|
605 |
-
|
606 |
-
/**
|
607 |
-
* Prepare links for the request.
|
608 |
-
*
|
609 |
-
* @param WC_Data $object Object data.
|
610 |
-
* @param WP_REST_Request $request Request object.
|
611 |
-
*
|
612 |
-
* @return array Links for the given post.
|
613 |
-
*/
|
614 |
-
protected function prepare_links( $object, $request ) {
|
615 |
-
$links = array(
|
616 |
-
'self' => array(
|
617 |
-
'href' => rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->base, $object->id ) ),
|
618 |
-
),
|
619 |
-
'collection' => array(
|
620 |
-
'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->base ) ),
|
621 |
-
),
|
622 |
-
);
|
623 |
-
|
624 |
-
return $links;
|
625 |
-
}
|
626 |
-
|
627 |
-
/**
|
628 |
-
* Get user data
|
629 |
-
*
|
630 |
-
* @since 2.8.0
|
631 |
-
*
|
632 |
-
* @return return object
|
633 |
-
*/
|
634 |
-
public function get_user_data( $user_id ) {
|
635 |
-
$vendor = dokan()->vendor->get( $user_id );
|
636 |
-
|
637 |
-
return $vendor->to_array();
|
638 |
-
}
|
639 |
-
|
640 |
-
/**
|
641 |
-
* Check permission for getting withdraw
|
642 |
-
*
|
643 |
-
* @since 2.8.0
|
644 |
-
*
|
645 |
-
* @return void
|
646 |
-
*/
|
647 |
-
public function get_withdraw_permissions_check() {
|
648 |
-
return current_user_can( 'dokan_manage_withdraw' );
|
649 |
-
}
|
650 |
-
|
651 |
-
/**
|
652 |
-
* Check permission for deleting withdraw
|
653 |
-
*
|
654 |
-
* @since 2.8.0
|
655 |
-
*
|
656 |
-
* @return void
|
657 |
-
*/
|
658 |
-
public function delete_withdraw_permissions_check() {
|
659 |
-
return current_user_can( 'manage_options' );
|
660 |
-
}
|
661 |
-
|
662 |
-
/**
|
663 |
-
* Check permission for getting withdraw
|
664 |
-
*
|
665 |
-
* @since 2.8.0
|
666 |
-
*
|
667 |
-
* @return void
|
668 |
-
*/
|
669 |
-
public function batch_items_permissions_check() {
|
670 |
-
return current_user_can( 'manage_options' );
|
671 |
-
}
|
672 |
-
|
673 |
-
/**
|
674 |
-
* Update withdraw note permission
|
675 |
-
*
|
676 |
-
* @since 2.8.0
|
677 |
-
*
|
678 |
-
* @return void
|
679 |
-
*/
|
680 |
-
public function update_withdraw_note_permission() {
|
681 |
-
return current_user_can( 'manage_options' );
|
682 |
-
}
|
683 |
-
|
684 |
-
/**
|
685 |
-
* Format item's collection for response
|
686 |
-
*
|
687 |
-
* @param object $response
|
688 |
-
* @param object $request
|
689 |
-
* @param array $items
|
690 |
-
* @param int $total_items
|
691 |
-
*
|
692 |
-
* @return object
|
693 |
-
*/
|
694 |
-
public function format_collection_response( $response, $request, $total_items ) {
|
695 |
-
if ( $total_items === 0 ) {
|
696 |
-
return $response;
|
697 |
-
}
|
698 |
-
|
699 |
-
// Store pagation values for headers then unset for count query.
|
700 |
-
$per_page = (int) ( ! empty( $request['per_page'] ) ? $request['per_page'] : 20 );
|
701 |
-
$page = (int) ( ! empty( $request['page'] ) ? $request['page'] : 1 );
|
702 |
-
|
703 |
-
$response->header( 'X-WP-Total', (int) $total_items );
|
704 |
-
|
705 |
-
$max_pages = ceil( $total_items / $per_page );
|
706 |
-
|
707 |
-
$response->header( 'X-WP-TotalPages', (int) $max_pages );
|
708 |
-
$base = add_query_arg( $request->get_query_params(), rest_url( sprintf( '/%s/%s', $this->namespace, $this->base ) ) );
|
709 |
-
|
710 |
-
if ( $page > 1 ) {
|
711 |
-
$prev_page = $page - 1;
|
712 |
-
|
713 |
-
if ( $prev_page > $max_pages ) {
|
714 |
-
$prev_page = $max_pages;
|
715 |
-
}
|
716 |
-
|
717 |
-
$prev_link = add_query_arg( 'page', $prev_page, $base );
|
718 |
-
$response->link_header( 'prev', $prev_link );
|
719 |
-
}
|
720 |
-
|
721 |
-
if ( $max_pages > $page ) {
|
722 |
-
|
723 |
-
$next_page = $page + 1;
|
724 |
-
$next_link = add_query_arg( 'page', $next_page, $base );
|
725 |
-
$response->link_header( 'next', $next_link );
|
726 |
-
}
|
727 |
-
|
728 |
-
return $response;
|
729 |
-
}
|
730 |
-
|
731 |
-
/**
|
732 |
-
* Get the Coupon's schema, conforming to JSON Schema.
|
733 |
-
*
|
734 |
-
* @return array
|
735 |
-
*/
|
736 |
-
public function get_item_schema() {
|
737 |
-
$schema = array(
|
738 |
-
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
739 |
-
'title' => 'Withdraw',
|
740 |
-
'type' => 'object',
|
741 |
-
'properties' => array(
|
742 |
-
'id' => array(
|
743 |
-
'description' => __( 'Unique identifier for the object.', 'dokan-lite' ),
|
744 |
-
'type' => 'integer',
|
745 |
-
'context' => array( 'view' ),
|
746 |
-
'readonly' => true,
|
747 |
-
),
|
748 |
-
'user' => array(
|
749 |
-
'description' => __( 'Requested User', 'dokan-lite' ),
|
750 |
-
'type' => 'integer',
|
751 |
-
'context' => array( 'view' ),
|
752 |
-
),
|
753 |
-
'amount' => array(
|
754 |
-
'description' => __( 'The amount of discount. Should always be numeric, even if setting a percentage.', 'dokan-lite' ),
|
755 |
-
'type' => 'string',
|
756 |
-
'context' => array( 'view' ),
|
757 |
-
),
|
758 |
-
'created_data' => array(
|
759 |
-
'description' => __( "The date the withdraw request has beed created in the site's timezone.", 'dokan-lite' ),
|
760 |
-
'type' => 'date-time',
|
761 |
-
'context' => array( 'view' ),
|
762 |
-
),
|
763 |
-
'status' => array(
|
764 |
-
'description' => __( "Withdraw status", 'dokan-lite' ),
|
765 |
-
'type' => 'integer',
|
766 |
-
'context' => array( 'view' ),
|
767 |
-
),
|
768 |
-
'method' => array(
|
769 |
-
'description' => __( "Withdraw Method", 'dokan-lite' ),
|
770 |
-
'type' => 'string',
|
771 |
-
'context' => array( 'view' ),
|
772 |
-
),
|
773 |
-
'notes' => array(
|
774 |
-
'description' => __( "Withdraw Notes", 'dokan-lite' ),
|
775 |
-
'type' => 'string',
|
776 |
-
'context' => array( 'view', 'edit' ),
|
777 |
-
),
|
778 |
-
'ip' => array(
|
779 |
-
'description' => __( "User IP", 'dokan-lite' ),
|
780 |
-
'type' => 'string',
|
781 |
-
'context' => array( 'view' ),
|
782 |
-
),
|
783 |
-
),
|
784 |
-
);
|
785 |
-
|
786 |
-
return $this->add_additional_fields_schema( $schema );
|
787 |
-
}
|
788 |
-
|
789 |
-
|
790 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/background-processes/class-dokan-background-processes.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Continue all Dokan background processes
|
5 |
-
*/
|
6 |
-
class Dokan_Background_Processes {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class constructor
|
10 |
-
*
|
11 |
-
* @since 1.0.0
|
12 |
-
*
|
13 |
-
* @return void
|
14 |
-
*/
|
15 |
-
public function __construct() {
|
16 |
-
$processes = get_option( 'dokan_background_processes', array() );
|
17 |
-
|
18 |
-
if ( ! empty( $processes ) ) {
|
19 |
-
foreach ( $processes as $processor => $file ) {
|
20 |
-
if ( file_exists( $file ) ) {
|
21 |
-
include_once $file;
|
22 |
-
new $processor();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-product-manager.php
DELETED
@@ -1,173 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Product manager Class
|
5 |
-
*
|
6 |
-
* @since 3.0.0
|
7 |
-
*/
|
8 |
-
class Dokan_Product_Manager {
|
9 |
-
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Get all Product for a vendor
|
13 |
-
*
|
14 |
-
* @since 1.0.0
|
15 |
-
*
|
16 |
-
* @return void
|
17 |
-
*/
|
18 |
-
public function all( $args = array() ) {
|
19 |
-
$post_statuses = apply_filters( 'dokan_get_product_status', array( 'publish', 'draft', 'pending', 'future' ) );
|
20 |
-
|
21 |
-
$defaults = array(
|
22 |
-
'post_type' => 'product',
|
23 |
-
'post_status' => $post_statuses,
|
24 |
-
'posts_per_page' => -1,
|
25 |
-
'orderby' => 'post_date',
|
26 |
-
'order' => 'DESC',
|
27 |
-
'paged' => 1,
|
28 |
-
);
|
29 |
-
|
30 |
-
$args = wp_parse_args( $args, $defaults );
|
31 |
-
|
32 |
-
return new WP_Query( apply_filters( 'dokan_all_products_query', $args ) );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Get featured products
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
*
|
40 |
-
* @return void
|
41 |
-
*/
|
42 |
-
public function featured( $args = array() ) {
|
43 |
-
|
44 |
-
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
45 |
-
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
46 |
-
|
47 |
-
$args['tax_query'][] = array(
|
48 |
-
'taxonomy' => 'product_visibility',
|
49 |
-
'field' => 'term_taxonomy_id',
|
50 |
-
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
51 |
-
'operator' => 'NOT IN',
|
52 |
-
);
|
53 |
-
|
54 |
-
$args['tax_query'][] = array(
|
55 |
-
'taxonomy' => 'product_visibility',
|
56 |
-
'field' => 'term_taxonomy_id',
|
57 |
-
'terms' => $product_visibility_term_ids['featured'],
|
58 |
-
);
|
59 |
-
} else {
|
60 |
-
$args['meta_query'] = array(
|
61 |
-
array(
|
62 |
-
'key' => '_visibility',
|
63 |
-
'value' => array( 'catalog', 'visible' ),
|
64 |
-
'compare' => 'IN'
|
65 |
-
),
|
66 |
-
array(
|
67 |
-
'key' => '_featured',
|
68 |
-
'value' => 'yes'
|
69 |
-
)
|
70 |
-
);
|
71 |
-
}
|
72 |
-
|
73 |
-
return $this->all( apply_filters( 'dokan_featured_products_query', $args ) );
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Get latest product
|
78 |
-
*
|
79 |
-
* @since 1.0.0
|
80 |
-
*
|
81 |
-
* @return void
|
82 |
-
*/
|
83 |
-
public function latest( $args = array() ) {
|
84 |
-
|
85 |
-
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
86 |
-
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
87 |
-
|
88 |
-
$args['tax_query'] = array(
|
89 |
-
'taxonomy' => 'product_visibility',
|
90 |
-
'field' => 'term_taxonomy_id',
|
91 |
-
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
92 |
-
'operator' => 'NOT IN',
|
93 |
-
);
|
94 |
-
} else {
|
95 |
-
$args['meta_query'] = array(
|
96 |
-
array(
|
97 |
-
'key' => '_visibility',
|
98 |
-
'value' => array('catalog', 'visible'),
|
99 |
-
'compare' => 'IN'
|
100 |
-
)
|
101 |
-
);
|
102 |
-
}
|
103 |
-
|
104 |
-
return $this->all( apply_filters( 'dokan_latest_products_query', $args ) );
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Best Selling Products
|
109 |
-
*
|
110 |
-
* @since 3.0.0
|
111 |
-
*
|
112 |
-
* @return void
|
113 |
-
*/
|
114 |
-
public function best_selling( $args = array() ) {
|
115 |
-
|
116 |
-
$args['meta_key'] = 'total_sales';
|
117 |
-
$args['orderby'] = 'meta_value_num';
|
118 |
-
|
119 |
-
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
120 |
-
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
121 |
-
$args['tax_query'] = array(
|
122 |
-
'taxonomy' => 'product_visibility',
|
123 |
-
'field' => 'term_taxonomy_id',
|
124 |
-
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
125 |
-
'operator' => 'NOT IN',
|
126 |
-
);
|
127 |
-
} else {
|
128 |
-
$args['meta_query'] = array(
|
129 |
-
array(
|
130 |
-
'key' => '_visibility',
|
131 |
-
'value' => array('catalog', 'visible'),
|
132 |
-
'compare' => 'IN'
|
133 |
-
)
|
134 |
-
);
|
135 |
-
}
|
136 |
-
|
137 |
-
return $this->all( apply_filters( 'dokan_best_selling_products_query', $args ) );
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Top rated product
|
142 |
-
*
|
143 |
-
* @since 3.0.0
|
144 |
-
*
|
145 |
-
* @return void
|
146 |
-
*/
|
147 |
-
public function top_rated( $args = array() ) {
|
148 |
-
if ( version_compare( WC_VERSION, '2.7', '>' ) ) {
|
149 |
-
$product_visibility_term_ids = wc_get_product_visibility_term_ids();
|
150 |
-
|
151 |
-
$args['tax_query'] = array(
|
152 |
-
'taxonomy' => 'product_visibility',
|
153 |
-
'field' => 'term_taxonomy_id',
|
154 |
-
'terms' => is_search() ? $product_visibility_term_ids['exclude-from-search'] : $product_visibility_term_ids['exclude-from-catalog'],
|
155 |
-
'operator' => 'NOT IN',
|
156 |
-
);
|
157 |
-
} else {
|
158 |
-
$args['meta_query'] = array(
|
159 |
-
array(
|
160 |
-
'key' => '_visibility',
|
161 |
-
'value' => array('catalog', 'visible'),
|
162 |
-
'compare' => 'IN'
|
163 |
-
)
|
164 |
-
);
|
165 |
-
}
|
166 |
-
|
167 |
-
add_filter( 'posts_clauses', array( 'WC_Shortcodes', 'order_by_rating_post_clauses' ) );
|
168 |
-
$products = $this->all( apply_filters( 'dokan_top_rated_products_query', $args ) );
|
169 |
-
remove_filter( 'posts_clauses', array( 'WC_Shortcodes', 'order_by_rating_post_clauses' ) );
|
170 |
-
|
171 |
-
return $products;
|
172 |
-
}
|
173 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-shortcodes.php
DELETED
@@ -1,281 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Tempalte shortcode class file
|
5 |
-
*
|
6 |
-
* @load all shortcode for template rendering
|
7 |
-
*/
|
8 |
-
class Dokan_Shortcodes {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Dokan template shortcodes __constract
|
12 |
-
* Initial loaded when class create an instanace
|
13 |
-
*
|
14 |
-
* @since 2.4
|
15 |
-
*/
|
16 |
-
function __construct() {
|
17 |
-
add_shortcode( 'dokan-dashboard', array( $this, 'load_template_files' ) );
|
18 |
-
add_shortcode( 'dokan-best-selling-product', array( $this, 'best_selling_product_shortcode' ) );
|
19 |
-
add_shortcode( 'dokan-top-rated-product', array( $this, 'top_rated_product_shortcode' ) );
|
20 |
-
add_shortcode( 'dokan-my-orders', array( $this, 'my_orders_page' ) );
|
21 |
-
add_shortcode( 'dokan-stores', array( $this, 'store_listing' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Load template files
|
26 |
-
*
|
27 |
-
* Based on the query vars, load the appropriate template files
|
28 |
-
* in the frontend user dashboard.
|
29 |
-
*
|
30 |
-
* @return void
|
31 |
-
*/
|
32 |
-
public function load_template_files() {
|
33 |
-
global $wp;
|
34 |
-
|
35 |
-
if ( ! function_exists( 'WC' ) ) {
|
36 |
-
return sprintf( __( 'Please install <a href="%s"><strong>WooCommerce</strong></a> plugin first', 'dokan-lite' ), 'http://wordpress.org/plugins/woocommerce/' );
|
37 |
-
}
|
38 |
-
|
39 |
-
if ( ! dokan_is_user_seller( get_current_user_id() ) ) {
|
40 |
-
return __( 'You have no permission to view this page', 'dokan-lite' );
|
41 |
-
}
|
42 |
-
|
43 |
-
ob_start();
|
44 |
-
|
45 |
-
if ( isset( $wp->query_vars['products'] ) ) {
|
46 |
-
if ( ! current_user_can( 'dokan_view_product_menu' ) ) {
|
47 |
-
dokan_get_template_part( 'global/no-permission' );
|
48 |
-
} else {
|
49 |
-
dokan_get_template_part( 'products/products' );
|
50 |
-
}
|
51 |
-
|
52 |
-
return ob_get_clean();
|
53 |
-
}
|
54 |
-
|
55 |
-
if ( isset( $wp->query_vars['new-product'] ) ) {
|
56 |
-
if ( ! current_user_can( 'dokan_add_product' ) ) {
|
57 |
-
dokan_get_template_part( 'global/no-permission' );
|
58 |
-
} else {
|
59 |
-
do_action( 'dokan_render_new_product_template', $wp->query_vars );
|
60 |
-
}
|
61 |
-
|
62 |
-
return ob_get_clean();
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( isset( $wp->query_vars['orders'] ) ) {
|
66 |
-
if ( ! current_user_can( 'dokan_view_order_menu' ) ) {
|
67 |
-
dokan_get_template_part( 'global/no-permission' );
|
68 |
-
} else {
|
69 |
-
dokan_get_template_part( 'orders/orders' );
|
70 |
-
}
|
71 |
-
|
72 |
-
return ob_get_clean();
|
73 |
-
}
|
74 |
-
|
75 |
-
if ( isset( $wp->query_vars['withdraw'] ) ) {
|
76 |
-
if ( ! current_user_can( 'dokan_view_withdraw_menu' ) ) {
|
77 |
-
dokan_get_template_part( 'global/no-permission' );
|
78 |
-
} else {
|
79 |
-
dokan_get_template_part( 'withdraw/withdraw' );
|
80 |
-
}
|
81 |
-
|
82 |
-
return ob_get_clean();
|
83 |
-
}
|
84 |
-
|
85 |
-
if ( isset( $wp->query_vars['settings'] ) ) {
|
86 |
-
dokan_get_template_part('settings/store');
|
87 |
-
|
88 |
-
return ob_get_clean();
|
89 |
-
}
|
90 |
-
|
91 |
-
if ( isset( $wp->query_vars['page'] ) ) {
|
92 |
-
if ( ! current_user_can( 'dokan_view_overview_menu' ) ) {
|
93 |
-
dokan_get_template_part( 'global/no-permission' );
|
94 |
-
} else {
|
95 |
-
dokan_get_template_part( 'dashboard/dashboard' );
|
96 |
-
}
|
97 |
-
|
98 |
-
return ob_get_clean();
|
99 |
-
}
|
100 |
-
|
101 |
-
if ( isset( $wp->query_vars['edit-account'] ) ) {
|
102 |
-
dokan_get_template_part( 'dashboard/edit-account' );
|
103 |
-
|
104 |
-
return ob_get_clean();
|
105 |
-
}
|
106 |
-
|
107 |
-
do_action( 'dokan_load_custom_template', $wp->query_vars );
|
108 |
-
|
109 |
-
return ob_get_clean();
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Render best selling products
|
114 |
-
*
|
115 |
-
* @param array $atts
|
116 |
-
*
|
117 |
-
* @return string
|
118 |
-
*/
|
119 |
-
function best_selling_product_shortcode( $atts ) {
|
120 |
-
/**
|
121 |
-
* Filter return the number of best selling product per page.
|
122 |
-
*
|
123 |
-
* @since 2.2
|
124 |
-
*
|
125 |
-
* @param array
|
126 |
-
*/
|
127 |
-
$atts_val = shortcode_atts( apply_filters( 'dokan_best_selling_product_per_page', array(
|
128 |
-
'no_of_product' => 8,
|
129 |
-
'seller_id' => ''
|
130 |
-
), $atts ), $atts );
|
131 |
-
|
132 |
-
ob_start();
|
133 |
-
?>
|
134 |
-
<ul class="products">
|
135 |
-
<?php
|
136 |
-
$best_selling_query = dokan_get_best_selling_products( $atts_val['no_of_product'], $atts_val['seller_id'] );
|
137 |
-
?>
|
138 |
-
<?php while ( $best_selling_query->have_posts() ) : $best_selling_query->the_post(); ?>
|
139 |
-
|
140 |
-
<?php wc_get_template_part( 'content', 'product' ); ?>
|
141 |
-
|
142 |
-
<?php endwhile; ?>
|
143 |
-
</ul>
|
144 |
-
<?php
|
145 |
-
|
146 |
-
return ob_get_clean();
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Render top rated products via shortcode
|
151 |
-
*
|
152 |
-
* @param array $atts
|
153 |
-
*
|
154 |
-
* @return string
|
155 |
-
*/
|
156 |
-
function top_rated_product_shortcode( $atts ) {
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Filter return the number of top rated product per page.
|
160 |
-
*
|
161 |
-
* @since 2.2
|
162 |
-
*
|
163 |
-
* @param array
|
164 |
-
*/
|
165 |
-
$per_page = shortcode_atts( apply_filters( 'dokan_top_rated_product_per_page', array(
|
166 |
-
'no_of_product' => 8
|
167 |
-
), $atts ), $atts );
|
168 |
-
|
169 |
-
ob_start();
|
170 |
-
?>
|
171 |
-
<ul class="products">
|
172 |
-
<?php
|
173 |
-
$best_selling_query = dokan_get_top_rated_products();
|
174 |
-
?>
|
175 |
-
<?php while ( $best_selling_query->have_posts() ) : $best_selling_query->the_post(); ?>
|
176 |
-
|
177 |
-
<?php wc_get_template_part( 'content', 'product' ); ?>
|
178 |
-
|
179 |
-
<?php endwhile; ?>
|
180 |
-
</ul>
|
181 |
-
<?php
|
182 |
-
|
183 |
-
return ob_get_clean();
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Render my orders page
|
188 |
-
*
|
189 |
-
* @return string
|
190 |
-
*/
|
191 |
-
function my_orders_page() {
|
192 |
-
if ( ! is_user_logged_in() ) {
|
193 |
-
return;
|
194 |
-
}
|
195 |
-
|
196 |
-
ob_start();
|
197 |
-
|
198 |
-
dokan_get_template_part( 'my-orders' );
|
199 |
-
|
200 |
-
return ob_get_clean();
|
201 |
-
}
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Displays the store lists
|
205 |
-
*
|
206 |
-
* @since 2.4
|
207 |
-
*
|
208 |
-
* @param array $atts
|
209 |
-
*
|
210 |
-
* @return string
|
211 |
-
*/
|
212 |
-
function store_listing( $atts ) {
|
213 |
-
|
214 |
-
$defaults = array(
|
215 |
-
'per_page' => 10,
|
216 |
-
'search' => 'yes',
|
217 |
-
'per_row' => 3,
|
218 |
-
'featured' => 'no'
|
219 |
-
);
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Filter return the number of store listing number per page.
|
223 |
-
*
|
224 |
-
* @since 2.2
|
225 |
-
*
|
226 |
-
* @param array
|
227 |
-
*/
|
228 |
-
$attr = shortcode_atts( apply_filters( 'dokan_store_listing_per_page', $defaults ), $atts );
|
229 |
-
$paged = (int) is_front_page() ? max( 1, get_query_var( 'page' ) ) : max( 1, get_query_var( 'paged' ) );
|
230 |
-
$limit = $attr['per_page'];
|
231 |
-
$offset = ( $paged - 1 ) * $limit;
|
232 |
-
|
233 |
-
$seller_args = array(
|
234 |
-
'number' => $limit,
|
235 |
-
'offset' => $offset
|
236 |
-
);
|
237 |
-
|
238 |
-
$_get_data = wp_unslash( $_GET );
|
239 |
-
|
240 |
-
// if search is enabled, perform a search
|
241 |
-
if ( 'yes' == $attr['search'] ) {
|
242 |
-
if ( ! empty( $_get_data['dokan_seller_search'] ) ) {
|
243 |
-
$seller_args['meta_query'] = [
|
244 |
-
[
|
245 |
-
'key' => 'dokan_store_name',
|
246 |
-
'value' => wc_clean( $_get_data['dokan_seller_search'] ),
|
247 |
-
'compare' => 'LIKE'
|
248 |
-
]
|
249 |
-
];
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
if ( $attr['featured'] == 'yes' ) {
|
254 |
-
$seller_args['featured'] = 'yes';
|
255 |
-
}
|
256 |
-
|
257 |
-
$sellers = dokan_get_sellers( apply_filters( 'dokan_seller_listing_args', $seller_args, $_GET ) );
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Filter for store listing args
|
261 |
-
*
|
262 |
-
* @since 2.4.9
|
263 |
-
*/
|
264 |
-
$template_args = apply_filters( 'dokan_store_list_args', array(
|
265 |
-
'sellers' => $sellers,
|
266 |
-
'limit' => $limit,
|
267 |
-
'offset' => $offset,
|
268 |
-
'paged' => $paged,
|
269 |
-
'image_size' => 'full',
|
270 |
-
'search' => $attr['search'],
|
271 |
-
'per_row' => $attr['per_row']
|
272 |
-
) );
|
273 |
-
|
274 |
-
ob_start();
|
275 |
-
dokan_get_template_part( 'store-lists', false, $template_args );
|
276 |
-
$content = ob_get_clean();
|
277 |
-
|
278 |
-
return apply_filters( 'dokan_seller_listing', $content, $attr );
|
279 |
-
}
|
280 |
-
|
281 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-theme-support.php
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dokan Theme Support
|
5 |
-
*
|
6 |
-
* @since 3.0
|
7 |
-
*
|
8 |
-
* @package Dokan
|
9 |
-
*/
|
10 |
-
class Dokan_Theme_Support {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The currently active theme
|
14 |
-
*
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
private $theme;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructor
|
21 |
-
*/
|
22 |
-
public function __construct() {
|
23 |
-
$this->theme = $this->format( strtolower( get_template() ) );
|
24 |
-
$this->include_support();
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Format theme name. ( Remove `-theme` from the string )
|
29 |
-
*
|
30 |
-
* @since 2.9.30
|
31 |
-
*
|
32 |
-
* @param string $string
|
33 |
-
*
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
private function format( $string ) {
|
37 |
-
if ( false !== strpos( $string, '-theme' ) ) {
|
38 |
-
$string = substr( $string, 0, strlen( $string ) - 6 );
|
39 |
-
}
|
40 |
-
|
41 |
-
return $string;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Include supported theme compatibility
|
46 |
-
*
|
47 |
-
* @return void
|
48 |
-
*/
|
49 |
-
private function include_support() {
|
50 |
-
$themes = apply_filters( 'dokan_load_theme_support_files', [
|
51 |
-
'storefront',
|
52 |
-
'flatsome',
|
53 |
-
'divi',
|
54 |
-
'rehub',
|
55 |
-
'electro',
|
56 |
-
'enfold'
|
57 |
-
] );
|
58 |
-
|
59 |
-
return in_array( $this->theme, $themes ) ? $this->load_file( $this->theme ) : false;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Load file classes
|
64 |
-
*
|
65 |
-
* @param string $file
|
66 |
-
*
|
67 |
-
* @since 2.9.17
|
68 |
-
*
|
69 |
-
* @return string|null on failure
|
70 |
-
*/
|
71 |
-
private function load_file( $file ) {
|
72 |
-
$file = __DIR__ . '/theme-support/class-' . $file . '.php';
|
73 |
-
|
74 |
-
if ( ! file_exists( $file ) ) {
|
75 |
-
return;
|
76 |
-
}
|
77 |
-
|
78 |
-
require_once $file;
|
79 |
-
}
|
80 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-email-contact-seller.php
DELETED
@@ -1,172 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_Contact_Seller' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Customer Email to vendor from contact form widget.
|
11 |
-
*
|
12 |
-
* @class Dokan_Email_Contact_Seller
|
13 |
-
* @version 2.6.8
|
14 |
-
* @author weDevs
|
15 |
-
* @extends WC_Email
|
16 |
-
*/
|
17 |
-
class Dokan_Email_Contact_Seller extends WC_Email {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructor.
|
21 |
-
*/
|
22 |
-
public function __construct() {
|
23 |
-
$this->id = 'dokan_contact_seller';
|
24 |
-
$this->title = __( 'Dokan Contact Vendor', 'dokan-lite' );
|
25 |
-
$this->description = __( 'These emails are sent to a vendor who is contacted by customer via contact form widget ', 'dokan-lite' );
|
26 |
-
$this->template_html = 'emails/contact-seller.php';
|
27 |
-
$this->template_plain = 'emails/plain/contact-seller.php';
|
28 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
29 |
-
|
30 |
-
// Triggers for this email
|
31 |
-
add_action( 'dokan_trigger_contact_seller_mail', array( $this, 'trigger' ), 30, 4 );
|
32 |
-
|
33 |
-
// Call parent constructor
|
34 |
-
parent::__construct();
|
35 |
-
|
36 |
-
// Other settings
|
37 |
-
$this->recipient = 'vendor@ofthe.product';
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Get email subject.
|
42 |
-
*
|
43 |
-
* @since 3.1.0
|
44 |
-
* @return string
|
45 |
-
*/
|
46 |
-
public function get_default_subject() {
|
47 |
-
return __( '[{customer_name}] sent you a message from your store at - {site_name}', 'dokan-lite' );
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Get email heading.
|
52 |
-
*
|
53 |
-
* @since 3.1.0
|
54 |
-
* @return string
|
55 |
-
*/
|
56 |
-
public function get_default_heading() {
|
57 |
-
return __( '{customer_name} - Sent a message from {site_name}', 'dokan-lite' );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Trigger the this email.
|
62 |
-
*/
|
63 |
-
public function trigger( $seller_email, $contact_name, $contact_email, $contact_message ) {
|
64 |
-
|
65 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
66 |
-
return;
|
67 |
-
}
|
68 |
-
|
69 |
-
$seller = get_user_by( 'email', $seller_email );
|
70 |
-
|
71 |
-
$this->find['seller_name'] = '{seller_name}';
|
72 |
-
$this->find['customer_name'] = '{customer_name}';
|
73 |
-
$this->find['customer_email'] = '{customer_email}';
|
74 |
-
$this->find['message'] = '{message}';
|
75 |
-
$this->find['site_name'] = '{site_name}';
|
76 |
-
$this->find['site_url'] = '{site_url}';
|
77 |
-
|
78 |
-
$this->replace['seller_name'] = $seller->display_name;
|
79 |
-
$this->replace['customer_name'] = $contact_name;
|
80 |
-
$this->replace['customer_email'] = $contact_email;
|
81 |
-
$this->replace['message'] = $contact_message;
|
82 |
-
$this->replace['site_name'] = $this->get_from_name();
|
83 |
-
$this->replace['site_url'] = site_url();
|
84 |
-
|
85 |
-
$this->setup_locale();
|
86 |
-
$this->send( $seller_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
87 |
-
$this->restore_locale();
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get content html.
|
92 |
-
*
|
93 |
-
* @access public
|
94 |
-
* @return string
|
95 |
-
*/
|
96 |
-
public function get_content_html() {
|
97 |
-
ob_start();
|
98 |
-
wc_get_template( $this->template_html, array(
|
99 |
-
'email_heading' => $this->get_heading(),
|
100 |
-
'sent_to_admin' => true,
|
101 |
-
'plain_text' => false,
|
102 |
-
'email' => $this,
|
103 |
-
'data' => $this->replace
|
104 |
-
), 'dokan/', $this->template_base );
|
105 |
-
return ob_get_clean();
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Get content plain.
|
111 |
-
*
|
112 |
-
* @access public
|
113 |
-
* @return string
|
114 |
-
*/
|
115 |
-
public function get_content_plain() {
|
116 |
-
ob_start();
|
117 |
-
wc_get_template( $this->template_html, array(
|
118 |
-
'email_heading' => $this->get_heading(),
|
119 |
-
'sent_to_admin' => true,
|
120 |
-
'plain_text' => true,
|
121 |
-
'email' => $this,
|
122 |
-
'data' => $this->replace
|
123 |
-
), 'dokan/', $this->template_base );
|
124 |
-
return ob_get_clean();
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Initialize settings form fields.
|
129 |
-
*/
|
130 |
-
public function init_form_fields() {
|
131 |
-
$this->form_fields = array(
|
132 |
-
'enabled' => array(
|
133 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
134 |
-
'type' => 'checkbox',
|
135 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
136 |
-
'default' => 'yes',
|
137 |
-
),
|
138 |
-
|
139 |
-
'subject' => array(
|
140 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
141 |
-
'type' => 'text',
|
142 |
-
'desc_tip' => true,
|
143 |
-
/* translators: %s: list of placeholders */
|
144 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{seller_name}, {customer_name}, {site_name}</code>' ),
|
145 |
-
'placeholder' => $this->get_default_subject(),
|
146 |
-
'default' => '',
|
147 |
-
),
|
148 |
-
'heading' => array(
|
149 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
150 |
-
'type' => 'text',
|
151 |
-
'desc_tip' => true,
|
152 |
-
/* translators: %s: list of placeholders */
|
153 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{seller_name}, {customer_name}, {site_name}</code>' ),
|
154 |
-
'placeholder' => $this->get_default_heading(),
|
155 |
-
'default' => '',
|
156 |
-
),
|
157 |
-
'email_type' => array(
|
158 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
159 |
-
'type' => 'select',
|
160 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
161 |
-
'default' => 'html',
|
162 |
-
'class' => 'email_type wc-enhanced-select',
|
163 |
-
'options' => $this->get_email_type_options(),
|
164 |
-
'desc_tip' => true,
|
165 |
-
),
|
166 |
-
);
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
endif;
|
171 |
-
|
172 |
-
return new Dokan_Email_Contact_Seller();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-email-new-product-pending.php
DELETED
@@ -1,199 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_New_Product_Pending' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* New Product Email.
|
11 |
-
*
|
12 |
-
* An email sent to the admin when a new Product is created by vendor.
|
13 |
-
*
|
14 |
-
* @class Dokan_Email_New_Product_Pending
|
15 |
-
* @version 2.6.8
|
16 |
-
* @package Dokan/Classes/Emails
|
17 |
-
* @author weDevs
|
18 |
-
* @extends WC_Email
|
19 |
-
*/
|
20 |
-
class Dokan_Email_New_Product_Pending extends WC_Email {
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Constructor.
|
24 |
-
*/
|
25 |
-
public function __construct() {
|
26 |
-
$this->id = 'new_product_pending';
|
27 |
-
$this->title = __( 'Dokan New Pending Product', 'dokan-lite' );
|
28 |
-
$this->description = __( 'New Pending Product emails are sent to chosen recipient(s) when a new product is created by vendors.', 'dokan-lite' );
|
29 |
-
$this->template_html = 'emails/new-product-pending.php';
|
30 |
-
$this->template_plain = 'emails/plain/new-product-pending.php';
|
31 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
32 |
-
|
33 |
-
// Triggers for this email
|
34 |
-
add_action( 'dokan_email_trigger_new_pending_product', array( $this, 'trigger' ), 30, 2 );
|
35 |
-
|
36 |
-
// Call parent constructor
|
37 |
-
parent::__construct();
|
38 |
-
|
39 |
-
// Other settings
|
40 |
-
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get email subject.
|
45 |
-
*
|
46 |
-
* @since 3.1.0
|
47 |
-
* @return string
|
48 |
-
*/
|
49 |
-
public function get_default_subject() {
|
50 |
-
return __( '[{site_title}] A New product is pending from ({seller_name}) - {product_title}', 'dokan-lite' );
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get email heading.
|
55 |
-
*
|
56 |
-
* @since 3.1.0
|
57 |
-
* @return string
|
58 |
-
*/
|
59 |
-
public function get_default_heading() {
|
60 |
-
return __( 'New pending product added by Vendor {seller_name}', 'dokan-lite' );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Trigger the sending of this email.
|
65 |
-
*
|
66 |
-
* @param int $product_id The product ID.
|
67 |
-
* @param array $postdata.
|
68 |
-
*/
|
69 |
-
public function trigger( $product_id, $postdata ) {
|
70 |
-
|
71 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
72 |
-
return;
|
73 |
-
}
|
74 |
-
|
75 |
-
$product = wc_get_product( $product_id );
|
76 |
-
$seller_id = get_post_field( 'post_author', $product_id );
|
77 |
-
$seller = get_user_by( 'id', $seller_id );
|
78 |
-
$category = wp_get_post_terms( dokan_get_prop( $product, 'id' ), 'product_cat', array( 'fields' => 'names' ) );
|
79 |
-
$category_name = $category ? reset( $category ) : 'N/A';
|
80 |
-
|
81 |
-
if ( is_a( $product, 'WC_Product' ) ) {
|
82 |
-
$this->object = $product;
|
83 |
-
|
84 |
-
$this->find['product-title'] = '{product_title}';
|
85 |
-
$this->find['price'] = '{price}';
|
86 |
-
$this->find['seller-name'] = '{seller_name}';
|
87 |
-
$this->find['seller_url'] = '{seller_url}';
|
88 |
-
$this->find['category'] = '{category}';
|
89 |
-
$this->find['product_link'] = '{product_link}';
|
90 |
-
$this->find['site_name'] = '{site_name}';
|
91 |
-
$this->find['site_url'] = '{site_url}';
|
92 |
-
|
93 |
-
$this->replace['product-title'] = $product->get_title();
|
94 |
-
$this->replace['price'] = $product->get_price();
|
95 |
-
$this->replace['seller-name'] = $seller->display_name;
|
96 |
-
$this->replace['seller_url'] = dokan_get_store_url( $seller->ID );
|
97 |
-
$this->replace['category'] = $category_name;
|
98 |
-
$this->replace['product_link'] = admin_url( 'post.php?action=edit&post=' . $product_id );
|
99 |
-
$this->replace['site_name'] = $this->get_from_name();
|
100 |
-
$this->replace['site_url'] = site_url();
|
101 |
-
}
|
102 |
-
|
103 |
-
$this->setup_locale();
|
104 |
-
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
105 |
-
$this->restore_locale();
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Get content html.
|
110 |
-
*
|
111 |
-
* @access public
|
112 |
-
* @return string
|
113 |
-
*/
|
114 |
-
public function get_content_html() {
|
115 |
-
ob_start();
|
116 |
-
wc_get_template( $this->template_html, array(
|
117 |
-
'product' => $this->object,
|
118 |
-
'email_heading' => $this->get_heading(),
|
119 |
-
'sent_to_admin' => true,
|
120 |
-
'plain_text' => false,
|
121 |
-
'email' => $this,
|
122 |
-
'data' => $this->replace
|
123 |
-
), 'dokan/', $this->template_base );
|
124 |
-
return ob_get_clean();
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Get content plain.
|
130 |
-
*
|
131 |
-
* @access public
|
132 |
-
* @return string
|
133 |
-
*/
|
134 |
-
public function get_content_plain() {
|
135 |
-
ob_start();
|
136 |
-
wc_get_template( $this->template_html, array(
|
137 |
-
'product' => $this->object,
|
138 |
-
'email_heading' => $this->get_heading(),
|
139 |
-
'sent_to_admin' => true,
|
140 |
-
'plain_text' => true,
|
141 |
-
'email' => $this,
|
142 |
-
'data' => $this->replace
|
143 |
-
), 'dokan/', $this->template_base );
|
144 |
-
return ob_get_clean();
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Initialise settings form fields.
|
149 |
-
*/
|
150 |
-
public function init_form_fields() {
|
151 |
-
$this->form_fields = array(
|
152 |
-
'enabled' => array(
|
153 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
154 |
-
'type' => 'checkbox',
|
155 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
156 |
-
'default' => 'yes',
|
157 |
-
),
|
158 |
-
'recipient' => array(
|
159 |
-
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
160 |
-
'type' => 'text',
|
161 |
-
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
162 |
-
'placeholder' => '',
|
163 |
-
'default' => '',
|
164 |
-
'desc_tip' => true,
|
165 |
-
),
|
166 |
-
'subject' => array(
|
167 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
168 |
-
'type' => 'text',
|
169 |
-
'desc_tip' => true,
|
170 |
-
/* translators: %s: list of placeholders */
|
171 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_title}, {product_title}, {seller_name}</code>' ),
|
172 |
-
'placeholder' => $this->get_default_subject(),
|
173 |
-
'default' => '',
|
174 |
-
),
|
175 |
-
'heading' => array(
|
176 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
177 |
-
'type' => 'text',
|
178 |
-
'desc_tip' => true,
|
179 |
-
/* translators: %s: list of placeholders */
|
180 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_title}, {product_title}, {seller_name}</code>' ),
|
181 |
-
'placeholder' => $this->get_default_heading(),
|
182 |
-
'default' => '',
|
183 |
-
),
|
184 |
-
'email_type' => array(
|
185 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
186 |
-
'type' => 'select',
|
187 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
188 |
-
'default' => 'html',
|
189 |
-
'class' => 'email_type wc-enhanced-select',
|
190 |
-
'options' => $this->get_email_type_options(),
|
191 |
-
'desc_tip' => true,
|
192 |
-
),
|
193 |
-
);
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
endif;
|
198 |
-
|
199 |
-
return new Dokan_Email_New_Product_Pending();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-email-new-product.php
DELETED
@@ -1,207 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_New_Product' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* New Product Email.
|
11 |
-
*
|
12 |
-
* An email sent to the admin when a new Product is created by vendor.
|
13 |
-
*
|
14 |
-
* @class Dokan_Email_New_Product
|
15 |
-
* @version 2.6.8
|
16 |
-
* @author weDevs
|
17 |
-
* @extends WC_Email
|
18 |
-
*/
|
19 |
-
class Dokan_Email_New_Product extends WC_Email {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Constructor.
|
23 |
-
*/
|
24 |
-
public function __construct() {
|
25 |
-
$this->id = 'new_product';
|
26 |
-
$this->title = __( 'Dokan New Product', 'dokan-lite' );
|
27 |
-
$this->description = __( 'New Product emails are sent to chosen recipient(s) when a new product is created by vendors.', 'dokan-lite' );
|
28 |
-
$this->template_html = 'emails/new-product.php';
|
29 |
-
$this->template_plain = 'emails/plain/new-product.php';
|
30 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
31 |
-
|
32 |
-
// Triggers for this email
|
33 |
-
add_action( 'dokan_new_product_added', array( $this, 'trigger' ), 30, 2 );
|
34 |
-
|
35 |
-
// Call parent constructor
|
36 |
-
parent::__construct();
|
37 |
-
|
38 |
-
// Other settings
|
39 |
-
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Get email subject.
|
44 |
-
*
|
45 |
-
* @since 3.1.0
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function get_default_subject() {
|
49 |
-
return __( '[{site_name}] A New product is added by ({seller_name}) - {product_title}', 'dokan-lite' );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get email heading.
|
54 |
-
*
|
55 |
-
* @since 3.1.0
|
56 |
-
* @return string
|
57 |
-
*/
|
58 |
-
public function get_default_heading() {
|
59 |
-
return __( 'New product added by Vendor {seller_name}', 'dokan-lite' );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Trigger the sending of this email.
|
64 |
-
*
|
65 |
-
* @param int $product_id The product ID.
|
66 |
-
* @param array $postdata.
|
67 |
-
*/
|
68 |
-
public function trigger( $product_id, $postdata ) {
|
69 |
-
|
70 |
-
if ( dokan_get_option( 'product_add_mail', 'dokan_general', 'on' ) != 'on' ) {
|
71 |
-
return;
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( dokan_get_new_post_status() == 'pending' ) {
|
75 |
-
do_action( 'dokan_email_trigger_new_pending_product', $product_id, $postdata );
|
76 |
-
return;
|
77 |
-
}
|
78 |
-
|
79 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
80 |
-
return;
|
81 |
-
}
|
82 |
-
|
83 |
-
$product = wc_get_product( $product_id );
|
84 |
-
$seller_id = get_post_field( 'post_author', $product_id );
|
85 |
-
$seller = get_user_by( 'id', $seller_id );
|
86 |
-
$category = wp_get_post_terms( dokan_get_prop( $product, 'id' ), 'product_cat', array( 'fields' => 'names' ) );
|
87 |
-
$category_name = $category ? reset( $category ) : 'N/A';
|
88 |
-
|
89 |
-
if ( is_a( $product, 'WC_Product' ) ) {
|
90 |
-
$this->object = $product;
|
91 |
-
|
92 |
-
$this->find['product-title'] = '{product_title}';
|
93 |
-
$this->find['price'] = '{price}';
|
94 |
-
$this->find['seller-name'] = '{seller_name}';
|
95 |
-
$this->find['seller_url'] = '{seller_url}';
|
96 |
-
$this->find['category'] = '{category}';
|
97 |
-
$this->find['product_link'] = '{product_link}';
|
98 |
-
$this->find['site_name'] = '{site_name}';
|
99 |
-
$this->find['site_url'] = '{site_url}';
|
100 |
-
|
101 |
-
$this->replace['product-title'] = $product->get_title();
|
102 |
-
$this->replace['price'] = $product->get_price();
|
103 |
-
$this->replace['seller-name'] = $seller->display_name;
|
104 |
-
$this->replace['seller_url'] = dokan_get_store_url( $seller->ID );
|
105 |
-
$this->replace['category'] = $category_name;
|
106 |
-
$this->replace['product_link'] = admin_url( 'post.php?action=edit&post=' . $product_id );
|
107 |
-
$this->replace['site_name'] = $this->get_from_name();
|
108 |
-
$this->replace['site_url'] = site_url();
|
109 |
-
}
|
110 |
-
|
111 |
-
$this->setup_locale();
|
112 |
-
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
113 |
-
$this->restore_locale();
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get content html.
|
118 |
-
*
|
119 |
-
* @access public
|
120 |
-
* @return string
|
121 |
-
*/
|
122 |
-
public function get_content_html() {
|
123 |
-
ob_start();
|
124 |
-
wc_get_template( $this->template_html, array(
|
125 |
-
'product' => $this->object,
|
126 |
-
'email_heading' => $this->get_heading(),
|
127 |
-
'sent_to_admin' => true,
|
128 |
-
'plain_text' => false,
|
129 |
-
'email' => $this,
|
130 |
-
'data' => $this->replace
|
131 |
-
), 'dokan/', $this->template_base );
|
132 |
-
return ob_get_clean();
|
133 |
-
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Get content plain.
|
138 |
-
*
|
139 |
-
* @access public
|
140 |
-
* @return string
|
141 |
-
*/
|
142 |
-
public function get_content_plain() {
|
143 |
-
ob_start();
|
144 |
-
wc_get_template( $this->template_html, array(
|
145 |
-
'product' => $this->object,
|
146 |
-
'email_heading' => $this->get_heading(),
|
147 |
-
'sent_to_admin' => true,
|
148 |
-
'plain_text' => true,
|
149 |
-
'email' => $this,
|
150 |
-
'data' => $this->replace
|
151 |
-
), 'dokan/', $this->template_base );
|
152 |
-
return ob_get_clean();
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Initialise settings form fields.
|
157 |
-
*/
|
158 |
-
public function init_form_fields() {
|
159 |
-
$this->form_fields = array(
|
160 |
-
'enabled' => array(
|
161 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
162 |
-
'type' => 'checkbox',
|
163 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
164 |
-
'default' => 'yes',
|
165 |
-
),
|
166 |
-
'recipient' => array(
|
167 |
-
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
168 |
-
'type' => 'text',
|
169 |
-
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
170 |
-
'placeholder' => '',
|
171 |
-
'default' => '',
|
172 |
-
'desc_tip' => true,
|
173 |
-
),
|
174 |
-
'subject' => array(
|
175 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
176 |
-
'type' => 'text',
|
177 |
-
'desc_tip' => true,
|
178 |
-
/* translators: %s: list of placeholders */
|
179 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
180 |
-
'placeholder' => $this->get_default_subject(),
|
181 |
-
'default' => '',
|
182 |
-
),
|
183 |
-
'heading' => array(
|
184 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
185 |
-
'type' => 'text',
|
186 |
-
'desc_tip' => true,
|
187 |
-
/* translators: %s: list of placeholders */
|
188 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
189 |
-
'placeholder' => $this->get_default_heading(),
|
190 |
-
'default' => '',
|
191 |
-
),
|
192 |
-
'email_type' => array(
|
193 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
194 |
-
'type' => 'select',
|
195 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
196 |
-
'default' => 'html',
|
197 |
-
'class' => 'email_type wc-enhanced-select',
|
198 |
-
'options' => $this->get_email_type_options(),
|
199 |
-
'desc_tip' => true,
|
200 |
-
),
|
201 |
-
);
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
endif;
|
206 |
-
|
207 |
-
return new Dokan_Email_New_Product();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-email-new-seller-registered.php
DELETED
@@ -1,187 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_New_Seller' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* New Product Email.
|
11 |
-
*
|
12 |
-
* An email sent to the admin when a new Product is created by vendor.
|
13 |
-
*
|
14 |
-
* @class Dokan_Email_New_Seller
|
15 |
-
* @version 2.6.6
|
16 |
-
* @package Dokan/Classes/Emails
|
17 |
-
* @author weDevs
|
18 |
-
* @extends WC_Email
|
19 |
-
*/
|
20 |
-
class Dokan_Email_New_Seller extends WC_Email {
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Constructor.
|
24 |
-
*/
|
25 |
-
public function __construct() {
|
26 |
-
$this->id = 'dokan_new_seller';
|
27 |
-
$this->title = __( 'Dokan New Seller Registered', 'dokan-lite' );
|
28 |
-
$this->description = __( 'These emails are sent to chosen recipient(s) when a new vendor registers in marketplace', 'dokan-lite' );
|
29 |
-
$this->template_html = 'emails/new-seller-registered.php';
|
30 |
-
$this->template_plain = 'emails/plain/new-seller-registered.php';
|
31 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
32 |
-
|
33 |
-
// Triggers for this email
|
34 |
-
add_action( 'dokan_new_seller_created', array( $this, 'trigger' ), 30, 2 );
|
35 |
-
|
36 |
-
// Call parent constructor
|
37 |
-
parent::__construct();
|
38 |
-
|
39 |
-
// Other settings
|
40 |
-
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get email subject.
|
45 |
-
*
|
46 |
-
* @since 3.1.0
|
47 |
-
* @return string
|
48 |
-
*/
|
49 |
-
public function get_default_subject() {
|
50 |
-
return __( '[{site_name}] A New vendor has registered', 'dokan-lite' );
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get email heading.
|
55 |
-
*
|
56 |
-
* @since 3.1.0
|
57 |
-
* @return string
|
58 |
-
*/
|
59 |
-
public function get_default_heading() {
|
60 |
-
return __( 'New Vendor Registered - {seller_name}', 'dokan-lite' );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Trigger the sending of this email.
|
65 |
-
*
|
66 |
-
* @param int $product_id The product ID.
|
67 |
-
* @param array $postdata.
|
68 |
-
*/
|
69 |
-
public function trigger( $user_id, $dokan_settings ) {
|
70 |
-
|
71 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
72 |
-
return;
|
73 |
-
}
|
74 |
-
|
75 |
-
$seller = get_user_by( 'id', $user_id );
|
76 |
-
$this->object = $seller;
|
77 |
-
$this->find['seller_name'] = '{seller_name}';
|
78 |
-
$this->find['store_url'] = '{store_url}';
|
79 |
-
$this->find['store_name'] = '{store_name}';
|
80 |
-
$this->find['seller_edit'] = '{seller_edit}';
|
81 |
-
$this->find['site_name'] = '{site_name}';
|
82 |
-
$this->find['site_url'] = '{site_url}';
|
83 |
-
|
84 |
-
$this->replace['seller_name'] = $seller->display_name;
|
85 |
-
$this->replace['store_url'] = dokan_get_store_url( $seller->ID );
|
86 |
-
$this->replace['store_name'] = $dokan_settings['store_name'];
|
87 |
-
$this->replace['seller_edit'] = admin_url( 'user-edit.php?user_id=' . $user_id );
|
88 |
-
$this->replace['site_name'] = $this->get_from_name();
|
89 |
-
$this->replace['site_url'] = site_url();
|
90 |
-
|
91 |
-
$this->setup_locale();
|
92 |
-
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
93 |
-
$this->restore_locale();
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Get content html.
|
98 |
-
*
|
99 |
-
* @access public
|
100 |
-
* @return string
|
101 |
-
*/
|
102 |
-
public function get_content_html() {
|
103 |
-
ob_start();
|
104 |
-
wc_get_template( $this->template_html, array(
|
105 |
-
'seller' => $this->object,
|
106 |
-
'email_heading' => $this->get_heading(),
|
107 |
-
'sent_to_admin' => true,
|
108 |
-
'plain_text' => false,
|
109 |
-
'email' => $this,
|
110 |
-
'data' => $this->replace
|
111 |
-
), 'dokan/', $this->template_base );
|
112 |
-
return ob_get_clean();
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get content plain.
|
118 |
-
*
|
119 |
-
* @access public
|
120 |
-
* @return string
|
121 |
-
*/
|
122 |
-
public function get_content_plain() {
|
123 |
-
ob_start();
|
124 |
-
wc_get_template( $this->template_html, array(
|
125 |
-
'seller' => $this->object,
|
126 |
-
'email_heading' => $this->get_heading(),
|
127 |
-
'sent_to_admin' => true,
|
128 |
-
'plain_text' => true,
|
129 |
-
'email' => $this,
|
130 |
-
'data' => $this->replace
|
131 |
-
), 'dokan/', $this->template_base );
|
132 |
-
return ob_get_clean();
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Initialise settings form fields.
|
137 |
-
*/
|
138 |
-
public function init_form_fields() {
|
139 |
-
$this->form_fields = array(
|
140 |
-
'enabled' => array(
|
141 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
142 |
-
'type' => 'checkbox',
|
143 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
144 |
-
'default' => 'yes',
|
145 |
-
),
|
146 |
-
'recipient' => array(
|
147 |
-
'title' => __( 'Recipient(s)', 'dokan-lite' ),
|
148 |
-
'type' => 'text',
|
149 |
-
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'dokan-lite' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
150 |
-
'placeholder' => '',
|
151 |
-
'default' => '',
|
152 |
-
'desc_tip' => true,
|
153 |
-
),
|
154 |
-
'subject' => array(
|
155 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
156 |
-
'type' => 'text',
|
157 |
-
'desc_tip' => true,
|
158 |
-
/* translators: %s: list of placeholders */
|
159 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {store_name}, {seller_name}</code>' ),
|
160 |
-
'placeholder' => $this->get_default_subject(),
|
161 |
-
'default' => '',
|
162 |
-
),
|
163 |
-
'heading' => array(
|
164 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
165 |
-
'type' => 'text',
|
166 |
-
'desc_tip' => true,
|
167 |
-
/* translators: %s: list of placeholders */
|
168 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {store_name}, {seller_name}</code>' ),
|
169 |
-
'placeholder' => $this->get_default_heading(),
|
170 |
-
'default' => '',
|
171 |
-
),
|
172 |
-
'email_type' => array(
|
173 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
174 |
-
'type' => 'select',
|
175 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
176 |
-
'default' => 'html',
|
177 |
-
'class' => 'email_type wc-enhanced-select',
|
178 |
-
'options' => $this->get_email_type_options(),
|
179 |
-
'desc_tip' => true,
|
180 |
-
),
|
181 |
-
);
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
endif;
|
186 |
-
|
187 |
-
return new Dokan_Email_New_Seller();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-email-product-published.php
DELETED
@@ -1,185 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_Product_Published' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* New Product Published Email to vendor.
|
11 |
-
*
|
12 |
-
* An email sent to the vendor when a pending Product is published by admin.
|
13 |
-
*
|
14 |
-
* @class Dokan_Email_Product_Published
|
15 |
-
* @version 2.6.8
|
16 |
-
* @author weDevs
|
17 |
-
* @extends WC_Email
|
18 |
-
*/
|
19 |
-
class Dokan_Email_Product_Published extends WC_Email {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Constructor.
|
23 |
-
*/
|
24 |
-
public function __construct() {
|
25 |
-
$this->id = 'pending_product_published';
|
26 |
-
$this->title = __( 'Dokan Pending Product Published', 'dokan-lite' );
|
27 |
-
$this->description = __( 'These emails are sent to vendor of the product when a pending product is published.', 'dokan-lite' );
|
28 |
-
$this->template_html = 'emails/product-published.php';
|
29 |
-
$this->template_plain = 'emails/plain/product-published.php';
|
30 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
31 |
-
|
32 |
-
// Triggers for this email
|
33 |
-
add_action( 'dokan_pending_product_published_notification', array( $this, 'trigger' ), 30, 2 );
|
34 |
-
|
35 |
-
// Call parent constructor
|
36 |
-
parent::__construct();
|
37 |
-
|
38 |
-
// Other settings
|
39 |
-
$this->recipient = 'vendor@ofthe.product';
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Get email subject.
|
44 |
-
*
|
45 |
-
* @since 3.1.0
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function get_default_subject() {
|
49 |
-
return __( '[{site_name}] Your product - {product_title} - is now published', 'dokan-lite' );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get email heading.
|
54 |
-
*
|
55 |
-
* @since 3.1.0
|
56 |
-
* @return string
|
57 |
-
*/
|
58 |
-
public function get_default_heading() {
|
59 |
-
return __( '{product_title} - is published', 'dokan-lite' );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Trigger the sending of this email.
|
64 |
-
*
|
65 |
-
* @param int $product_id The product ID.
|
66 |
-
* @param array $postdata.
|
67 |
-
*/
|
68 |
-
public function trigger( $post, $seller ) {
|
69 |
-
|
70 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
71 |
-
return;
|
72 |
-
}
|
73 |
-
|
74 |
-
$product = wc_get_product( $post->ID );
|
75 |
-
|
76 |
-
if ( is_a( $product, 'WC_Product' ) ) {
|
77 |
-
$this->object = $product;
|
78 |
-
|
79 |
-
$this->find['product-title'] = '{product_title}';
|
80 |
-
$this->find['price'] = '{price}';
|
81 |
-
$this->find['seller-name'] = '{seller_name}';
|
82 |
-
$this->find['product_url'] = '{product_url}';
|
83 |
-
$this->find['product_edit_link'] = '{product_edit_link}';
|
84 |
-
$this->find['site_name'] = '{site_name}';
|
85 |
-
$this->find['site_url'] = '{site_url}';
|
86 |
-
|
87 |
-
$this->replace['product-title'] = $product->get_title();
|
88 |
-
$this->replace['price'] = $product->get_price();
|
89 |
-
$this->replace['seller-name'] = $seller->display_name;
|
90 |
-
$this->replace['product_url'] = get_permalink( $post->ID );
|
91 |
-
$this->replace['product_edit_link'] = dokan_edit_product_url( $post->ID );
|
92 |
-
$this->replace['site_name'] = $this->get_from_name();
|
93 |
-
$this->replace['site_url'] = site_url();
|
94 |
-
}
|
95 |
-
|
96 |
-
$this->setup_locale();
|
97 |
-
$this->send( $seller->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
98 |
-
$this->restore_locale();
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Get content html.
|
103 |
-
*
|
104 |
-
* @access public
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
public function get_content_html() {
|
108 |
-
ob_start();
|
109 |
-
wc_get_template( $this->template_html, array(
|
110 |
-
'product' => $this->object,
|
111 |
-
'email_heading' => $this->get_heading(),
|
112 |
-
'sent_to_admin' => true,
|
113 |
-
'plain_text' => false,
|
114 |
-
'email' => $this,
|
115 |
-
'data' => $this->replace
|
116 |
-
), 'dokan/', $this->template_base );
|
117 |
-
return ob_get_clean();
|
118 |
-
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Get content plain.
|
123 |
-
*
|
124 |
-
* @access public
|
125 |
-
* @return string
|
126 |
-
*/
|
127 |
-
public function get_content_plain() {
|
128 |
-
ob_start();
|
129 |
-
wc_get_template( $this->template_html, array(
|
130 |
-
'product' => $this->object,
|
131 |
-
'email_heading' => $this->get_heading(),
|
132 |
-
'sent_to_admin' => true,
|
133 |
-
'plain_text' => true,
|
134 |
-
'email' => $this,
|
135 |
-
'data' => $this->replace
|
136 |
-
), 'dokan/', $this->template_base );
|
137 |
-
return ob_get_clean();
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Initialise settings form fields.
|
142 |
-
*/
|
143 |
-
public function init_form_fields() {
|
144 |
-
$this->form_fields = array(
|
145 |
-
'enabled' => array(
|
146 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
147 |
-
'type' => 'checkbox',
|
148 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
149 |
-
'default' => 'yes',
|
150 |
-
),
|
151 |
-
|
152 |
-
'subject' => array(
|
153 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
154 |
-
'type' => 'text',
|
155 |
-
'desc_tip' => true,
|
156 |
-
/* translators: %s: list of placeholders */
|
157 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
158 |
-
'placeholder' => $this->get_default_subject(),
|
159 |
-
'default' => '',
|
160 |
-
),
|
161 |
-
'heading' => array(
|
162 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
163 |
-
'type' => 'text',
|
164 |
-
'desc_tip' => true,
|
165 |
-
/* translators: %s: list of placeholders */
|
166 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name}, {product_title}, {seller_name}</code>' ),
|
167 |
-
'placeholder' => $this->get_default_heading(),
|
168 |
-
'default' => '',
|
169 |
-
),
|
170 |
-
'email_type' => array(
|
171 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
172 |
-
'type' => 'select',
|
173 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
174 |
-
'default' => 'html',
|
175 |
-
'class' => 'email_type wc-enhanced-select',
|
176 |
-
'options' => $this->get_email_type_options(),
|
177 |
-
'desc_tip' => true,
|
178 |
-
),
|
179 |
-
);
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
endif;
|
184 |
-
|
185 |
-
return new Dokan_Email_Product_Published();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/emails/class-dokan-withdraw-cancelled.php
DELETED
@@ -1,181 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! class_exists( 'Dokan_Email_Withdraw_Cancelled' ) ) :
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Withdraw Request Cancelled
|
11 |
-
*
|
12 |
-
* An email sent to the vendor when a withdrawal request is cancelled by admin.
|
13 |
-
*
|
14 |
-
* @class Dokan_Email_Withdraw_Cancelled
|
15 |
-
* @version 2.6.8
|
16 |
-
* @author weDevs
|
17 |
-
* @extends WC_Email
|
18 |
-
*/
|
19 |
-
class Dokan_Email_Withdraw_Cancelled extends WC_Email {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Constructor.
|
23 |
-
*/
|
24 |
-
public function __construct() {
|
25 |
-
$this->id = 'dokan_vendor_withdraw_cancelled';
|
26 |
-
$this->title = __( 'Dokan Withdraw cancelled', 'dokan-lite' );
|
27 |
-
$this->description = __( 'These emails are sent to vendor when a vendor withdraw request is cancelled', 'dokan-lite' );
|
28 |
-
$this->template_html = 'emails/withdraw-cancel.php';
|
29 |
-
$this->template_plain = 'emails/plain/withdraw-cancel.php';
|
30 |
-
$this->template_base = DOKAN_DIR.'/templates/';
|
31 |
-
|
32 |
-
// Triggers for this email
|
33 |
-
add_action( 'dokan_withdraw_request_cancelled', array( $this, 'trigger' ), 30, 2 );
|
34 |
-
|
35 |
-
// Call parent constructor
|
36 |
-
parent::__construct();
|
37 |
-
|
38 |
-
// Other settings
|
39 |
-
$this->recipient = 'vendor@ofthe.product';
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Get email subject.
|
44 |
-
*
|
45 |
-
* @since 3.1.0
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function get_default_subject() {
|
49 |
-
return __( '[{site_name}] Your withdrawal request was cancelled', 'dokan-lite' );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get email heading.
|
54 |
-
*
|
55 |
-
* @since 3.1.0
|
56 |
-
* @return string
|
57 |
-
*/
|
58 |
-
public function get_default_heading() {
|
59 |
-
return __( 'Withdrawal request for {amount} is cancelled', 'dokan-lite' );
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Trigger the sending of this email.
|
64 |
-
*
|
65 |
-
* @param int $product_id The product ID.
|
66 |
-
* @param array $postdata.
|
67 |
-
*/
|
68 |
-
public function trigger( $user_id, $withdraw ) {
|
69 |
-
if ( ! $this->is_enabled() || ! $this->get_recipient() ) {
|
70 |
-
return;
|
71 |
-
}
|
72 |
-
|
73 |
-
$seller = get_user_by( 'id', $user_id );
|
74 |
-
$this->object = $seller;
|
75 |
-
$this->find['username'] = '{user_name}';
|
76 |
-
$this->find['amount'] = '{amount}';
|
77 |
-
$this->find['method'] = '{method}';
|
78 |
-
$this->find['profile_url'] = '{profile_url}';
|
79 |
-
$this->find['withdraw_page'] = '{withdraw_page}';
|
80 |
-
$this->find['site_name'] = '{site_name}';
|
81 |
-
$this->find['site_url'] = '{site_url}';
|
82 |
-
$this->find['note'] = '{note}';
|
83 |
-
|
84 |
-
$this->replace['username'] = $seller->user_login;
|
85 |
-
$this->replace['amount'] = wc_price( $withdraw->amount );
|
86 |
-
$this->replace['method'] = dokan_withdraw_get_method_title( $withdraw->method );
|
87 |
-
$this->replace['profile_url'] = admin_url( 'user-edit.php?user_id=' . $seller->ID );
|
88 |
-
$this->replace['withdraw_page'] = admin_url( 'admin.php?page=dokan-withdraw' );
|
89 |
-
$this->replace['site_name'] = $this->get_from_name();
|
90 |
-
$this->replace['site_url'] = site_url();
|
91 |
-
$this->replace['note'] = $withdraw->note;
|
92 |
-
|
93 |
-
$this->setup_locale();
|
94 |
-
$this->send( $seller->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
95 |
-
$this->restore_locale();
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Get content html.
|
101 |
-
*
|
102 |
-
* @access public
|
103 |
-
* @return string
|
104 |
-
*/
|
105 |
-
public function get_content_html() {
|
106 |
-
ob_start();
|
107 |
-
wc_get_template( $this->template_html, array(
|
108 |
-
'seller' => $this->object,
|
109 |
-
'email_heading' => $this->get_heading(),
|
110 |
-
'sent_to_admin' => true,
|
111 |
-
'plain_text' => false,
|
112 |
-
'email' => $this,
|
113 |
-
'data' => $this->replace
|
114 |
-
), 'dokan/', $this->template_base );
|
115 |
-
return ob_get_clean();
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Get content plain.
|
120 |
-
*
|
121 |
-
* @access public
|
122 |
-
* @return string
|
123 |
-
*/
|
124 |
-
public function get_content_plain() {
|
125 |
-
ob_start();
|
126 |
-
wc_get_template( $this->template_html, array(
|
127 |
-
'seller' => $this->object,
|
128 |
-
'email_heading' => $this->get_heading(),
|
129 |
-
'sent_to_admin' => true,
|
130 |
-
'plain_text' => true,
|
131 |
-
'email' => $this,
|
132 |
-
'data' => $this->replace
|
133 |
-
), 'dokan/', $this->template_base );
|
134 |
-
return ob_get_clean();
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Initialise settings form fields.
|
139 |
-
*/
|
140 |
-
public function init_form_fields() {
|
141 |
-
$this->form_fields = array(
|
142 |
-
'enabled' => array(
|
143 |
-
'title' => __( 'Enable/Disable', 'dokan-lite' ),
|
144 |
-
'type' => 'checkbox',
|
145 |
-
'label' => __( 'Enable this email notification', 'dokan-lite' ),
|
146 |
-
'default' => 'yes',
|
147 |
-
),
|
148 |
-
'subject' => array(
|
149 |
-
'title' => __( 'Subject', 'dokan-lite' ),
|
150 |
-
'type' => 'text',
|
151 |
-
'desc_tip' => true,
|
152 |
-
/* translators: %s: list of placeholders */
|
153 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name},{amount},{user_name}</code>' ),
|
154 |
-
'placeholder' => $this->get_default_subject(),
|
155 |
-
'default' => '',
|
156 |
-
),
|
157 |
-
'heading' => array(
|
158 |
-
'title' => __( 'Email heading', 'dokan-lite' ),
|
159 |
-
'type' => 'text',
|
160 |
-
'desc_tip' => true,
|
161 |
-
/* translators: %s: list of placeholders */
|
162 |
-
'description' => sprintf( __( 'Available placeholders: %s', 'dokan-lite' ), '<code>{site_name},{amount},{user_name}</code>' ),
|
163 |
-
'placeholder' => $this->get_default_heading(),
|
164 |
-
'default' => '',
|
165 |
-
),
|
166 |
-
'email_type' => array(
|
167 |
-
'title' => __( 'Email type', 'dokan-lite' ),
|
168 |
-
'type' => 'select',
|
169 |
-
'description' => __( 'Choose which format of email to send.', 'dokan-lite' ),
|
170 |
-
'default' => 'html',
|
171 |
-
'class' => 'email_type wc-enhanced-select',
|
172 |
-
'options' => $this->get_email_type_options(),
|
173 |
-
'desc_tip' => true,
|
174 |
-
),
|
175 |
-
);
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
endif;
|
180 |
-
|
181 |
-
return new Dokan_Email_Withdraw_Cancelled();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/functions-depricated.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dokan get product status
|
5 |
-
*
|
6 |
-
* @since 2.5
|
7 |
-
*
|
8 |
-
* @deprecated 2.5.1
|
9 |
-
*
|
10 |
-
* @return string|array
|
11 |
-
**/
|
12 |
-
function dokan_get_product_status( $status ) {
|
13 |
-
_deprecated_function( 'dokan_get_product_status', '2.5', 'dokan_get_product_types' );
|
14 |
-
return dokan_get_product_types( $status );
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/functions.php
CHANGED
@@ -1,9 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
require_once dirname( __FILE__ ) . '/product-functions.php';
|
4 |
-
require_once dirname( __FILE__ ) . '/order-functions.php';
|
5 |
-
require_once dirname( __FILE__ ) . '/withdraw-functions.php';
|
6 |
-
|
7 |
/**
|
8 |
* Dokan Admin menu position
|
9 |
*
|
@@ -404,19 +399,22 @@ function dokan_generate_sync_table() {
|
|
404 |
INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta oim2 ON oim2.order_item_id = oi.order_item_id
|
405 |
INNER JOIN $wpdb->posts p ON oi.order_id = p.ID
|
406 |
WHERE
|
407 |
-
oim.meta_key =
|
408 |
-
oim2.meta_key =
|
409 |
-
GROUP BY oi.order_id"
|
|
|
|
|
410 |
)
|
411 |
);
|
412 |
|
413 |
$table_name = $wpdb->prefix . 'dokan_orders';
|
414 |
|
415 |
-
$wpdb->query(
|
416 |
|
417 |
if ( $orders ) {
|
418 |
foreach ( $orders as $order ) {
|
419 |
-
$
|
|
|
420 |
|
421 |
$wpdb->insert(
|
422 |
$table_name,
|
@@ -424,7 +422,7 @@ function dokan_generate_sync_table() {
|
|
424 |
'order_id' => $order->order_id,
|
425 |
'seller_id' => $order->seller_id,
|
426 |
'order_total' => $order->order_total,
|
427 |
-
'net_amount' => $order_total - $admin_commission,
|
428 |
'order_status' => $order->order_status,
|
429 |
),
|
430 |
array(
|
@@ -435,8 +433,8 @@ function dokan_generate_sync_table() {
|
|
435 |
'%s',
|
436 |
)
|
437 |
);
|
438 |
-
}
|
439 |
-
}
|
440 |
}
|
441 |
|
442 |
if ( ! function_exists( 'dokan_get_seller_earnings_by_order' ) ) {
|
@@ -858,8 +856,6 @@ function dokan_posted_textarea( $key ) {
|
|
858 |
* Looks at the theme directory first
|
859 |
*/
|
860 |
function dokan_get_template_part( $slug, $name = '', $args = array() ) {
|
861 |
-
$dokan = WeDevs_Dokan::init();
|
862 |
-
|
863 |
$defaults = array(
|
864 |
'pro' => false,
|
865 |
);
|
@@ -873,14 +869,14 @@ function dokan_get_template_part( $slug, $name = '', $args = array() ) {
|
|
873 |
$template = '';
|
874 |
|
875 |
// Look in yourtheme/dokan/slug-name.php and yourtheme/dokan/slug.php
|
876 |
-
$template = locate_template( array(
|
877 |
|
878 |
/**
|
879 |
* Change template directory path filter
|
880 |
*
|
881 |
* @since 2.5.3
|
882 |
*/
|
883 |
-
$template_path = apply_filters( 'dokan_set_template_path',
|
884 |
|
885 |
// Get default slug-name.php
|
886 |
if ( ! $template && $name && file_exists( $template_path . "/{$slug}-{$name}.php" ) ) {
|
@@ -945,14 +941,12 @@ function dokan_get_template( $template_name, $args = array(), $template_path = '
|
|
945 |
* @return string
|
946 |
*/
|
947 |
function dokan_locate_template( $template_name, $template_path = '', $default_path = '', $pro = false ) {
|
948 |
-
$dokan = WeDevs_Dokan::init();
|
949 |
-
|
950 |
if ( ! $template_path ) {
|
951 |
-
$template_path =
|
952 |
}
|
953 |
|
954 |
if ( ! $default_path ) {
|
955 |
-
$default_path =
|
956 |
}
|
957 |
|
958 |
// Look within passed path within the theme - this is priority
|
@@ -1194,13 +1188,7 @@ add_filter( 'ajax_query_attachments_args', 'dokan_media_uploader_restrict' );
|
|
1194 |
* @return array
|
1195 |
*/
|
1196 |
function dokan_get_store_info( $seller_id ) {
|
1197 |
-
|
1198 |
-
|
1199 |
-
if ( ! $vendor instanceof Dokan_Vendor_Manager ) {
|
1200 |
-
return null;
|
1201 |
-
}
|
1202 |
-
|
1203 |
-
return $vendor->get( $seller_id )->get_shop_info();
|
1204 |
}
|
1205 |
|
1206 |
/**
|
@@ -2813,7 +2801,7 @@ function dokan_cache_clear_deleted_product( $post_id ) {
|
|
2813 |
* @return float $earning | zero on failure or no price
|
2814 |
*/
|
2815 |
function dokan_get_earning_by_product( $product_id, $seller_id ) {
|
2816 |
-
wc_deprecated_function( 'dokan_get_earning_by_product', '2.9.21', '
|
2817 |
|
2818 |
return dokan()->commission->get_earning_by_product( $product_id );
|
2819 |
|
@@ -2893,7 +2881,7 @@ function dokan_get_vendor( $vendor_id = null ) {
|
|
2893 |
$vendor_id = wp_get_current_user();
|
2894 |
}
|
2895 |
|
2896 |
-
return
|
2897 |
}
|
2898 |
|
2899 |
/**
|
@@ -3451,6 +3439,8 @@ function dokan_is_store_listing() {
|
|
3451 |
function dokan_generate_username( $name = 'store' ) {
|
3452 |
static $i = 1;
|
3453 |
|
|
|
|
|
3454 |
if ( ! username_exists( $name ) ) {
|
3455 |
return $name;
|
3456 |
}
|
@@ -3744,3 +3734,42 @@ function dokan_redirect_to_admin_setup_wizard() {
|
|
3744 |
wp_safe_redirect( add_query_arg( array( 'page' => 'dokan-setup' ), admin_url( 'index.php' ) ) );
|
3745 |
exit;
|
3746 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Dokan Admin menu position
|
4 |
*
|
399 |
INNER JOIN {$wpdb->prefix}woocommerce_order_itemmeta oim2 ON oim2.order_item_id = oi.order_item_id
|
400 |
INNER JOIN $wpdb->posts p ON oi.order_id = p.ID
|
401 |
WHERE
|
402 |
+
oim.meta_key = %s AND
|
403 |
+
oim2.meta_key = %s
|
404 |
+
GROUP BY oi.order_id",
|
405 |
+
'_product_id',
|
406 |
+
'_line_total'
|
407 |
)
|
408 |
);
|
409 |
|
410 |
$table_name = $wpdb->prefix . 'dokan_orders';
|
411 |
|
412 |
+
$wpdb->query( "TRUNCATE TABLE $table_name" );
|
413 |
|
414 |
if ( $orders ) {
|
415 |
foreach ( $orders as $order ) {
|
416 |
+
$wc_order = wc_get_order( $order->order_id );
|
417 |
+
$admin_commission = dokan_get_admin_commission_by( $wc_order, $order->seller_id );
|
418 |
|
419 |
$wpdb->insert(
|
420 |
$table_name,
|
422 |
'order_id' => $order->order_id,
|
423 |
'seller_id' => $order->seller_id,
|
424 |
'order_total' => $order->order_total,
|
425 |
+
'net_amount' => $order->order_total - $admin_commission,
|
426 |
'order_status' => $order->order_status,
|
427 |
),
|
428 |
array(
|
433 |
'%s',
|
434 |
)
|
435 |
);
|
436 |
+
}
|
437 |
+
}
|
438 |
}
|
439 |
|
440 |
if ( ! function_exists( 'dokan_get_seller_earnings_by_order' ) ) {
|
856 |
* Looks at the theme directory first
|
857 |
*/
|
858 |
function dokan_get_template_part( $slug, $name = '', $args = array() ) {
|
|
|
|
|
859 |
$defaults = array(
|
860 |
'pro' => false,
|
861 |
);
|
869 |
$template = '';
|
870 |
|
871 |
// Look in yourtheme/dokan/slug-name.php and yourtheme/dokan/slug.php
|
872 |
+
$template = locate_template( array( dokan()->template_path() . "{$slug}-{$name}.php", dokan()->template_path() . "{$slug}.php" ) );
|
873 |
|
874 |
/**
|
875 |
* Change template directory path filter
|
876 |
*
|
877 |
* @since 2.5.3
|
878 |
*/
|
879 |
+
$template_path = apply_filters( 'dokan_set_template_path', dokan()->plugin_path() . '/templates', $template, $args );
|
880 |
|
881 |
// Get default slug-name.php
|
882 |
if ( ! $template && $name && file_exists( $template_path . "/{$slug}-{$name}.php" ) ) {
|
941 |
* @return string
|
942 |
*/
|
943 |
function dokan_locate_template( $template_name, $template_path = '', $default_path = '', $pro = false ) {
|
|
|
|
|
944 |
if ( ! $template_path ) {
|
945 |
+
$template_path = dokan()->template_path();
|
946 |
}
|
947 |
|
948 |
if ( ! $default_path ) {
|
949 |
+
$default_path = dokan()->plugin_path() . '/templates/';
|
950 |
}
|
951 |
|
952 |
// Look within passed path within the theme - this is priority
|
1188 |
* @return array
|
1189 |
*/
|
1190 |
function dokan_get_store_info( $seller_id ) {
|
1191 |
+
return dokan()->vendor->get( $seller_id )->get_shop_info();
|
|
|
|
|
|
|
|
|
|
|
|
|
1192 |
}
|
1193 |
|
1194 |
/**
|
2801 |
* @return float $earning | zero on failure or no price
|
2802 |
*/
|
2803 |
function dokan_get_earning_by_product( $product_id, $seller_id ) {
|
2804 |
+
wc_deprecated_function( 'dokan_get_earning_by_product', '2.9.21', 'dokan()->comission->get_earning_by_product()' );
|
2805 |
|
2806 |
return dokan()->commission->get_earning_by_product( $product_id );
|
2807 |
|
2881 |
$vendor_id = wp_get_current_user();
|
2882 |
}
|
2883 |
|
2884 |
+
return dokan()->vendor->get( $vendor_id );
|
2885 |
}
|
2886 |
|
2887 |
/**
|
3439 |
function dokan_generate_username( $name = 'store' ) {
|
3440 |
static $i = 1;
|
3441 |
|
3442 |
+
$name = implode( '', explode( ' ', $name ) );
|
3443 |
+
|
3444 |
if ( ! username_exists( $name ) ) {
|
3445 |
return $name;
|
3446 |
}
|
3734 |
wp_safe_redirect( add_query_arg( array( 'page' => 'dokan-setup' ), admin_url( 'index.php' ) ) );
|
3735 |
exit;
|
3736 |
}
|
3737 |
+
|
3738 |
+
/**
|
3739 |
+
* Dokan generate star ratings
|
3740 |
+
*
|
3741 |
+
* @since DOKAN_LITE_SINCE
|
3742 |
+
*
|
3743 |
+
* @param int $rating Number of rating point
|
3744 |
+
* @param int $starts Total number of stars
|
3745 |
+
*
|
3746 |
+
* @return string
|
3747 |
+
*/
|
3748 |
+
function dokan_generate_ratings( $rating, $stars ) {
|
3749 |
+
$result = '';
|
3750 |
+
|
3751 |
+
for ( $i = 1; $i <= $stars; $i++ ) {
|
3752 |
+
if ( $rating >= $i ) {
|
3753 |
+
$result .= "<i class='dashicons dashicons-star-filled'></i>";
|
3754 |
+
} else if ( $rating > ( $i - 1 ) && $rating < $i ) {
|
3755 |
+
$result .= "<i class='dashicons dashicons-star-half'></i>";
|
3756 |
+
} else {
|
3757 |
+
$result .= "<i class='dashicons dashicons-star-empty'></i>";
|
3758 |
+
}
|
3759 |
+
}
|
3760 |
+
|
3761 |
+
return apply_filters( 'dokan_generate_ratings', $result );
|
3762 |
+
}
|
3763 |
+
|
3764 |
+
/**
|
3765 |
+
* Check if current PHP version met the minimum requried PHP version for WooCommerce
|
3766 |
+
*
|
3767 |
+
* @since DOKAN_LITE_SINCE
|
3768 |
+
*
|
3769 |
+
* @param string $required_version
|
3770 |
+
*
|
3771 |
+
* @return bool
|
3772 |
+
*/
|
3773 |
+
function dokan_met_minimum_php_version_for_wc( $required_version = '7.0' ) {
|
3774 |
+
return apply_filters( 'dokan_met_minimum_php_version_for_wc', version_compare( PHP_VERSION, $required_version, '>=' ), $required_version );
|
3775 |
+
}
|
includes/template-tags.php
CHANGED
@@ -537,7 +537,7 @@ function dokan_store_category_menu( $seller_id, $title = '' ) {
|
|
537 |
'selected_cats' => ''
|
538 |
);
|
539 |
|
540 |
-
$walker = new
|
541 |
echo "<ul>";
|
542 |
echo call_user_func_array( array(&$walker, 'walk'), array($categories, 0, array()) ); //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
543 |
echo "</ul>";
|
537 |
'selected_cats' => ''
|
538 |
);
|
539 |
|
540 |
+
$walker = new \WeDevs\Dokan\Walkers\StoreCategory( $seller_id );
|
541 |
echo "<ul>";
|
542 |
echo call_user_func_array( array(&$walker, 'walk'), array($categories, 0, array()) ); //phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
543 |
echo "</ul>";
|
includes/theme-support/class-electro.php
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Electro Theme Support
|
5 |
-
*
|
6 |
-
* @see https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624?ref=wedevs
|
7 |
-
*
|
8 |
-
* @since 2.9.30
|
9 |
-
*/
|
10 |
-
class Dokan_Theme_Support_Electro {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The constructor
|
14 |
-
*/
|
15 |
-
function __construct() {
|
16 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'store_listing_style' ], 100 );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Reset store listing style
|
21 |
-
*
|
22 |
-
* @since 2.9.30
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
public function store_listing_style() {
|
27 |
-
if ( ! dokan_is_store_listing() ) {
|
28 |
-
return;
|
29 |
-
}
|
30 |
-
|
31 |
-
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 a {text-decoration: none}';
|
32 |
-
$style .= '#dokan-store-listing-filter-wrap .left .store-count {margin-bottom: 0}';
|
33 |
-
$style .= '#dokan-seller-listing-wrap .dokan-btn-theme.dokan-follow-store-button {border: 1px solid; padding: 7px 12px 7px 12px}';
|
34 |
-
|
35 |
-
// responsive
|
36 |
-
$style .= '@media (max-width: 414px) { #dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {margin: 0}';
|
37 |
-
$style .= '#dokan-store-listing-filter-wrap .right {margin-top: 15px}';
|
38 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 15px}';
|
39 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {padding: 8px 9px 8px 9px}';
|
40 |
-
$style .= '#dokan-store-listing-filter-form-wrap .apply-filter #cancel-filter-btn {border: 1px solid #ccc !important}';
|
41 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars a {padding: 0 !important}';
|
42 |
-
$style .= '}';
|
43 |
-
|
44 |
-
$style .= '@media (max-width: 375px) { ';
|
45 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) { padding-left: 6px}';
|
46 |
-
$style .= '}';
|
47 |
-
|
48 |
-
wp_add_inline_style( 'dokan-style', $style );
|
49 |
-
wp_enqueue_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', '', WC_VERSION, 'all' );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
return new Dokan_Theme_Support_Electro();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/theme-support/class-enfold.php
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Enfold Theme Support
|
5 |
-
*
|
6 |
-
* @see https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?ref=wedevs
|
7 |
-
*
|
8 |
-
* @since 2.9.30
|
9 |
-
*/
|
10 |
-
class Dokan_Theme_Support_Enfold {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The constructor
|
14 |
-
*/
|
15 |
-
function __construct() {
|
16 |
-
add_filter( 'avf_sidebar_position', '__return_false' );
|
17 |
-
add_filter( 'avia_layout_filter', [ $this, 'filter_layout_classes' ] );
|
18 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'store_listing_style' ], 100 );
|
19 |
-
add_filter( 'avf_enqueue_wp_mediaelement', '__return_true' );
|
20 |
-
}
|
21 |
-
|
22 |
-
public function filter_layout_classes( $classes ) {
|
23 |
-
if ( ! empty( $classes['current'] ) ) {
|
24 |
-
$classes['current'] = [ 'content' => 'av-content-full alpha', 'sidebar' => 'hidden', 'meta' => '','entry' => '', 'main' => '' ];
|
25 |
-
}
|
26 |
-
|
27 |
-
return $classes;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Reset store listing style
|
32 |
-
*
|
33 |
-
* @since 2.9.30
|
34 |
-
*
|
35 |
-
* @return void
|
36 |
-
*/
|
37 |
-
public function store_listing_style() {
|
38 |
-
if ( ! dokan_is_store_listing() ) {
|
39 |
-
return;
|
40 |
-
}
|
41 |
-
|
42 |
-
$style = '.container .av-content-full.units {border: 0}';
|
43 |
-
$style .= '.content .entry-content-wrapper {padding: 0}';
|
44 |
-
$style .= '#dokan-seller-listing-wrap .store-banner a {position: unset !important}';
|
45 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item select {width: 130px; display: inline-block; color: #000; font-size: 14px; border-radius: 3px; padding: 11px 20px}';
|
46 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item form.sort-by.item {display: inline-block}';
|
47 |
-
$style .= '#top form {margin-bottom: -15px}';
|
48 |
-
$style .= '#top label {font-weight: normal; font-size: 14px}';
|
49 |
-
$style .= '.template-page .entry-content-wrapper h2 a {text-transform: capitalize !important}';
|
50 |
-
|
51 |
-
// responsive
|
52 |
-
$style .= '@media (max-width: 414px) { #dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {margin: 0}';
|
53 |
-
$style .= '#dokan-store-listing-filter-wrap .right {margin-top: 15px}';
|
54 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 15px}';
|
55 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item .dokan-icons{top: 20%}';
|
56 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) {padding-left: 30px}';
|
57 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {padding: 11px 15px 10px 16px}';
|
58 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 238px !important}';
|
59 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -25px !important}';
|
60 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {width: 133px}';
|
61 |
-
$style .= '}';
|
62 |
-
|
63 |
-
$style .= '@media (max-width: 375px) { ';
|
64 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 14px}';
|
65 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) {padding-left: 27px}';
|
66 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {font-size: 13px; padding: 11px; width: 104px}';
|
67 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item .sort-by.item label {font-size: 13px !important}';
|
68 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 208px !important}';
|
69 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -19px !important}';
|
70 |
-
$style .= '}';
|
71 |
-
|
72 |
-
$style .= '@media (max-width: 360px) { ';
|
73 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) {padding-left: 12px}';
|
74 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {font-size: 13px; padding: 11px; width: 105px}';
|
75 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item .sort-by.item label {font-size: 13px !important}';
|
76 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 198px !important}';
|
77 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -15px !important}';
|
78 |
-
$style .= '}';
|
79 |
-
|
80 |
-
$style .= '@media (max-width: 320px) { ';
|
81 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 166px !important}';
|
82 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -8px !important}';
|
83 |
-
$style .= '}';
|
84 |
-
|
85 |
-
wp_add_inline_style( 'dokan-style', $style );
|
86 |
-
wp_dequeue_style( 'avia-woocommerce-css' );
|
87 |
-
wp_enqueue_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', '', WC_VERSION, 'all' );
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
return new Dokan_Theme_Support_Enfold();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/theme-support/class-rehub.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Rehub Theme Support
|
5 |
-
*
|
6 |
-
* @since 2.9.17
|
7 |
-
*/
|
8 |
-
class Dokan_Theme_Support_Rehub {
|
9 |
-
/**
|
10 |
-
* The constructor
|
11 |
-
*/
|
12 |
-
public function __construct() {
|
13 |
-
add_filter( 'dokan_load_hamburger_menu', [ $this, 'load_hamburger_menu'] );
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Remove hamburger menu
|
18 |
-
*
|
19 |
-
* @since 2.9.17
|
20 |
-
*
|
21 |
-
* @return boolean
|
22 |
-
*/
|
23 |
-
public function load_hamburger_menu() {
|
24 |
-
return false;
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
return new Dokan_Theme_Support_Rehub();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/theme-support/class-storefront.php
DELETED
@@ -1,100 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Storefront Theme Support
|
5 |
-
*
|
6 |
-
* @see https://woocommerce.com/storefront/
|
7 |
-
*
|
8 |
-
* @since 3.0
|
9 |
-
*/
|
10 |
-
class Dokan_Theme_Support_Storefront {
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The constructor
|
14 |
-
*/
|
15 |
-
function __construct() {
|
16 |
-
add_action( 'storefront_page_after', [ $this, 'remove_sidebar'], 5 );
|
17 |
-
add_filter( 'body_class', [ $this, 'full_width_page'] );
|
18 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'reset_style' ] );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Remove sidebar from store and dashboard page
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
public function remove_sidebar() {
|
27 |
-
if ( dokan_is_store_page() || dokan_is_seller_dashboard() ) {
|
28 |
-
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Makes the store and dashboard page full width
|
34 |
-
*
|
35 |
-
* @param array $classes
|
36 |
-
*
|
37 |
-
* @return array
|
38 |
-
*/
|
39 |
-
public function full_width_page( $classes ) {
|
40 |
-
|
41 |
-
if ( dokan_is_store_page() || dokan_is_seller_dashboard() ) {
|
42 |
-
|
43 |
-
if ( ! in_array( 'page-template-template-fullwidth-php', $classes ) ) {
|
44 |
-
$classes[] = 'page-template-template-fullwidth-php';
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
return $classes;
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Reset style
|
53 |
-
*
|
54 |
-
* @since 2.9.30
|
55 |
-
*
|
56 |
-
* @return void
|
57 |
-
*/
|
58 |
-
public function reset_style() {
|
59 |
-
if ( ! dokan_is_store_listing() ) {
|
60 |
-
return;
|
61 |
-
}
|
62 |
-
|
63 |
-
$style = '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 a {text-decoration: none}';
|
64 |
-
$style .= '#dokan-seller-listing-wrap .store-content .store-data-container .store-data h2 {font-size: 24px; margin: 20px 0 10px 0}';
|
65 |
-
$style .= '#dokan-store-listing-filter-form-wrap:before {top: -74px; height: 0}';
|
66 |
-
$style .= 'form.sort-by.item {margin-bottom: 0}';
|
67 |
-
$style .= '#dokan-store-listing-filter-wrap .left .store-count {margin-bottom: 0}';
|
68 |
-
$style .= '#dokan-seller-listing-wrap.list-view .dokan-seller-wrap .dokan-single-seller .store-wrapper .store-content .store-data-container .store-data .dokan-seller-rating[class] {font-size: 14px}';
|
69 |
-
|
70 |
-
// responsive
|
71 |
-
$style .= '@media (max-width: 414px) { #dokan-store-listing-filter-wrap .right .item .dokan-store-list-filter-button {margin: 0}';
|
72 |
-
$style .= '#dokan-store-listing-filter-wrap .right {margin-top: 15px}';
|
73 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 15px}';
|
74 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item #stores_orderby {padding: 8px 15px 8px 16px}';
|
75 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 252px !important}';
|
76 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -5px !important}';
|
77 |
-
$style .= '}';
|
78 |
-
|
79 |
-
$style .= '@media (max-width: 375px) { ';
|
80 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item {font-size: 14px}';
|
81 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) {padding-left: 27px}';
|
82 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 217px !important}';
|
83 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .store-ratings .stars {margin-left: -5px !important}';
|
84 |
-
$style .= '}';
|
85 |
-
|
86 |
-
$style .= '@media (max-width: 360px) { ';
|
87 |
-
$style .= '#dokan-store-listing-filter-wrap .right .item:not(:first-child) {padding-left: 12px}';
|
88 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 204px !important}';
|
89 |
-
$style .= '}';
|
90 |
-
|
91 |
-
$style .= '@media (max-width: 320px) { ';
|
92 |
-
$style .= '#dokan-store-listing-filter-form-wrap .store-lists-other-filter-wrap .item:not(.store-lists-category) label {width: 168px !important}';
|
93 |
-
$style .= '}';
|
94 |
-
|
95 |
-
wp_add_inline_style( 'dokan-style', $style );
|
96 |
-
wp_enqueue_style( 'woocommerce-general', WC()->plugin_url() . '/assets/css/woocommerce.css', '', WC_VERSION, 'all' );
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
return new Dokan_Theme_Support_Storefront();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-1.2.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
dokan_generate_sync_table();
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.1.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$dokan_installer = new Dokan_Installer();
|
4 |
-
$dokan_installer->create_announcement_table();
|
5 |
-
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.3.php
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Upgrade necessary meta for
|
5 |
-
* new product design
|
6 |
-
*
|
7 |
-
* @since 2.3
|
8 |
-
*
|
9 |
-
* @return void
|
10 |
-
*/
|
11 |
-
function upgrade_dokan_23() {
|
12 |
-
$args = array(
|
13 |
-
'post_type' => 'product',
|
14 |
-
'posts_per_page' => -1,
|
15 |
-
);
|
16 |
-
|
17 |
-
$product_query = new WP_Query( $args );
|
18 |
-
|
19 |
-
if ( $product_query->posts ) {
|
20 |
-
foreach ($product_query->posts as $post ) {
|
21 |
-
$product = wc_get_product( $post->ID );
|
22 |
-
|
23 |
-
if ( get_post_meta( $post->ID, '_product_attributes', true ) ) {
|
24 |
-
update_post_meta( $post->ID, '_has_attribute', 'yes' );
|
25 |
-
}
|
26 |
-
|
27 |
-
if ( $product->has_child() ) {
|
28 |
-
update_post_meta( $post->ID, '_create_variation', 'yes' );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
}
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Upgrade store meta for sellers
|
37 |
-
* and replace old address meta with new address meta
|
38 |
-
*
|
39 |
-
* @since 2.3
|
40 |
-
*
|
41 |
-
* @return void
|
42 |
-
*/
|
43 |
-
function upgrade_store_meta_23() {
|
44 |
-
|
45 |
-
$query = new WP_User_Query( array(
|
46 |
-
'role' => 'seller',
|
47 |
-
) );
|
48 |
-
$sellers = $query->get_results();
|
49 |
-
|
50 |
-
$default_settings = array(
|
51 |
-
'store_name' => '',
|
52 |
-
'location' => '',
|
53 |
-
'find_address' => '',
|
54 |
-
'banner' => '',
|
55 |
-
'phone' => '',
|
56 |
-
'show_email' => '',
|
57 |
-
'gravatar' => '',
|
58 |
-
'payment' => array(),
|
59 |
-
'social' => array()
|
60 |
-
);
|
61 |
-
|
62 |
-
foreach ( $sellers as $seller ) {
|
63 |
-
|
64 |
-
$current_settings = dokan_get_store_info( $seller->ID );
|
65 |
-
$current_settings = wp_parse_args($current_settings, $default_settings);
|
66 |
-
$old_address = $current_settings['address'];
|
67 |
-
|
68 |
-
$new_address = array(
|
69 |
-
'street_1' => $old_address,
|
70 |
-
'street_2' => '',
|
71 |
-
'city' => '',
|
72 |
-
'zip' => '',
|
73 |
-
'country' => '',
|
74 |
-
'state' => ''
|
75 |
-
);
|
76 |
-
|
77 |
-
$current_settings['address'] = $new_address;
|
78 |
-
update_user_meta( $seller->ID, 'dokan_profile_settings', $current_settings );
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
upgrade_dokan_23();
|
83 |
-
upgrade_store_meta_23();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.4.11.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Upgrade capabilities for sellers
|
4 |
-
*
|
5 |
-
* @since 2.4.11
|
6 |
-
*
|
7 |
-
* @return void
|
8 |
-
*/
|
9 |
-
function dokan_upgrade_seller_cap_2411() {
|
10 |
-
global $wp_roles;
|
11 |
-
$wp_roles->add_cap( 'seller', 'edit_shop_orders' );
|
12 |
-
}
|
13 |
-
dokan_upgrade_seller_cap_2411();
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Add new table for refund request
|
17 |
-
*
|
18 |
-
* @since 2.4.11
|
19 |
-
*
|
20 |
-
* @return void
|
21 |
-
*/
|
22 |
-
function create_refund_table() {
|
23 |
-
global $wpdb;
|
24 |
-
include_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
25 |
-
$sql = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}dokan_refund` (
|
26 |
-
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
27 |
-
`order_id` bigint(20) unsigned NOT NULL,
|
28 |
-
`seller_id` bigint(20) NOT NULL,
|
29 |
-
`refund_amount` float(11) NOT NULL,
|
30 |
-
`refund_reason` text NULL,
|
31 |
-
`item_qtys` varchar(50) NULL,
|
32 |
-
`item_totals` varchar(50) NULL,
|
33 |
-
`item_tax_totals` varchar(50) NULL,
|
34 |
-
`restock_items` varchar(10) NULL,
|
35 |
-
`date` timestamp NOT NULL,
|
36 |
-
`status` int(1) NOT NULL,
|
37 |
-
`method` varchar(30) NOT NULL,
|
38 |
-
PRIMARY KEY (id)
|
39 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
|
40 |
-
|
41 |
-
dbDelta( $sql );
|
42 |
-
}
|
43 |
-
|
44 |
-
create_refund_table();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.4.12.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Upgrade meta for sellers
|
4 |
-
*
|
5 |
-
* @since 2.4.12
|
6 |
-
*
|
7 |
-
* @return void
|
8 |
-
*/
|
9 |
-
function upgrade_sseller_meta_2412() {
|
10 |
-
|
11 |
-
$query = new WP_User_Query( array(
|
12 |
-
'role' => 'seller',
|
13 |
-
) );
|
14 |
-
$sellers = $query->get_results();
|
15 |
-
|
16 |
-
foreach ( $sellers as $seller ) {
|
17 |
-
|
18 |
-
$store_info = dokan_get_store_info( $seller->ID );
|
19 |
-
update_user_meta( $seller->ID, 'dokan_store_name', esc_html( $store_info['store_name'] ) );
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
upgrade_sseller_meta_2412();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.5.7.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function dokan_remove_notice_meta_257() {
|
4 |
-
delete_option( 'dokan_4th_yr_aniv_44_perc_discount_tracking_notice' );
|
5 |
-
}
|
6 |
-
|
7 |
-
dokan_remove_notice_meta_257();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.6.9.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function dokan_update_user_cap_269() {
|
4 |
-
$role = get_role( 'seller' );
|
5 |
-
$role->add_cap( 'edit_product' );
|
6 |
-
}
|
7 |
-
|
8 |
-
function dokan_replace_seller_commission() {
|
9 |
-
$seller_percentage = dokan_get_seller_percentage();
|
10 |
-
$options = get_option( 'dokan_selling' );
|
11 |
-
$options['admin_percentage'] = 100 - (float) $seller_percentage;
|
12 |
-
update_option( 'dokan_selling', $options );
|
13 |
-
}
|
14 |
-
|
15 |
-
function dokan_replace_seller_commission_by_seller() {
|
16 |
-
$args = array(
|
17 |
-
'role' => 'seller',
|
18 |
-
'meta_query' => array(
|
19 |
-
array(
|
20 |
-
'key' => 'dokan_seller_percentage',
|
21 |
-
'value' => '',
|
22 |
-
'compare' => '!='
|
23 |
-
)
|
24 |
-
)
|
25 |
-
);
|
26 |
-
|
27 |
-
$user_query = new WP_User_Query( $args );
|
28 |
-
$sellers = $user_query->get_results();
|
29 |
-
foreach ( $sellers as $s ) {
|
30 |
-
$seller_percentage = get_user_meta( $s->ID, 'dokan_seller_percentage', true );
|
31 |
-
$admin_percentage = 100 - (int) $seller_percentage;
|
32 |
-
update_user_meta( $s->ID, 'dokan_admin_percentage', $admin_percentage );
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
function dokan_replace_product_commissions() {
|
37 |
-
$args = array(
|
38 |
-
'post_type' => 'product',
|
39 |
-
'meta_query' => array(
|
40 |
-
array(
|
41 |
-
'key' => '_per_product_commission',
|
42 |
-
'value' => '',
|
43 |
-
'compare' => '!='
|
44 |
-
)
|
45 |
-
)
|
46 |
-
);
|
47 |
-
|
48 |
-
$query = new WP_Query( $args );
|
49 |
-
$products = $query->get_posts();
|
50 |
-
|
51 |
-
foreach ( $products as $p ) {
|
52 |
-
$seller_commission = get_post_meta( $p->ID, '_per_product_commission' );
|
53 |
-
$admin_commission = 100 - (float) $seller_commission;
|
54 |
-
update_post_meta( $p->ID, '_per_product_admin_commission', $admin_commission );
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
function dokan_replace_category_commission_meta() {
|
59 |
-
$args = array(
|
60 |
-
'taxonomy' => 'product_cat',
|
61 |
-
'hide_empty' => true,
|
62 |
-
'meta_key' => 'per_category_commission'
|
63 |
-
);
|
64 |
-
|
65 |
-
$the_query = new WP_Term_Query( $args );
|
66 |
-
$terms = $the_query->get_terms();
|
67 |
-
|
68 |
-
foreach ( $terms as $t ) {
|
69 |
-
$admin_commission = 100 - (int) get_term_meta( $t->term_id, 'per_category_commission', true );
|
70 |
-
update_term_meta( $t->term_id, 'per_category_admin_commission', $admin_commission );
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
dokan_update_user_cap_269();
|
75 |
-
dokan_replace_seller_commission();
|
76 |
-
dokan_replace_seller_commission_by_seller();
|
77 |
-
dokan_replace_product_commissions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.7.3.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Save admin fee as meta for existing sub-orders
|
4 |
-
*/
|
5 |
-
function dokan_update_order_meta_273(){
|
6 |
-
$args = array(
|
7 |
-
'post_type' => 'shop_order',
|
8 |
-
'posts_per_page' => -1,
|
9 |
-
'post_status' => 'any',
|
10 |
-
'meta_query' => array(
|
11 |
-
array(
|
12 |
-
'key' => 'has_sub_order',
|
13 |
-
'compare' => 'NOT EXISTS',
|
14 |
-
),
|
15 |
-
array(
|
16 |
-
'key' => '_dokan_admin_fee',
|
17 |
-
'compare' => 'NOT EXISTS',
|
18 |
-
),
|
19 |
-
)
|
20 |
-
);
|
21 |
-
|
22 |
-
$query = new WP_Query( $args );
|
23 |
-
|
24 |
-
foreach ( $query->posts as $sub_order ) {
|
25 |
-
$order = wc_get_order( $sub_order->ID );
|
26 |
-
$admin_fee = dokan_get_admin_commission_by( $order, dokan_get_seller_id_by_order( $sub_order->ID ) );
|
27 |
-
update_post_meta( $sub_order->ID , '_dokan_admin_fee', $admin_fee );
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Modify column structure to support upto 4 decimals
|
33 |
-
*/
|
34 |
-
function dokan_update_table_structure_273(){
|
35 |
-
global $wpdb;
|
36 |
-
|
37 |
-
$wpdb->query(
|
38 |
-
"ALTER TABLE `{$wpdb->prefix}dokan_orders`
|
39 |
-
MODIFY COLUMN order_total float(11,4)"
|
40 |
-
);
|
41 |
-
|
42 |
-
$wpdb->query(
|
43 |
-
"ALTER TABLE `{$wpdb->prefix}dokan_orders`
|
44 |
-
MODIFY COLUMN net_amount float(11,4)"
|
45 |
-
);
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Update seller capabilities
|
51 |
-
*
|
52 |
-
* @since 2.7.3
|
53 |
-
*
|
54 |
-
* @return void
|
55 |
-
*/
|
56 |
-
function dokan_update_user_capabilities_273() {
|
57 |
-
global $wp_roles;
|
58 |
-
|
59 |
-
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
60 |
-
$wp_roles = new WP_Roles();
|
61 |
-
}
|
62 |
-
|
63 |
-
$capabilities = array();
|
64 |
-
$all_cap = dokan_get_all_caps();
|
65 |
-
|
66 |
-
foreach( $all_cap as $key=>$cap ) {
|
67 |
-
$capabilities = array_merge( $capabilities, array_keys( $cap ) );
|
68 |
-
}
|
69 |
-
|
70 |
-
foreach ( $capabilities as $key => $capability ) {
|
71 |
-
$wp_roles->add_cap( 'seller', $capability );
|
72 |
-
$wp_roles->add_cap( 'administrator', $capability );
|
73 |
-
$wp_roles->add_cap( 'shop_manager', $capability );
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
dokan_update_table_structure_273();
|
79 |
-
dokan_update_order_meta_273();
|
80 |
-
dokan_update_user_capabilities_273();
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.7.6.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Modify ip column to support the max possible length of IPv6
|
4 |
-
*/
|
5 |
-
function dokan_update_table_structure_276(){
|
6 |
-
global $wpdb;
|
7 |
-
|
8 |
-
$wpdb->query(
|
9 |
-
"ALTER TABLE `{$wpdb->prefix}dokan_withdraw`
|
10 |
-
MODIFY COLUMN ip varchar(50) NOT NULL"
|
11 |
-
);
|
12 |
-
}
|
13 |
-
|
14 |
-
function dokan_update_user_capabilities_276() {
|
15 |
-
global $wp_roles;
|
16 |
-
|
17 |
-
if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {
|
18 |
-
$wp_roles = new WP_Roles();
|
19 |
-
}
|
20 |
-
|
21 |
-
$caps = array(
|
22 |
-
'publish_posts' => true,
|
23 |
-
'edit_posts' => true,
|
24 |
-
'delete_published_posts' => true,
|
25 |
-
'edit_published_posts' => true,
|
26 |
-
'delete_posts' => true,
|
27 |
-
'manage_categories' => true,
|
28 |
-
'moderate_comments' => true,
|
29 |
-
'unfiltered_html' => true,
|
30 |
-
'upload_files' => true,
|
31 |
-
'edit_shop_orders' => true,
|
32 |
-
'edit_product' => true,
|
33 |
-
'read_product' => true,
|
34 |
-
'delete_product' => true,
|
35 |
-
'edit_products' => true,
|
36 |
-
'publish_products' => true,
|
37 |
-
'read_private_products' => true,
|
38 |
-
'delete_products' => true,
|
39 |
-
'delete_products' => true,
|
40 |
-
'delete_private_products' => true,
|
41 |
-
'delete_published_products' => true,
|
42 |
-
'delete_published_products' => true,
|
43 |
-
'edit_private_products' => true,
|
44 |
-
'edit_published_products' => true,
|
45 |
-
'manage_product_terms' => true,
|
46 |
-
'delete_product_terms' => true,
|
47 |
-
'assign_product_terms' => true,
|
48 |
-
);
|
49 |
-
|
50 |
-
foreach ( $caps as $cap => $val ) {
|
51 |
-
$wp_roles->add_cap( 'seller', $cap );
|
52 |
-
}
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
dokan_update_table_structure_276();
|
58 |
-
dokan_update_user_capabilities_276();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.8.0.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Remove product_style option from database
|
4 |
-
*/
|
5 |
-
|
6 |
-
function dokan_remove_product_style_option() {
|
7 |
-
delete_option( 'product_style' );
|
8 |
-
}
|
9 |
-
|
10 |
-
dokan_remove_product_style_option();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.8.3.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Add new table for vendor-balance
|
4 |
-
*
|
5 |
-
* @since 2.8.3
|
6 |
-
*
|
7 |
-
* @return void
|
8 |
-
*/
|
9 |
-
function create_vendor_balance_table_283() {
|
10 |
-
$processor_file = DOKAN_INC_DIR . '/upgrades/background-processes/class_dokan_update_2_8_3_vendor_balance.php';
|
11 |
-
|
12 |
-
include_once $processor_file;
|
13 |
-
|
14 |
-
$processor = new Dokan_Update_2_8_3_Vendor_Balance();
|
15 |
-
|
16 |
-
$args = array(
|
17 |
-
'updating' => 'vendor_balance_table',
|
18 |
-
);
|
19 |
-
|
20 |
-
$processor->push_to_queue( $args )->dispatch_process( $processor_file );
|
21 |
-
}
|
22 |
-
|
23 |
-
create_vendor_balance_table_283();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.8.6.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Update extra fee recipient settings
|
5 |
-
*
|
6 |
-
* @since 2.8.6
|
7 |
-
*
|
8 |
-
* @return void
|
9 |
-
*/
|
10 |
-
function dokan_update_2_8_6_fees_recipient() {
|
11 |
-
|
12 |
-
$options = get_option( 'dokan_general', array() );
|
13 |
-
$options['shipping_fee_recipient'] = ! empty( $options['extra_fee_recipient'] ) ? $options['extra_fee_recipient'] : 'seller';
|
14 |
-
$options['tax_fee_recipient'] = ! empty( $options['extra_fee_recipient'] ) ? $options['extra_fee_recipient'] : 'seller';
|
15 |
-
|
16 |
-
update_option( 'dokan_general', $options );
|
17 |
-
}
|
18 |
-
|
19 |
-
dokan_update_2_8_6_fees_recipient();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.9.13.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Update single product multi vendor module table
|
5 |
-
*
|
6 |
-
* @return void
|
7 |
-
*/
|
8 |
-
function dokan_update_spmv_product_map_table_2_9_13() {
|
9 |
-
global $wpdb;
|
10 |
-
|
11 |
-
$map_table = $wpdb->prefix . 'dokan_product_map';
|
12 |
-
|
13 |
-
if ( $wpdb->get_var( $wpdb->prepare("show tables like %s", $map_table ) ) !== $map_table ) {
|
14 |
-
return;
|
15 |
-
}
|
16 |
-
|
17 |
-
$columns = $wpdb->get_results( "describe {$wpdb->prefix}dokan_product_map" );
|
18 |
-
|
19 |
-
$columns = array_filter( $columns, function ( $column ) {
|
20 |
-
return 'visibility' === $column->Field;
|
21 |
-
} );
|
22 |
-
|
23 |
-
if ( empty( $columns ) ) {
|
24 |
-
$wpdb->query(
|
25 |
-
$wpdb->prepare( "alter table `{$wpdb->prefix}dokan_product_map` add column visibility tinyint(1) default %d", 1 )
|
26 |
-
);
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
dokan_update_spmv_product_map_table_2_9_13();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.9.16.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Update update store settings
|
5 |
-
*
|
6 |
-
* @since 2.9.16
|
7 |
-
*
|
8 |
-
* @return void
|
9 |
-
*/
|
10 |
-
function dokan_update_store_settings() {
|
11 |
-
$processor_file = DOKAN_INC_DIR . '/upgrades/background-processes/class_dokan_update_2_9_16_store_settings.php';
|
12 |
-
|
13 |
-
include_once $processor_file;
|
14 |
-
|
15 |
-
$processor = new Dokan_Update_2_9_16_Store_Settings();
|
16 |
-
|
17 |
-
$args = array(
|
18 |
-
'updating' => 'store_settings',
|
19 |
-
'paged' => 0
|
20 |
-
);
|
21 |
-
|
22 |
-
$processor->push_to_queue( $args )->dispatch_process( $processor_file );
|
23 |
-
}
|
24 |
-
|
25 |
-
dokan_update_store_settings();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.9.19.php
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function dokan_update_admin_settings_next() {
|
4 |
-
$field_map = array(
|
5 |
-
'dokan_general' => array(
|
6 |
-
'shipping_fee_recipient' => array( 'shipping_fee_recipient', 'dokan_selling' ),
|
7 |
-
'tax_fee_recipient' => array( 'tax_fee_recipient', 'dokan_selling' ),
|
8 |
-
'store_open_close' => array( 'store_open_close', 'dokan_appearance' ),
|
9 |
-
'store_map' => array( 'store_map', 'dokan_appearance' ),
|
10 |
-
'gmap_api_key' => array( 'gmap_api_key', 'dokan_appearance' ),
|
11 |
-
'contact_seller' => array( 'contact_seller', 'dokan_appearance' ),
|
12 |
-
'enable_theme_store_sidebar' => array( 'enable_theme_store_sidebar', 'dokan_appearance' ),
|
13 |
-
'seller_review_manage' => array( 'seller_review_manage', 'dokan_selling' ),
|
14 |
-
'store_banner_width' => array( 'store_banner_width', 'dokan_appearance' ),
|
15 |
-
'store_banner_height' => array( 'store_banner_height', 'dokan_appearance' ),
|
16 |
-
),
|
17 |
-
'dokan_appearance' => array(
|
18 |
-
'setup_wizard_logo_url' => array( 'setup_wizard_logo_url', 'dokan_general' ),
|
19 |
-
),
|
20 |
-
'dokan_selling' => array(
|
21 |
-
'enable_shipstation_logging' => array( 'enable_shipstation_logging', 'dokan_general' ),
|
22 |
-
),
|
23 |
-
);
|
24 |
-
|
25 |
-
$options_to_save = array();
|
26 |
-
|
27 |
-
foreach ( $field_map as $old_section => $map ) {
|
28 |
-
$old_settings = get_option( $old_section, array() );
|
29 |
-
|
30 |
-
foreach ( $map as $old_option => $rearranged_option ) {
|
31 |
-
if ( isset( $old_settings[ $old_option ] ) ) {
|
32 |
-
$new_option_option = $rearranged_option[0];
|
33 |
-
$new_section = $rearranged_option[1];
|
34 |
-
|
35 |
-
if ( ! isset( $options_to_save[ $old_section ] ) ) {
|
36 |
-
$options_to_save[ $old_section ] = $old_settings;
|
37 |
-
}
|
38 |
-
|
39 |
-
if ( ! isset( $options_to_save[ $new_section ] ) ) {
|
40 |
-
$options_to_save[ $new_section ] = get_option( $new_section, array() );
|
41 |
-
}
|
42 |
-
|
43 |
-
$options_to_save[ $new_section ][ $new_option_option ] = $old_settings[ $old_option ];
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
foreach ( $options_to_save as $section => $value ) {
|
49 |
-
update_option( $section, $value );
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
dokan_update_admin_settings_next();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.9.23.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Update update store settings
|
5 |
-
*
|
6 |
-
* @since 2.9.23
|
7 |
-
*
|
8 |
-
* @return void
|
9 |
-
*/
|
10 |
-
function dokan_update_store_name() {
|
11 |
-
$processor_file = DOKAN_INC_DIR . '/upgrades/background-processes/class_dokan_update_2_9_23_store_name.php';
|
12 |
-
|
13 |
-
include_once $processor_file;
|
14 |
-
|
15 |
-
$processor = new Dokan_Update_2_9_23_Store_Name();
|
16 |
-
|
17 |
-
$args = array(
|
18 |
-
'updating' => 'store_name',
|
19 |
-
'paged' => 0
|
20 |
-
);
|
21 |
-
|
22 |
-
$processor->push_to_queue( $args )->dispatch_process( $processor_file );
|
23 |
-
}
|
24 |
-
|
25 |
-
dokan_update_store_name();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/upgrades/dokan-upgrade-2.9.4.php
DELETED
@@ -1,53 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Update post_author id for shop_orders
|
5 |
-
*
|
6 |
-
* @since 2.9.4
|
7 |
-
*
|
8 |
-
* @return void
|
9 |
-
*/
|
10 |
-
function dokan_update_shop_order_post_author() {
|
11 |
-
$processor_file = DOKAN_INC_DIR . '/upgrades/background-processes/class_dokan_update_2_9_4_order_post_author.php';
|
12 |
-
|
13 |
-
include_once $processor_file;
|
14 |
-
|
15 |
-
$processor = new Dokan_Update_2_9_4_Order_Post_Author();
|
16 |
-
|
17 |
-
$args = array(
|
18 |
-
'updating' => 'shop_order_post_author',
|
19 |
-
'paged' => 0
|
20 |
-
);
|
21 |
-
|
22 |
-
$processor->push_to_queue( $args )->dispatch_process( $processor_file );
|
23 |
-
}
|
24 |
-
|
25 |
-
dokan_update_shop_order_post_author();
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Update refund table structure
|
29 |
-
*
|
30 |
-
* @return void
|
31 |
-
*/
|
32 |
-
function dokan_update_refund_table_2_9_4() {
|
33 |
-
global $wpdb;
|
34 |
-
|
35 |
-
$table_name = $wpdb->prefix . 'dokan_refund';
|
36 |
-
|
37 |
-
if ( $wpdb->get_var( $wpdb->prepare("SHOW TABLES LIKE %s", $table_name ) ) !== $table_name ) {
|
38 |
-
return;
|
39 |
-
}
|
40 |
-
|
41 |
-
$columns = array( 'item_qtys', 'item_totals', 'item_tax_totals' );
|
42 |
-
|
43 |
-
foreach ( $columns as $column ) {
|
44 |
-
$wpdb->query(
|
45 |
-
$wpdb->prepare(
|
46 |
-
"ALTER TABLE `{$wpdb->prefix}dokan_refund`
|
47 |
-
MODIFY COLUMN %s varchar(200)", $column
|
48 |
-
)
|
49 |
-
);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
dokan_update_refund_table_2_9_4();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/dokan-lite.php
CHANGED
@@ -125,4 +125,13 @@ return [
|
|
125 |
__( 'Withdraw Requests', 'dokan-lite' ),
|
126 |
__( 'Update Note', 'dokan-lite' ),
|
127 |
__( 'Cancelled <span class=\'count\'>(%s)</span>', 'dokan-lite' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
];
|
125 |
__( 'Withdraw Requests', 'dokan-lite' ),
|
126 |
__( 'Update Note', 'dokan-lite' ),
|
127 |
__( 'Cancelled <span class=\'count\'>(%s)</span>', 'dokan-lite' ),
|
128 |
+
__( 'Dokan Logo', 'dokan-lite' ),
|
129 |
+
__( 'Dokan Data Update Required', 'dokan-lite' ),
|
130 |
+
__( 'We need to update your install to the latest version', 'dokan-lite' ),
|
131 |
+
__( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'dokan-lite' ),
|
132 |
+
__( 'Update', 'dokan-lite' ),
|
133 |
+
__( 'Yes, Update Now', 'dokan-lite' ),
|
134 |
+
__( 'No, Cancel', 'dokan-lite' ),
|
135 |
+
__( 'Dokan Data Updated Successfully!', 'dokan-lite' ),
|
136 |
+
__( 'All data updated successfully. Thank you for using Dokan.', 'dokan-lite' ),
|
137 |
];
|
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
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -39,4243 +39,4381 @@ msgstr ""
|
|
39 |
msgid "1233456789"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#:
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
msgid "Available"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#:
|
50 |
-
|
51 |
-
#: src/admin/pages/VendorAccountFields.vue:319
|
52 |
-
msgid "Not Available"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#:
|
56 |
-
#: includes/
|
57 |
-
#:
|
58 |
-
#:
|
59 |
-
msgid "
|
60 |
msgstr ""
|
61 |
|
62 |
-
#:
|
63 |
-
msgid "
|
64 |
msgstr ""
|
65 |
|
66 |
-
#:
|
67 |
-
msgid "
|
|
|
|
|
68 |
msgstr ""
|
69 |
|
70 |
-
#:
|
71 |
-
msgid "
|
72 |
msgstr ""
|
73 |
|
74 |
-
#:
|
75 |
-
msgid "
|
76 |
msgstr ""
|
77 |
|
78 |
-
#:
|
79 |
-
msgid "
|
80 |
msgstr ""
|
81 |
|
82 |
-
#:
|
83 |
-
|
|
|
84 |
msgstr ""
|
85 |
|
86 |
-
#:
|
87 |
-
|
|
|
|
|
88 |
msgstr ""
|
89 |
|
90 |
-
#:
|
91 |
-
|
|
|
|
|
|
|
92 |
msgstr ""
|
93 |
|
94 |
-
#:
|
95 |
-
#:
|
96 |
-
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
-
#:
|
100 |
-
|
|
|
101 |
msgstr ""
|
102 |
|
103 |
-
#:
|
104 |
-
msgid "
|
105 |
msgstr ""
|
106 |
|
107 |
-
|
108 |
-
msgid "
|
109 |
msgstr ""
|
110 |
|
111 |
-
#:
|
112 |
-
|
|
|
|
|
113 |
msgstr ""
|
114 |
|
115 |
-
#:
|
116 |
-
#:
|
117 |
-
#: templates/
|
118 |
-
|
119 |
-
msgid "Phone Number"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#:
|
123 |
-
msgid "
|
124 |
msgstr ""
|
125 |
|
126 |
-
#:
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
128 |
msgstr ""
|
129 |
|
130 |
-
#:
|
131 |
-
msgid "
|
132 |
msgstr ""
|
133 |
|
134 |
-
#:
|
135 |
-
msgid "
|
136 |
msgstr ""
|
137 |
|
138 |
-
#:
|
139 |
-
msgid "
|
140 |
msgstr ""
|
141 |
|
142 |
-
#:
|
143 |
-
msgid "
|
144 |
msgstr ""
|
145 |
|
146 |
-
#:
|
147 |
-
msgid "
|
148 |
msgstr ""
|
149 |
|
150 |
-
#:
|
151 |
-
|
152 |
-
msgid "Routing Number"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#:
|
156 |
-
msgid "
|
157 |
msgstr ""
|
158 |
|
159 |
-
#:
|
160 |
-
msgid "
|
161 |
msgstr ""
|
162 |
|
163 |
-
#:
|
164 |
-
msgid "
|
165 |
msgstr ""
|
166 |
|
167 |
-
#:
|
168 |
-
msgid "
|
169 |
msgstr ""
|
170 |
|
171 |
-
#:
|
172 |
-
msgid "
|
173 |
msgstr ""
|
174 |
|
175 |
-
#:
|
176 |
-
msgid "
|
|
|
|
|
177 |
msgstr ""
|
178 |
|
179 |
-
#:
|
180 |
-
|
|
|
|
|
181 |
msgstr ""
|
182 |
|
183 |
-
#:
|
184 |
-
msgid "
|
185 |
msgstr ""
|
186 |
|
187 |
-
#:
|
188 |
-
msgid "
|
189 |
msgstr ""
|
190 |
|
191 |
-
#:
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#:
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
-
#:
|
200 |
-
msgid "
|
201 |
msgstr ""
|
202 |
|
203 |
-
#:
|
204 |
-
msgid "
|
205 |
msgstr ""
|
206 |
|
207 |
-
#:
|
208 |
-
msgid "
|
209 |
msgstr ""
|
210 |
|
211 |
-
#:
|
212 |
-
msgid "
|
213 |
msgstr ""
|
214 |
|
215 |
-
#:
|
216 |
-
|
217 |
-
msgid "You have no permission to do this action"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#:
|
221 |
-
|
222 |
-
#: lib/promotions.php:190
|
223 |
-
msgid "Invalid nonce"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#:
|
227 |
-
msgid "
|
228 |
msgstr ""
|
229 |
|
230 |
-
#:
|
231 |
-
|
232 |
-
#: classes/template-settings.php:261 classes/template-settings.php:298
|
233 |
-
#: classes/template-settings.php:364 classes/template-settings.php:405
|
234 |
-
#: classes/template-settings.php:455 classes/template-withdraw.php:206
|
235 |
-
#: classes/template-withdraw.php:239
|
236 |
-
msgid "Are you cheating?"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#:
|
240 |
-
msgid "
|
241 |
msgstr ""
|
242 |
|
243 |
-
#:
|
244 |
-
msgid "
|
|
|
|
|
245 |
msgstr ""
|
246 |
|
247 |
-
#:
|
248 |
-
msgid "
|
249 |
msgstr ""
|
250 |
|
251 |
-
#:
|
252 |
-
msgid "
|
|
|
|
|
253 |
msgstr ""
|
254 |
|
255 |
-
#:
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
-
#:
|
260 |
-
msgid "
|
|
|
|
|
261 |
msgstr ""
|
262 |
|
263 |
-
#:
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#:
|
268 |
-
msgid "
|
|
|
|
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
-
#:
|
272 |
-
msgid "
|
273 |
msgstr ""
|
274 |
|
275 |
-
#:
|
276 |
-
msgid "
|
|
|
|
|
277 |
msgstr ""
|
278 |
|
279 |
-
#:
|
280 |
-
msgid "
|
281 |
msgstr ""
|
282 |
|
283 |
-
#:
|
284 |
-
msgid "
|
|
|
|
|
|
|
285 |
msgstr ""
|
286 |
|
287 |
-
#:
|
288 |
-
msgid "
|
289 |
msgstr ""
|
290 |
|
291 |
-
#:
|
292 |
-
msgid "
|
|
|
|
|
|
|
293 |
msgstr ""
|
294 |
|
295 |
-
#:
|
296 |
-
msgid "
|
297 |
msgstr ""
|
298 |
|
299 |
-
#:
|
300 |
-
|
301 |
-
msgid "%1$s (#%2$s – %3$s)"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#:
|
305 |
-
msgid "
|
306 |
msgstr ""
|
307 |
|
308 |
-
#:
|
309 |
-
msgid "
|
310 |
msgstr ""
|
311 |
|
312 |
-
#:
|
313 |
-
msgid "
|
314 |
msgstr ""
|
315 |
|
316 |
-
#:
|
317 |
-
|
318 |
-
#: includes/admin-functions.php:44 includes/admin-functions.php:50
|
319 |
-
#: includes/admin-functions.php:685 includes/admin-functions.php:709
|
320 |
-
#: includes/wc-template.php:17 includes/wc-template.php:150
|
321 |
-
#: includes/wc-template.php:292 templates/my-orders.php:31
|
322 |
-
msgid "Vendor"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#:
|
326 |
-
|
327 |
-
#: includes/template-tags.php:323 src/admin/pages/Dashboard.vue:3
|
328 |
-
msgid "Dashboard"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#:
|
332 |
-
msgid "
|
333 |
msgstr ""
|
334 |
|
335 |
-
#:
|
336 |
-
|
337 |
-
msgid "My Orders"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#:
|
341 |
-
msgid "
|
342 |
msgstr ""
|
343 |
|
344 |
-
#:
|
345 |
-
|
346 |
-
msgid "Store"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#:
|
350 |
-
#:
|
351 |
-
msgid "
|
352 |
msgstr ""
|
353 |
|
354 |
-
#:
|
355 |
-
msgid "
|
356 |
msgstr ""
|
357 |
|
358 |
-
#:
|
359 |
-
msgid "Vendor
|
360 |
msgstr ""
|
361 |
|
362 |
-
#:
|
363 |
-
msgid "
|
|
|
|
|
364 |
msgstr ""
|
365 |
|
366 |
-
#:
|
367 |
-
msgid "Welcome
|
368 |
msgstr ""
|
369 |
|
370 |
-
#:
|
371 |
-
msgid ""
|
372 |
-
"Thank you for choosing The Marketplace to power your online store! This "
|
373 |
-
"quick setup wizard will help you configure the basic settings. <strong>It’s "
|
374 |
-
"completely optional and shouldn’t take longer than two minutes.</strong>"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#:
|
378 |
-
msgid ""
|
379 |
-
"No time right now? If you don’t want to go through the wizard, you can skip "
|
380 |
-
"and return to the Store!"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#:
|
384 |
-
|
385 |
-
msgid "Let's Go!"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#:
|
389 |
-
msgid "
|
390 |
msgstr ""
|
391 |
|
392 |
-
#:
|
393 |
-
|
394 |
-
msgid "Store Setup"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#:
|
398 |
-
msgid "
|
399 |
msgstr ""
|
400 |
|
401 |
-
#:
|
402 |
-
msgid "
|
403 |
msgstr ""
|
404 |
|
405 |
-
#:
|
406 |
-
#: src/admin/pages/
|
407 |
-
#:
|
408 |
-
|
409 |
-
msgid "Street 2"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#:
|
413 |
-
|
414 |
-
#: src/admin/pages/VendorAddressFields.vue:22
|
415 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:51
|
416 |
-
#: templates/settings/address-form.php:57
|
417 |
-
msgid "City"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#:
|
421 |
-
|
|
|
422 |
msgstr ""
|
423 |
|
424 |
-
#:
|
425 |
-
|
426 |
-
#: src/admin/pages/VendorAddressFields.vue:38
|
427 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:58
|
428 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:59
|
429 |
-
msgid "State"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#:
|
433 |
-
|
|
|
434 |
msgstr ""
|
435 |
|
436 |
-
#:
|
437 |
-
#:
|
438 |
-
|
439 |
-
msgid "Email"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#:
|
443 |
-
msgid "
|
444 |
msgstr ""
|
445 |
|
446 |
-
#:
|
447 |
-
|
448 |
-
#: includes/admin/setup-wizard.php:521 includes/admin/setup-wizard.php:573
|
449 |
-
#: templates/admin-setup-wizard/step-selling.php:53
|
450 |
-
#: templates/admin-setup-wizard/step-store.php:77
|
451 |
-
msgid "Continue"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#:
|
455 |
-
|
456 |
-
#: templates/admin-setup-wizard/step-selling.php:54
|
457 |
-
#: templates/admin-setup-wizard/step-store.php:78
|
458 |
-
msgid "Skip this step"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#:
|
462 |
-
msgid "
|
463 |
msgstr ""
|
464 |
|
465 |
-
#:
|
466 |
-
msgid "
|
467 |
msgstr ""
|
468 |
|
469 |
-
#:
|
470 |
-
msgid "
|
471 |
msgstr ""
|
472 |
|
473 |
-
#:
|
474 |
-
|
|
|
475 |
msgstr ""
|
476 |
|
477 |
-
#:
|
478 |
-
|
479 |
-
msgid "Completed"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#:
|
483 |
-
msgid "
|
484 |
msgstr ""
|
485 |
|
486 |
-
#:
|
487 |
-
|
488 |
-
#: templates/orders/listing.php:141
|
489 |
-
msgid "Processing"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#:
|
493 |
-
|
494 |
-
msgid "Cancelled"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#:
|
498 |
-
|
499 |
-
|
|
|
500 |
msgstr ""
|
501 |
|
502 |
-
#:
|
503 |
-
msgid "
|
504 |
msgstr ""
|
505 |
|
506 |
-
#:
|
507 |
-
|
|
|
|
|
508 |
msgstr ""
|
509 |
|
510 |
-
#:
|
511 |
-
#:
|
512 |
-
|
513 |
-
msgid "You have no permission to view this page"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#:
|
517 |
-
msgid "
|
518 |
msgstr ""
|
519 |
|
520 |
-
#:
|
521 |
-
msgid "
|
522 |
msgstr ""
|
523 |
|
524 |
-
#:
|
525 |
-
msgid "
|
526 |
msgstr ""
|
527 |
|
528 |
-
#:
|
529 |
-
|
530 |
-
msgid "Please enter product title"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#:
|
534 |
-
|
535 |
-
msgid "Please select a category"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#:
|
539 |
-
|
540 |
-
|
|
|
541 |
msgstr ""
|
542 |
|
543 |
-
#:
|
544 |
-
msgid "
|
545 |
msgstr ""
|
546 |
|
547 |
-
#:
|
548 |
-
msgid "
|
549 |
msgstr ""
|
550 |
|
551 |
-
#:
|
552 |
-
#:
|
553 |
-
|
554 |
-
#: src/admin/pages/Settings.vue:3
|
555 |
-
msgid "Settings"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#:
|
559 |
-
|
|
|
560 |
msgstr ""
|
561 |
|
562 |
-
#:
|
563 |
-
msgid ""
|
564 |
-
"These are the withdraw methods available for you. Please update your "
|
565 |
-
"payment information below to submit withdraw requests and get your store "
|
566 |
-
"payments seamlessly."
|
567 |
msgstr ""
|
568 |
|
569 |
-
#:
|
570 |
-
msgid "
|
571 |
msgstr ""
|
572 |
|
573 |
-
#:
|
574 |
-
|
|
|
575 |
msgstr ""
|
576 |
|
577 |
-
#:
|
578 |
-
msgid "
|
|
|
|
|
|
|
579 |
msgstr ""
|
580 |
|
581 |
-
#:
|
582 |
-
|
|
|
583 |
msgstr ""
|
584 |
|
585 |
-
#:
|
586 |
-
#:
|
587 |
-
msgid "
|
|
|
|
|
|
|
588 |
msgstr ""
|
589 |
|
590 |
-
#:
|
591 |
-
|
592 |
-
msgid "Invalid email"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#:
|
596 |
-
msgid "
|
597 |
msgstr ""
|
598 |
|
599 |
-
#:
|
600 |
-
msgid "
|
601 |
msgstr ""
|
602 |
|
603 |
-
#:
|
604 |
-
msgid "
|
605 |
msgstr ""
|
606 |
|
607 |
-
#:
|
608 |
-
msgid "
|
609 |
msgstr ""
|
610 |
|
611 |
-
#:
|
612 |
-
msgid "
|
613 |
msgstr ""
|
614 |
|
615 |
-
#:
|
616 |
-
msgid "
|
617 |
msgstr ""
|
618 |
|
619 |
-
#:
|
620 |
-
msgid "
|
621 |
msgstr ""
|
622 |
|
623 |
-
#:
|
624 |
-
msgid "
|
625 |
msgstr ""
|
626 |
|
627 |
-
#:
|
628 |
-
msgid "
|
629 |
msgstr ""
|
630 |
|
631 |
-
#:
|
632 |
-
|
633 |
-
msgid "You don't have enough balance for this request"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#:
|
637 |
-
|
638 |
-
|
|
|
|
|
639 |
msgstr ""
|
640 |
|
641 |
-
#:
|
642 |
-
msgid "
|
643 |
msgstr ""
|
644 |
|
645 |
-
#:
|
646 |
-
|
|
|
647 |
msgstr ""
|
648 |
|
649 |
-
#:
|
650 |
-
msgid "
|
651 |
msgstr ""
|
652 |
|
653 |
-
#:
|
654 |
-
msgid "
|
655 |
msgstr ""
|
656 |
|
657 |
-
#:
|
658 |
-
msgid ""
|
659 |
-
"You have already withdrawn %s. This amount will be deducted from your "
|
660 |
-
"balance."
|
661 |
msgstr ""
|
662 |
|
663 |
-
#:
|
664 |
-
msgid "
|
665 |
msgstr ""
|
666 |
|
667 |
-
#:
|
668 |
-
msgid ""
|
669 |
-
"Please submit your request after approval or cancellation of your previous "
|
670 |
-
"request."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#:
|
674 |
-
|
|
|
675 |
msgstr ""
|
676 |
|
677 |
-
#:
|
678 |
-
msgid "
|
|
|
|
|
|
|
679 |
msgstr ""
|
680 |
|
681 |
-
#:
|
682 |
-
msgid "
|
|
|
|
|
|
|
683 |
msgstr ""
|
684 |
|
685 |
-
#:
|
686 |
-
|
|
|
687 |
msgstr ""
|
688 |
|
689 |
-
#:
|
690 |
-
msgid "
|
691 |
msgstr ""
|
692 |
|
693 |
-
#:
|
694 |
-
msgid ""
|
695 |
-
"It is strongly recommended that you backup your database before proceeding. "
|
696 |
-
"Are you sure you wish to run the updater now?"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#:
|
700 |
-
msgid "
|
701 |
msgstr ""
|
702 |
|
703 |
-
#:
|
704 |
-
msgid "
|
705 |
msgstr ""
|
706 |
|
707 |
-
#:
|
708 |
-
msgid ""
|
709 |
-
"The Minimum PHP Version Requirement for <b>Dokan</b> is %s. You are Running "
|
710 |
-
"PHP %s"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#:
|
714 |
-
msgid "
|
715 |
msgstr ""
|
716 |
|
717 |
-
#:
|
718 |
-
msgid "
|
719 |
msgstr ""
|
720 |
|
721 |
-
#:
|
722 |
-
msgid ""
|
723 |
-
"Dokan requires WooCommerce to be installed and active. You can activate %s "
|
724 |
-
"here."
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: includes/
|
728 |
-
msgid "
|
|
|
|
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: includes/
|
732 |
-
msgid ""
|
733 |
-
"View the status of your marketplace including vendors and withdraw from "
|
734 |
-
"here."
|
735 |
msgstr ""
|
736 |
|
737 |
-
#: includes/
|
738 |
-
#: includes/
|
739 |
-
#: includes/
|
740 |
-
|
741 |
-
#: includes/admin/class-admin-pointers.php:214 src/admin/pages/AddVendor.vue:64
|
742 |
-
msgid "Next"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: includes/
|
746 |
-
|
|
|
|
|
|
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: includes/
|
750 |
-
msgid "
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: includes/
|
754 |
-
msgid "
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: includes/
|
758 |
-
|
|
|
|
|
|
|
|
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: includes/
|
762 |
-
|
|
|
|
|
|
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: includes/
|
766 |
-
msgid "
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: includes/
|
770 |
-
|
771 |
-
msgid "Selling Options"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/
|
775 |
-
|
|
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/
|
779 |
-
|
780 |
-
msgid "Withdraw Options"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: includes/
|
784 |
-
msgid "
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: includes/
|
788 |
-
|
|
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: includes/
|
792 |
-
msgid "
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/
|
796 |
-
|
797 |
-
#: includes/template-tags.php:345 templates/withdraw/header.php:11
|
798 |
-
msgid "Withdraw"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: includes/
|
802 |
-
msgid "
|
803 |
msgstr ""
|
804 |
|
805 |
-
|
806 |
-
msgid "Dokan"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: includes/
|
810 |
-
msgid "
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: includes/
|
814 |
-
msgid "
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: includes/
|
818 |
-
msgid "
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: includes/
|
822 |
-
msgid "
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: includes/
|
826 |
-
msgid "
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: includes/
|
830 |
-
|
|
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/
|
834 |
-
|
|
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: includes/
|
838 |
-
|
|
|
|
|
|
|
|
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: includes/
|
842 |
-
|
|
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: includes/
|
846 |
-
msgid "
|
|
|
|
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: includes/
|
850 |
-
msgid "
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: includes/
|
854 |
-
msgid "
|
|
|
|
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: includes/
|
858 |
-
msgid "
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/
|
862 |
-
msgid "
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/
|
866 |
-
msgid "
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: includes/
|
870 |
-
|
871 |
-
msgid "Vendor Store URL"
|
872 |
msgstr ""
|
873 |
|
874 |
-
#: includes/
|
875 |
-
msgid "
|
876 |
msgstr ""
|
877 |
|
878 |
-
#: includes/
|
879 |
-
|
|
|
|
|
|
|
|
|
|
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: includes/
|
883 |
msgid ""
|
884 |
-
"
|
885 |
-
"
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: includes/
|
889 |
-
|
|
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: includes/
|
893 |
-
|
|
|
|
|
|
|
894 |
msgstr ""
|
895 |
|
896 |
-
#: includes/
|
897 |
-
|
|
|
|
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: includes/
|
901 |
-
|
|
|
|
|
|
|
902 |
msgstr ""
|
903 |
|
904 |
-
#: includes/
|
905 |
-
msgid "
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: includes/
|
909 |
-
msgid "
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: includes/
|
913 |
-
msgid "
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: includes/
|
917 |
-
msgid "
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: includes/
|
921 |
-
|
922 |
-
#: src/admin/pages/VendorPaymentFields.vue:78
|
923 |
-
#: templates/admin-setup-wizard/step-selling.php:31
|
924 |
-
msgid "Admin Commission"
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: includes/
|
928 |
-
msgid "
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: includes/
|
932 |
-
|
933 |
-
msgid "Shipping Fee Recipient"
|
934 |
msgstr ""
|
935 |
|
936 |
-
#: includes/
|
937 |
-
msgid "
|
938 |
msgstr ""
|
939 |
|
940 |
-
#: includes/
|
941 |
-
#:
|
942 |
-
msgid "
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: includes/
|
946 |
-
|
947 |
-
msgid "Tax Fee Recipient"
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: includes/
|
951 |
-
msgid "
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: includes/
|
955 |
-
msgid "
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: includes/
|
959 |
-
msgid "
|
960 |
msgstr ""
|
961 |
|
962 |
-
#: includes/
|
963 |
-
|
|
|
|
|
|
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: includes/
|
967 |
-
msgid "
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: includes/
|
971 |
-
msgid "
|
972 |
msgstr ""
|
973 |
|
974 |
-
#: includes/
|
975 |
-
|
976 |
-
msgid "Order Status Change"
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: includes/
|
980 |
-
msgid "
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: includes/
|
984 |
-
msgid "
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: includes/
|
988 |
-
msgid "
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: includes/
|
992 |
-
msgid "
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: includes/
|
996 |
-
|
|
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: includes/
|
1000 |
-
msgid ""
|
1001 |
-
"Minimum balance required to make a withdraw request. Leave blank to set no "
|
1002 |
-
"minimum limits."
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: includes/
|
1006 |
-
msgid "
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: includes/
|
1010 |
-
|
1011 |
-
#: includes/admin/class-settings.php:557
|
1012 |
-
msgid "Select page"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
-
#: includes/
|
1016 |
-
msgid "
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: includes/
|
1020 |
-
msgid "
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: includes/
|
1024 |
-
msgid "
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: includes/
|
1028 |
-
msgid "
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: includes/
|
1032 |
-
msgid "
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: includes/
|
1036 |
-
msgid ""
|
1037 |
-
"Select where you want to add Dokan pages <a target=\"_blank\" href=\"%s\"> "
|
1038 |
-
"Learn More </a>"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: includes/
|
1042 |
-
msgid "
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: includes/
|
1046 |
-
msgid "
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: includes/
|
1050 |
-
msgid "
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: includes/
|
1054 |
-
msgid "
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: includes/
|
1058 |
-
msgid "
|
1059 |
msgstr ""
|
1060 |
|
1061 |
-
#: includes/
|
1062 |
-
|
|
|
1063 |
msgstr ""
|
1064 |
|
1065 |
-
#: includes/
|
1066 |
-
|
1067 |
-
msgid "Google Map API Key"
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: includes/
|
1071 |
-
|
1072 |
-
|
1073 |
-
"target=\"_blank\" rel=\"noopener noreferrer\">API Key</a> is needed to "
|
1074 |
-
"display map on store page"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
-
#: includes/
|
1078 |
-
msgid "
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: includes/
|
1082 |
-
|
1083 |
-
|
1084 |
-
"target=\"_blank\" rel=\"noopener noreferrer\">Access Token</a> is needed to "
|
1085 |
-
"display map on store page"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: includes/
|
1089 |
-
msgid "
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: includes/
|
1093 |
-
|
|
|
|
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: includes/
|
1097 |
-
msgid "
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: includes/
|
1101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: includes/
|
1105 |
-
msgid "
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: includes/
|
1109 |
-
msgid "
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: includes/
|
1113 |
-
msgid "
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: includes/
|
1117 |
-
msgid "
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: includes/
|
1121 |
-
msgid "
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: includes/
|
1125 |
-
msgid "
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: includes/
|
1129 |
-
msgid "
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: includes/
|
1133 |
-
msgid ""
|
1134 |
-
"Your personal data will be used to support your experience throughout this "
|
1135 |
-
"website, to manage access to your account, and for other purposes described "
|
1136 |
-
"in our [dokan_privacy_policy]"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: includes/
|
1140 |
-
msgid "
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: includes/
|
1144 |
-
msgid ""
|
1145 |
-
"By using this module, make it mandatory for your vendors to buy a "
|
1146 |
-
"subscription pack to sell products in your marketplace."
|
1147 |
msgstr ""
|
1148 |
|
1149 |
-
#: includes/
|
1150 |
-
msgid "
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: includes/
|
1154 |
-
msgid ""
|
1155 |
-
"This extension enables your customers to post a review for each store "
|
1156 |
-
"available on your site."
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: includes/
|
1160 |
-
msgid "
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: includes/
|
1164 |
-
msgid ""
|
1165 |
-
"Allow your vendors to verify their stores using social profiles, phone, "
|
1166 |
-
"photo ID etc. using this advanced and handy module."
|
1167 |
msgstr ""
|
1168 |
|
1169 |
-
#: includes/
|
1170 |
-
msgid "
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: includes/
|
1174 |
-
|
1175 |
-
"
|
1176 |
-
"each vendor according to the products they are selling. Meaning more "
|
1177 |
-
"earning for you."
|
1178 |
msgstr ""
|
1179 |
|
1180 |
-
#: includes/
|
1181 |
-
msgid "
|
1182 |
msgstr ""
|
1183 |
|
1184 |
-
#: includes/
|
1185 |
-
msgid ""
|
1186 |
-
"Need to solve a conflict with your plugins, have a theme layout issues with "
|
1187 |
-
"Dokan or any kind of problem you might face, we are here for you"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
-
#: includes/
|
1191 |
-
msgid "
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: includes/
|
1195 |
-
msgid ""
|
1196 |
-
"No matter what type of coupon you want to create you can do that easily "
|
1197 |
-
"using the pro version of Dokan. Set the coupon title, fix discount types, "
|
1198 |
-
"restrict email addresses and much more."
|
1199 |
msgstr ""
|
1200 |
|
1201 |
-
#: includes/
|
1202 |
-
msgid "
|
1203 |
msgstr ""
|
1204 |
|
1205 |
-
#: includes/
|
1206 |
-
msgid ""
|
1207 |
-
"With the simplest configuration options available, only by enabling a "
|
1208 |
-
"single toggle button you will be able to do everything your competitors are "
|
1209 |
-
"doing and even more."
|
1210 |
msgstr ""
|
1211 |
|
1212 |
-
#: includes/
|
1213 |
-
msgid "
|
1214 |
msgstr ""
|
1215 |
|
1216 |
-
#: includes/
|
1217 |
-
msgid "
|
1218 |
msgstr ""
|
1219 |
|
1220 |
-
#: includes/
|
1221 |
-
msgid "
|
1222 |
msgstr ""
|
1223 |
|
1224 |
-
#: includes/
|
1225 |
-
|
1226 |
-
#: includes/product-functions.php:240
|
1227 |
-
msgid "Shipping"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: includes/
|
1231 |
-
|
1232 |
-
msgid ""
|
1233 |
-
"We've created two Shipping Zones - for %s and for the rest of the world. "
|
1234 |
-
"Below you can set Flat Rate shipping costs for these Zones or offer Free "
|
1235 |
-
"Shipping."
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#: includes/
|
1239 |
-
|
1240 |
-
msgid "Did you know you can print shipping labels at home?"
|
1241 |
msgstr ""
|
1242 |
|
1243 |
-
#: includes/
|
1244 |
-
msgid ""
|
1245 |
-
"Use WooCommerce Shipping (powered by WooCommerce Services & Jetpack) to "
|
1246 |
-
"save time at the post office by printing your shipping labels at home."
|
1247 |
msgstr ""
|
1248 |
|
1249 |
-
#: includes/
|
1250 |
-
msgid "
|
1251 |
msgstr ""
|
1252 |
|
1253 |
-
#: includes/
|
1254 |
-
msgid ""
|
1255 |
-
"We recommend using ShipStation to save time at the post office by printing "
|
1256 |
-
"your shipping labels at home. Try ShipStation free for 30 days."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: includes/
|
1260 |
-
msgid "
|
1261 |
msgstr ""
|
1262 |
|
1263 |
-
#: includes/
|
1264 |
-
msgid "
|
1265 |
msgstr ""
|
1266 |
|
1267 |
-
#: includes/
|
1268 |
-
msgid "
|
1269 |
msgstr ""
|
1270 |
|
1271 |
-
#: includes/
|
1272 |
-
msgid "
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: includes/
|
1276 |
-
msgid "
|
1277 |
msgstr ""
|
1278 |
|
1279 |
-
#: includes/
|
1280 |
-
|
1281 |
-
msgid ""
|
1282 |
-
"If you'd like to offer <span class=\"help_tip\" data-tip=\"%1$s\">live "
|
1283 |
-
"rates</span> from a specific carrier (e.g. UPS) you can find a variety of "
|
1284 |
-
"extensions available for WooCommerce <a href=\"%2$s\" "
|
1285 |
-
"target=\"_blank\">here</a>."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
-
#: includes/
|
1289 |
-
msgid ""
|
1290 |
-
"A live rate is the exact cost to ship an order, quoted directly from the "
|
1291 |
-
"shipping carrier."
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: includes/
|
1295 |
-
|
1296 |
-
msgid "We'll use %1$s for product weight and %2$s for product dimensions."
|
1297 |
msgstr ""
|
1298 |
|
1299 |
-
#: includes/
|
1300 |
-
msgid "
|
1301 |
msgstr ""
|
1302 |
|
1303 |
-
#: includes/
|
1304 |
-
msgid "
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: includes/
|
1308 |
-
|
1309 |
-
msgid "Welcome to the world of Dokan!"
|
1310 |
msgstr ""
|
1311 |
|
1312 |
-
#: includes/
|
1313 |
-
msgid ""
|
1314 |
-
"Thank you for choosing Dokan to power your online marketplace! This quick "
|
1315 |
-
"setup wizard will help you configure the basic settings. <strong>It’s "
|
1316 |
-
"completely optional and shouldn’t take longer than three minutes.</strong>"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: includes/
|
1320 |
-
msgid ""
|
1321 |
-
"No time right now? If you don’t want to go through the wizard, you can skip "
|
1322 |
-
"and return to the WordPress dashboard. Come back anytime if you change your "
|
1323 |
-
"mind!"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
-
#: includes/
|
1327 |
-
msgid "
|
1328 |
msgstr ""
|
1329 |
|
1330 |
-
#: includes/
|
1331 |
-
msgid "
|
|
|
|
|
1332 |
msgstr ""
|
1333 |
|
1334 |
-
#: includes/
|
1335 |
-
msgid "
|
1336 |
msgstr ""
|
1337 |
|
1338 |
-
#: includes/
|
1339 |
-
msgid "
|
1340 |
msgstr ""
|
1341 |
|
1342 |
-
#: includes/
|
1343 |
-
msgid "
|
|
|
|
|
|
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: includes/
|
1347 |
-
msgid "
|
1348 |
msgstr ""
|
1349 |
|
1350 |
-
#: includes/
|
1351 |
-
msgid "
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: includes/
|
1355 |
-
msgid ""
|
1356 |
-
"Minimum balance required to make a withdraw request ( Leave it blank to set "
|
1357 |
-
"no limits )"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
-
#: includes/
|
1361 |
-
msgid "
|
1362 |
msgstr ""
|
1363 |
|
1364 |
-
#: includes/
|
1365 |
-
msgid "
|
1366 |
msgstr ""
|
1367 |
|
1368 |
-
#: includes/
|
1369 |
-
msgid "
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: includes/
|
1373 |
-
msgid "
|
1374 |
msgstr ""
|
1375 |
|
1376 |
-
#: includes/
|
1377 |
-
msgid "
|
1378 |
msgstr ""
|
1379 |
|
1380 |
-
#: includes/
|
1381 |
-
|
1382 |
-
msgid "WooCommerce Conversion Tracking"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: includes/
|
1386 |
-
msgid "
|
1387 |
msgstr ""
|
1388 |
|
1389 |
-
#: includes/
|
1390 |
-
msgid "
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: includes/
|
1394 |
-
|
1395 |
-
msgid "weForms"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
-
#: includes/
|
1399 |
-
msgid "
|
1400 |
msgstr ""
|
1401 |
|
1402 |
-
#: includes/
|
1403 |
-
msgid "
|
1404 |
msgstr ""
|
1405 |
|
1406 |
-
#: includes/
|
1407 |
-
msgid "
|
1408 |
msgstr ""
|
1409 |
|
1410 |
-
#: includes/
|
1411 |
-
msgid "
|
1412 |
msgstr ""
|
1413 |
|
1414 |
-
#: includes/
|
1415 |
-
msgid "
|
1416 |
msgstr ""
|
1417 |
|
1418 |
-
#: includes/
|
1419 |
-
msgid "
|
1420 |
msgstr ""
|
1421 |
|
1422 |
-
#: includes/
|
1423 |
-
msgid "
|
1424 |
msgstr ""
|
1425 |
|
1426 |
-
#: includes/
|
1427 |
-
msgid "
|
1428 |
msgstr ""
|
1429 |
|
1430 |
-
#: includes/
|
1431 |
-
msgid "
|
1432 |
msgstr ""
|
1433 |
|
1434 |
-
#: includes/
|
1435 |
-
msgid "
|
1436 |
msgstr ""
|
1437 |
|
1438 |
-
#: includes/
|
1439 |
-
msgid "
|
1440 |
msgstr ""
|
1441 |
|
1442 |
-
#: includes/
|
1443 |
-
msgid "
|
1444 |
msgstr ""
|
1445 |
|
1446 |
-
#: includes/
|
1447 |
-
msgid "
|
1448 |
msgstr ""
|
1449 |
|
1450 |
-
#: includes/
|
1451 |
-
|
1452 |
-
msgid "Total Sales"
|
1453 |
msgstr ""
|
1454 |
|
1455 |
-
#: includes/
|
1456 |
-
msgid "
|
1457 |
msgstr ""
|
1458 |
|
1459 |
-
#: includes/
|
1460 |
-
|
1461 |
-
msgid "Number of orders"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: includes/
|
1465 |
-
msgid "
|
1466 |
msgstr ""
|
1467 |
|
1468 |
-
#: includes/
|
1469 |
-
|
1470 |
-
msgid "Commision"
|
1471 |
msgstr ""
|
1472 |
|
1473 |
-
#: includes/
|
1474 |
-
msgid "
|
1475 |
msgstr ""
|
1476 |
|
1477 |
-
#: includes/
|
1478 |
-
msgid "
|
1479 |
msgstr ""
|
1480 |
|
1481 |
-
#: includes/
|
1482 |
-
msgid "
|
1483 |
msgstr ""
|
1484 |
|
1485 |
-
#: includes/
|
1486 |
-
msgid "
|
1487 |
msgstr ""
|
1488 |
|
1489 |
-
#: includes/
|
1490 |
-
msgid "
|
1491 |
msgstr ""
|
1492 |
|
1493 |
-
#: includes/
|
1494 |
-
msgid ""
|
1495 |
-
"An error has occurred, which probably means the feed is down. Try again "
|
1496 |
-
"later."
|
1497 |
msgstr ""
|
1498 |
|
1499 |
-
#: includes/
|
1500 |
-
|
|
|
1501 |
msgstr ""
|
1502 |
|
1503 |
-
#: includes/
|
1504 |
-
#: templates/dashboard/orders-widget.php:
|
1505 |
-
|
1506 |
-
#: templates/orders/order-fee-html.php:17 templates/sub-orders.php:28
|
1507 |
-
msgid "Total"
|
1508 |
msgstr ""
|
1509 |
|
1510 |
-
#: includes/
|
1511 |
-
#: includes/
|
1512 |
-
msgid "
|
1513 |
msgstr ""
|
1514 |
|
1515 |
-
#: includes/
|
1516 |
-
|
1517 |
-
#: includes/api/class-api-rest-controller.php:270
|
1518 |
-
msgid "Method '%s' not implemented. Must be overridden in subclass."
|
1519 |
msgstr ""
|
1520 |
|
1521 |
-
#: includes/
|
1522 |
-
|
1523 |
-
msgid ""
|
1524 |
-
"To manipulate product variations you should use the "
|
1525 |
-
"/products/<product_id>/variations/<id> endpoint."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: includes/
|
1529 |
-
#: includes/
|
1530 |
-
#: includes/
|
1531 |
-
#: includes/
|
1532 |
-
msgid "
|
1533 |
msgstr ""
|
1534 |
|
1535 |
-
#: includes/
|
1536 |
-
#:
|
1537 |
-
msgid "
|
1538 |
msgstr ""
|
1539 |
|
1540 |
-
#: includes/
|
1541 |
-
#: includes/
|
1542 |
-
|
1543 |
-
#: includes/api/class-product-controller.php:58
|
1544 |
-
#: includes/api/class-product-controller.php:80
|
1545 |
-
#: includes/api/class-product-controller.php:121
|
1546 |
-
#: includes/api/class-store-controller.php:48
|
1547 |
-
#: includes/api/class-store-controller.php:78
|
1548 |
-
#: includes/api/class-store-controller.php:92
|
1549 |
-
#: includes/api/class-store-controller.php:113
|
1550 |
-
#: includes/api/class-store-controller.php:144
|
1551 |
-
#: includes/api/class-withdraw-controller.php:35
|
1552 |
-
#: includes/api/class-withdraw-controller.php:62
|
1553 |
-
#: includes/api/class-withdraw-controller.php:90
|
1554 |
-
#: includes/api/class-withdraw-controller.php:743
|
1555 |
-
msgid "Unique identifier for the object."
|
1556 |
msgstr ""
|
1557 |
|
1558 |
-
#: includes/
|
1559 |
-
msgid "
|
1560 |
msgstr ""
|
1561 |
|
1562 |
-
#: includes/
|
1563 |
-
|
|
|
|
|
1564 |
msgstr ""
|
1565 |
|
1566 |
-
#: includes/
|
1567 |
-
|
|
|
|
|
1568 |
msgstr ""
|
1569 |
|
1570 |
-
#: includes/
|
1571 |
-
#: includes/
|
1572 |
-
#: includes/
|
1573 |
-
msgid "
|
1574 |
msgstr ""
|
1575 |
|
1576 |
-
#: includes/
|
1577 |
-
|
1578 |
-
#: includes/api/class-product-controller.php:326
|
1579 |
-
msgid "Sorry, you have no permission to do this. Since it's not your product."
|
1580 |
msgstr ""
|
1581 |
|
1582 |
-
#: includes/
|
1583 |
-
|
|
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: includes/
|
1587 |
-
msgid "
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: includes/
|
1591 |
-
msgid "
|
|
|
|
|
|
|
1592 |
msgstr ""
|
1593 |
|
1594 |
-
#: includes/
|
1595 |
-
msgid "
|
1596 |
msgstr ""
|
1597 |
|
1598 |
-
#: includes/
|
1599 |
-
#: includes/
|
1600 |
-
|
1601 |
-
msgid "You have no permission to view this notes"
|
1602 |
msgstr ""
|
1603 |
|
1604 |
-
#: includes/
|
1605 |
-
|
1606 |
-
#: includes/api/class-order-controller.php:611
|
1607 |
-
#: includes/api/class-order-controller.php:642
|
1608 |
-
msgid "Invalid order ID."
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: includes/
|
1612 |
-
#: includes/
|
1613 |
-
msgid "
|
1614 |
msgstr ""
|
1615 |
|
1616 |
-
#: includes/
|
1617 |
-
|
|
|
|
|
1618 |
msgstr ""
|
1619 |
|
1620 |
-
#: includes/
|
1621 |
-
|
|
|
|
|
|
|
1622 |
msgstr ""
|
1623 |
|
1624 |
-
#: includes/
|
1625 |
-
|
1626 |
-
msgid "Invalid resource ID."
|
1627 |
msgstr ""
|
1628 |
|
1629 |
-
#: includes/
|
1630 |
-
|
1631 |
-
msgid "Unique identifier for the resource."
|
1632 |
msgstr ""
|
1633 |
|
1634 |
-
#: includes/
|
1635 |
-
msgid "
|
1636 |
msgstr ""
|
1637 |
|
1638 |
-
#: includes/
|
1639 |
-
msgid "
|
1640 |
msgstr ""
|
1641 |
|
1642 |
-
#: includes/
|
1643 |
-
msgid "
|
1644 |
msgstr ""
|
1645 |
|
1646 |
-
#: includes/
|
1647 |
-
|
|
|
1648 |
msgstr ""
|
1649 |
|
1650 |
-
#: includes/
|
1651 |
-
msgid "
|
1652 |
msgstr ""
|
1653 |
|
1654 |
-
#: includes/
|
1655 |
-
msgid "
|
1656 |
msgstr ""
|
1657 |
|
1658 |
-
#: includes/
|
1659 |
-
msgid "
|
1660 |
msgstr ""
|
1661 |
|
1662 |
-
#: includes/
|
1663 |
-
msgid "
|
1664 |
msgstr ""
|
1665 |
|
1666 |
-
#: includes/
|
1667 |
-
msgid "
|
1668 |
msgstr ""
|
1669 |
|
1670 |
-
#: includes/
|
1671 |
-
msgid "
|
1672 |
msgstr ""
|
1673 |
|
1674 |
-
#: includes/
|
1675 |
-
msgid "
|
1676 |
msgstr ""
|
1677 |
|
1678 |
-
#: includes/
|
1679 |
-
msgid "
|
1680 |
msgstr ""
|
1681 |
|
1682 |
-
#: includes/
|
1683 |
-
msgid "
|
|
|
|
|
1684 |
msgstr ""
|
1685 |
|
1686 |
-
#: includes/
|
1687 |
-
msgid "
|
1688 |
msgstr ""
|
1689 |
|
1690 |
-
#: includes/
|
1691 |
-
msgid "
|
|
|
|
|
1692 |
msgstr ""
|
1693 |
|
1694 |
-
#: includes/
|
1695 |
-
msgid "
|
1696 |
msgstr ""
|
1697 |
|
1698 |
-
#: includes/
|
1699 |
-
|
|
|
1700 |
msgstr ""
|
1701 |
|
1702 |
-
#: includes/
|
1703 |
-
msgid "
|
1704 |
msgstr ""
|
1705 |
|
1706 |
-
#: includes/
|
1707 |
-
msgid "
|
|
|
|
|
1708 |
msgstr ""
|
1709 |
|
1710 |
-
#: includes/
|
1711 |
-
msgid "
|
1712 |
msgstr ""
|
1713 |
|
1714 |
-
#: includes/
|
1715 |
-
msgid "
|
1716 |
msgstr ""
|
1717 |
|
1718 |
-
#: includes/
|
1719 |
-
|
|
|
|
|
|
|
|
|
|
|
1720 |
msgstr ""
|
1721 |
|
1722 |
-
#: includes/
|
1723 |
-
|
|
|
|
|
|
|
|
|
|
|
1724 |
msgstr ""
|
1725 |
|
1726 |
-
#: includes/
|
1727 |
-
|
|
|
|
|
|
|
|
|
|
|
1728 |
msgstr ""
|
1729 |
|
1730 |
-
#: includes/
|
1731 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1732 |
msgstr ""
|
1733 |
|
1734 |
-
#: includes/
|
1735 |
-
#: includes/
|
1736 |
-
|
|
|
|
|
|
|
|
|
1737 |
msgstr ""
|
1738 |
|
1739 |
-
#: includes/
|
1740 |
-
#: includes/
|
1741 |
-
|
|
|
|
|
|
|
|
|
1742 |
msgstr ""
|
1743 |
|
1744 |
-
#: includes/
|
1745 |
-
#: includes/
|
1746 |
-
|
|
|
|
|
|
|
|
|
1747 |
msgstr ""
|
1748 |
|
1749 |
-
#: includes/
|
1750 |
-
|
1751 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:37
|
1752 |
-
msgid "Address line 1"
|
1753 |
msgstr ""
|
1754 |
|
1755 |
-
#: includes/
|
1756 |
-
|
1757 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:44
|
1758 |
-
msgid "Address line 2"
|
1759 |
msgstr ""
|
1760 |
|
1761 |
-
#: includes/
|
1762 |
-
|
1763 |
-
msgid "City name."
|
1764 |
msgstr ""
|
1765 |
|
1766 |
-
#: includes/
|
1767 |
-
|
1768 |
-
msgid "ISO code or name of the state, province or district."
|
1769 |
msgstr ""
|
1770 |
|
1771 |
-
#: includes/
|
1772 |
-
|
1773 |
-
msgid "Postal code."
|
1774 |
msgstr ""
|
1775 |
|
1776 |
-
#: includes/
|
1777 |
-
|
1778 |
-
msgid "Country code in ISO 3166-1 alpha-2 format."
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/
|
1782 |
-
msgid "
|
1783 |
msgstr ""
|
1784 |
|
1785 |
-
#: includes/
|
1786 |
-
msgid "
|
1787 |
msgstr ""
|
1788 |
|
1789 |
-
#: includes/
|
1790 |
-
msgid "
|
1791 |
msgstr ""
|
1792 |
|
1793 |
-
#: includes/
|
1794 |
-
msgid "
|
1795 |
msgstr ""
|
1796 |
|
1797 |
-
#: includes/
|
1798 |
-
msgid "
|
|
|
|
|
1799 |
msgstr ""
|
1800 |
|
1801 |
-
#: includes/
|
1802 |
-
msgid "
|
1803 |
msgstr ""
|
1804 |
|
1805 |
-
#: includes/
|
1806 |
-
msgid "
|
1807 |
msgstr ""
|
1808 |
|
1809 |
-
#: includes/
|
1810 |
-
|
|
|
|
|
1811 |
msgstr ""
|
1812 |
|
1813 |
-
#: includes/
|
1814 |
-
|
|
|
|
|
1815 |
msgstr ""
|
1816 |
|
1817 |
-
#: includes/
|
1818 |
-
msgid "
|
1819 |
msgstr ""
|
1820 |
|
1821 |
-
#: includes/
|
1822 |
-
msgid "
|
|
|
|
|
1823 |
msgstr ""
|
1824 |
|
1825 |
-
#: includes/
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
#: includes/api/class-order-controller.php:1534
|
1830 |
-
#: includes/api/class-order-controller.php:1592
|
1831 |
-
#: includes/api/class-product-controller.php:2269
|
1832 |
-
msgid "Meta data."
|
1833 |
msgstr ""
|
1834 |
|
1835 |
-
#: includes/
|
1836 |
-
|
1837 |
-
#: includes/api/class-order-controller.php:1357
|
1838 |
-
#: includes/api/class-order-controller.php:1443
|
1839 |
-
#: includes/api/class-order-controller.php:1541
|
1840 |
-
#: includes/api/class-order-controller.php:1599
|
1841 |
-
#: includes/api/class-product-controller.php:2276
|
1842 |
-
msgid "Meta ID."
|
1843 |
msgstr ""
|
1844 |
|
1845 |
-
#: includes/
|
1846 |
-
|
1847 |
-
#: includes/api/class-order-controller.php:1363
|
1848 |
-
#: includes/api/class-order-controller.php:1449
|
1849 |
-
#: includes/api/class-order-controller.php:1547
|
1850 |
-
#: includes/api/class-order-controller.php:1605
|
1851 |
-
#: includes/api/class-product-controller.php:2282
|
1852 |
-
msgid "Meta key."
|
1853 |
msgstr ""
|
1854 |
|
1855 |
-
#: includes/
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
#: includes/api/class-order-controller.php:1552
|
1860 |
-
#: includes/api/class-order-controller.php:1610
|
1861 |
-
#: includes/api/class-product-controller.php:2287
|
1862 |
-
msgid "Meta value."
|
1863 |
msgstr ""
|
1864 |
|
1865 |
-
#: includes/
|
1866 |
-
msgid "
|
1867 |
msgstr ""
|
1868 |
|
1869 |
-
#: includes/
|
1870 |
-
|
1871 |
-
#: includes/api/class-order-controller.php:1386
|
1872 |
-
#: includes/api/class-order-controller.php:1472
|
1873 |
-
#: includes/api/class-order-controller.php:1570
|
1874 |
-
msgid "Item ID."
|
1875 |
msgstr ""
|
1876 |
|
1877 |
-
#: includes/
|
1878 |
-
|
1879 |
-
msgid "Product name."
|
1880 |
msgstr ""
|
1881 |
|
1882 |
-
#: includes/
|
1883 |
-
msgid "
|
|
|
|
|
1884 |
msgstr ""
|
1885 |
|
1886 |
-
#: includes/
|
1887 |
-
msgid "
|
1888 |
msgstr ""
|
1889 |
|
1890 |
-
#: includes/
|
1891 |
-
msgid "
|
1892 |
msgstr ""
|
1893 |
|
1894 |
-
#: includes/
|
1895 |
-
msgid "
|
1896 |
msgstr ""
|
1897 |
|
1898 |
-
#: includes/
|
1899 |
-
msgid "
|
|
|
|
|
1900 |
msgstr ""
|
1901 |
|
1902 |
-
#: includes/
|
1903 |
-
msgid "
|
1904 |
msgstr ""
|
1905 |
|
1906 |
-
#: includes/
|
1907 |
-
|
1908 |
-
#: includes/api/class-order-controller.php:1494
|
1909 |
-
msgid "Line total (after discounts)."
|
1910 |
msgstr ""
|
1911 |
|
1912 |
-
#: includes/
|
1913 |
-
|
1914 |
-
#: includes/api/class-order-controller.php:1499
|
1915 |
-
msgid "Line total tax (after discounts)."
|
1916 |
msgstr ""
|
1917 |
|
1918 |
-
#: includes/
|
1919 |
-
|
1920 |
-
#: includes/api/class-order-controller.php:1505
|
1921 |
-
msgid "Line taxes."
|
1922 |
msgstr ""
|
1923 |
|
1924 |
-
#: includes/
|
1925 |
-
|
1926 |
-
#: includes/api/class-order-controller.php:1421
|
1927 |
-
#: includes/api/class-order-controller.php:1513
|
1928 |
-
msgid "Tax rate ID."
|
1929 |
msgstr ""
|
1930 |
|
1931 |
-
#: includes/
|
1932 |
-
|
1933 |
-
#: includes/api/class-order-controller.php:1519
|
1934 |
-
msgid "Tax total."
|
1935 |
msgstr ""
|
1936 |
|
1937 |
-
#: includes/
|
1938 |
-
|
1939 |
-
msgid "Tax subtotal."
|
1940 |
msgstr ""
|
1941 |
|
1942 |
-
#: includes/
|
1943 |
-
msgid "
|
1944 |
msgstr ""
|
1945 |
|
1946 |
-
#: includes/
|
1947 |
-
msgid "
|
1948 |
msgstr ""
|
1949 |
|
1950 |
-
#: includes/
|
1951 |
-
msgid "
|
1952 |
msgstr ""
|
1953 |
|
1954 |
-
#: includes/
|
1955 |
-
msgid "
|
1956 |
msgstr ""
|
1957 |
|
1958 |
-
#: includes/
|
1959 |
-
msgid "
|
1960 |
msgstr ""
|
1961 |
|
1962 |
-
#: includes/
|
1963 |
-
msgid "
|
1964 |
msgstr ""
|
1965 |
|
1966 |
-
#: includes/
|
1967 |
-
|
|
|
1968 |
msgstr ""
|
1969 |
|
1970 |
-
#: includes/
|
1971 |
-
msgid "
|
1972 |
msgstr ""
|
1973 |
|
1974 |
-
#: includes/
|
1975 |
-
msgid "
|
1976 |
msgstr ""
|
1977 |
|
1978 |
-
#: includes/
|
1979 |
-
msgid "
|
1980 |
msgstr ""
|
1981 |
|
1982 |
-
#: includes/
|
1983 |
-
msgid "
|
1984 |
msgstr ""
|
1985 |
|
1986 |
-
#: includes/
|
1987 |
-
msgid "
|
1988 |
msgstr ""
|
1989 |
|
1990 |
-
#: includes/
|
1991 |
-
msgid "
|
1992 |
msgstr ""
|
1993 |
|
1994 |
-
#: includes/
|
1995 |
-
msgid "
|
1996 |
msgstr ""
|
1997 |
|
1998 |
-
#: includes/
|
1999 |
-
|
|
|
2000 |
msgstr ""
|
2001 |
|
2002 |
-
#: includes/
|
2003 |
-
msgid "
|
2004 |
msgstr ""
|
2005 |
|
2006 |
-
#: includes/
|
2007 |
-
msgid "
|
2008 |
msgstr ""
|
2009 |
|
2010 |
-
#: includes/
|
2011 |
-
msgid "
|
2012 |
msgstr ""
|
2013 |
|
2014 |
-
#: includes/
|
2015 |
-
msgid "
|
2016 |
msgstr ""
|
2017 |
|
2018 |
-
#: includes/
|
2019 |
-
msgid "
|
2020 |
msgstr ""
|
2021 |
|
2022 |
-
#: includes/
|
2023 |
-
msgid "
|
2024 |
msgstr ""
|
2025 |
|
2026 |
-
#: includes/
|
2027 |
-
msgid "
|
2028 |
msgstr ""
|
2029 |
|
2030 |
-
#: includes/
|
2031 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2032 |
msgstr ""
|
2033 |
|
2034 |
-
#: includes/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2035 |
msgid ""
|
2036 |
-
"
|
2037 |
-
"
|
|
|
|
|
|
|
|
|
2038 |
msgstr ""
|
2039 |
|
2040 |
-
#: includes/
|
2041 |
-
|
2042 |
-
#: includes/api/class-product-attribute-controller.php:109
|
2043 |
-
msgid "Resource does not exist."
|
2044 |
msgstr ""
|
2045 |
|
2046 |
-
#: includes/
|
2047 |
-
msgid "
|
2048 |
msgstr ""
|
2049 |
|
2050 |
-
#: includes/
|
2051 |
-
msgid "
|
2052 |
msgstr ""
|
2053 |
|
2054 |
-
#: includes/
|
2055 |
-
msgid "
|
|
|
|
|
2056 |
msgstr ""
|
2057 |
|
2058 |
-
#: includes/
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
#: includes/api/class-product-controller.php:209
|
2063 |
-
msgid "Number of product you want to get top rated product"
|
2064 |
msgstr ""
|
2065 |
|
2066 |
-
#: includes/
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
msgid "Number of page number"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
-
#: includes/
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
msgid "Top rated product for specific vendor"
|
2078 |
msgstr ""
|
2079 |
|
2080 |
-
#: includes/
|
2081 |
-
msgid "
|
|
|
|
|
2082 |
msgstr ""
|
2083 |
|
2084 |
-
#: includes/
|
2085 |
-
msgid "
|
|
|
|
|
2086 |
msgstr ""
|
2087 |
|
2088 |
-
#: includes/
|
2089 |
-
msgid "
|
|
|
|
|
|
|
|
|
2090 |
msgstr ""
|
2091 |
|
2092 |
-
#: includes/
|
2093 |
-
|
2094 |
-
msgid "Placeholder"
|
2095 |
msgstr ""
|
2096 |
|
2097 |
-
#: includes/
|
2098 |
-
|
2099 |
-
msgid "#%s is an invalid image ID."
|
2100 |
msgstr ""
|
2101 |
|
2102 |
-
#: includes/
|
2103 |
-
msgid "
|
2104 |
msgstr ""
|
2105 |
|
2106 |
-
#: includes/
|
2107 |
-
msgid "
|
2108 |
msgstr ""
|
2109 |
|
2110 |
-
#: includes/
|
2111 |
-
msgid "
|
2112 |
msgstr ""
|
2113 |
|
2114 |
-
#: includes/
|
2115 |
-
msgid "
|
2116 |
msgstr ""
|
2117 |
|
2118 |
-
#: includes/
|
2119 |
-
msgid "
|
2120 |
msgstr ""
|
2121 |
|
2122 |
-
#: includes/
|
2123 |
-
msgid "
|
|
|
|
|
2124 |
msgstr ""
|
2125 |
|
2126 |
-
#: includes/
|
2127 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
2128 |
msgstr ""
|
2129 |
|
2130 |
-
#: includes/
|
2131 |
-
msgid "
|
2132 |
msgstr ""
|
2133 |
|
2134 |
-
#: includes/
|
2135 |
-
msgid "
|
2136 |
msgstr ""
|
2137 |
|
2138 |
-
#: includes/
|
2139 |
-
msgid "
|
|
|
|
|
2140 |
msgstr ""
|
2141 |
|
2142 |
-
#: includes/
|
2143 |
-
msgid "
|
|
|
|
|
2144 |
msgstr ""
|
2145 |
|
2146 |
-
#: includes/
|
2147 |
-
msgid "
|
|
|
|
|
2148 |
msgstr ""
|
2149 |
|
2150 |
-
#: includes/
|
2151 |
-
msgid "
|
|
|
|
|
2152 |
msgstr ""
|
2153 |
|
2154 |
-
#: includes/
|
2155 |
-
msgid "
|
2156 |
msgstr ""
|
2157 |
|
2158 |
-
#: includes/
|
2159 |
-
msgid "
|
|
|
|
|
|
|
2160 |
msgstr ""
|
2161 |
|
2162 |
-
#: includes/
|
2163 |
-
msgid "
|
|
|
|
|
2164 |
msgstr ""
|
2165 |
|
2166 |
-
#: includes/
|
2167 |
-
msgid "
|
2168 |
msgstr ""
|
2169 |
|
2170 |
-
#: includes/
|
2171 |
-
msgid "
|
|
|
|
|
|
|
|
|
2172 |
msgstr ""
|
2173 |
|
2174 |
-
#: includes/
|
2175 |
-
msgid "
|
|
|
|
|
|
|
2176 |
msgstr ""
|
2177 |
|
2178 |
-
#: includes/
|
2179 |
-
msgid "
|
|
|
|
|
|
|
2180 |
msgstr ""
|
2181 |
|
2182 |
-
#: includes/
|
2183 |
-
msgid "
|
2184 |
msgstr ""
|
2185 |
|
2186 |
-
#: includes/
|
2187 |
-
msgid "
|
|
|
|
|
|
|
|
|
2188 |
msgstr ""
|
2189 |
|
2190 |
-
#: includes/
|
2191 |
-
|
|
|
|
|
2192 |
msgstr ""
|
2193 |
|
2194 |
-
#: includes/
|
2195 |
-
msgid "
|
2196 |
msgstr ""
|
2197 |
|
2198 |
-
#: includes/
|
2199 |
-
msgid "
|
2200 |
msgstr ""
|
2201 |
|
2202 |
-
#: includes/
|
2203 |
-
|
|
|
|
|
|
|
|
|
2204 |
msgstr ""
|
2205 |
|
2206 |
-
#: includes/
|
2207 |
-
msgid "
|
2208 |
msgstr ""
|
2209 |
|
2210 |
-
#: includes/
|
2211 |
-
msgid "
|
2212 |
msgstr ""
|
2213 |
|
2214 |
-
#: includes/
|
2215 |
-
msgid "
|
2216 |
msgstr ""
|
2217 |
|
2218 |
-
#: includes/
|
2219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2220 |
msgstr ""
|
2221 |
|
2222 |
-
#: includes/
|
2223 |
-
msgid "
|
2224 |
msgstr ""
|
2225 |
|
2226 |
-
#: includes/
|
2227 |
-
msgid "
|
2228 |
msgstr ""
|
2229 |
|
2230 |
-
#: includes/
|
2231 |
-
msgid "
|
|
|
|
|
2232 |
msgstr ""
|
2233 |
|
2234 |
-
#: includes/
|
2235 |
-
msgid "
|
2236 |
msgstr ""
|
2237 |
|
2238 |
-
#: includes/
|
2239 |
-
msgid "
|
2240 |
msgstr ""
|
2241 |
|
2242 |
-
#: includes/
|
2243 |
-
msgid "
|
2244 |
msgstr ""
|
2245 |
|
2246 |
-
#: includes/
|
2247 |
-
|
|
|
|
|
|
|
|
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: includes/
|
2251 |
-
msgid "
|
2252 |
msgstr ""
|
2253 |
|
2254 |
-
#: includes/
|
2255 |
-
msgid ""
|
2256 |
-
"Controls whether or not the product is listed as \"in stock\" or \"out of "
|
2257 |
-
"stock\" on the frontend."
|
2258 |
msgstr ""
|
2259 |
|
2260 |
-
#: includes/
|
2261 |
-
msgid "
|
2262 |
msgstr ""
|
2263 |
|
2264 |
-
#: includes/
|
2265 |
-
msgid "
|
2266 |
msgstr ""
|
2267 |
|
2268 |
-
#: includes/
|
2269 |
-
msgid "
|
2270 |
msgstr ""
|
2271 |
|
2272 |
-
#: includes/
|
2273 |
-
msgid "
|
2274 |
msgstr ""
|
2275 |
|
2276 |
-
#: includes/
|
2277 |
-
|
2278 |
-
msgid "Product weight (%s)."
|
2279 |
msgstr ""
|
2280 |
|
2281 |
-
#: includes/
|
2282 |
-
msgid "
|
2283 |
msgstr ""
|
2284 |
|
2285 |
-
#: includes/
|
2286 |
-
|
2287 |
-
msgid "Product length (%s)."
|
2288 |
msgstr ""
|
2289 |
|
2290 |
-
#: includes/
|
2291 |
-
|
2292 |
-
msgid "Product width (%s)."
|
2293 |
msgstr ""
|
2294 |
|
2295 |
-
#: includes/
|
2296 |
-
|
2297 |
-
msgid "Product height (%s)."
|
2298 |
msgstr ""
|
2299 |
|
2300 |
-
#: includes/
|
2301 |
-
msgid "
|
2302 |
msgstr ""
|
2303 |
|
2304 |
-
#: includes/
|
2305 |
-
msgid "
|
2306 |
msgstr ""
|
2307 |
|
2308 |
-
#: includes/
|
2309 |
-
|
|
|
|
|
2310 |
msgstr ""
|
2311 |
|
2312 |
-
#: includes/
|
2313 |
-
msgid "
|
2314 |
msgstr ""
|
2315 |
|
2316 |
-
#: includes/
|
2317 |
-
msgid "
|
2318 |
msgstr ""
|
2319 |
|
2320 |
-
#: includes/
|
2321 |
-
msgid "
|
2322 |
msgstr ""
|
2323 |
|
2324 |
-
#: includes/
|
2325 |
-
msgid "
|
2326 |
msgstr ""
|
2327 |
|
2328 |
-
#: includes/
|
2329 |
-
msgid "
|
2330 |
msgstr ""
|
2331 |
|
2332 |
-
#: includes/
|
2333 |
-
msgid "
|
2334 |
msgstr ""
|
2335 |
|
2336 |
-
#: includes/
|
2337 |
-
msgid "
|
2338 |
msgstr ""
|
2339 |
|
2340 |
-
#: includes/
|
2341 |
-
msgid "
|
2342 |
msgstr ""
|
2343 |
|
2344 |
-
#: includes/
|
2345 |
-
msgid "
|
|
|
|
|
2346 |
msgstr ""
|
2347 |
|
2348 |
-
#: includes/
|
2349 |
-
msgid "
|
2350 |
msgstr ""
|
2351 |
|
2352 |
-
#: includes/
|
2353 |
-
msgid "
|
2354 |
msgstr ""
|
2355 |
|
2356 |
-
#: includes/
|
2357 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2358 |
msgstr ""
|
2359 |
|
2360 |
-
#: includes/
|
2361 |
-
msgid "
|
2362 |
-
|
|
|
|
|
2363 |
|
2364 |
-
#: includes/
|
2365 |
-
msgid "
|
2366 |
msgstr ""
|
2367 |
|
2368 |
-
#: includes/
|
2369 |
-
|
|
|
|
|
2370 |
msgstr ""
|
2371 |
|
2372 |
-
#: includes/
|
2373 |
-
msgid "
|
2374 |
msgstr ""
|
2375 |
|
2376 |
-
#: includes/
|
2377 |
-
msgid "
|
2378 |
msgstr ""
|
2379 |
|
2380 |
-
#: includes/
|
2381 |
-
msgid "
|
2382 |
msgstr ""
|
2383 |
|
2384 |
-
#: includes/
|
2385 |
-
msgid "
|
2386 |
msgstr ""
|
2387 |
|
2388 |
-
#: includes/
|
2389 |
-
msgid "
|
2390 |
msgstr ""
|
2391 |
|
2392 |
-
#: includes/
|
2393 |
-
msgid "
|
2394 |
msgstr ""
|
2395 |
|
2396 |
-
#: includes/
|
2397 |
-
msgid "
|
2398 |
msgstr ""
|
2399 |
|
2400 |
-
#: includes/
|
2401 |
-
msgid "
|
2402 |
msgstr ""
|
2403 |
|
2404 |
-
#: includes/
|
2405 |
-
msgid "
|
2406 |
msgstr ""
|
2407 |
|
2408 |
-
#: includes/
|
2409 |
-
|
|
|
2410 |
msgstr ""
|
2411 |
|
2412 |
-
#: includes/
|
2413 |
-
msgid "
|
2414 |
msgstr ""
|
2415 |
|
2416 |
-
#: includes/
|
2417 |
-
|
|
|
2418 |
msgstr ""
|
2419 |
|
2420 |
-
#: includes/
|
2421 |
-
msgid "
|
2422 |
msgstr ""
|
2423 |
|
2424 |
-
#: includes/
|
2425 |
-
|
2426 |
-
msgid "Attribute ID."
|
2427 |
msgstr ""
|
2428 |
|
2429 |
-
#: includes/
|
2430 |
-
|
2431 |
-
msgid "Attribute name."
|
2432 |
msgstr ""
|
2433 |
|
2434 |
-
#: includes/
|
2435 |
-
msgid "
|
2436 |
msgstr ""
|
2437 |
|
2438 |
-
#: includes/
|
2439 |
msgid ""
|
2440 |
-
"
|
2441 |
-
"
|
2442 |
msgstr ""
|
2443 |
|
2444 |
-
#: includes/
|
2445 |
-
msgid "
|
2446 |
msgstr ""
|
2447 |
|
2448 |
-
#: includes/
|
2449 |
-
|
|
|
|
|
|
|
2450 |
msgstr ""
|
2451 |
|
2452 |
-
#: includes/
|
2453 |
-
|
|
|
2454 |
msgstr ""
|
2455 |
|
2456 |
-
#: includes/
|
2457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2458 |
msgstr ""
|
2459 |
|
2460 |
-
#: includes/
|
2461 |
-
msgid "
|
2462 |
msgstr ""
|
2463 |
|
2464 |
-
#: includes/
|
2465 |
-
msgid "
|
2466 |
msgstr ""
|
2467 |
|
2468 |
-
#: includes/
|
2469 |
-
|
|
|
|
|
2470 |
msgstr ""
|
2471 |
|
2472 |
-
#: includes/
|
2473 |
-
|
|
|
|
|
2474 |
msgstr ""
|
2475 |
|
2476 |
-
#: includes/
|
2477 |
-
|
2478 |
-
msgid "Your Name"
|
2479 |
msgstr ""
|
2480 |
|
2481 |
-
#: includes/
|
2482 |
-
msgid "
|
2483 |
msgstr ""
|
2484 |
|
2485 |
-
#: includes/
|
2486 |
-
msgid "
|
2487 |
msgstr ""
|
2488 |
|
2489 |
-
#: includes/
|
2490 |
-
msgid "
|
2491 |
msgstr ""
|
2492 |
|
2493 |
-
#: includes/
|
2494 |
-
#: includes/
|
2495 |
-
|
2496 |
-
msgid "No store found"
|
2497 |
msgstr ""
|
2498 |
|
2499 |
-
#: includes/
|
2500 |
-
#: includes/
|
2501 |
-
msgid "
|
2502 |
msgstr ""
|
2503 |
|
2504 |
-
#: includes/
|
2505 |
-
|
|
|
2506 |
msgstr ""
|
2507 |
|
2508 |
-
#: includes/
|
2509 |
-
|
2510 |
-
msgid "No reviews found"
|
2511 |
msgstr ""
|
2512 |
|
2513 |
-
#: includes/
|
2514 |
-
msgid "
|
2515 |
msgstr ""
|
2516 |
|
2517 |
-
#: includes/
|
2518 |
-
msgid "
|
2519 |
msgstr ""
|
2520 |
|
2521 |
-
#: includes/
|
2522 |
-
|
|
|
2523 |
msgstr ""
|
2524 |
|
2525 |
-
#: includes/
|
2526 |
-
|
2527 |
-
msgid "No items found for bulk updating"
|
2528 |
msgstr ""
|
2529 |
|
2530 |
-
#: includes/
|
2531 |
-
|
2532 |
-
#: includes/api/class-withdraw-controller.php:764
|
2533 |
-
msgid "Withdraw status"
|
2534 |
msgstr ""
|
2535 |
|
2536 |
-
#: includes/
|
2537 |
-
msgid "
|
2538 |
msgstr ""
|
2539 |
|
2540 |
-
#: includes/
|
2541 |
-
msgid "
|
2542 |
msgstr ""
|
2543 |
|
2544 |
-
#: includes/
|
2545 |
-
|
2546 |
-
#: includes/api/class-withdraw-controller.php:357
|
2547 |
-
#: includes/api/class-withdraw-controller.php:391
|
2548 |
-
msgid "No vendor found"
|
2549 |
msgstr ""
|
2550 |
|
2551 |
-
#: includes/
|
2552 |
-
|
2553 |
-
msgid "Invalid ID"
|
2554 |
msgstr ""
|
2555 |
|
2556 |
-
#: includes/
|
2557 |
-
msgid "
|
2558 |
msgstr ""
|
2559 |
|
2560 |
-
#: includes/
|
2561 |
-
msgid "
|
2562 |
msgstr ""
|
2563 |
|
2564 |
-
#: includes/
|
2565 |
-
msgid "
|
2566 |
msgstr ""
|
2567 |
|
2568 |
-
#: includes/
|
2569 |
-
msgid "
|
2570 |
msgstr ""
|
2571 |
|
2572 |
-
#: includes/
|
2573 |
-
msgid "
|
2574 |
msgstr ""
|
2575 |
|
2576 |
-
#: includes/
|
2577 |
-
msgid "
|
2578 |
msgstr ""
|
2579 |
|
2580 |
-
#: includes/
|
2581 |
-
msgid "
|
2582 |
msgstr ""
|
2583 |
|
2584 |
-
#: includes/
|
2585 |
-
msgid "
|
2586 |
msgstr ""
|
2587 |
|
2588 |
-
#: includes/
|
2589 |
-
msgid "
|
2590 |
msgstr ""
|
2591 |
|
2592 |
-
#: includes/
|
2593 |
-
msgid "
|
2594 |
msgstr ""
|
2595 |
|
2596 |
-
#: includes/
|
2597 |
-
msgid ""
|
2598 |
-
"The amount of discount. Should always be numeric, even if setting a "
|
2599 |
-
"percentage."
|
2600 |
msgstr ""
|
2601 |
|
2602 |
-
#: includes/
|
2603 |
-
msgid "
|
2604 |
msgstr ""
|
2605 |
|
2606 |
-
#: includes/
|
2607 |
-
msgid "
|
2608 |
msgstr ""
|
2609 |
|
2610 |
-
#: includes/
|
2611 |
-
msgid "
|
2612 |
msgstr ""
|
2613 |
|
2614 |
-
#: includes/
|
2615 |
-
msgid "User
|
2616 |
msgstr ""
|
2617 |
|
2618 |
-
#: includes/
|
2619 |
-
msgid "
|
2620 |
msgstr ""
|
2621 |
|
2622 |
-
#: includes/
|
2623 |
-
msgid "
|
2624 |
msgstr ""
|
2625 |
|
2626 |
-
#: includes/
|
2627 |
-
msgid "
|
2628 |
msgstr ""
|
2629 |
|
2630 |
-
#: includes/
|
2631 |
-
msgid "
|
2632 |
msgstr ""
|
2633 |
|
2634 |
-
#: includes/
|
2635 |
-
msgid "
|
2636 |
msgstr ""
|
2637 |
|
2638 |
-
#: includes/
|
2639 |
-
|
|
|
2640 |
msgstr ""
|
2641 |
|
2642 |
-
#: includes/
|
2643 |
-
|
|
|
2644 |
msgstr ""
|
2645 |
|
2646 |
-
#: includes/
|
2647 |
-
|
|
|
|
|
2648 |
msgstr ""
|
2649 |
|
2650 |
-
#: includes/
|
2651 |
-
|
|
|
|
|
2652 |
msgstr ""
|
2653 |
|
2654 |
-
#: includes/
|
2655 |
-
|
|
|
2656 |
msgstr ""
|
2657 |
|
2658 |
-
#: includes/
|
2659 |
-
|
|
|
2660 |
msgstr ""
|
2661 |
|
2662 |
-
#: includes/
|
2663 |
-
|
|
|
2664 |
msgstr ""
|
2665 |
|
2666 |
-
#: includes/
|
2667 |
-
|
|
|
2668 |
msgstr ""
|
2669 |
|
2670 |
-
#: includes/
|
2671 |
-
msgid "
|
2672 |
msgstr ""
|
2673 |
|
2674 |
-
#: includes/
|
2675 |
-
msgid "
|
2676 |
msgstr ""
|
2677 |
|
2678 |
-
#: includes/
|
2679 |
-
msgid "
|
2680 |
msgstr ""
|
2681 |
|
2682 |
-
#: includes/
|
2683 |
-
msgid "
|
2684 |
msgstr ""
|
2685 |
|
2686 |
-
#: includes/
|
2687 |
-
msgid "
|
2688 |
msgstr ""
|
2689 |
|
2690 |
-
#: includes/
|
2691 |
-
msgid "
|
2692 |
msgstr ""
|
2693 |
|
2694 |
-
#: includes/
|
2695 |
-
msgid "
|
2696 |
msgstr ""
|
2697 |
|
2698 |
-
#: includes/
|
2699 |
-
msgid "
|
2700 |
msgstr ""
|
2701 |
|
2702 |
-
#: includes/
|
2703 |
-
msgid "
|
2704 |
msgstr ""
|
2705 |
|
2706 |
-
#: includes/
|
2707 |
-
msgid "
|
|
|
|
|
|
|
|
|
2708 |
msgstr ""
|
2709 |
|
2710 |
-
#: includes/
|
2711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2712 |
msgstr ""
|
2713 |
|
2714 |
-
#: includes/
|
2715 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2716 |
msgstr ""
|
2717 |
|
2718 |
-
#: includes/
|
2719 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2720 |
msgstr ""
|
2721 |
|
2722 |
-
#: includes/
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
|
|
|
|
|
|
|
|
2726 |
msgstr ""
|
2727 |
|
2728 |
-
#: includes/
|
2729 |
-
msgid "
|
2730 |
msgstr ""
|
2731 |
|
2732 |
-
#: includes/
|
2733 |
-
|
|
|
|
|
|
|
|
|
2734 |
msgstr ""
|
2735 |
|
2736 |
-
#: includes/
|
2737 |
-
|
2738 |
-
"
|
2739 |
-
"variation for each and every possible combination of variation attributes "
|
2740 |
-
"(max %d per run)."
|
2741 |
msgstr ""
|
2742 |
|
2743 |
-
#: includes/
|
2744 |
-
msgid "
|
2745 |
msgstr ""
|
2746 |
|
2747 |
-
#: includes/
|
2748 |
-
msgid "Variation
|
2749 |
msgstr ""
|
2750 |
|
2751 |
-
#: includes/
|
2752 |
-
msgid "
|
2753 |
msgstr ""
|
2754 |
|
2755 |
-
#: includes/
|
2756 |
-
msgid "
|
2757 |
msgstr ""
|
2758 |
|
2759 |
-
#: includes/
|
2760 |
-
msgid "
|
2761 |
msgstr ""
|
2762 |
|
2763 |
-
#: includes/
|
2764 |
-
msgid "
|
2765 |
msgstr ""
|
2766 |
|
2767 |
-
#: includes/
|
2768 |
-
|
|
|
|
|
2769 |
msgstr ""
|
2770 |
|
2771 |
-
#: includes/
|
2772 |
-
|
|
|
|
|
2773 |
msgstr ""
|
2774 |
|
2775 |
-
#: includes/
|
2776 |
-
|
|
|
|
|
2777 |
msgstr ""
|
2778 |
|
2779 |
-
#: includes/
|
2780 |
-
|
|
|
|
|
|
|
2781 |
msgstr ""
|
2782 |
|
2783 |
-
#: includes/
|
2784 |
-
|
|
|
|
|
2785 |
msgstr ""
|
2786 |
|
2787 |
-
#: includes/
|
2788 |
-
|
|
|
2789 |
msgstr ""
|
2790 |
|
2791 |
-
#: includes/
|
2792 |
-
msgid "
|
2793 |
msgstr ""
|
2794 |
|
2795 |
-
#: includes/
|
2796 |
-
msgid "
|
2797 |
msgstr ""
|
2798 |
|
2799 |
-
#: includes/
|
2800 |
-
msgid "
|
2801 |
msgstr ""
|
2802 |
|
2803 |
-
#: includes/
|
2804 |
-
msgid "
|
2805 |
msgstr ""
|
2806 |
|
2807 |
-
#: includes/
|
2808 |
-
msgid "
|
2809 |
msgstr ""
|
2810 |
|
2811 |
-
#: includes/
|
2812 |
-
msgid "
|
2813 |
msgstr ""
|
2814 |
|
2815 |
-
#: includes/
|
2816 |
-
msgid "
|
2817 |
msgstr ""
|
2818 |
|
2819 |
-
#: includes/
|
2820 |
-
msgid "
|
2821 |
msgstr ""
|
2822 |
|
2823 |
-
#: includes/
|
2824 |
-
msgid "
|
2825 |
msgstr ""
|
2826 |
|
2827 |
-
#: includes/
|
2828 |
-
msgid "
|
2829 |
msgstr ""
|
2830 |
|
2831 |
-
#: includes/
|
2832 |
-
msgid "
|
2833 |
msgstr ""
|
2834 |
|
2835 |
-
#: includes/
|
2836 |
-
msgid "
|
2837 |
msgstr ""
|
2838 |
|
2839 |
-
#: includes/
|
2840 |
-
msgid "
|
2841 |
msgstr ""
|
2842 |
|
2843 |
-
#: includes/
|
2844 |
-
msgid "
|
2845 |
msgstr ""
|
2846 |
|
2847 |
-
#: includes/
|
2848 |
-
msgid "
|
2849 |
msgstr ""
|
2850 |
|
2851 |
-
#: includes/
|
2852 |
-
msgid "
|
2853 |
msgstr ""
|
2854 |
|
2855 |
-
#: includes/
|
2856 |
-
msgid "
|
2857 |
msgstr ""
|
2858 |
|
2859 |
-
#: includes/
|
2860 |
-
msgid "
|
2861 |
msgstr ""
|
2862 |
|
2863 |
-
#: includes/
|
2864 |
-
msgid "
|
2865 |
msgstr ""
|
2866 |
|
2867 |
-
#: includes/
|
2868 |
-
msgid "
|
2869 |
msgstr ""
|
2870 |
|
2871 |
-
#: includes/
|
2872 |
-
msgid "
|
2873 |
msgstr ""
|
2874 |
|
2875 |
-
#: includes/
|
2876 |
-
msgid "
|
2877 |
msgstr ""
|
2878 |
|
2879 |
-
#: includes/
|
2880 |
-
msgid "
|
2881 |
msgstr ""
|
2882 |
|
2883 |
-
#: includes/
|
2884 |
-
msgid "
|
|
|
|
|
2885 |
msgstr ""
|
2886 |
|
2887 |
-
#: includes/
|
2888 |
-
#: includes/
|
2889 |
-
|
|
|
2890 |
msgstr ""
|
2891 |
|
2892 |
-
#: includes/
|
2893 |
-
msgid ""
|
2894 |
-
"This sample privacy policy includes the basics around what personal data "
|
2895 |
-
"your multivendor store may be collecting, storing and sharing, as well as "
|
2896 |
-
"who may have access to that data. Depending on what settings are enabled "
|
2897 |
-
"and which additional plugins are used, the specific information shared by "
|
2898 |
-
"your store will vary. We recommend consulting with a lawyer when deciding "
|
2899 |
-
"what information to disclose on your privacy policy."
|
2900 |
msgstr ""
|
2901 |
|
2902 |
-
#: includes/
|
2903 |
-
msgid "
|
2904 |
msgstr ""
|
2905 |
|
2906 |
-
#: includes/
|
2907 |
-
msgid "
|
2908 |
msgstr ""
|
2909 |
|
2910 |
-
#: includes/
|
2911 |
-
|
|
|
|
|
|
|
|
|
2912 |
msgstr ""
|
2913 |
|
2914 |
-
#: includes/
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
|
|
2918 |
msgstr ""
|
2919 |
|
2920 |
-
#: includes/
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
|
|
2924 |
msgstr ""
|
2925 |
|
2926 |
-
#: includes/
|
2927 |
-
msgid ""
|
2928 |
-
"Location, IP address and browser type: we’ll use this for purposes like "
|
2929 |
-
"estimating taxes and shipping"
|
2930 |
msgstr ""
|
2931 |
|
2932 |
-
#: includes/
|
2933 |
-
msgid ""
|
2934 |
-
"Shipping address: we’ll ask you to enter this so we can, for instance, "
|
2935 |
-
"estimate shipping before you place an order, and send you the order!"
|
2936 |
msgstr ""
|
2937 |
|
2938 |
-
#: includes/
|
2939 |
-
msgid ""
|
2940 |
-
"We’ll also use cookies to keep track of cart contents while you’re browsing "
|
2941 |
-
"our site."
|
2942 |
msgstr ""
|
2943 |
|
2944 |
-
#: includes/
|
2945 |
-
|
2946 |
-
|
2947 |
-
"section from here."
|
2948 |
msgstr ""
|
2949 |
|
2950 |
-
#: includes/
|
2951 |
-
|
2952 |
-
"
|
2953 |
-
"your name, billing address, shipping address, email address, phone number, "
|
2954 |
-
"credit card/payment details and optional account information like username "
|
2955 |
-
"and password. We’ll use this information for purposes, such as, to:"
|
2956 |
msgstr ""
|
2957 |
|
2958 |
-
#: includes/
|
2959 |
-
msgid "
|
2960 |
msgstr ""
|
2961 |
|
2962 |
-
#: includes/
|
2963 |
-
msgid "
|
2964 |
msgstr ""
|
2965 |
|
2966 |
-
#: includes/
|
2967 |
-
msgid "
|
2968 |
msgstr ""
|
2969 |
|
2970 |
-
#: includes/
|
2971 |
-
msgid "
|
2972 |
msgstr ""
|
2973 |
|
2974 |
-
#: includes/
|
2975 |
-
msgid "
|
2976 |
msgstr ""
|
2977 |
|
2978 |
-
#: includes/
|
2979 |
-
msgid "
|
2980 |
msgstr ""
|
2981 |
|
2982 |
-
#: includes/
|
2983 |
-
msgid "
|
2984 |
msgstr ""
|
2985 |
|
2986 |
-
#: includes/
|
2987 |
-
msgid ""
|
2988 |
-
"If you create an account, we will store your name, address, email and phone "
|
2989 |
-
"number, which will be used to populate the checkout for future orders."
|
2990 |
msgstr ""
|
2991 |
|
2992 |
-
#: includes/
|
2993 |
-
msgid ""
|
2994 |
-
"We generally store information about you for as long as we need the "
|
2995 |
-
"information for the purposes for which we collect and use it, and we are "
|
2996 |
-
"not legally required to continue to keep it. For example, we will store "
|
2997 |
-
"order information for XXX years for tax and accounting purposes. This "
|
2998 |
-
"includes your name, email address and billing and shipping addresses."
|
2999 |
msgstr ""
|
3000 |
|
3001 |
-
#: includes/
|
3002 |
-
msgid "
|
3003 |
msgstr ""
|
3004 |
|
3005 |
-
#: includes/
|
3006 |
-
msgid "
|
3007 |
msgstr ""
|
3008 |
|
3009 |
-
#: includes/
|
3010 |
-
msgid ""
|
3011 |
-
"Members of our team have access to the information you provide us. For "
|
3012 |
-
"example, both Administrators and Shop Managers can access:"
|
3013 |
msgstr ""
|
3014 |
|
3015 |
-
#: includes/
|
3016 |
-
msgid ""
|
3017 |
-
"Order information like what was purchased, when it was purchased and where "
|
3018 |
-
"it should be sent, and"
|
3019 |
msgstr ""
|
3020 |
|
3021 |
-
#: includes/
|
3022 |
-
msgid ""
|
3023 |
-
"Customer information like your name, email address, and billing and "
|
3024 |
-
"shipping information."
|
3025 |
msgstr ""
|
3026 |
|
3027 |
-
#: includes/
|
3028 |
-
msgid ""
|
3029 |
-
"Our team members have access to this information to help fulfill orders, "
|
3030 |
-
"process refunds and support you."
|
3031 |
msgstr ""
|
3032 |
|
3033 |
-
#: includes/
|
3034 |
-
msgid "
|
3035 |
msgstr ""
|
3036 |
|
3037 |
-
#: includes/
|
3038 |
-
msgid ""
|
3039 |
-
"In this section you should list who you’re sharing data with, and for what "
|
3040 |
-
"purpose. This could include, but may not be limited to, analytics, "
|
3041 |
-
"marketing, payment gateways, shipping providers, and third party embeds."
|
3042 |
msgstr ""
|
3043 |
|
3044 |
-
#: includes/
|
3045 |
-
msgid ""
|
3046 |
-
"We share information with third parties who help us provide our orders and "
|
3047 |
-
"store services to you; for example --"
|
3048 |
msgstr ""
|
3049 |
|
3050 |
-
#: includes/
|
3051 |
-
msgid "
|
3052 |
msgstr ""
|
3053 |
|
3054 |
-
#: includes/
|
3055 |
-
msgid ""
|
3056 |
-
"In this subsection you should list which third party payment processors "
|
3057 |
-
"you’re using to take payments on your store since these may handle customer "
|
3058 |
-
"data. We’ve included PayPal as an example, but you should remove this if "
|
3059 |
-
"you’re not using PayPal."
|
3060 |
msgstr ""
|
3061 |
|
3062 |
-
#: includes/
|
3063 |
-
msgid ""
|
3064 |
-
"We accept payments through PayPal. When processing payments, some of your "
|
3065 |
-
"data will be passed to PayPal, including information required to process or "
|
3066 |
-
"support the payment, such as the purchase total and billing information."
|
3067 |
msgstr ""
|
3068 |
|
3069 |
-
#: includes/
|
3070 |
-
msgid ""
|
3071 |
-
"Please see the <a "
|
3072 |
-
"href=\"https://www.paypal.com/us/webapps/mpp/ua/privacy-full\">PayPal "
|
3073 |
-
"Privacy Policy</a> for more details."
|
3074 |
msgstr ""
|
3075 |
|
3076 |
-
#: includes/
|
3077 |
-
msgid "
|
3078 |
msgstr ""
|
3079 |
|
3080 |
-
#: includes/
|
3081 |
-
msgid ""
|
3082 |
-
"Dokan has premium modules that perform specific and special purpose tasks. "
|
3083 |
-
"Each of the modules collect additional information. Also third party "
|
3084 |
-
"extensions and integrations collect data that is applicable to the each of "
|
3085 |
-
"their individual privacy policy."
|
3086 |
msgstr ""
|
3087 |
|
3088 |
-
#: includes/
|
3089 |
-
|
3090 |
-
#: src/admin/pages/VendorAccountFields.vue:49
|
3091 |
-
#: templates/settings/store-form.php:116
|
3092 |
-
msgid "Store Name"
|
3093 |
msgstr ""
|
3094 |
|
3095 |
-
#: includes/
|
3096 |
-
msgid "
|
3097 |
msgstr ""
|
3098 |
|
3099 |
-
#: includes/
|
3100 |
-
msgid "
|
3101 |
msgstr ""
|
3102 |
|
3103 |
-
#: includes/
|
3104 |
-
|
3105 |
-
#: templates/admin-setup-wizard/step-store-wc-fields.php:33
|
3106 |
-
#: templates/maps/mapbox-with-search.php:5
|
3107 |
-
#: templates/settings/address-form.php:23
|
3108 |
-
msgid "Address"
|
3109 |
msgstr ""
|
3110 |
|
3111 |
-
#: includes/
|
3112 |
-
msgid "
|
3113 |
msgstr ""
|
3114 |
|
3115 |
-
#: includes/
|
3116 |
-
msgid "
|
3117 |
msgstr ""
|
3118 |
|
3119 |
-
#: includes/
|
3120 |
-
msgid "
|
3121 |
msgstr ""
|
3122 |
|
3123 |
-
#: includes/
|
3124 |
-
|
3125 |
-
msgid "Facebook"
|
3126 |
msgstr ""
|
3127 |
|
3128 |
-
#: includes/
|
3129 |
-
|
3130 |
-
msgid "Google Plus"
|
3131 |
msgstr ""
|
3132 |
|
3133 |
-
#: includes/
|
3134 |
-
|
3135 |
-
msgid "Twitter"
|
3136 |
msgstr ""
|
3137 |
|
3138 |
-
#: includes/
|
3139 |
-
|
3140 |
-
msgid "Pinterest"
|
3141 |
msgstr ""
|
3142 |
|
3143 |
-
#: includes/
|
3144 |
-
|
3145 |
-
msgid "Linkedin"
|
3146 |
msgstr ""
|
3147 |
|
3148 |
-
#: includes/
|
3149 |
-
|
3150 |
-
msgid "Youtube"
|
3151 |
msgstr ""
|
3152 |
|
3153 |
-
#: includes/
|
3154 |
-
|
3155 |
-
msgid "Instagram"
|
3156 |
msgstr ""
|
3157 |
|
3158 |
-
#: includes/
|
3159 |
-
|
3160 |
-
|
|
|
3161 |
msgstr ""
|
3162 |
|
3163 |
-
#: includes/
|
3164 |
-
msgid "
|
3165 |
msgstr ""
|
3166 |
|
3167 |
-
#: includes/
|
3168 |
-
msgid "
|
3169 |
msgstr ""
|
3170 |
|
3171 |
-
#: includes/
|
3172 |
-
|
3173 |
-
#: src/admin/pages/VendorPaymentFields.vue:11
|
3174 |
-
msgid "Account Name"
|
3175 |
msgstr ""
|
3176 |
|
3177 |
-
#: includes/
|
3178 |
-
|
3179 |
-
msgid "Account Number"
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: includes/
|
3183 |
-
|
3184 |
-
|
3185 |
-
msgid "Bank Name"
|
3186 |
msgstr ""
|
3187 |
|
3188 |
-
#: includes/
|
3189 |
-
|
3190 |
-
#: src/admin/pages/VendorPaymentFields.vue:26
|
3191 |
-
msgid "Bank Address"
|
3192 |
msgstr ""
|
3193 |
|
3194 |
-
#: includes/
|
3195 |
-
|
3196 |
-
msgid "
|
3197 |
msgstr ""
|
3198 |
|
3199 |
-
#: includes/
|
3200 |
-
|
|
|
3201 |
msgstr ""
|
3202 |
|
3203 |
-
#: includes/
|
3204 |
-
|
3205 |
-
msgid "
|
3206 |
msgstr ""
|
3207 |
|
3208 |
-
#: includes/
|
3209 |
-
msgid "
|
3210 |
msgstr ""
|
3211 |
|
3212 |
-
#: includes/
|
3213 |
-
msgid "
|
3214 |
msgstr ""
|
3215 |
|
3216 |
-
#: includes/
|
3217 |
-
msgid "
|
3218 |
msgstr ""
|
3219 |
|
3220 |
-
#: includes/
|
3221 |
-
msgid "
|
3222 |
msgstr ""
|
3223 |
|
3224 |
-
#: includes/
|
3225 |
-
msgid "
|
3226 |
msgstr ""
|
3227 |
|
3228 |
-
#: includes/
|
3229 |
-
msgid "
|
3230 |
msgstr ""
|
3231 |
|
3232 |
-
#: includes/
|
3233 |
-
msgid "
|
3234 |
msgstr ""
|
3235 |
|
3236 |
-
#: includes/
|
3237 |
-
msgid "
|
3238 |
msgstr ""
|
3239 |
|
3240 |
-
#: includes/
|
3241 |
-
msgid "
|
3242 |
msgstr ""
|
3243 |
|
3244 |
-
#: includes/
|
3245 |
-
msgid "
|
3246 |
msgstr ""
|
3247 |
|
3248 |
-
#: includes/
|
3249 |
-
msgid "
|
3250 |
msgstr ""
|
3251 |
|
3252 |
-
#: includes/
|
3253 |
-
msgid "
|
3254 |
msgstr ""
|
3255 |
|
3256 |
-
#: includes/
|
3257 |
-
msgid "
|
3258 |
msgstr ""
|
3259 |
|
3260 |
-
#: includes/
|
3261 |
-
|
3262 |
-
msgid "Unable to restore stock for item %s."
|
3263 |
msgstr ""
|
3264 |
|
3265 |
-
#: includes/
|
3266 |
-
msgid "
|
3267 |
msgstr ""
|
3268 |
|
3269 |
-
#: includes/
|
3270 |
-
msgid "
|
3271 |
msgstr ""
|
3272 |
|
3273 |
-
#: includes/
|
3274 |
-
msgid "
|
3275 |
msgstr ""
|
3276 |
|
3277 |
-
#: includes/
|
3278 |
-
msgid "
|
3279 |
msgstr ""
|
3280 |
|
3281 |
-
#: includes/
|
3282 |
-
msgid "
|
3283 |
msgstr ""
|
3284 |
|
3285 |
-
#: includes/
|
3286 |
-
msgid "
|
3287 |
msgstr ""
|
3288 |
|
3289 |
-
#: includes/
|
3290 |
-
msgid "
|
3291 |
msgstr ""
|
3292 |
|
3293 |
-
#: includes/
|
3294 |
-
msgid "
|
3295 |
msgstr ""
|
3296 |
|
3297 |
-
#: includes/
|
3298 |
-
msgid "
|
3299 |
msgstr ""
|
3300 |
|
3301 |
-
#: includes/
|
3302 |
-
msgid "
|
3303 |
msgstr ""
|
3304 |
|
3305 |
-
#: includes/
|
3306 |
-
msgid "
|
3307 |
msgstr ""
|
3308 |
|
3309 |
-
#: includes/
|
3310 |
-
msgid "
|
3311 |
msgstr ""
|
3312 |
|
3313 |
-
#: includes/
|
3314 |
-
msgid "
|
3315 |
msgstr ""
|
3316 |
|
3317 |
-
#: includes/
|
3318 |
-
msgid "
|
3319 |
-
|
3320 |
-
msgstr[0] ""
|
3321 |
-
msgstr[1] ""
|
3322 |
|
3323 |
-
#: includes/
|
3324 |
-
msgid "
|
3325 |
msgstr ""
|
3326 |
|
3327 |
-
#: includes/
|
3328 |
-
msgid "
|
3329 |
msgstr ""
|
3330 |
|
3331 |
-
#: includes/
|
3332 |
-
msgid "
|
3333 |
msgstr ""
|
3334 |
|
3335 |
-
#: includes/
|
3336 |
-
|
|
|
3337 |
msgstr ""
|
3338 |
|
3339 |
-
#: includes/
|
3340 |
-
|
3341 |
-
"
|
3342 |
-
"form widget "
|
3343 |
msgstr ""
|
3344 |
|
3345 |
-
#: includes/
|
3346 |
-
msgid "
|
3347 |
msgstr ""
|
3348 |
|
3349 |
-
#: includes/
|
3350 |
-
msgid "
|
|
|
|
|
3351 |
msgstr ""
|
3352 |
|
3353 |
-
#: includes/
|
3354 |
-
|
3355 |
-
#: includes/emails/class-dokan-email-new-product.php:161
|
3356 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:141
|
3357 |
-
#: includes/emails/class-dokan-email-product-published.php:146
|
3358 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:146
|
3359 |
-
#: includes/emails/class-dokan-withdraw-approved.php:143
|
3360 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:143
|
3361 |
-
msgid "Enable/Disable"
|
3362 |
msgstr ""
|
3363 |
|
3364 |
-
#: includes/
|
3365 |
-
|
3366 |
-
#: includes/emails/class-dokan-email-new-product.php:163
|
3367 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:143
|
3368 |
-
#: includes/emails/class-dokan-email-product-published.php:148
|
3369 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:148
|
3370 |
-
#: includes/emails/class-dokan-withdraw-approved.php:145
|
3371 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:145
|
3372 |
-
msgid "Enable this email notification"
|
3373 |
msgstr ""
|
3374 |
|
3375 |
-
#: includes/
|
3376 |
-
|
3377 |
-
#: includes/emails/class-dokan-email-new-product.php:175
|
3378 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:155
|
3379 |
-
#: includes/emails/class-dokan-email-product-published.php:153
|
3380 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:160
|
3381 |
-
#: includes/emails/class-dokan-withdraw-approved.php:149
|
3382 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:149
|
3383 |
-
msgid "Subject"
|
3384 |
msgstr ""
|
3385 |
|
3386 |
-
#: includes/
|
3387 |
-
|
3388 |
-
#: includes/emails/class-dokan-email-new-product-pending.php:171
|
3389 |
-
#: includes/emails/class-dokan-email-new-product-pending.php:180
|
3390 |
-
#: includes/emails/class-dokan-email-new-product.php:179
|
3391 |
-
#: includes/emails/class-dokan-email-new-product.php:188
|
3392 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:159
|
3393 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:168
|
3394 |
-
#: includes/emails/class-dokan-email-product-published.php:157
|
3395 |
-
#: includes/emails/class-dokan-email-product-published.php:166
|
3396 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:164
|
3397 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:173
|
3398 |
-
#: includes/emails/class-dokan-withdraw-approved.php:153
|
3399 |
-
#: includes/emails/class-dokan-withdraw-approved.php:162
|
3400 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:153
|
3401 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:162
|
3402 |
-
#. translators: %s: list of placeholders
|
3403 |
-
msgid "Available placeholders: %s"
|
3404 |
msgstr ""
|
3405 |
|
3406 |
-
#: includes/
|
3407 |
-
|
3408 |
-
#: includes/emails/class-dokan-email-new-product.php:184
|
3409 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:164
|
3410 |
-
#: includes/emails/class-dokan-email-product-published.php:162
|
3411 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:169
|
3412 |
-
#: includes/emails/class-dokan-withdraw-approved.php:158
|
3413 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:158
|
3414 |
-
msgid "Email heading"
|
3415 |
msgstr ""
|
3416 |
|
3417 |
-
#: includes/
|
3418 |
-
|
3419 |
-
#: includes/emails/class-dokan-email-new-product.php:193
|
3420 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:173
|
3421 |
-
#: includes/emails/class-dokan-email-product-published.php:171
|
3422 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:178
|
3423 |
-
#: includes/emails/class-dokan-withdraw-approved.php:167
|
3424 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:167
|
3425 |
-
msgid "Email type"
|
3426 |
msgstr ""
|
3427 |
|
3428 |
-
#: includes/
|
3429 |
-
|
3430 |
-
#: includes/emails/class-dokan-email-new-product.php:195
|
3431 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:175
|
3432 |
-
#: includes/emails/class-dokan-email-product-published.php:173
|
3433 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:180
|
3434 |
-
#: includes/emails/class-dokan-withdraw-approved.php:169
|
3435 |
-
#: includes/emails/class-dokan-withdraw-cancelled.php:169
|
3436 |
-
msgid "Choose which format of email to send."
|
3437 |
msgstr ""
|
3438 |
|
3439 |
-
#: includes/
|
3440 |
-
msgid "
|
3441 |
msgstr ""
|
3442 |
|
3443 |
-
#: includes/
|
3444 |
-
|
3445 |
-
"
|
3446 |
-
"product is created by vendors."
|
3447 |
msgstr ""
|
3448 |
|
3449 |
-
#: includes/
|
3450 |
-
msgid ""
|
3451 |
-
"[{site_title}] A New product is pending from ({seller_name}) - "
|
3452 |
-
"{product_title}"
|
3453 |
msgstr ""
|
3454 |
|
3455 |
-
#: includes/
|
3456 |
-
msgid "
|
3457 |
msgstr ""
|
3458 |
|
3459 |
-
#: includes/
|
3460 |
-
|
3461 |
-
#: includes/emails/class-dokan-email-new-seller-registered.php:147
|
3462 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:152
|
3463 |
-
msgid "Recipient(s)"
|
3464 |
msgstr ""
|
3465 |
|
3466 |
-
#: includes/
|
3467 |
-
#: includes/
|
3468 |
-
|
3469 |
-
#: includes/emails/class-dokan-vendor-withdraw-request.php:154
|
3470 |
-
msgid "Enter recipients (comma separated) for this email. Defaults to %s."
|
3471 |
msgstr ""
|
3472 |
|
3473 |
-
#: includes/
|
3474 |
-
msgid "
|
3475 |
msgstr ""
|
3476 |
|
3477 |
-
#: includes/
|
3478 |
-
msgid ""
|
3479 |
-
"New Product emails are sent to chosen recipient(s) when a new product is "
|
3480 |
-
"created by vendors."
|
3481 |
msgstr ""
|
3482 |
|
3483 |
-
#: includes/
|
3484 |
-
msgid "
|
3485 |
msgstr ""
|
3486 |
|
3487 |
-
#: includes/
|
3488 |
-
msgid "
|
3489 |
msgstr ""
|
3490 |
|
3491 |
-
#: includes/
|
3492 |
-
msgid "
|
3493 |
msgstr ""
|
3494 |
|
3495 |
-
#: includes/
|
3496 |
-
msgid ""
|
3497 |
-
"These emails are sent to chosen recipient(s) when a new vendor registers in "
|
3498 |
-
"marketplace"
|
3499 |
msgstr ""
|
3500 |
|
3501 |
-
#: includes/
|
3502 |
-
msgid "
|
3503 |
msgstr ""
|
3504 |
|
3505 |
-
#: includes/
|
3506 |
-
msgid "
|
3507 |
msgstr ""
|
3508 |
|
3509 |
-
#: includes/
|
3510 |
-
msgid "
|
3511 |
msgstr ""
|
3512 |
|
3513 |
-
#: includes/
|
3514 |
-
|
3515 |
-
"
|
3516 |
-
"published."
|
3517 |
msgstr ""
|
3518 |
|
3519 |
-
#: includes/
|
3520 |
-
msgid "
|
3521 |
msgstr ""
|
3522 |
|
3523 |
-
#: includes/
|
3524 |
-
msgid "
|
3525 |
msgstr ""
|
3526 |
|
3527 |
-
#: includes/
|
3528 |
-
msgid "
|
3529 |
msgstr ""
|
3530 |
|
3531 |
-
#: includes/
|
3532 |
msgid ""
|
3533 |
-
"
|
3534 |
-
"
|
3535 |
msgstr ""
|
3536 |
|
3537 |
-
#: includes/
|
3538 |
-
msgid "
|
3539 |
msgstr ""
|
3540 |
|
3541 |
-
#: includes/
|
3542 |
-
msgid "
|
3543 |
msgstr ""
|
3544 |
|
3545 |
-
#: includes/
|
3546 |
-
msgid "
|
3547 |
msgstr ""
|
3548 |
|
3549 |
-
#: includes/
|
3550 |
-
msgid "
|
3551 |
msgstr ""
|
3552 |
|
3553 |
-
#: includes/
|
3554 |
-
msgid "
|
3555 |
msgstr ""
|
3556 |
|
3557 |
-
#: includes/
|
3558 |
-
msgid "
|
3559 |
msgstr ""
|
3560 |
|
3561 |
-
#: includes/
|
3562 |
-
msgid "
|
3563 |
msgstr ""
|
3564 |
|
3565 |
-
#: includes/
|
3566 |
-
msgid "
|
3567 |
msgstr ""
|
3568 |
|
3569 |
-
#: includes/
|
3570 |
-
msgid "
|
3571 |
msgstr ""
|
3572 |
|
3573 |
-
#: includes/
|
3574 |
-
msgid "
|
3575 |
msgstr ""
|
3576 |
|
3577 |
-
#: includes/
|
3578 |
-
msgid "
|
3579 |
msgstr ""
|
3580 |
|
3581 |
-
#: incl
|
2 |
# This file is distributed under the GPL2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Dokan 3.0.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wedevs.com/contact/\n"
|
7 |
+
"POT-Creation-Date: 2020-02-03 10:09:54+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
39 |
msgid "1233456789"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: dokan.php:187
|
43 |
+
msgid ""
|
44 |
+
"The Minimum PHP Version Requirement for <b>Dokan</b> is %s. You are Running "
|
45 |
+
"PHP %s"
|
|
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: dokan.php:435
|
49 |
+
msgid "Get Pro"
|
|
|
|
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: dokan.php:438 includes/Admin/AdminBar.php:68 includes/Admin/Menu.php:59
|
53 |
+
#: includes/Dashboard/Templates/Settings.php:58
|
54 |
+
#: includes/Dashboard/Templates/Settings.php:62 includes/template-tags.php:354
|
55 |
+
#: src/admin/pages/Settings.vue:3
|
56 |
+
msgid "Settings"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: dokan.php:439
|
60 |
+
msgid "Documentation"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: dokan.php:470
|
64 |
+
msgid ""
|
65 |
+
"Dokan requires WooCommerce to be installed and active. You can activate %s "
|
66 |
+
"here."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/Abstracts/DokanBackgroundProcesses.php:86
|
70 |
+
msgid "Every %d Minutes"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/Abstracts/DokanPromotion.php:81
|
74 |
+
msgid "Learn More →"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/Abstracts/DokanPromotion.php:186
|
78 |
+
msgid "You have no permission to do that"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/Abstracts/DokanPromotion.php:190 includes/Admin/Settings.php:43
|
82 |
+
#: includes/Admin/Settings.php:71
|
83 |
+
msgid "Invalid nonce"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: includes/Abstracts/DokanRESTController.php:28
|
87 |
+
#: includes/Abstracts/DokanRESTController.php:205
|
88 |
+
#: includes/Abstracts/DokanRESTController.php:279
|
89 |
+
msgid "Method '%s' not implemented. Must be overridden in subclass."
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: includes/Abstracts/DokanRESTController.php:69
|
93 |
+
#: includes/REST/ProductController.php:797
|
94 |
+
msgid ""
|
95 |
+
"To manipulate product variations you should use the "
|
96 |
+
"/products/<product_id>/variations/<id> endpoint."
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/Abstracts/DokanRESTController.php:71
|
100 |
+
#: includes/REST/OrderController.php:200
|
101 |
+
#: includes/REST/ProductController.php:295
|
102 |
+
#: includes/REST/ProductController.php:320
|
103 |
+
msgid "Invalid ID."
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: includes/Abstracts/DokanRESTController.php:189
|
107 |
+
#: includes/REST/OrderController.php:663
|
108 |
+
msgid "The %s cannot be deleted."
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: includes/Abstracts/DokanShortcode.php:11
|
112 |
+
msgid "$shortcode property is empty."
|
113 |
msgstr ""
|
114 |
|
115 |
+
#. Plugin Name of the plugin/theme
|
116 |
+
msgid "Dokan"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: includes/Admin/AdminBar.php:47 includes/Admin/Menu.php:42
|
120 |
+
#: includes/Admin/Settings.php:411 includes/Install/Installer.php:157
|
121 |
+
#: includes/template-tags.php:323 src/admin/pages/Dashboard.vue:3
|
122 |
+
msgid "Dashboard"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/Admin/AdminBar.php:54 includes/Admin/Menu.php:32
|
126 |
+
#: includes/Admin/Menu.php:43 includes/Admin/SetupWizard.php:140
|
127 |
+
#: includes/template-tags.php:345 templates/withdraw/header.php:11
|
128 |
+
msgid "Withdraw"
|
|
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: includes/Admin/AdminBar.php:61 includes/Admin/Menu.php:51
|
132 |
+
msgid "PRO Features"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: includes/Admin/Hooks.php:78 includes/Admin/Hooks.php:84
|
136 |
+
#: includes/Admin/Hooks.php:367 includes/Admin/Hooks.php:384
|
137 |
+
#: includes/Admin/Settings.php:340 includes/Admin/Settings.php:348
|
138 |
+
#: includes/Admin/SetupWizard.php:319 includes/Install/Installer.php:93
|
139 |
+
#: includes/wc-template.php:17 includes/wc-template.php:150
|
140 |
+
#: includes/wc-template.php:292 templates/my-orders.php:31
|
141 |
+
msgid "Vendor"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/Admin/Hooks.php:79
|
145 |
+
msgid "Actions"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/Admin/Hooks.php:80 includes/Admin/Hooks.php:85
|
149 |
+
msgid "Sub Order"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/Admin/Hooks.php:133
|
153 |
+
msgid " Sub Order of"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/Admin/Hooks.php:143
|
157 |
+
msgid "Show Sub-Orders"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/Admin/Hooks.php:143
|
161 |
+
msgid "Hide Sub-Orders"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: includes/Admin/Hooks.php:153
|
165 |
+
msgid "(no name)"
|
|
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: includes/Admin/Hooks.php:338
|
169 |
+
msgid "Toggle Sub-orders"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/Admin/Menu.php:36
|
173 |
+
msgid "Withdraw %s"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: includes/Admin/Menu.php:47 src/admin/pages/Vendors.vue:3
|
177 |
+
msgid "Vendors"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: includes/Admin/Menu.php:58
|
181 |
+
msgid "<span style=\"color:#f18500\">Help</span>"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: includes/Admin/Pointers.php:107
|
185 |
+
msgid "Important Details At a Glance"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: includes/Admin/Pointers.php:108
|
189 |
+
msgid ""
|
190 |
+
"View the status of your marketplace including vendors and withdraw from "
|
191 |
+
"here."
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/Admin/Pointers.php:114 includes/Admin/Pointers.php:131
|
195 |
+
#: includes/Admin/Pointers.php:181 includes/Admin/Pointers.php:198
|
196 |
+
#: includes/Admin/Pointers.php:215 src/admin/pages/AddVendor.vue:64
|
197 |
+
msgid "Next"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/Admin/Pointers.php:124
|
201 |
+
msgid "Your Sales Overview"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/Admin/Pointers.php:125
|
205 |
+
msgid "Get a complete overview of your sales, orders and commissions."
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: includes/Admin/Pointers.php:138
|
209 |
+
msgid "News & Updates"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/Admin/Pointers.php:139
|
213 |
+
msgid "Get all the latest news and updates of Dokan from here."
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/Admin/Pointers.php:174
|
217 |
+
msgid "General Settings"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/Admin/Pointers.php:175
|
221 |
+
msgid "Configure all general settings for your marketplace from this tab."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/Admin/Pointers.php:191 includes/Admin/Settings.php:222
|
225 |
+
msgid "Selling Options"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: includes/Admin/Pointers.php:192
|
229 |
+
msgid "You can configure different selling options for your vendors"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/Admin/Pointers.php:208 includes/Admin/Settings.php:227
|
233 |
+
msgid "Withdraw Options"
|
|
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: includes/Admin/Pointers.php:209
|
237 |
+
msgid "Configure your vendor's balance withdrawal options"
|
|
|
|
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/Admin/Pointers.php:221
|
241 |
+
msgid "Dokan Pages"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: includes/Admin/Pointers.php:222
|
245 |
+
msgid "Dokan requires some pages to be configured and you can set them up here"
|
|
|
|
|
|
|
|
|
|
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: includes/Admin/Promotion.php:39
|
249 |
+
msgid "Create Customizable Paid Subscription Packs For Your Vendors"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: includes/Admin/Promotion.php:40
|
253 |
+
msgid ""
|
254 |
+
"By using this module, make it mandatory for your vendors to buy a "
|
255 |
+
"subscription pack to sell products in your marketplace."
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/Admin/Promotion.php:47
|
259 |
+
msgid "Increase conversions 270% by displaying reviews"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/Admin/Promotion.php:48
|
263 |
+
msgid ""
|
264 |
+
"This extension enables your customers to post a review for each store "
|
265 |
+
"available on your site."
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: includes/Admin/Promotion.php:55
|
269 |
+
msgid "Verify Your Sellers To Earn Customer Reliability"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: includes/Admin/Promotion.php:56
|
273 |
+
msgid ""
|
274 |
+
"Allow your vendors to verify their stores using social profiles, phone, "
|
275 |
+
"photo ID etc. using this advanced and handy module."
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: includes/Admin/Promotion.php:63
|
279 |
+
msgid "Earn more from multiple commission type"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/Admin/Promotion.php:64
|
283 |
+
msgid ""
|
284 |
+
"With this feature, you will be able to set different type of commission for "
|
285 |
+
"each vendor according to the products they are selling. Meaning more "
|
286 |
+
"earning for you."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/Admin/Promotion.php:71
|
290 |
+
msgid "Get priority support 24/7/365"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: includes/Admin/Promotion.php:72
|
294 |
+
msgid ""
|
295 |
+
"Need to solve a conflict with your plugins, have a theme layout issues with "
|
296 |
+
"Dokan or any kind of problem you might face, we are here for you"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: includes/Admin/Promotion.php:79
|
300 |
+
msgid "97% of consumers look for deals when they shop"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: includes/Admin/Promotion.php:80
|
304 |
+
msgid ""
|
305 |
+
"No matter what type of coupon you want to create you can do that easily "
|
306 |
+
"using the pro version of Dokan. Set the coupon title, fix discount types, "
|
307 |
+
"restrict email addresses and much more."
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/Admin/Promotion.php:87
|
311 |
+
msgid "Exciting premium features to take your marketplace"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/Admin/Promotion.php:88
|
315 |
+
msgid ""
|
316 |
+
"With the simplest configuration options available, only by enabling a "
|
317 |
+
"single toggle button you will be able to do everything your competitors are "
|
318 |
+
"doing and even more."
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/Admin/Settings.php:37
|
322 |
+
msgid "You have no permission to get settings value"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: includes/Admin/Settings.php:65
|
326 |
+
msgid "You are not authorized to perform this action."
|
|
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: includes/Admin/Settings.php:75
|
330 |
+
msgid "`section` parameter is required."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: includes/Admin/Settings.php:93
|
334 |
+
msgid "Setting has been saved successfully."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/Admin/Settings.php:217
|
338 |
+
msgid "General"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/Admin/Settings.php:232
|
342 |
+
msgid "Page Settings"
|
|
|
|
|
|
|
|
|
|
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/Admin/Settings.php:237
|
346 |
+
msgid "Appearance"
|
|
|
|
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: includes/Admin/Settings.php:242 includes/Admin/Settings.php:537
|
350 |
+
msgid "Privacy Policy"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: includes/Admin/Settings.php:265
|
354 |
+
msgid "Site Options"
|
|
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: includes/Admin/Settings.php:270
|
358 |
+
msgid "Admin area access"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/Admin/Settings.php:271
|
362 |
+
msgid "Disallow Vendors and Customers from accessing the wp-admin dashboard area"
|
|
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: includes/Admin/Settings.php:277
|
366 |
+
#: templates/admin-setup-wizard/step-store.php:7
|
367 |
+
msgid "Vendor Store URL"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/Admin/Settings.php:278
|
371 |
+
msgid "Define the Vendor store URL (%s<strong>[this-text]</strong>/[vendor-name])"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: includes/Admin/Settings.php:284
|
375 |
+
msgid "Vendor Setup Wizard Logo"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: includes/Admin/Settings.php:286
|
379 |
+
msgid ""
|
380 |
+
"Recommended Logo size ( 270px X 90px ). If no logo is uploaded, site title "
|
381 |
+
"is shown by default."
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/Admin/Settings.php:290
|
385 |
+
msgid "Disable Welcome Wizard"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/Admin/Settings.php:291
|
389 |
+
msgid "Disable welcome wizard for newly registered vendors"
|
|
|
|
|
|
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: includes/Admin/Settings.php:300
|
393 |
+
msgid "Vendor Store Options"
|
|
|
|
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/Admin/Settings.php:305
|
397 |
+
msgid "Store Terms and Conditions"
|
|
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/Admin/Settings.php:306
|
401 |
+
msgid "Enable Terms and Conditions for vendor stores"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/Admin/Settings.php:315
|
405 |
+
msgid "Commission"
|
|
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: includes/Admin/Settings.php:320
|
409 |
+
msgid "Commission Type "
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: includes/Admin/Settings.php:321
|
413 |
+
msgid "Select a commission type for Vendor"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: includes/Admin/Settings.php:328 src/admin/pages/VendorPaymentFields.vue:69
|
417 |
+
#: src/admin/pages/VendorPaymentFields.vue:78
|
418 |
+
#: templates/admin-setup-wizard/step-selling.php:31
|
419 |
+
msgid "Admin Commission"
|
|
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: includes/Admin/Settings.php:329
|
423 |
+
msgid "Amount you get from each sale"
|
|
|
|
|
|
|
|
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: includes/Admin/Settings.php:337
|
427 |
+
#: templates/admin-setup-wizard/step-store.php:14
|
428 |
+
msgid "Shipping Fee Recipient"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: includes/Admin/Settings.php:338
|
432 |
+
msgid "Who will be receiving the Shipping fees"
|
|
|
|
|
|
|
|
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: includes/Admin/Settings.php:340 includes/Admin/Settings.php:348
|
436 |
+
#: includes/Admin/SetupWizard.php:320
|
437 |
+
msgid "Admin"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/Admin/Settings.php:345
|
441 |
+
#: templates/admin-setup-wizard/step-store.php:28
|
442 |
+
msgid "Tax Fee Recipient"
|
|
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: includes/Admin/Settings.php:346
|
446 |
+
msgid "Who will be receiving the Tax fees"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: includes/Admin/Settings.php:356
|
450 |
+
msgid "Vendor Capability"
|
|
|
|
|
|
|
|
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: includes/Admin/Settings.php:361
|
454 |
+
msgid "New Vendor Product Upload"
|
|
|
|
|
|
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/Admin/Settings.php:362
|
458 |
+
msgid "Allow newly registered vendors to add products"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/Admin/Settings.php:368
|
462 |
+
msgid "Disable Product Popup"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/Admin/Settings.php:369
|
466 |
+
msgid "Disable add new product in popup view"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/Admin/Settings.php:375
|
470 |
+
#: templates/admin-setup-wizard/step-selling.php:39
|
471 |
+
msgid "Order Status Change"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: includes/Admin/Settings.php:376
|
475 |
+
msgid "Allow/Disallow vendor to update order status"
|
|
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/Admin/Settings.php:394 includes/Admin/SetupWizard.php:435
|
479 |
+
msgid "Withdraw Methods"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/Admin/Settings.php:395
|
483 |
+
msgid "Select suitable Withdraw methods for Vendors"
|
|
|
|
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/Admin/Settings.php:402 includes/Admin/SetupWizard.php:493
|
487 |
+
msgid "Minimum Withdraw Limit"
|
|
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/Admin/Settings.php:403
|
491 |
+
msgid ""
|
492 |
+
"Minimum balance required to make a withdraw request. Leave blank to set no "
|
493 |
+
"minimum limits."
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: includes/Admin/Settings.php:412
|
497 |
+
msgid "Select a page to show Vendor Dashboard"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: includes/Admin/Settings.php:414 includes/Admin/Settings.php:422
|
501 |
+
#: includes/Admin/Settings.php:430 includes/Admin/Settings.php:438
|
502 |
+
#: includes/Admin/Settings.php:532
|
503 |
+
msgid "Select page"
|
504 |
msgstr ""
|
505 |
|
506 |
+
#: includes/Admin/Settings.php:419 includes/Install/Installer.php:169
|
507 |
+
#: templates/global/header-menu.php:46
|
508 |
+
msgid "My Orders"
|
|
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: includes/Admin/Settings.php:420
|
512 |
+
msgid "Select a page to show My Orders"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: includes/Admin/Settings.php:427
|
516 |
+
msgid "Store Listing"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: includes/Admin/Settings.php:428
|
520 |
+
msgid "Select a page to show all Stores"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: includes/Admin/Settings.php:435
|
524 |
+
msgid "Terms and Conditions Page"
|
|
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: includes/Admin/Settings.php:436
|
528 |
+
msgid "Select a page to show Terms and Conditions"
|
|
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: includes/Admin/Settings.php:440
|
532 |
+
msgid ""
|
533 |
+
"Select where you want to add Dokan pages <a target=\"_blank\" href=\"%s\"> "
|
534 |
+
"Learn More </a>"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: includes/Admin/Settings.php:446
|
538 |
+
msgid "Show Map on Store Page"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/Admin/Settings.php:447
|
542 |
+
msgid "Enable Map of the Store Location in the store sidebar"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/Admin/Settings.php:453
|
546 |
+
#: templates/admin-setup-wizard/step-store.php:42
|
547 |
+
msgid "Map API Source"
|
|
|
|
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/Admin/Settings.php:454
|
551 |
+
#: templates/admin-setup-wizard/step-store.php:52
|
552 |
+
msgid "Which Map API source you want to use in your site?"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: includes/Admin/Settings.php:459 includes/Admin/SetupWizard.php:332
|
556 |
+
msgid "Google Maps"
|
|
|
|
|
|
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: includes/Admin/Settings.php:460 includes/Admin/SetupWizard.php:333
|
560 |
+
msgid "Mapbox"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: includes/Admin/Settings.php:470
|
564 |
+
#: templates/admin-setup-wizard/step-store.php:56
|
565 |
+
msgid "Google Map API Key"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: includes/Admin/Settings.php:471
|
569 |
+
msgid ""
|
570 |
+
"<a href=\"https://developers.google.com/maps/documentation/javascript/\" "
|
571 |
+
"target=\"_blank\" rel=\"noopener noreferrer\">API Key</a> is needed to "
|
572 |
+
"display map on store page"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/Admin/Settings.php:481
|
576 |
+
#: templates/admin-setup-wizard/step-store.php:71
|
577 |
+
msgid "Mapbox Access Token"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: includes/Admin/Settings.php:482
|
581 |
+
#: templates/admin-setup-wizard/step-store.php:75
|
582 |
+
msgid ""
|
583 |
+
"<a href=\"https://docs.mapbox.com/help/how-mapbox-works/access-tokens/\" "
|
584 |
+
"target=\"_blank\" rel=\"noopener noreferrer\">Access Token</a> is needed to "
|
585 |
+
"display map on store page"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: includes/Admin/Settings.php:487
|
589 |
+
msgid "Show Contact Form on Store Page"
|
|
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: includes/Admin/Settings.php:488
|
593 |
+
msgid "Display a vendor contact form in the store sidebar"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: includes/Admin/Settings.php:494
|
597 |
+
msgid "Store Header Template"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: includes/Admin/Settings.php:506
|
601 |
+
msgid "Store Opening Closing Time Widget"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: includes/Admin/Settings.php:507
|
605 |
+
msgid "Enable store opening & closing time widget in the store sidebar"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: includes/Admin/Settings.php:513
|
609 |
+
msgid "Enable Store Sidebar From Theme"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: includes/Admin/Settings.php:514
|
613 |
+
msgid "Enable showing Store Sidebar From Your Theme."
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: includes/Admin/Settings.php:522
|
617 |
+
msgid "Enable Privacy Policy"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/Admin/Settings.php:524
|
621 |
+
msgid "Enable privacy policy for Vendor store contact form"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: includes/Admin/Settings.php:529
|
625 |
+
msgid "Privacy Page"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: includes/Admin/Settings.php:531
|
629 |
+
msgid "Select a page to show your privacy policy"
|
|
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: includes/Admin/Settings.php:540 includes/functions.php:3488
|
633 |
+
msgid ""
|
634 |
+
"Your personal data will be used to support your experience throughout this "
|
635 |
+
"website, to manage access to your account, and for other purposes described "
|
636 |
+
"in our [dokan_privacy_policy]"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: includes/Admin/SetupWizard.php:126 includes/Vendor/SetupWizard.php:70
|
640 |
+
msgid "Introduction"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: includes/Admin/SetupWizard.php:130 includes/Vendor/SetupWizard.php:75
|
644 |
+
#: includes/template-tags.php:368
|
645 |
+
msgid "Store"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: includes/Admin/SetupWizard.php:135 includes/Admin/UserProfile.php:294
|
649 |
+
msgid "Selling"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: includes/Admin/SetupWizard.php:145
|
653 |
+
msgid "Recommended"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: includes/Admin/SetupWizard.php:150 includes/Vendor/SetupWizard.php:85
|
657 |
+
msgid "Ready!"
|
|
|
|
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: includes/Admin/SetupWizard.php:227
|
661 |
+
msgid "Dokan › Setup Wizard"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: includes/Admin/SetupWizard.php:247 includes/Admin/SetupWizardNoWC.php:96
|
665 |
+
msgid "Return to the WordPress Dashboard"
|
|
|
|
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: includes/Admin/SetupWizard.php:294
|
669 |
+
#: templates/admin-setup-wizard/step-no-wc-introduction.php:2
|
670 |
+
msgid "Welcome to the world of Dokan!"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/Admin/SetupWizard.php:295
|
674 |
+
msgid ""
|
675 |
+
"Thank you for choosing Dokan to power your online marketplace! This quick "
|
676 |
+
"setup wizard will help you configure the basic settings. <strong>It’s "
|
677 |
+
"completely optional and shouldn’t take longer than three minutes.</strong>"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: includes/Admin/SetupWizard.php:296
|
681 |
+
msgid ""
|
682 |
+
"No time right now? If you don’t want to go through the wizard, you can skip "
|
683 |
+
"and return to the WordPress dashboard. Come back anytime if you change your "
|
684 |
+
"mind!"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: includes/Admin/SetupWizard.php:298 includes/Vendor/SetupWizard.php:155
|
688 |
+
#: templates/admin-setup-wizard/step-no-wc-introduction.php:54
|
689 |
+
msgid "Let's Go!"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: includes/Admin/SetupWizard.php:299 includes/Vendor/SetupWizard.php:156
|
693 |
+
msgid "Not right now"
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: includes/Admin/SetupWizard.php:431
|
697 |
+
msgid "Withdraw Setup"
|
|
|
|
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: includes/Admin/SetupWizard.php:442 includes/Withdraw/functions.php:12
|
701 |
+
msgid "PayPal"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: includes/Admin/SetupWizard.php:445
|
705 |
+
msgid "Enable PayPal for your vendor as a withdraw method"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: includes/Admin/SetupWizard.php:455
|
709 |
+
msgid "Bank"
|
|
|
|
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: includes/Admin/SetupWizard.php:458
|
713 |
+
msgid "Enable bank transfer for your vendor as a withdraw method"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: includes/Admin/SetupWizard.php:468
|
717 |
+
msgid "Skrill"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: includes/Admin/SetupWizard.php:471
|
721 |
+
msgid "Enable skrill for your vendor as a withdraw method"
|
|
|
|
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/Admin/SetupWizard.php:496
|
725 |
+
msgid ""
|
726 |
+
"Minimum balance required to make a withdraw request ( Leave it blank to set "
|
727 |
+
"no limits )"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: includes/Admin/SetupWizard.php:500
|
731 |
+
msgid "Order Status for Withdraw"
|
|
|
|
|
732 |
msgstr ""
|
733 |
|
734 |
+
#: includes/Admin/SetupWizard.php:506
|
735 |
+
#: includes/Dashboard/Templates/Dashboard.php:101
|
736 |
+
#: includes/Order/functions.php:490 templates/dashboard/orders-widget.php:26
|
737 |
+
msgid "Completed"
|
|
|
|
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: includes/Admin/SetupWizard.php:512
|
741 |
+
#: includes/Dashboard/Templates/Dashboard.php:111
|
742 |
+
#: includes/Order/functions.php:505 templates/dashboard/orders-widget.php:36
|
743 |
+
#: templates/orders/listing.php:138
|
744 |
+
msgid "Processing"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/Admin/SetupWizard.php:518 includes/Order/functions.php:500
|
748 |
+
msgid "On-hold"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/Admin/SetupWizard.php:523
|
752 |
+
msgid "Order status for which vendor can make a withdraw request."
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/Admin/SetupWizard.php:528 includes/Admin/SetupWizard.php:580
|
756 |
+
#: includes/Admin/SetupWizardWCAdmin.php:232
|
757 |
+
#: includes/Vendor/SetupWizard.php:243 includes/Vendor/SetupWizard.php:396
|
758 |
+
#: templates/admin-setup-wizard/step-selling.php:53
|
759 |
+
#: templates/admin-setup-wizard/step-store.php:100
|
760 |
+
msgid "Continue"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: includes/Admin/SetupWizard.php:529 includes/Vendor/SetupWizard.php:244
|
764 |
+
#: includes/Vendor/SetupWizard.php:397
|
765 |
+
#: templates/admin-setup-wizard/step-selling.php:54
|
766 |
+
#: templates/admin-setup-wizard/step-store.php:101
|
767 |
+
msgid "Skip this step"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: includes/Admin/SetupWizard.php:545
|
771 |
+
msgid "Recommended for All Dokan Marketplaces"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: includes/Admin/SetupWizard.php:547
|
775 |
+
msgid "Enhance your store with these recommended features."
|
|
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: includes/Admin/SetupWizard.php:557 includes/Admin/SetupWizard.php:561
|
779 |
+
#: includes/Admin/SetupWizard.php:604
|
780 |
+
msgid "WooCommerce Conversion Tracking"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: includes/Admin/SetupWizard.php:558
|
784 |
+
msgid "Track conversions on your WooCommerce store like a pro!"
|
|
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: includes/Admin/SetupWizard.php:560
|
788 |
+
msgid "WooCommerce Conversion Tracking logo"
|
789 |
msgstr ""
|
790 |
|
791 |
+
#: includes/Admin/SetupWizard.php:568 includes/Admin/SetupWizard.php:572
|
792 |
+
#: includes/Admin/SetupWizard.php:615
|
793 |
+
msgid "weForms"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/Admin/SetupWizard.php:569
|
797 |
+
msgid "Best Contact Form Plugin for WordPress."
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: includes/Admin/SetupWizard.php:571
|
801 |
+
msgid "weForms logo"
|
|
|
|
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: includes/Admin/SetupWizard.php:675
|
805 |
+
msgid "Your Marketplace is Ready!"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: includes/Admin/SetupWizard.php:680
|
809 |
+
msgid "Visit Dokan Dashboard"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: includes/Admin/SetupWizard.php:681
|
813 |
+
msgid "More Settings"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/Admin/SetupWizard.php:782
|
817 |
+
msgid "The following plugins will be installed and activated for you:"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: includes/Admin/SetupWizard.php:914
|
821 |
+
msgid "Contact Admin"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: includes/Admin/SetupWizardNoWC.php:20
|
825 |
+
msgid "Welcome to Dokan"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: includes/Admin/SetupWizardNoWC.php:133
|
829 |
+
msgid "Error installing WooCommerce plugin"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: includes/Admin/SetupWizardNoWC.php:177 includes/Vendor/SetupWizard.php:80
|
833 |
+
#: includes/template-tags.php:375
|
834 |
+
msgid "Payment"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: includes/Admin/SetupWizardNoWC.php:183
|
838 |
+
#: includes/Admin/SetupWizardWCAdmin.php:84 includes/Product/functions.php:184
|
839 |
+
msgid "Shipping"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/Admin/SetupWizardWCAdmin.php:75
|
843 |
+
#. translators: %s: country name including the 'the' prefix if needed
|
844 |
+
msgid ""
|
845 |
+
"We've created two Shipping Zones - for %s and for the rest of the world. "
|
846 |
+
"Below you can set Flat Rate shipping costs for these Zones or offer Free "
|
847 |
+
"Shipping."
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: includes/Admin/SetupWizardWCAdmin.php:96
|
851 |
+
#: includes/Admin/SetupWizardWCAdmin.php:107
|
852 |
+
msgid "Did you know you can print shipping labels at home?"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: includes/Admin/SetupWizardWCAdmin.php:97
|
856 |
+
msgid ""
|
857 |
+
"Use WooCommerce Shipping (powered by WooCommerce Services & Jetpack) to "
|
858 |
+
"save time at the post office by printing your shipping labels at home."
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: includes/Admin/SetupWizardWCAdmin.php:99
|
862 |
+
msgid "WooCommerce Services icon"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: includes/Admin/SetupWizardWCAdmin.php:108
|
866 |
+
msgid ""
|
867 |
+
"We recommend using ShipStation to save time at the post office by printing "
|
868 |
+
"your shipping labels at home. Try ShipStation free for 30 days."
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: includes/Admin/SetupWizardWCAdmin.php:110
|
872 |
+
msgid "ShipStation icon"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/Admin/SetupWizardWCAdmin.php:113
|
876 |
+
msgid "ShipStation"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: includes/Admin/SetupWizardWCAdmin.php:128
|
880 |
+
msgid "Shipping Zone"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: includes/Admin/SetupWizardWCAdmin.php:131
|
884 |
+
msgid "Shipping Method"
|
|
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: includes/Admin/SetupWizardWCAdmin.php:156
|
888 |
+
msgid "Locations not covered by your other zones"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: includes/Admin/SetupWizardWCAdmin.php:180
|
892 |
+
#. translators: %1$s: live rates tooltip text, %2$s: shipping extensions URL
|
893 |
+
msgid ""
|
894 |
+
"If you'd like to offer <span class=\"help_tip\" data-tip=\"%1$s\">live "
|
895 |
+
"rates</span> from a specific carrier (e.g. UPS) you can find a variety of "
|
896 |
+
"extensions available for WooCommerce <a href=\"%2$s\" "
|
897 |
+
"target=\"_blank\">here</a>."
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/Admin/SetupWizardWCAdmin.php:192
|
901 |
msgid ""
|
902 |
+
"A live rate is the exact cost to ship an order, quoted directly from the "
|
903 |
+
"shipping carrier."
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: includes/Admin/SetupWizardWCAdmin.php:207
|
907 |
+
#. translators: %1$s: weight unit dropdown, %2$s: dimension unit dropdown
|
908 |
+
msgid "We'll use %1$s for product weight and %2$s for product dimensions."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: includes/Admin/UserProfile.php:38 includes/Ajax.php:139
|
912 |
+
#: includes/Assets.php:398 src/admin/pages/VendorAccountFields.vue:279
|
913 |
+
#: src/admin/pages/VendorAccountFields.vue:311
|
914 |
+
#: src/admin/pages/VendorAccountFields.vue:343
|
915 |
+
msgid "Available"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: includes/Admin/UserProfile.php:39 includes/Assets.php:399
|
919 |
+
#: src/admin/pages/VendorAccountFields.vue:287
|
920 |
+
#: src/admin/pages/VendorAccountFields.vue:319
|
921 |
+
msgid "Not Available"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: includes/Admin/UserProfile.php:88 includes/Privacy.php:227
|
925 |
+
#: includes/Vendor/SetupWizard.php:213
|
926 |
+
#: src/admin/pages/VendorAddressFields.vue:31
|
927 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:24
|
928 |
+
msgid "Country"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: includes/Admin/UserProfile.php:92
|
932 |
+
msgid "Select a country…"
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: includes/Admin/UserProfile.php:95
|
936 |
+
msgid "State/County"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: includes/Admin/UserProfile.php:96
|
940 |
+
msgid "State/County or state code"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: includes/Admin/UserProfile.php:101
|
944 |
+
msgid "Dokan Options"
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: includes/Admin/UserProfile.php:106
|
948 |
+
msgid "Banner"
|
|
|
|
|
|
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: includes/Admin/UserProfile.php:118 templates/settings/store-form.php:74
|
952 |
+
msgid "Upload banner"
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: includes/Admin/UserProfile.php:122
|
956 |
+
msgid "Upload a banner for your store. Banner size is (%1$sx%2$s) pixels."
|
|
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: includes/Admin/UserProfile.php:134
|
960 |
+
msgid "Store name"
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: includes/Admin/UserProfile.php:141
|
964 |
+
#: src/admin/pages/VendorAccountFields.vue:53
|
965 |
+
msgid "Store URL"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/Admin/UserProfile.php:149 includes/Privacy.php:223
|
969 |
+
msgid "Address 1"
|
|
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: includes/Admin/UserProfile.php:156 includes/Privacy.php:224
|
973 |
+
msgid "Address 2"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: includes/Admin/UserProfile.php:163
|
977 |
+
msgid "Town/City"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: includes/Admin/UserProfile.php:170
|
981 |
+
msgid "Zip Code"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: includes/Admin/UserProfile.php:211
|
985 |
+
#: src/admin/pages/VendorAccountFields.vue:64
|
986 |
+
#: templates/account/vendor-registration.php:33
|
987 |
+
#: templates/global/seller-registration-form.php:38
|
988 |
+
msgid "Phone Number"
|
989 |
msgstr ""
|
990 |
|
991 |
+
#: includes/Admin/UserProfile.php:229
|
992 |
+
msgid "Payment Options : "
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: includes/Admin/UserProfile.php:234
|
996 |
+
msgid "Paypal Email "
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: includes/Admin/UserProfile.php:242
|
1000 |
+
msgid "Skrill Email "
|
|
|
1001 |
msgstr ""
|
1002 |
|
1003 |
+
#: includes/Admin/UserProfile.php:251
|
1004 |
+
msgid "Bank name "
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: includes/Admin/UserProfile.php:257
|
1008 |
+
msgid "Account Name "
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: includes/Admin/UserProfile.php:263
|
1012 |
+
msgid "Account Number "
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: includes/Admin/UserProfile.php:269
|
1016 |
+
msgid "Bank Address "
|
1017 |
msgstr ""
|
1018 |
|
1019 |
+
#: includes/Admin/UserProfile.php:275 includes/Privacy.php:284
|
1020 |
+
#: src/admin/pages/VendorPaymentFields.vue:30
|
1021 |
+
msgid "Routing Number"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: includes/Admin/UserProfile.php:281
|
1025 |
+
msgid "Bank IBAN "
|
|
|
|
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: includes/Admin/UserProfile.php:287
|
1029 |
+
msgid "Bank Swift "
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: includes/Admin/UserProfile.php:299
|
1033 |
+
msgid "Enable Adding Products"
|
|
|
|
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: includes/Admin/UserProfile.php:302
|
1037 |
+
msgid "Enable or disable product adding capability"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: includes/Admin/UserProfile.php:307
|
1041 |
+
msgid "Publishing"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: includes/Admin/UserProfile.php:312
|
1045 |
+
msgid "Publish product directly"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: includes/Admin/UserProfile.php:315
|
1049 |
+
msgid "Bypass pending, publish products directly"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: includes/Admin/UserProfile.php:320
|
1053 |
+
msgid "Admin Commission Type "
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: includes/Admin/UserProfile.php:327
|
1057 |
+
msgid "Set the commmission type admin gets from this seller"
|
|
|
|
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: includes/Admin/UserProfile.php:331
|
1061 |
+
msgid "Admin Commission "
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: includes/Admin/UserProfile.php:335
|
1065 |
+
msgid "It will override the default commission admin gets from each sales"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: includes/Admin/UserProfile.php:340
|
1069 |
+
msgid "Featured vendor"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: includes/Admin/UserProfile.php:345
|
1073 |
+
msgid "Mark as featured vendor"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: includes/Admin/UserProfile.php:348
|
1077 |
+
msgid "This vendor will be marked as a featured vendor."
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: includes/Admin/functions.php:211 includes/Admin/functions.php:485
|
1081 |
+
#: includes/REST/AdminReportController.php:134
|
1082 |
+
msgid "Total Sales"
|
1083 |
msgstr ""
|
1084 |
|
1085 |
+
#: includes/Admin/functions.php:218 includes/Admin/functions.php:492
|
1086 |
+
msgid "Total: "
|
|
|
1087 |
msgstr ""
|
1088 |
|
1089 |
+
#: includes/Admin/functions.php:221 includes/Admin/functions.php:495
|
1090 |
+
#: includes/REST/AdminReportController.php:142 includes/reports.php:359
|
1091 |
+
msgid "Number of orders"
|
|
|
|
|
1092 |
msgstr ""
|
1093 |
|
1094 |
+
#: includes/Admin/functions.php:228 includes/Admin/functions.php:502
|
1095 |
+
msgid "sales"
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: includes/Admin/functions.php:231 includes/Admin/functions.php:505
|
1099 |
+
#: includes/REST/AdminReportController.php:149
|
1100 |
+
msgid "Commision"
|
|
|
|
|
1101 |
msgstr ""
|
1102 |
|
1103 |
+
#: includes/Admin/functions.php:238 includes/Admin/functions.php:512
|
1104 |
+
msgid "Commision: "
|
1105 |
msgstr ""
|
1106 |
|
1107 |
+
#: includes/Ajax.php:71 includes/Ajax.php:946
|
1108 |
+
#: includes/Dashboard/Templates/Withdraw.php:110
|
1109 |
+
#: includes/Dashboard/Templates/Withdraw.php:169
|
1110 |
+
msgid "You have no permission to do this action"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
+
#: includes/Ajax.php:93
|
1114 |
+
msgid "Something wrong, please try again later"
|
1115 |
msgstr ""
|
1116 |
|
1117 |
+
#: includes/Ajax.php:108 includes/Dashboard/Templates/Settings.php:211
|
1118 |
+
#: includes/Dashboard/Templates/Settings.php:225
|
1119 |
+
#: includes/Dashboard/Templates/Settings.php:237
|
1120 |
+
#: includes/Dashboard/Templates/Settings.php:249
|
1121 |
+
#: includes/Dashboard/Templates/Settings.php:286
|
1122 |
+
#: includes/Dashboard/Templates/Settings.php:352
|
1123 |
+
#: includes/Dashboard/Templates/Settings.php:393
|
1124 |
+
#: includes/Dashboard/Templates/Settings.php:443
|
1125 |
+
#: includes/Dashboard/Templates/Withdraw.php:106
|
1126 |
+
#: includes/Dashboard/Templates/Withdraw.php:165
|
1127 |
+
msgid "Are you cheating?"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: includes/Ajax.php:156 includes/Ajax.php:191
|
1131 |
+
msgid "You do not have sufficient permissions to access this page."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: includes/Ajax.php:160 includes/Ajax.php:195
|
1135 |
+
msgid "You have taken too long. Please go back and retry."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: includes/Ajax.php:170 includes/Ajax.php:205
|
1139 |
+
msgid "You do not have permission to change this order"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: includes/Ajax.php:268
|
1143 |
+
msgid "File %d"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: includes/Ajax.php:290
|
1147 |
+
msgid "You have no permission to manage this order"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: includes/Ajax.php:325 includes/Ajax.php:330
|
1151 |
+
msgid "Please provide your name."
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: includes/Ajax.php:337 includes/template-tags.php:140
|
1155 |
+
msgid "Something went wrong!"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: includes/Ajax.php:343 includes/REST/StoreController.php:759
|
1159 |
+
msgid "Email sent successfully!"
|
|
|
|
|
|
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: includes/Ajax.php:402 templates/orders/details.php:288
|
1163 |
+
msgid "Delete note"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: includes/Ajax.php:432
|
1167 |
+
msgid "Shipping provider: "
|
|
|
|
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: includes/Ajax.php:432
|
1171 |
+
msgid "Shipping number: "
|
1172 |
msgstr ""
|
1173 |
|
1174 |
+
#: includes/Ajax.php:432
|
1175 |
+
msgid "Shipped date: "
|
|
|
|
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: includes/Ajax.php:469 includes/woo-views/html-product-download.php:14
|
1179 |
+
msgid "Delete"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
+
#: includes/Ajax.php:514
|
1183 |
+
msgid "Error: Nonce verification failed"
|
|
|
|
|
1184 |
msgstr ""
|
1185 |
|
1186 |
+
#: includes/Ajax.php:601
|
1187 |
+
msgid "Image could not be processed. Please go back and try again."
|
1188 |
msgstr ""
|
1189 |
|
1190 |
+
#: includes/Ajax.php:722
|
1191 |
+
#. translators: 1: user display name 2: user ID 3: user email
|
1192 |
+
msgid "%1$s (#%2$s – %3$s)"
|
|
|
|
|
1193 |
msgstr ""
|
1194 |
|
1195 |
+
#: includes/Ajax.php:867
|
1196 |
+
msgid "Invalid username or password."
|
1197 |
msgstr ""
|
1198 |
|
1199 |
+
#: includes/Ajax.php:876
|
1200 |
+
msgid "Wrong username or password."
|
|
|
|
|
1201 |
msgstr ""
|
1202 |
|
1203 |
+
#: includes/Ajax.php:903
|
1204 |
+
msgid "User logged in successfully."
|
1205 |
msgstr ""
|
1206 |
|
1207 |
+
#: includes/Ajax.php:952
|
1208 |
+
msgid "id param is required"
|
|
|
|
|
|
|
1209 |
msgstr ""
|
1210 |
|
1211 |
+
#: includes/Assets.php:401
|
1212 |
+
msgid "Are you sure?"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: includes/Assets.php:402
|
1216 |
+
msgid "Something went wrong. Please try again."
|
|
|
|
|
|
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: includes/Assets.php:477
|
1220 |
+
msgid "This field is required"
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: includes/Assets.php:478
|
1224 |
+
msgid "Please fix this field."
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: includes/Assets.php:479
|
1228 |
+
msgid "Please enter a valid email address."
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/Assets.php:480
|
1232 |
+
msgid "Please enter a valid URL."
|
|
|
|
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: includes/Assets.php:481
|
1236 |
+
msgid "Please enter a valid date."
|
|
|
|
|
|
|
|
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: includes/Assets.php:482
|
1240 |
+
msgid "Please enter a valid date (ISO)."
|
|
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: includes/Assets.php:483
|
1244 |
+
msgid "Please enter a valid number."
|
|
|
|
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: includes/Assets.php:484
|
1248 |
+
msgid "Please enter only digits."
|
1249 |
msgstr ""
|
1250 |
|
1251 |
+
#: includes/Assets.php:485
|
1252 |
+
msgid "Please enter a valid credit card number."
|
|
|
|
|
1253 |
msgstr ""
|
1254 |
|
1255 |
+
#: includes/Assets.php:486
|
1256 |
+
msgid "Please enter the same value again."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: includes/Assets.php:487
|
1260 |
+
msgid "Please enter no more than {0} characters."
|
1261 |
msgstr ""
|
1262 |
|
1263 |
+
#: includes/Assets.php:488
|
1264 |
+
msgid "Please enter at least {0} characters."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: includes/Assets.php:489
|
1268 |
+
msgid "Please enter a value between {0} and {1} characters long."
|
1269 |
msgstr ""
|
1270 |
|
1271 |
+
#: includes/Assets.php:490
|
1272 |
+
msgid "Please enter a value between {0} and {1}."
|
1273 |
msgstr ""
|
1274 |
|
1275 |
+
#: includes/Assets.php:491
|
1276 |
+
msgid "Please enter a value less than or equal to {0}."
|
|
|
|
|
|
|
|
|
|
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: includes/Assets.php:492
|
1280 |
+
msgid "Please enter a value greater than or equal to {0}."
|
|
|
|
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: includes/Assets.php:610
|
1284 |
+
msgid "Upload featured image"
|
|
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: includes/Assets.php:611
|
1288 |
+
msgid "Choose a file"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
+
#: includes/Assets.php:612
|
1292 |
+
msgid "Add Images to Product Gallery"
|
1293 |
msgstr ""
|
1294 |
|
1295 |
+
#: includes/Assets.php:613
|
1296 |
+
msgid "Set featured image"
|
|
|
1297 |
msgstr ""
|
1298 |
|
1299 |
+
#: includes/Assets.php:614 includes/woo-views/html-product-download.php:8
|
1300 |
+
msgid "Insert file URL"
|
|
|
|
|
|
|
1301 |
msgstr ""
|
1302 |
|
1303 |
+
#: includes/Assets.php:615
|
1304 |
+
msgid "Add to gallery"
|
|
|
|
|
|
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: includes/Assets.php:616
|
1308 |
+
msgid "Sorry, this attribute option already exists, Try a different one."
|
1309 |
msgstr ""
|
1310 |
|
1311 |
+
#: includes/Assets.php:617
|
1312 |
+
msgid ""
|
1313 |
+
"Warning! This product will not have any variations if this option is not "
|
1314 |
+
"checked."
|
1315 |
msgstr ""
|
1316 |
|
1317 |
+
#: includes/Assets.php:618
|
1318 |
+
msgid "Enter a name for the new attribute term:"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
+
#: includes/Assets.php:619
|
1322 |
+
msgid "Remove this attribute?"
|
1323 |
msgstr ""
|
1324 |
|
1325 |
+
#: includes/Assets.php:627
|
1326 |
+
msgid ""
|
1327 |
+
"Are you sure you want to link all variations? This will create a new "
|
1328 |
+
"variation for each and every possible combination of variation attributes "
|
1329 |
+
"(max %d per run)."
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: includes/Assets.php:628
|
1333 |
+
msgid "Enter a value"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: includes/Assets.php:629
|
1337 |
+
msgid "Variation menu order (determines position in the list of variations)"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: includes/Assets.php:630
|
1341 |
+
msgid "Enter a value (fixed or %)"
|
|
|
|
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: includes/Assets.php:631
|
1345 |
+
msgid "Are you sure you want to delete all variations? This cannot be undone."
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: includes/Assets.php:632
|
1349 |
+
msgid "Last warning, are you sure?"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: includes/Assets.php:633
|
1353 |
+
msgid "Choose an image"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: includes/Assets.php:634
|
1357 |
+
msgid "Set variation image"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: includes/Assets.php:635
|
1361 |
+
msgid "variation added"
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: includes/Assets.php:636
|
1365 |
+
msgid "variations added"
|
|
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: includes/Assets.php:637
|
1369 |
+
msgid "No variations added"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: includes/Assets.php:638
|
1373 |
+
msgid "Are you sure you want to remove this variation?"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
+
#: includes/Assets.php:639
|
1377 |
+
msgid "Sale start date (YYYY-MM-DD format or leave blank)"
|
|
|
1378 |
msgstr ""
|
1379 |
|
1380 |
+
#: includes/Assets.php:640
|
1381 |
+
msgid "Sale end date (YYYY-MM-DD format or leave blank)"
|
1382 |
msgstr ""
|
1383 |
|
1384 |
+
#: includes/Assets.php:641
|
1385 |
+
msgid "Save changes before changing page?"
|
1386 |
msgstr ""
|
1387 |
|
1388 |
+
#: includes/Assets.php:642
|
1389 |
+
msgid "%qty% variation"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: includes/Assets.php:643
|
1393 |
+
msgid "%qty% variations"
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: includes/Assets.php:644
|
1397 |
+
msgid "No Result Found"
|
1398 |
msgstr ""
|
1399 |
|
1400 |
+
#: includes/Assets.php:647
|
1401 |
+
msgid "Select and Crop"
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: includes/Assets.php:648
|
1405 |
+
msgid "Choose Image"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: includes/Assets.php:649
|
1409 |
+
msgid "Product title is required"
|
1410 |
msgstr ""
|
1411 |
|
1412 |
+
#: includes/Assets.php:650
|
1413 |
+
msgid "Product category is required"
|
1414 |
msgstr ""
|
1415 |
|
1416 |
+
#: includes/Assets.php:653
|
1417 |
+
msgid "One result is available, press enter to select it."
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#: includes/Assets.php:654
|
1421 |
+
msgid "%qty% results are available, use up and down arrow keys to navigate."
|
1422 |
msgstr ""
|
1423 |
|
1424 |
+
#: includes/Assets.php:655
|
1425 |
+
msgid "No matches found"
|
1426 |
msgstr ""
|
1427 |
|
1428 |
+
#: includes/Assets.php:656
|
1429 |
+
msgid "Loading failed"
|
1430 |
msgstr ""
|
1431 |
|
1432 |
+
#: includes/Assets.php:657
|
1433 |
+
msgid "Please enter 1 or more characters"
|
|
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: includes/Assets.php:658
|
1437 |
+
msgid "Please enter %qty% or more characters"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
+
#: includes/Assets.php:659
|
1441 |
+
msgid "Please delete 1 character"
|
|
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: includes/Assets.php:660
|
1445 |
+
msgid "Please delete %qty% characters"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: includes/Assets.php:661
|
1449 |
+
msgid "You can only select 1 item"
|
|
|
1450 |
msgstr ""
|
1451 |
|
1452 |
+
#: includes/Assets.php:662
|
1453 |
+
msgid "You can only select %qty% items"
|
1454 |
msgstr ""
|
1455 |
|
1456 |
+
#: includes/Assets.php:663
|
1457 |
+
msgid "Loading more results…"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
+
#: includes/Assets.php:664
|
1461 |
+
msgid "Searching…"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
+
#: includes/Commission.php:128
|
1465 |
+
msgid "Product not found"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
+
#: includes/Commission.php:156
|
1469 |
+
msgid "Order not found"
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: includes/Core.php:143
|
1473 |
+
msgid "Page %s"
|
|
|
|
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: includes/Dashboard/Templates/Dashboard.php:106
|
1477 |
+
#: templates/dashboard/orders-widget.php:31
|
1478 |
+
msgid "Pending"
|
1479 |
msgstr ""
|
1480 |
|
1481 |
+
#: includes/Dashboard/Templates/Dashboard.php:116
|
1482 |
+
#: includes/Order/functions.php:515 templates/dashboard/orders-widget.php:41
|
1483 |
+
msgid "Cancelled"
|
|
|
|
|
1484 |
msgstr ""
|
1485 |
|
1486 |
+
#: includes/Dashboard/Templates/Dashboard.php:121
|
1487 |
+
#: includes/Order/functions.php:510 templates/dashboard/orders-widget.php:46
|
1488 |
+
msgid "Refunded"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
+
#: includes/Dashboard/Templates/Dashboard.php:126
|
1492 |
+
msgid "On Hold"
|
|
|
|
|
1493 |
msgstr ""
|
1494 |
|
1495 |
+
#: includes/Dashboard/Templates/Orders.php:69
|
1496 |
+
msgid "You have no permission to view this order"
|
|
|
|
|
|
|
1497 |
msgstr ""
|
1498 |
|
1499 |
+
#: includes/Dashboard/Templates/Products.php:184
|
1500 |
+
#: includes/Dashboard/Templates/Settings.php:141
|
1501 |
+
#: includes/Dashboard/Templates/Settings.php:152
|
1502 |
+
#: includes/Shortcodes/Dashboard.php:29 templates/global/no-permission.php:53
|
1503 |
+
msgid "You have no permission to view this page"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
+
#: includes/Dashboard/Templates/Products.php:201
|
1507 |
+
#: templates/orders/listing.php:11
|
1508 |
+
msgid "Bulk Actions"
|
1509 |
msgstr ""
|
1510 |
|
1511 |
+
#: includes/Dashboard/Templates/Products.php:202
|
1512 |
+
#: includes/Product/functions.php:434
|
1513 |
+
msgid "Delete Permanently"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: includes/Dashboard/Templates/Products.php:235
|
1517 |
+
msgid "Details of your product ..."
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: includes/Dashboard/Templates/Products.php:244
|
1521 |
+
#: includes/Dashboard/Templates/Products.php:392
|
1522 |
+
#: includes/Product/functions.php:33
|
1523 |
+
msgid "Please enter product title"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
+
#: includes/Dashboard/Templates/Products.php:251
|
1527 |
+
#: includes/Dashboard/Templates/Products.php:399
|
1528 |
+
#: includes/Product/functions.php:38
|
1529 |
+
msgid "Please select a category"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
+
#: includes/Dashboard/Templates/Products.php:256
|
1533 |
+
#: includes/Dashboard/Templates/Products.php:404
|
1534 |
+
#: includes/Product/functions.php:42
|
1535 |
+
msgid "Please select AT LEAST ONE category"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: includes/Dashboard/Templates/Products.php:411
|
1539 |
+
msgid "No product found!"
|
|
|
|
|
1540 |
msgstr ""
|
1541 |
|
1542 |
+
#: includes/Dashboard/Templates/Products.php:415
|
1543 |
+
#: includes/Product/functions.php:66
|
1544 |
+
msgid "I swear this is not your product!"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
+
#: includes/Dashboard/Templates/Settings.php:60
|
1548 |
+
msgid "Payment Settings"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: includes/Dashboard/Templates/Settings.php:81
|
1552 |
+
msgid ""
|
1553 |
+
"These are the withdraw methods available for you. Please update your "
|
1554 |
+
"payment information below to submit withdraw requests and get your store "
|
1555 |
+
"payments seamlessly."
|
1556 |
msgstr ""
|
1557 |
|
1558 |
+
#: includes/Dashboard/Templates/Settings.php:221
|
1559 |
+
msgid "Pemission denied social"
|
1560 |
msgstr ""
|
1561 |
|
1562 |
+
#: includes/Dashboard/Templates/Settings.php:233
|
1563 |
+
#: includes/Dashboard/Templates/Settings.php:245
|
1564 |
+
msgid "Pemission denied"
|
|
|
1565 |
msgstr ""
|
1566 |
|
1567 |
+
#: includes/Dashboard/Templates/Settings.php:263
|
1568 |
+
msgid "Your information has been saved successfully"
|
|
|
|
|
|
|
1569 |
msgstr ""
|
1570 |
|
1571 |
+
#: includes/Dashboard/Templates/Settings.php:294
|
1572 |
+
#: includes/Dashboard/Templates/Settings.php:401
|
1573 |
+
msgid "Store name required"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
+
#: includes/Dashboard/Templates/Settings.php:300
|
1577 |
+
#: includes/Dashboard/Templates/Settings.php:360
|
1578 |
+
#: includes/Dashboard/Templates/Settings.php:407
|
1579 |
+
msgid "Store type required"
|
1580 |
msgstr ""
|
1581 |
|
1582 |
+
#: includes/Dashboard/Templates/Settings.php:308
|
1583 |
+
#: includes/Dashboard/Templates/Settings.php:368
|
1584 |
+
#: includes/Dashboard/Templates/Settings.php:415
|
1585 |
+
#: includes/Dashboard/Templates/Settings.php:452
|
1586 |
+
msgid "Invalid email"
|
1587 |
msgstr ""
|
1588 |
|
1589 |
+
#: includes/Dashboard/Templates/Settings.php:327
|
1590 |
+
msgid "Address field for %s is required"
|
|
|
1591 |
msgstr ""
|
1592 |
|
1593 |
+
#: includes/Dashboard/Templates/Settings.php:604
|
1594 |
+
msgid "Book"
|
|
|
1595 |
msgstr ""
|
1596 |
|
1597 |
+
#: includes/Dashboard/Templates/Settings.php:605
|
1598 |
+
msgid "Dress"
|
1599 |
msgstr ""
|
1600 |
|
1601 |
+
#: includes/Dashboard/Templates/Settings.php:606
|
1602 |
+
msgid "Electronic"
|
1603 |
msgstr ""
|
1604 |
|
1605 |
+
#: includes/Dashboard/Templates/Withdraw.php:114
|
1606 |
+
msgid "Missing withdraw id."
|
1607 |
msgstr ""
|
1608 |
|
1609 |
+
#: includes/Dashboard/Templates/Withdraw.php:125
|
1610 |
+
#: templates/global/seller-warning.php:12
|
1611 |
+
msgid "Your account is not enabled for selling, please contact the admin"
|
1612 |
msgstr ""
|
1613 |
|
1614 |
+
#: includes/Dashboard/Templates/Withdraw.php:173
|
1615 |
+
msgid "withdraw_amount is required"
|
1616 |
msgstr ""
|
1617 |
|
1618 |
+
#: includes/Dashboard/Templates/Withdraw.php:177
|
1619 |
+
msgid "withdraw_method is required"
|
1620 |
msgstr ""
|
1621 |
|
1622 |
+
#: includes/Dashboard/Templates/Withdraw.php:311
|
1623 |
+
msgid "Current Balance: %s "
|
1624 |
msgstr ""
|
1625 |
|
1626 |
+
#: includes/Dashboard/Templates/Withdraw.php:314
|
1627 |
+
msgid "<br>Minimum Withdraw amount: %s "
|
1628 |
msgstr ""
|
1629 |
|
1630 |
+
#: includes/Dashboard/Templates/Withdraw.php:318
|
1631 |
+
msgid "<br>Withdraw Threshold: %d days "
|
1632 |
msgstr ""
|
1633 |
|
1634 |
+
#: includes/Dashboard/Templates/Withdraw.php:375
|
1635 |
+
msgid "Your request has been cancelled successfully!"
|
1636 |
msgstr ""
|
1637 |
|
1638 |
+
#: includes/Dashboard/Templates/Withdraw.php:379
|
1639 |
+
msgid "Your request has been received successfully and being reviewed!"
|
1640 |
msgstr ""
|
1641 |
|
1642 |
+
#: includes/Dashboard/Templates/Withdraw.php:383
|
1643 |
+
msgid "Unknown error!"
|
1644 |
msgstr ""
|
1645 |
|
1646 |
+
#: includes/Dashboard/Templates/Withdraw.php:419
|
1647 |
+
msgid ""
|
1648 |
+
"You have already withdrawn %s. This amount will be deducted from your "
|
1649 |
+
"balance."
|
1650 |
msgstr ""
|
1651 |
|
1652 |
+
#: includes/Dashboard/Templates/Withdraw.php:428
|
1653 |
+
msgid "You already have pending withdraw request(s)."
|
1654 |
msgstr ""
|
1655 |
|
1656 |
+
#: includes/Dashboard/Templates/Withdraw.php:428
|
1657 |
+
msgid ""
|
1658 |
+
"Please submit your request after approval or cancellation of your previous "
|
1659 |
+
"request."
|
1660 |
msgstr ""
|
1661 |
|
1662 |
+
#: includes/Dashboard/Templates/Withdraw.php:438
|
1663 |
+
msgid "You don't have sufficient balance for a withdraw request!"
|
1664 |
msgstr ""
|
1665 |
|
1666 |
+
#: includes/Dashboard/Templates/Withdraw.php:498
|
1667 |
+
#: includes/Dashboard/Templates/Withdraw.php:524
|
1668 |
+
msgid "Sorry, no transactions were found!"
|
1669 |
msgstr ""
|
1670 |
|
1671 |
+
#: includes/Emails/ContactSeller.php:22
|
1672 |
+
msgid "Dokan Contact Vendor"
|
1673 |
msgstr ""
|
1674 |
|
1675 |
+
#: includes/Emails/ContactSeller.php:23
|
1676 |
+
msgid ""
|
1677 |
+
"These emails are sent to a vendor who is contacted by customer via contact "
|
1678 |
+
"form widget "
|
1679 |
msgstr ""
|
1680 |
|
1681 |
+
#: includes/Emails/ContactSeller.php:45
|
1682 |
+
msgid "[{customer_name}] sent you a message from your store at - {site_name}"
|
1683 |
msgstr ""
|
1684 |
|
1685 |
+
#: includes/Emails/ContactSeller.php:55
|
1686 |
+
msgid "{customer_name} - Sent a message from {site_name}"
|
1687 |
msgstr ""
|
1688 |
|
1689 |
+
#: includes/Emails/ContactSeller.php:131 includes/Emails/NewProduct.php:159
|
1690 |
+
#: includes/Emails/NewProductPending.php:151 includes/Emails/NewSeller.php:136
|
1691 |
+
#: includes/Emails/ProductPublished.php:144
|
1692 |
+
#: includes/Emails/VendorWithdrawRequest.php:144
|
1693 |
+
#: includes/Emails/WithdrawApproved.php:140
|
1694 |
+
#: includes/Emails/WithdrawCancelled.php:140
|
1695 |
+
msgid "Enable/Disable"
|
1696 |
msgstr ""
|
1697 |
|
1698 |
+
#: includes/Emails/ContactSeller.php:133 includes/Emails/NewProduct.php:161
|
1699 |
+
#: includes/Emails/NewProductPending.php:153 includes/Emails/NewSeller.php:138
|
1700 |
+
#: includes/Emails/ProductPublished.php:146
|
1701 |
+
#: includes/Emails/VendorWithdrawRequest.php:146
|
1702 |
+
#: includes/Emails/WithdrawApproved.php:142
|
1703 |
+
#: includes/Emails/WithdrawCancelled.php:142
|
1704 |
+
msgid "Enable this email notification"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
+
#: includes/Emails/ContactSeller.php:138 includes/Emails/NewProduct.php:173
|
1708 |
+
#: includes/Emails/NewProductPending.php:165 includes/Emails/NewSeller.php:150
|
1709 |
+
#: includes/Emails/ProductPublished.php:151
|
1710 |
+
#: includes/Emails/VendorWithdrawRequest.php:158
|
1711 |
+
#: includes/Emails/WithdrawApproved.php:146
|
1712 |
+
#: includes/Emails/WithdrawCancelled.php:146
|
1713 |
+
msgid "Subject"
|
1714 |
msgstr ""
|
1715 |
|
1716 |
+
#: includes/Emails/ContactSeller.php:142 includes/Emails/ContactSeller.php:151
|
1717 |
+
#: includes/Emails/NewProduct.php:177 includes/Emails/NewProduct.php:186
|
1718 |
+
#: includes/Emails/NewProductPending.php:169
|
1719 |
+
#: includes/Emails/NewProductPending.php:178 includes/Emails/NewSeller.php:154
|
1720 |
+
#: includes/Emails/NewSeller.php:163 includes/Emails/ProductPublished.php:155
|
1721 |
+
#: includes/Emails/ProductPublished.php:164
|
1722 |
+
#: includes/Emails/VendorWithdrawRequest.php:162
|
1723 |
+
#: includes/Emails/VendorWithdrawRequest.php:171
|
1724 |
+
#: includes/Emails/WithdrawApproved.php:150
|
1725 |
+
#: includes/Emails/WithdrawApproved.php:159
|
1726 |
+
#: includes/Emails/WithdrawCancelled.php:150
|
1727 |
+
#: includes/Emails/WithdrawCancelled.php:159
|
1728 |
+
#. translators: %s: list of placeholders
|
1729 |
+
msgid "Available placeholders: %s"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
+
#: includes/Emails/ContactSeller.php:147 includes/Emails/NewProduct.php:182
|
1733 |
+
#: includes/Emails/NewProductPending.php:174 includes/Emails/NewSeller.php:159
|
1734 |
+
#: includes/Emails/ProductPublished.php:160
|
1735 |
+
#: includes/Emails/VendorWithdrawRequest.php:167
|
1736 |
+
#: includes/Emails/WithdrawApproved.php:155
|
1737 |
+
#: includes/Emails/WithdrawCancelled.php:155
|
1738 |
+
msgid "Email heading"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
+
#: includes/Emails/ContactSeller.php:156 includes/Emails/NewProduct.php:191
|
1742 |
+
#: includes/Emails/NewProductPending.php:183 includes/Emails/NewSeller.php:168
|
1743 |
+
#: includes/Emails/ProductPublished.php:169
|
1744 |
+
#: includes/Emails/VendorWithdrawRequest.php:176
|
1745 |
+
#: includes/Emails/WithdrawApproved.php:164
|
1746 |
+
#: includes/Emails/WithdrawCancelled.php:164
|
1747 |
+
msgid "Email type"
|
1748 |
msgstr ""
|
1749 |
|
1750 |
+
#: includes/Emails/ContactSeller.php:158 includes/Emails/NewProduct.php:193
|
1751 |
+
#: includes/Emails/NewProductPending.php:185 includes/Emails/NewSeller.php:170
|
1752 |
+
#: includes/Emails/ProductPublished.php:171
|
1753 |
+
#: includes/Emails/VendorWithdrawRequest.php:178
|
1754 |
+
#: includes/Emails/WithdrawApproved.php:166
|
1755 |
+
#: includes/Emails/WithdrawCancelled.php:166
|
1756 |
+
msgid "Choose which format of email to send."
|
1757 |
msgstr ""
|
1758 |
|
1759 |
+
#: includes/Emails/Manager.php:195
|
1760 |
+
msgid "\"%s\" sent you a message from your \"%s\" store"
|
|
|
|
|
1761 |
msgstr ""
|
1762 |
|
1763 |
+
#: includes/Emails/Manager.php:244
|
1764 |
+
msgid "[%s] Refund Request %s"
|
|
|
|
|
1765 |
msgstr ""
|
1766 |
|
1767 |
+
#: includes/Emails/Manager.php:278
|
1768 |
+
msgid "[%s] New Refund Request"
|
|
|
1769 |
msgstr ""
|
1770 |
|
1771 |
+
#: includes/Emails/Manager.php:335
|
1772 |
+
msgid "[%s] New Withdraw Request"
|
|
|
1773 |
msgstr ""
|
1774 |
|
1775 |
+
#: includes/Emails/Manager.php:357
|
1776 |
+
msgid "[%s] Your Withdraw Request has been approved"
|
|
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: includes/Emails/Manager.php:380
|
1780 |
+
msgid "[%s] Your Withdraw Request has been cancelled"
|
|
|
1781 |
msgstr ""
|
1782 |
|
1783 |
+
#: includes/Emails/Manager.php:419
|
1784 |
+
msgid "[%s] New Vendor Registered"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
+
#: includes/Emails/Manager.php:472
|
1788 |
+
msgid "[%s] New Product Added"
|
1789 |
msgstr ""
|
1790 |
|
1791 |
+
#: includes/Emails/Manager.php:512
|
1792 |
+
msgid "[%s] Your product has been approved!"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
+
#: includes/Emails/NewProduct.php:24
|
1796 |
+
msgid "Dokan New Product"
|
1797 |
msgstr ""
|
1798 |
|
1799 |
+
#: includes/Emails/NewProduct.php:25
|
1800 |
+
msgid ""
|
1801 |
+
"New Product emails are sent to chosen recipient(s) when a new product is "
|
1802 |
+
"created by vendors."
|
1803 |
msgstr ""
|
1804 |
|
1805 |
+
#: includes/Emails/NewProduct.php:47
|
1806 |
+
msgid "[{site_name}] A New product is added by ({seller_name}) - {product_title}"
|
1807 |
msgstr ""
|
1808 |
|
1809 |
+
#: includes/Emails/NewProduct.php:57
|
1810 |
+
msgid "New product added by Vendor {seller_name}"
|
1811 |
msgstr ""
|
1812 |
|
1813 |
+
#: includes/Emails/NewProduct.php:165 includes/Emails/NewProductPending.php:157
|
1814 |
+
#: includes/Emails/NewSeller.php:142
|
1815 |
+
#: includes/Emails/VendorWithdrawRequest.php:150
|
1816 |
+
msgid "Recipient(s)"
|
1817 |
msgstr ""
|
1818 |
|
1819 |
+
#: includes/Emails/NewProduct.php:167 includes/Emails/NewProductPending.php:159
|
1820 |
+
#: includes/Emails/NewSeller.php:144
|
1821 |
+
#: includes/Emails/VendorWithdrawRequest.php:152
|
1822 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to %s."
|
1823 |
msgstr ""
|
1824 |
|
1825 |
+
#: includes/Emails/NewProductPending.php:25
|
1826 |
+
msgid "Dokan New Pending Product"
|
1827 |
msgstr ""
|
1828 |
|
1829 |
+
#: includes/Emails/NewProductPending.php:26
|
1830 |
+
msgid ""
|
1831 |
+
"New Pending Product emails are sent to chosen recipient(s) when a new "
|
1832 |
+
"product is created by vendors."
|
1833 |
msgstr ""
|
1834 |
|
1835 |
+
#: includes/Emails/NewProductPending.php:48
|
1836 |
+
msgid ""
|
1837 |
+
"[{site_title}] A New product is pending from ({seller_name}) - "
|
1838 |
+
"{product_title}"
|
|
|
|
|
|
|
|
|
1839 |
msgstr ""
|
1840 |
|
1841 |
+
#: includes/Emails/NewProductPending.php:58
|
1842 |
+
msgid "New pending product added by Vendor {seller_name}"
|
|
|
|
|
|
|
|
|
|
|
|
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: includes/Emails/NewSeller.php:22
|
1846 |
+
msgid "Dokan New Seller Registered"
|
|
|
|
|
|
|
|
|
|
|
|
|
1847 |
msgstr ""
|
1848 |
|
1849 |
+
#: includes/Emails/NewSeller.php:23
|
1850 |
+
msgid ""
|
1851 |
+
"These emails are sent to chosen recipient(s) when a new vendor registers in "
|
1852 |
+
"marketplace"
|
|
|
|
|
|
|
|
|
1853 |
msgstr ""
|
1854 |
|
1855 |
+
#: includes/Emails/NewSeller.php:45
|
1856 |
+
msgid "[{site_name}] A New vendor has registered"
|
1857 |
msgstr ""
|
1858 |
|
1859 |
+
#: includes/Emails/NewSeller.php:55
|
1860 |
+
msgid "New Vendor Registered - {seller_name}"
|
|
|
|
|
|
|
|
|
1861 |
msgstr ""
|
1862 |
|
1863 |
+
#: includes/Emails/ProductPublished.php:24
|
1864 |
+
msgid "Dokan Pending Product Published"
|
|
|
1865 |
msgstr ""
|
1866 |
|
1867 |
+
#: includes/Emails/ProductPublished.php:25
|
1868 |
+
msgid ""
|
1869 |
+
"These emails are sent to vendor of the product when a pending product is "
|
1870 |
+
"published."
|
1871 |
msgstr ""
|
1872 |
|
1873 |
+
#: includes/Emails/ProductPublished.php:47
|
1874 |
+
msgid "[{site_name}] Your product - {product_title} - is now published"
|
1875 |
msgstr ""
|
1876 |
|
1877 |
+
#: includes/Emails/ProductPublished.php:57
|
1878 |
+
msgid "{product_title} - is published"
|
1879 |
msgstr ""
|
1880 |
|
1881 |
+
#: includes/Emails/VendorWithdrawRequest.php:24
|
1882 |
+
msgid "Dokan New Withdrawal Request"
|
1883 |
msgstr ""
|
1884 |
|
1885 |
+
#: includes/Emails/VendorWithdrawRequest.php:25
|
1886 |
+
msgid ""
|
1887 |
+
"These emails are sent to chosen recipient(s) when a vendor send request to "
|
1888 |
+
"withdraw"
|
1889 |
msgstr ""
|
1890 |
|
1891 |
+
#: includes/Emails/VendorWithdrawRequest.php:47
|
1892 |
+
msgid "[{site_name}] A New withdrawal request is made by {user_name}"
|
1893 |
msgstr ""
|
1894 |
|
1895 |
+
#: includes/Emails/VendorWithdrawRequest.php:57
|
1896 |
+
msgid "New Withdraw Request from - {user_name}"
|
|
|
|
|
1897 |
msgstr ""
|
1898 |
|
1899 |
+
#: includes/Emails/WithdrawApproved.php:24
|
1900 |
+
msgid "Dokan Withdraw Approved"
|
|
|
|
|
1901 |
msgstr ""
|
1902 |
|
1903 |
+
#: includes/Emails/WithdrawApproved.php:25
|
1904 |
+
msgid "These emails are sent to vendor when a vendor withdraw request is approved"
|
|
|
|
|
1905 |
msgstr ""
|
1906 |
|
1907 |
+
#: includes/Emails/WithdrawApproved.php:47
|
1908 |
+
msgid "[{site_name}] Your withdrawal request was approved"
|
|
|
|
|
|
|
1909 |
msgstr ""
|
1910 |
|
1911 |
+
#: includes/Emails/WithdrawApproved.php:57
|
1912 |
+
msgid "Withdrawal request for {amount} is approved"
|
|
|
|
|
1913 |
msgstr ""
|
1914 |
|
1915 |
+
#: includes/Emails/WithdrawCancelled.php:24
|
1916 |
+
msgid "Dokan Withdraw cancelled"
|
|
|
1917 |
msgstr ""
|
1918 |
|
1919 |
+
#: includes/Emails/WithdrawCancelled.php:25
|
1920 |
+
msgid "These emails are sent to vendor when a vendor withdraw request is cancelled"
|
1921 |
msgstr ""
|
1922 |
|
1923 |
+
#: includes/Emails/WithdrawCancelled.php:47
|
1924 |
+
msgid "[{site_name}] Your withdrawal request was cancelled"
|
1925 |
msgstr ""
|
1926 |
|
1927 |
+
#: includes/Emails/WithdrawCancelled.php:57
|
1928 |
+
msgid "Withdrawal request for {amount} is cancelled"
|
1929 |
msgstr ""
|
1930 |
|
1931 |
+
#: includes/Install/Installer.php:163
|
1932 |
+
msgid "Store List"
|
1933 |
msgstr ""
|
1934 |
|
1935 |
+
#: includes/Order/Hooks.php:140
|
1936 |
+
msgid "Mark parent order completed when all child orders are completed."
|
1937 |
msgstr ""
|
1938 |
|
1939 |
+
#: includes/Order/Hooks.php:182
|
1940 |
+
msgid "A coupon must be restricted with a vendor product."
|
1941 |
msgstr ""
|
1942 |
|
1943 |
+
#: includes/Order/Hooks.php:237
|
1944 |
+
#. translators: %s item name.
|
1945 |
+
msgid "Unable to restore stock for item %s."
|
1946 |
msgstr ""
|
1947 |
|
1948 |
+
#: includes/Order/functions.php:495
|
1949 |
+
msgid "Pending Payment"
|
1950 |
msgstr ""
|
1951 |
|
1952 |
+
#: includes/Order/functions.php:520
|
1953 |
+
msgid "Failed"
|
1954 |
msgstr ""
|
1955 |
|
1956 |
+
#: includes/Order/functions.php:761
|
1957 |
+
msgid "Order No"
|
1958 |
msgstr ""
|
1959 |
|
1960 |
+
#: includes/Order/functions.php:762 templates/orders/details.php:21
|
1961 |
+
msgid "Order Items"
|
1962 |
msgstr ""
|
1963 |
|
1964 |
+
#: includes/Order/functions.php:763
|
1965 |
+
msgid "Shipping method"
|
1966 |
msgstr ""
|
1967 |
|
1968 |
+
#: includes/Order/functions.php:764
|
1969 |
+
msgid "Shipping Cost"
|
1970 |
msgstr ""
|
1971 |
|
1972 |
+
#: includes/Order/functions.php:765
|
1973 |
+
msgid "Payment method"
|
1974 |
msgstr ""
|
1975 |
|
1976 |
+
#: includes/Order/functions.php:766 templates/orders/listing.php:52
|
1977 |
+
#: templates/orders/listing.php:77
|
1978 |
+
msgid "Order Total"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#: includes/Order/functions.php:767 includes/REST/OrderController.php:99
|
1982 |
+
msgid "Order Status"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
+
#: includes/Order/functions.php:768
|
1986 |
+
msgid "Order Date"
|
1987 |
msgstr ""
|
1988 |
|
1989 |
+
#: includes/Order/functions.php:769
|
1990 |
+
msgid "Billing Company"
|
1991 |
msgstr ""
|
1992 |
|
1993 |
+
#: includes/Order/functions.php:770
|
1994 |
+
msgid "Billing First Name"
|
1995 |
msgstr ""
|
1996 |
|
1997 |
+
#: includes/Order/functions.php:771
|
1998 |
+
msgid "Billing Last Name"
|
1999 |
msgstr ""
|
2000 |
|
2001 |
+
#: includes/Order/functions.php:772
|
2002 |
+
msgid "Billing Full Name"
|
2003 |
msgstr ""
|
2004 |
|
2005 |
+
#: includes/Order/functions.php:773
|
2006 |
+
msgid "Billing Email"
|
2007 |
msgstr ""
|
2008 |
|
2009 |
+
#: includes/Order/functions.php:774
|
2010 |
+
msgid "Billing Phone"
|
2011 |
+
msgstr ""
|
2012 |
+
|
2013 |
+
#: includes/Order/functions.php:775
|
2014 |
+
msgid "Billing Address 1"
|
2015 |
+
msgstr ""
|
2016 |
+
|
2017 |
+
#: includes/Order/functions.php:776
|
2018 |
+
msgid "Billing Address 2"
|
2019 |
+
msgstr ""
|
2020 |
+
|
2021 |
+
#: includes/Order/functions.php:777
|
2022 |
+
msgid "Billing City"
|
2023 |
+
msgstr ""
|
2024 |
+
|
2025 |
+
#: includes/Order/functions.php:778
|
2026 |
+
msgid "Billing State"
|
2027 |
msgstr ""
|
2028 |
|
2029 |
+
#: includes/Order/functions.php:779
|
2030 |
+
msgid "Billing Postcode"
|
2031 |
+
msgstr ""
|
2032 |
+
|
2033 |
+
#: includes/Order/functions.php:780
|
2034 |
+
msgid "Billing Country"
|
2035 |
+
msgstr ""
|
2036 |
+
|
2037 |
+
#: includes/Order/functions.php:781
|
2038 |
+
msgid "Shipping Company"
|
2039 |
+
msgstr ""
|
2040 |
+
|
2041 |
+
#: includes/Order/functions.php:782
|
2042 |
+
msgid "Shipping First Name"
|
2043 |
+
msgstr ""
|
2044 |
+
|
2045 |
+
#: includes/Order/functions.php:783
|
2046 |
+
msgid "Shipping Last Name"
|
2047 |
+
msgstr ""
|
2048 |
+
|
2049 |
+
#: includes/Order/functions.php:784
|
2050 |
+
msgid "Shipping Full Name"
|
2051 |
+
msgstr ""
|
2052 |
+
|
2053 |
+
#: includes/Order/functions.php:785
|
2054 |
+
msgid "Shipping Address 1"
|
2055 |
+
msgstr ""
|
2056 |
+
|
2057 |
+
#: includes/Order/functions.php:786
|
2058 |
+
msgid "Shipping Address 2"
|
2059 |
+
msgstr ""
|
2060 |
+
|
2061 |
+
#: includes/Order/functions.php:787
|
2062 |
+
msgid "Shipping City"
|
2063 |
+
msgstr ""
|
2064 |
+
|
2065 |
+
#: includes/Order/functions.php:788
|
2066 |
+
msgid "Shipping State"
|
2067 |
+
msgstr ""
|
2068 |
+
|
2069 |
+
#: includes/Order/functions.php:789
|
2070 |
+
msgid "Shipping Postcode"
|
2071 |
+
msgstr ""
|
2072 |
+
|
2073 |
+
#: includes/Order/functions.php:790
|
2074 |
+
msgid "Shipping Country"
|
2075 |
+
msgstr ""
|
2076 |
+
|
2077 |
+
#: includes/Order/functions.php:791
|
2078 |
+
msgid "Customer IP"
|
2079 |
+
msgstr ""
|
2080 |
+
|
2081 |
+
#: includes/Order/functions.php:792
|
2082 |
+
msgid "Customer Note"
|
2083 |
+
msgstr ""
|
2084 |
+
|
2085 |
+
#: includes/Privacy.php:33 includes/Privacy.php:36 includes/Privacy.php:152
|
2086 |
+
msgid "Vendor Data"
|
2087 |
+
msgstr ""
|
2088 |
+
|
2089 |
+
#: includes/Privacy.php:51
|
2090 |
msgid ""
|
2091 |
+
"This sample privacy policy includes the basics around what personal data "
|
2092 |
+
"your multivendor store may be collecting, storing and sharing, as well as "
|
2093 |
+
"who may have access to that data. Depending on what settings are enabled "
|
2094 |
+
"and which additional plugins are used, the specific information shared by "
|
2095 |
+
"your store will vary. We recommend consulting with a lawyer when deciding "
|
2096 |
+
"what information to disclose on your privacy policy."
|
2097 |
msgstr ""
|
2098 |
|
2099 |
+
#: includes/Privacy.php:54
|
2100 |
+
msgid "We collect information about you during the checkout process on our store."
|
|
|
|
|
2101 |
msgstr ""
|
2102 |
|
2103 |
+
#: includes/Privacy.php:55
|
2104 |
+
msgid "What we collect and store"
|
2105 |
msgstr ""
|
2106 |
|
2107 |
+
#: includes/Privacy.php:56
|
2108 |
+
msgid "While you visit our site, we’ll track:"
|
2109 |
msgstr ""
|
2110 |
|
2111 |
+
#: includes/Privacy.php:58
|
2112 |
+
msgid ""
|
2113 |
+
"Stores you’ve viewed: we’ll use this to, for example, show you vendor "
|
2114 |
+
"stores you’ve recently viewed"
|
2115 |
msgstr ""
|
2116 |
|
2117 |
+
#: includes/Privacy.php:59
|
2118 |
+
msgid ""
|
2119 |
+
"Products you’ve viewed: we’ll use this to, for example, show you products "
|
2120 |
+
"you’ve recently viewed"
|
|
|
|
|
2121 |
msgstr ""
|
2122 |
|
2123 |
+
#: includes/Privacy.php:60
|
2124 |
+
msgid ""
|
2125 |
+
"Location, IP address and browser type: we’ll use this for purposes like "
|
2126 |
+
"estimating taxes and shipping"
|
|
|
2127 |
msgstr ""
|
2128 |
|
2129 |
+
#: includes/Privacy.php:61
|
2130 |
+
msgid ""
|
2131 |
+
"Shipping address: we’ll ask you to enter this so we can, for instance, "
|
2132 |
+
"estimate shipping before you place an order, and send you the order!"
|
|
|
2133 |
msgstr ""
|
2134 |
|
2135 |
+
#: includes/Privacy.php:63
|
2136 |
+
msgid ""
|
2137 |
+
"We’ll also use cookies to keep track of cart contents while you’re browsing "
|
2138 |
+
"our site."
|
2139 |
msgstr ""
|
2140 |
|
2141 |
+
#: includes/Privacy.php:65
|
2142 |
+
msgid ""
|
2143 |
+
"Note: you may want to further detail your cookie policy, and link to that "
|
2144 |
+
"section from here."
|
2145 |
msgstr ""
|
2146 |
|
2147 |
+
#: includes/Privacy.php:67
|
2148 |
+
msgid ""
|
2149 |
+
"When you purchase from us, we’ll ask you to provide information including "
|
2150 |
+
"your name, billing address, shipping address, email address, phone number, "
|
2151 |
+
"credit card/payment details and optional account information like username "
|
2152 |
+
"and password. We’ll use this information for purposes, such as, to:"
|
2153 |
msgstr ""
|
2154 |
|
2155 |
+
#: includes/Privacy.php:69
|
2156 |
+
msgid "Send you information about your account and order"
|
|
|
2157 |
msgstr ""
|
2158 |
|
2159 |
+
#: includes/Privacy.php:70
|
2160 |
+
msgid "Respond to your requests, including refunds and complaints"
|
|
|
2161 |
msgstr ""
|
2162 |
|
2163 |
+
#: includes/Privacy.php:71
|
2164 |
+
msgid "Process payments and prevent fraud"
|
2165 |
msgstr ""
|
2166 |
|
2167 |
+
#: includes/Privacy.php:72
|
2168 |
+
msgid "Set up your account for our store"
|
2169 |
msgstr ""
|
2170 |
|
2171 |
+
#: includes/Privacy.php:73
|
2172 |
+
msgid "Comply with any legal obligations we have, such as calculating taxes"
|
2173 |
msgstr ""
|
2174 |
|
2175 |
+
#: includes/Privacy.php:74
|
2176 |
+
msgid "Improve our store offerings"
|
2177 |
msgstr ""
|
2178 |
|
2179 |
+
#: includes/Privacy.php:75
|
2180 |
+
msgid "Send you marketing messages, if you choose to receive them"
|
2181 |
msgstr ""
|
2182 |
|
2183 |
+
#: includes/Privacy.php:77
|
2184 |
+
msgid ""
|
2185 |
+
"If you create an account, we will store your name, address, email and phone "
|
2186 |
+
"number, which will be used to populate the checkout for future orders."
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: includes/Privacy.php:78
|
2190 |
+
msgid ""
|
2191 |
+
"We generally store information about you for as long as we need the "
|
2192 |
+
"information for the purposes for which we collect and use it, and we are "
|
2193 |
+
"not legally required to continue to keep it. For example, we will store "
|
2194 |
+
"order information for XXX years for tax and accounting purposes. This "
|
2195 |
+
"includes your name, email address and billing and shipping addresses."
|
2196 |
msgstr ""
|
2197 |
|
2198 |
+
#: includes/Privacy.php:79
|
2199 |
+
msgid "We will also store comments or reviews, if you choose to leave them."
|
2200 |
msgstr ""
|
2201 |
|
2202 |
+
#: includes/Privacy.php:80
|
2203 |
+
msgid "Who on our team has access"
|
2204 |
msgstr ""
|
2205 |
|
2206 |
+
#: includes/Privacy.php:81
|
2207 |
+
msgid ""
|
2208 |
+
"Members of our team have access to the information you provide us. For "
|
2209 |
+
"example, both Administrators and Shop Managers can access:"
|
2210 |
msgstr ""
|
2211 |
|
2212 |
+
#: includes/Privacy.php:83
|
2213 |
+
msgid ""
|
2214 |
+
"Order information like what was purchased, when it was purchased and where "
|
2215 |
+
"it should be sent, and"
|
2216 |
msgstr ""
|
2217 |
|
2218 |
+
#: includes/Privacy.php:84
|
2219 |
+
msgid ""
|
2220 |
+
"Customer information like your name, email address, and billing and "
|
2221 |
+
"shipping information."
|
2222 |
msgstr ""
|
2223 |
|
2224 |
+
#: includes/Privacy.php:86
|
2225 |
+
msgid ""
|
2226 |
+
"Our team members have access to this information to help fulfill orders, "
|
2227 |
+
"process refunds and support you."
|
2228 |
msgstr ""
|
2229 |
|
2230 |
+
#: includes/Privacy.php:87
|
2231 |
+
msgid "What we share with others"
|
2232 |
msgstr ""
|
2233 |
|
2234 |
+
#: includes/Privacy.php:89
|
2235 |
+
msgid ""
|
2236 |
+
"In this section you should list who you’re sharing data with, and for what "
|
2237 |
+
"purpose. This could include, but may not be limited to, analytics, "
|
2238 |
+
"marketing, payment gateways, shipping providers, and third party embeds."
|
2239 |
msgstr ""
|
2240 |
|
2241 |
+
#: includes/Privacy.php:91
|
2242 |
+
msgid ""
|
2243 |
+
"We share information with third parties who help us provide our orders and "
|
2244 |
+
"store services to you; for example --"
|
2245 |
msgstr ""
|
2246 |
|
2247 |
+
#: includes/Privacy.php:92
|
2248 |
+
msgid "Payments"
|
2249 |
msgstr ""
|
2250 |
|
2251 |
+
#: includes/Privacy.php:94
|
2252 |
+
msgid ""
|
2253 |
+
"In this subsection you should list which third party payment processors "
|
2254 |
+
"you’re using to take payments on your store since these may handle customer "
|
2255 |
+
"data. We’ve included PayPal as an example, but you should remove this if "
|
2256 |
+
"you’re not using PayPal."
|
2257 |
msgstr ""
|
2258 |
|
2259 |
+
#: includes/Privacy.php:96
|
2260 |
+
msgid ""
|
2261 |
+
"We accept payments through PayPal. When processing payments, some of your "
|
2262 |
+
"data will be passed to PayPal, including information required to process or "
|
2263 |
+
"support the payment, such as the purchase total and billing information."
|
2264 |
msgstr ""
|
2265 |
|
2266 |
+
#: includes/Privacy.php:97
|
2267 |
+
msgid ""
|
2268 |
+
"Please see the <a "
|
2269 |
+
"href=\"https://www.paypal.com/us/webapps/mpp/ua/privacy-full\">PayPal "
|
2270 |
+
"Privacy Policy</a> for more details."
|
2271 |
msgstr ""
|
2272 |
|
2273 |
+
#: includes/Privacy.php:98
|
2274 |
+
msgid "Modules"
|
2275 |
msgstr ""
|
2276 |
|
2277 |
+
#: includes/Privacy.php:100
|
2278 |
+
msgid ""
|
2279 |
+
"Dokan has premium modules that perform specific and special purpose tasks. "
|
2280 |
+
"Each of the modules collect additional information. Also third party "
|
2281 |
+
"extensions and integrations collect data that is applicable to the each of "
|
2282 |
+
"their individual privacy policy."
|
2283 |
msgstr ""
|
2284 |
|
2285 |
+
#: includes/Privacy.php:180 src/admin/pages/VendorAccountFields.vue:43
|
2286 |
+
#: src/admin/pages/VendorAccountFields.vue:49
|
2287 |
+
#: templates/settings/store-form.php:116
|
2288 |
+
msgid "Store Name"
|
2289 |
msgstr ""
|
2290 |
|
2291 |
+
#: includes/Privacy.php:181
|
2292 |
+
msgid "Social"
|
2293 |
msgstr ""
|
2294 |
|
2295 |
+
#: includes/Privacy.php:182
|
2296 |
+
msgid "Phone"
|
2297 |
msgstr ""
|
2298 |
|
2299 |
+
#: includes/Privacy.php:183 src/admin/components/Mapbox.vue:8
|
2300 |
+
#: src/admin/pages/AddVendor.vue:73 src/admin/pages/VendorAddressFields.vue:4
|
2301 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:33
|
2302 |
+
#: templates/maps/mapbox-with-search.php:5
|
2303 |
+
#: templates/settings/address-form.php:23
|
2304 |
+
msgid "Address"
|
2305 |
msgstr ""
|
2306 |
|
2307 |
+
#: includes/Privacy.php:184
|
2308 |
+
msgid "GEO Locations"
|
2309 |
msgstr ""
|
2310 |
|
2311 |
+
#: includes/Privacy.php:185
|
2312 |
+
msgid "Banner Url"
|
2313 |
msgstr ""
|
2314 |
|
2315 |
+
#: includes/Privacy.php:186
|
2316 |
+
msgid "Gravatar Url"
|
2317 |
msgstr ""
|
2318 |
|
2319 |
+
#: includes/Privacy.php:201 includes/functions.php:2333
|
2320 |
+
#: src/admin/pages/VendorSocialFields.vue:11
|
2321 |
+
msgid "Facebook"
|
2322 |
+
msgstr ""
|
2323 |
+
|
2324 |
+
#: includes/Privacy.php:202 includes/functions.php:2337
|
2325 |
+
#: src/admin/pages/VendorSocialFields.vue:21
|
2326 |
+
msgid "Google Plus"
|
2327 |
+
msgstr ""
|
2328 |
+
|
2329 |
+
#: includes/Privacy.php:203 includes/functions.php:2341
|
2330 |
+
#: src/admin/pages/VendorSocialFields.vue:26
|
2331 |
+
msgid "Twitter"
|
2332 |
+
msgstr ""
|
2333 |
+
|
2334 |
+
#: includes/Privacy.php:204 includes/functions.php:2345
|
2335 |
+
#: src/admin/pages/VendorSocialFields.vue:41
|
2336 |
+
msgid "Pinterest"
|
2337 |
+
msgstr ""
|
2338 |
+
|
2339 |
+
#: includes/Privacy.php:205 src/admin/pages/VendorSocialFields.vue:36
|
2340 |
+
msgid "Linkedin"
|
2341 |
+
msgstr ""
|
2342 |
+
|
2343 |
+
#: includes/Privacy.php:206 includes/functions.php:2353
|
2344 |
+
#: src/admin/pages/VendorSocialFields.vue:31
|
2345 |
+
msgid "Youtube"
|
2346 |
+
msgstr ""
|
2347 |
+
|
2348 |
+
#: includes/Privacy.php:207 includes/functions.php:2357
|
2349 |
+
#: src/admin/pages/VendorSocialFields.vue:46
|
2350 |
+
msgid "Instagram"
|
2351 |
+
msgstr ""
|
2352 |
+
|
2353 |
+
#: includes/Privacy.php:208 includes/functions.php:2361
|
2354 |
+
#: src/admin/pages/VendorSocialFields.vue:16
|
2355 |
+
msgid "Flickr"
|
2356 |
+
msgstr ""
|
2357 |
+
|
2358 |
+
#: includes/Privacy.php:225 includes/Vendor/SetupWizard.php:203
|
2359 |
+
#: src/admin/pages/VendorAddressFields.vue:21
|
2360 |
+
#: src/admin/pages/VendorAddressFields.vue:22
|
2361 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:51
|
2362 |
+
#: templates/settings/address-form.php:57
|
2363 |
+
msgid "City"
|
2364 |
+
msgstr ""
|
2365 |
+
|
2366 |
+
#: includes/Privacy.php:226
|
2367 |
+
msgid "Postal Code"
|
2368 |
+
msgstr ""
|
2369 |
+
|
2370 |
+
#: includes/Privacy.php:228 includes/Vendor/SetupWizard.php:221
|
2371 |
+
#: src/admin/pages/VendorAddressFields.vue:36
|
2372 |
+
#: src/admin/pages/VendorAddressFields.vue:38
|
2373 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:58
|
2374 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:59
|
2375 |
+
msgid "State"
|
2376 |
+
msgstr ""
|
2377 |
+
|
2378 |
+
#: includes/Privacy.php:278
|
2379 |
+
msgid "Bank Details"
|
2380 |
+
msgstr ""
|
2381 |
+
|
2382 |
+
#: includes/Privacy.php:280 src/admin/pages/VendorPaymentFields.vue:10
|
2383 |
+
#: src/admin/pages/VendorPaymentFields.vue:11
|
2384 |
+
msgid "Account Name"
|
2385 |
+
msgstr ""
|
2386 |
+
|
2387 |
+
#: includes/Privacy.php:281 src/admin/pages/VendorPaymentFields.vue:15
|
2388 |
+
msgid "Account Number"
|
2389 |
+
msgstr ""
|
2390 |
+
|
2391 |
+
#: includes/Privacy.php:282 src/admin/pages/VendorPaymentFields.vue:20
|
2392 |
+
#: src/admin/pages/VendorPaymentFields.vue:21
|
2393 |
+
msgid "Bank Name"
|
2394 |
+
msgstr ""
|
2395 |
+
|
2396 |
+
#: includes/Privacy.php:283 src/admin/pages/VendorPaymentFields.vue:25
|
2397 |
+
#: src/admin/pages/VendorPaymentFields.vue:26
|
2398 |
+
msgid "Bank Address"
|
2399 |
+
msgstr ""
|
2400 |
+
|
2401 |
+
#: includes/Privacy.php:285 includes/Withdraw/functions.php:203
|
2402 |
+
#: src/admin/pages/VendorPaymentFields.vue:35
|
2403 |
+
msgid "IBAN"
|
2404 |
+
msgstr ""
|
2405 |
+
|
2406 |
+
#: includes/Privacy.php:286
|
2407 |
+
msgid "Swift Code"
|
2408 |
+
msgstr ""
|
2409 |
+
|
2410 |
+
#: includes/Privacy.php:297 src/admin/pages/VendorPaymentFields.vue:55
|
2411 |
+
msgid "PayPal Email"
|
2412 |
+
msgstr ""
|
2413 |
+
|
2414 |
+
#: includes/Privacy.php:302
|
2415 |
+
msgid "Skrill Email"
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: includes/Privacy.php:373
|
2419 |
+
msgid "Vendor %s data is removed."
|
2420 |
msgstr ""
|
2421 |
|
2422 |
+
#: includes/Product/Manager.php:392
|
2423 |
+
msgid "No product ID found for updating"
|
2424 |
msgstr ""
|
2425 |
|
2426 |
+
#: includes/Product/functions.php:153
|
2427 |
+
msgid ""
|
2428 |
+
"Before you can add a variation you need to add some variation attributes on "
|
2429 |
+
"the <strong>Attributes</strong> section"
|
2430 |
msgstr ""
|
2431 |
|
2432 |
+
#: includes/Product/functions.php:163
|
2433 |
+
msgid "Add variation"
|
2434 |
msgstr ""
|
2435 |
|
2436 |
+
#: includes/Product/functions.php:164
|
2437 |
+
msgid "Create variations from all attributes"
|
2438 |
msgstr ""
|
2439 |
|
2440 |
+
#: includes/Product/functions.php:165
|
2441 |
+
msgid "Delete all variations"
|
2442 |
msgstr ""
|
2443 |
|
2444 |
+
#: includes/Product/functions.php:166 templates/my-orders.php:29
|
2445 |
+
#: templates/orders/listing.php:53 templates/orders/listing.php:80
|
2446 |
+
#: templates/products/products-listing-row.php:53
|
2447 |
+
#: templates/products/products-listing.php:89 templates/sub-orders.php:27
|
2448 |
+
#: templates/withdraw/pending-request-listing.php:18
|
2449 |
+
msgid "Status"
|
2450 |
msgstr ""
|
2451 |
|
2452 |
+
#: includes/Product/functions.php:167
|
2453 |
+
msgid "Toggle "Enabled""
|
2454 |
msgstr ""
|
2455 |
|
2456 |
+
#: includes/Product/functions.php:168
|
2457 |
+
msgid "Toggle "Downloadable""
|
|
|
|
|
2458 |
msgstr ""
|
2459 |
|
2460 |
+
#: includes/Product/functions.php:169
|
2461 |
+
msgid "Toggle "Virtual""
|
2462 |
msgstr ""
|
2463 |
|
2464 |
+
#: includes/Product/functions.php:171
|
2465 |
+
msgid "Pricing"
|
2466 |
msgstr ""
|
2467 |
|
2468 |
+
#: includes/Product/functions.php:172
|
2469 |
+
msgid "Set regular prices"
|
2470 |
msgstr ""
|
2471 |
|
2472 |
+
#: includes/Product/functions.php:173
|
2473 |
+
msgid "Increase regular prices (fixed amount or percentage)"
|
2474 |
msgstr ""
|
2475 |
|
2476 |
+
#: includes/Product/functions.php:174
|
2477 |
+
msgid "Decrease regular prices (fixed amount or percentage)"
|
|
|
2478 |
msgstr ""
|
2479 |
|
2480 |
+
#: includes/Product/functions.php:175
|
2481 |
+
msgid "Set sale prices"
|
2482 |
msgstr ""
|
2483 |
|
2484 |
+
#: includes/Product/functions.php:176
|
2485 |
+
msgid "Increase sale prices (fixed amount or percentage)"
|
|
|
2486 |
msgstr ""
|
2487 |
|
2488 |
+
#: includes/Product/functions.php:177
|
2489 |
+
msgid "Decrease sale prices (fixed amount or percentage)"
|
|
|
2490 |
msgstr ""
|
2491 |
|
2492 |
+
#: includes/Product/functions.php:178
|
2493 |
+
msgid "Set scheduled sale dates"
|
|
|
2494 |
msgstr ""
|
2495 |
|
2496 |
+
#: includes/Product/functions.php:180 templates/products/inventory.php:3
|
2497 |
+
msgid "Inventory"
|
2498 |
msgstr ""
|
2499 |
|
2500 |
+
#: includes/Product/functions.php:181
|
2501 |
+
msgid "Toggle "Manage stock""
|
2502 |
msgstr ""
|
2503 |
|
2504 |
+
#: includes/Product/functions.php:182
|
2505 |
+
#: templates/products/products-listing-row.php:68
|
2506 |
+
#: templates/products/products-listing.php:94
|
2507 |
+
msgid "Stock"
|
2508 |
msgstr ""
|
2509 |
|
2510 |
+
#: includes/Product/functions.php:185
|
2511 |
+
msgid "Length"
|
2512 |
msgstr ""
|
2513 |
|
2514 |
+
#: includes/Product/functions.php:186
|
2515 |
+
msgid "Width"
|
2516 |
msgstr ""
|
2517 |
|
2518 |
+
#: includes/Product/functions.php:187
|
2519 |
+
msgid "Height"
|
2520 |
msgstr ""
|
2521 |
|
2522 |
+
#: includes/Product/functions.php:188
|
2523 |
+
msgid "Weight"
|
2524 |
msgstr ""
|
2525 |
|
2526 |
+
#: includes/Product/functions.php:190
|
2527 |
+
msgid "Downloadable products"
|
2528 |
msgstr ""
|
2529 |
|
2530 |
+
#: includes/Product/functions.php:191
|
2531 |
+
msgid "Download limit"
|
2532 |
msgstr ""
|
2533 |
|
2534 |
+
#: includes/Product/functions.php:192
|
2535 |
+
msgid "Download expiry"
|
2536 |
msgstr ""
|
2537 |
|
2538 |
+
#: includes/Product/functions.php:196
|
2539 |
+
msgid "Go"
|
2540 |
msgstr ""
|
2541 |
|
2542 |
+
#: includes/Product/functions.php:203
|
2543 |
+
msgid ""
|
2544 |
+
"Default Form Values: These are the attributes that will be pre-selected on "
|
2545 |
+
"the frontend."
|
2546 |
msgstr ""
|
2547 |
|
2548 |
+
#: includes/Product/functions.php:221
|
2549 |
+
msgid "No default"
|
2550 |
msgstr ""
|
2551 |
|
2552 |
+
#: includes/Product/functions.php:261
|
2553 |
+
msgid "Save Variations"
|
2554 |
msgstr ""
|
2555 |
|
2556 |
+
#: includes/Product/functions.php:262 lib/appsero/Insights.php:764
|
2557 |
+
#: templates/my-orders.php:83 templates/orders/details.php:199
|
2558 |
+
#: templates/products/new-product-single.php:217
|
2559 |
+
#: templates/products/new-product.php:167
|
2560 |
+
#: templates/products/tmpl-add-product-popup.php:68
|
2561 |
+
#: templates/store-lists-filter.php:81
|
2562 |
+
#: templates/withdraw/pending-request-listing.php:17
|
2563 |
+
#: templates/withdraw/pending-request-listing.php:35
|
2564 |
+
#: vendor/appsero/client/src/Insights.php:764
|
2565 |
+
msgid "Cancel"
|
2566 |
msgstr ""
|
2567 |
|
2568 |
+
#: includes/Product/functions.php:267
|
2569 |
+
msgid "%s item"
|
2570 |
+
msgid_plural "%s items"
|
2571 |
+
msgstr[0] ""
|
2572 |
+
msgstr[1] ""
|
2573 |
|
2574 |
+
#: includes/Product/functions.php:272
|
2575 |
+
msgid "Expand"
|
2576 |
msgstr ""
|
2577 |
|
2578 |
+
#: includes/Product/functions.php:272 src/admin/components/ColorPicker.vue:31
|
2579 |
+
#: src/upgrade/App.vue:49 templates/orders/details.php:353
|
2580 |
+
#: templates/settings/store-form.php:256
|
2581 |
+
msgid "Close"
|
2582 |
msgstr ""
|
2583 |
|
2584 |
+
#: includes/Product/functions.php:275
|
2585 |
+
msgid "Go to the first page"
|
2586 |
msgstr ""
|
2587 |
|
2588 |
+
#: includes/Product/functions.php:276
|
2589 |
+
msgid "Go to the previous page"
|
2590 |
msgstr ""
|
2591 |
|
2592 |
+
#: includes/Product/functions.php:278
|
2593 |
+
msgid "Select Page"
|
2594 |
msgstr ""
|
2595 |
|
2596 |
+
#: includes/Product/functions.php:279
|
2597 |
+
msgid "Current page"
|
2598 |
msgstr ""
|
2599 |
|
2600 |
+
#: includes/Product/functions.php:286
|
2601 |
+
msgid "Go to the next page"
|
2602 |
msgstr ""
|
2603 |
|
2604 |
+
#: includes/Product/functions.php:287
|
2605 |
+
msgid "Go to the last page"
|
2606 |
msgstr ""
|
2607 |
|
2608 |
+
#: includes/Product/functions.php:310
|
2609 |
+
msgid "Visible"
|
2610 |
msgstr ""
|
2611 |
|
2612 |
+
#: includes/Product/functions.php:311
|
2613 |
+
msgid "Catalog"
|
2614 |
msgstr ""
|
2615 |
|
2616 |
+
#: includes/Product/functions.php:312 templates/products/listing-filter.php:56
|
2617 |
+
msgid "Search"
|
2618 |
msgstr ""
|
2619 |
|
2620 |
+
#: includes/Product/functions.php:313
|
2621 |
+
#: templates/products/new-product-single.php:119
|
2622 |
+
msgid "Hidden"
|
2623 |
msgstr ""
|
2624 |
|
2625 |
+
#: includes/Product/functions.php:426
|
2626 |
+
msgid "Edit"
|
2627 |
msgstr ""
|
2628 |
|
2629 |
+
#: includes/Product/functions.php:443 templates/my-orders.php:88
|
2630 |
+
#: templates/orders/listing.php:157 templates/sub-orders.php:59
|
2631 |
+
msgid "View"
|
2632 |
msgstr ""
|
2633 |
|
2634 |
+
#: includes/REST/AdminDashboardController.php:40
|
2635 |
+
msgid "Number of feed item"
|
2636 |
msgstr ""
|
2637 |
|
2638 |
+
#: includes/REST/AdminDashboardController.php:46
|
2639 |
+
msgid "Flag for showing summary"
|
|
|
2640 |
msgstr ""
|
2641 |
|
2642 |
+
#: includes/REST/AdminDashboardController.php:52
|
2643 |
+
msgid "Flag for showing author"
|
|
|
2644 |
msgstr ""
|
2645 |
|
2646 |
+
#: includes/REST/AdminDashboardController.php:58
|
2647 |
+
msgid "Flag for showing date"
|
2648 |
msgstr ""
|
2649 |
|
2650 |
+
#: includes/REST/AdminDashboardController.php:94
|
2651 |
msgid ""
|
2652 |
+
"An error has occurred, which probably means the feed is down. Try again "
|
2653 |
+
"later."
|
2654 |
msgstr ""
|
2655 |
|
2656 |
+
#: includes/REST/AdminDashboardController.php:109
|
2657 |
+
msgid "Untitled"
|
2658 |
msgstr ""
|
2659 |
|
2660 |
+
#: includes/REST/AdminReportController.php:138
|
2661 |
+
#: templates/dashboard/orders-widget.php:21
|
2662 |
+
#: templates/dashboard/products-widget.php:26 templates/my-orders.php:30
|
2663 |
+
#: templates/orders/order-fee-html.php:17 templates/sub-orders.php:28
|
2664 |
+
msgid "Total"
|
2665 |
msgstr ""
|
2666 |
|
2667 |
+
#: includes/REST/AdminReportController.php:146 includes/template-tags.php:337
|
2668 |
+
#: templates/dashboard/orders-widget.php:15
|
2669 |
+
msgid "Orders"
|
2670 |
msgstr ""
|
2671 |
|
2672 |
+
#: includes/REST/OrderController.php:82 includes/REST/OrderController.php:111
|
2673 |
+
#: includes/REST/OrderController.php:138 includes/REST/ProductController.php:58
|
2674 |
+
#: includes/REST/ProductController.php:80
|
2675 |
+
#: includes/REST/ProductController.php:121 includes/REST/StoreController.php:57
|
2676 |
+
#: includes/REST/StoreController.php:87 includes/REST/StoreController.php:101
|
2677 |
+
#: includes/REST/StoreController.php:122 includes/REST/StoreController.php:153
|
2678 |
+
#: includes/REST/WithdrawController.php:63
|
2679 |
+
#: includes/REST/WithdrawController.php:651
|
2680 |
+
msgid "Unique identifier for the object."
|
2681 |
msgstr ""
|
2682 |
|
2683 |
+
#: includes/REST/OrderController.php:128
|
2684 |
+
msgid "Order note content."
|
2685 |
msgstr ""
|
2686 |
|
2687 |
+
#: includes/REST/OrderController.php:142
|
2688 |
+
msgid "Unique identifier for the note object."
|
2689 |
msgstr ""
|
2690 |
|
2691 |
+
#: includes/REST/OrderController.php:194
|
2692 |
+
#: includes/REST/ProductController.php:252
|
2693 |
+
#: includes/REST/ProductController.php:289
|
2694 |
+
msgid "No seller found"
|
2695 |
msgstr ""
|
2696 |
|
2697 |
+
#: includes/REST/OrderController.php:206
|
2698 |
+
#: includes/REST/ProductController.php:301
|
2699 |
+
#: includes/REST/ProductController.php:326
|
2700 |
+
msgid "Sorry, you have no permission to do this. Since it's not your product."
|
2701 |
msgstr ""
|
2702 |
|
2703 |
+
#: includes/REST/OrderController.php:331
|
2704 |
+
msgid "Invalid order ID"
|
|
|
2705 |
msgstr ""
|
2706 |
|
2707 |
+
#: includes/REST/OrderController.php:337
|
2708 |
+
msgid "Order status must me required"
|
2709 |
msgstr ""
|
2710 |
|
2711 |
+
#: includes/REST/OrderController.php:343
|
2712 |
+
msgid "Order status not valid"
|
2713 |
msgstr ""
|
2714 |
|
2715 |
+
#: includes/REST/OrderController.php:351
|
2716 |
+
msgid "Invalid order"
|
2717 |
msgstr ""
|
2718 |
|
2719 |
+
#: includes/REST/OrderController.php:508 includes/REST/OrderController.php:613
|
2720 |
+
#: includes/REST/OrderController.php:644
|
2721 |
+
msgid "You have no permission to view this notes"
|
|
|
2722 |
msgstr ""
|
2723 |
|
2724 |
+
#: includes/REST/OrderController.php:512 includes/REST/OrderController.php:575
|
2725 |
+
#: includes/REST/OrderController.php:617 includes/REST/OrderController.php:648
|
2726 |
+
msgid "Invalid order ID."
|
2727 |
msgstr ""
|
2728 |
|
2729 |
+
#: includes/REST/OrderController.php:564
|
2730 |
+
#: includes/REST/ProductController.php:256
|
2731 |
+
msgid "Cannot create existing %s."
|
2732 |
msgstr ""
|
2733 |
|
2734 |
+
#: includes/REST/OrderController.php:571
|
2735 |
+
msgid "You have no permission to create this notes"
|
|
|
2736 |
msgstr ""
|
2737 |
|
2738 |
+
#: includes/REST/OrderController.php:582
|
2739 |
+
msgid "Cannot create order note, please try again."
|
2740 |
msgstr ""
|
2741 |
|
2742 |
+
#: includes/REST/OrderController.php:623 includes/REST/OrderController.php:654
|
2743 |
+
msgid "Invalid resource ID."
|
2744 |
msgstr ""
|
2745 |
|
2746 |
+
#: includes/REST/OrderController.php:843
|
2747 |
+
#: includes/REST/ProductController.php:1692
|
2748 |
+
msgid "Unique identifier for the resource."
|
2749 |
msgstr ""
|
2750 |
|
2751 |
+
#: includes/REST/OrderController.php:849
|
2752 |
+
msgid "Parent order ID."
|
|
|
2753 |
msgstr ""
|
2754 |
|
2755 |
+
#: includes/REST/OrderController.php:854
|
2756 |
+
msgid "Orders belongs to specific seller"
|
|
|
|
|
2757 |
msgstr ""
|
2758 |
|
2759 |
+
#: includes/REST/OrderController.php:859
|
2760 |
+
msgid "Order number."
|
2761 |
msgstr ""
|
2762 |
|
2763 |
+
#: includes/REST/OrderController.php:865
|
2764 |
+
msgid "Order key."
|
2765 |
msgstr ""
|
2766 |
|
2767 |
+
#: includes/REST/OrderController.php:871
|
2768 |
+
msgid "Shows where the order was created."
|
|
|
|
|
|
|
2769 |
msgstr ""
|
2770 |
|
2771 |
+
#: includes/REST/OrderController.php:877
|
2772 |
+
msgid "Version of WooCommerce which last updated the order."
|
|
|
2773 |
msgstr ""
|
2774 |
|
2775 |
+
#: includes/REST/OrderController.php:883
|
2776 |
+
msgid "Order status."
|
2777 |
msgstr ""
|
2778 |
|
2779 |
+
#: includes/REST/OrderController.php:890
|
2780 |
+
msgid "Currency the order was created with, in ISO format."
|
2781 |
msgstr ""
|
2782 |
|
2783 |
+
#: includes/REST/OrderController.php:897
|
2784 |
+
msgid "The date the order was created, in the site's timezone."
|
2785 |
msgstr ""
|
2786 |
|
2787 |
+
#: includes/REST/OrderController.php:904
|
2788 |
+
msgid "The date the order was created, as GMT."
|
2789 |
msgstr ""
|
2790 |
|
2791 |
+
#: includes/REST/OrderController.php:910
|
2792 |
+
msgid "The date the order was last modified, in the site's timezone."
|
2793 |
msgstr ""
|
2794 |
|
2795 |
+
#: includes/REST/OrderController.php:916
|
2796 |
+
msgid "The date the order was last modified, as GMT."
|
2797 |
msgstr ""
|
2798 |
|
2799 |
+
#: includes/REST/OrderController.php:922
|
2800 |
+
msgid "Total discount amount for the order."
|
2801 |
msgstr ""
|
2802 |
|
2803 |
+
#: includes/REST/OrderController.php:928
|
2804 |
+
msgid "Total discount tax amount for the order."
|
2805 |
msgstr ""
|
2806 |
|
2807 |
+
#: includes/REST/OrderController.php:934
|
2808 |
+
msgid "Total shipping amount for the order."
|
2809 |
msgstr ""
|
2810 |
|
2811 |
+
#: includes/REST/OrderController.php:940
|
2812 |
+
msgid "Total shipping tax amount for the order."
|
2813 |
msgstr ""
|
2814 |
|
2815 |
+
#: includes/REST/OrderController.php:946
|
2816 |
+
msgid "Sum of line item taxes only."
|
|
|
|
|
2817 |
msgstr ""
|
2818 |
|
2819 |
+
#: includes/REST/OrderController.php:952
|
2820 |
+
msgid "Grand total."
|
2821 |
msgstr ""
|
2822 |
|
2823 |
+
#: includes/REST/OrderController.php:958
|
2824 |
+
msgid "Sum of all taxes."
|
2825 |
msgstr ""
|
2826 |
|
2827 |
+
#: includes/REST/OrderController.php:964
|
2828 |
+
msgid "True the prices included tax during checkout."
|
2829 |
msgstr ""
|
2830 |
|
2831 |
+
#: includes/REST/OrderController.php:970
|
2832 |
+
msgid "User ID who owns the order. 0 for guests."
|
2833 |
msgstr ""
|
2834 |
|
2835 |
+
#: includes/REST/OrderController.php:976
|
2836 |
+
msgid "Customer's IP address."
|
2837 |
msgstr ""
|
2838 |
|
2839 |
+
#: includes/REST/OrderController.php:982
|
2840 |
+
msgid "User agent of the customer."
|
2841 |
msgstr ""
|
2842 |
|
2843 |
+
#: includes/REST/OrderController.php:988
|
2844 |
+
msgid "Note left by customer during checkout."
|
2845 |
msgstr ""
|
2846 |
|
2847 |
+
#: includes/REST/OrderController.php:993
|
2848 |
+
msgid "Billing address."
|
2849 |
msgstr ""
|
2850 |
|
2851 |
+
#: includes/REST/OrderController.php:998 includes/REST/OrderController.php:1061
|
2852 |
+
msgid "First name."
|
2853 |
msgstr ""
|
2854 |
|
2855 |
+
#: includes/REST/OrderController.php:1003
|
2856 |
+
#: includes/REST/OrderController.php:1066
|
2857 |
+
msgid "Last name."
|
2858 |
msgstr ""
|
2859 |
|
2860 |
+
#: includes/REST/OrderController.php:1008
|
2861 |
+
#: includes/REST/OrderController.php:1071
|
2862 |
+
msgid "Company name."
|
2863 |
msgstr ""
|
2864 |
|
2865 |
+
#: includes/REST/OrderController.php:1013
|
2866 |
+
#: includes/REST/OrderController.php:1076
|
2867 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:37
|
2868 |
+
msgid "Address line 1"
|
2869 |
msgstr ""
|
2870 |
|
2871 |
+
#: includes/REST/OrderController.php:1018
|
2872 |
+
#: includes/REST/OrderController.php:1081
|
2873 |
+
#: templates/admin-setup-wizard/step-store-wc-fields.php:44
|
2874 |
+
msgid "Address line 2"
|
2875 |
msgstr ""
|
2876 |
|
2877 |
+
#: includes/REST/OrderController.php:1023
|
2878 |
+
#: includes/REST/OrderController.php:1086
|
2879 |
+
msgid "City name."
|
2880 |
msgstr ""
|
2881 |
|
2882 |
+
#: includes/REST/OrderController.php:1028
|
2883 |
+
#: includes/REST/OrderController.php:1091
|
2884 |
+
msgid "ISO code or name of the state, province or district."
|
2885 |
msgstr ""
|
2886 |
|
2887 |
+
#: includes/REST/OrderController.php:1033
|
2888 |
+
#: includes/REST/OrderController.php:1096
|
2889 |
+
msgid "Postal code."
|
2890 |
msgstr ""
|
2891 |
|
2892 |
+
#: includes/REST/OrderController.php:1038
|
2893 |
+
#: includes/REST/OrderController.php:1101
|
2894 |
+
msgid "Country code in ISO 3166-1 alpha-2 format."
|
2895 |
msgstr ""
|
2896 |
|
2897 |
+
#: includes/REST/OrderController.php:1043
|
2898 |
+
msgid "Email address."
|
2899 |
msgstr ""
|
2900 |
|
2901 |
+
#: includes/REST/OrderController.php:1049
|
2902 |
+
msgid "Phone number."
|
2903 |
msgstr ""
|
2904 |
|
2905 |
+
#: includes/REST/OrderController.php:1056
|
2906 |
+
msgid "Shipping address."
|
2907 |
msgstr ""
|
2908 |
|
2909 |
+
#: includes/REST/OrderController.php:1108
|
2910 |
+
msgid "Payment method ID."
|
2911 |
msgstr ""
|
2912 |
|
2913 |
+
#: includes/REST/OrderController.php:1113
|
2914 |
+
msgid "Payment method title."
|
2915 |
msgstr ""
|
2916 |
|
2917 |
+
#: includes/REST/OrderController.php:1118
|
2918 |
+
msgid "Unique transaction ID."
|
2919 |
msgstr ""
|
2920 |
|
2921 |
+
#: includes/REST/OrderController.php:1123
|
2922 |
+
msgid "The date the order was paid, in the site's timezone."
|
2923 |
msgstr ""
|
2924 |
|
2925 |
+
#: includes/REST/OrderController.php:1129
|
2926 |
+
msgid "The date the order was paid, as GMT."
|
2927 |
msgstr ""
|
2928 |
|
2929 |
+
#: includes/REST/OrderController.php:1135
|
2930 |
+
msgid "The date the order was completed, in the site's timezone."
|
2931 |
msgstr ""
|
2932 |
|
2933 |
+
#: includes/REST/OrderController.php:1141
|
2934 |
+
msgid "The date the order was completed, as GMT."
|
2935 |
+
msgstr ""
|
2936 |
+
|
2937 |
+
#: includes/REST/OrderController.php:1147
|
2938 |
+
msgid "MD5 hash of cart items to ensure orders are not modified."
|
2939 |
msgstr ""
|
2940 |
|
2941 |
+
#: includes/REST/OrderController.php:1153
|
2942 |
+
#: includes/REST/OrderController.php:1265
|
2943 |
+
#: includes/REST/OrderController.php:1356
|
2944 |
+
#: includes/REST/OrderController.php:1442
|
2945 |
+
#: includes/REST/OrderController.php:1540
|
2946 |
+
#: includes/REST/OrderController.php:1598
|
2947 |
+
#: includes/REST/ProductController.php:2269
|
2948 |
+
msgid "Meta data."
|
2949 |
msgstr ""
|
2950 |
|
2951 |
+
#: includes/REST/OrderController.php:1160
|
2952 |
+
#: includes/REST/OrderController.php:1272
|
2953 |
+
#: includes/REST/OrderController.php:1363
|
2954 |
+
#: includes/REST/OrderController.php:1449
|
2955 |
+
#: includes/REST/OrderController.php:1547
|
2956 |
+
#: includes/REST/OrderController.php:1605
|
2957 |
+
#: includes/REST/ProductController.php:2276
|
2958 |
+
msgid "Meta ID."
|
2959 |
msgstr ""
|
2960 |
|
2961 |
+
#: includes/REST/OrderController.php:1166
|
2962 |
+
#: includes/REST/OrderController.php:1278
|
2963 |
+
#: includes/REST/OrderController.php:1369
|
2964 |
+
#: includes/REST/OrderController.php:1455
|
2965 |
+
#: includes/REST/OrderController.php:1553
|
2966 |
+
#: includes/REST/OrderController.php:1611
|
2967 |
+
#: includes/REST/ProductController.php:2282
|
2968 |
+
msgid "Meta key."
|
2969 |
msgstr ""
|
2970 |
|
2971 |
+
#: includes/REST/OrderController.php:1171
|
2972 |
+
#: includes/REST/OrderController.php:1283
|
2973 |
+
#: includes/REST/OrderController.php:1374
|
2974 |
+
#: includes/REST/OrderController.php:1460
|
2975 |
+
#: includes/REST/OrderController.php:1558
|
2976 |
+
#: includes/REST/OrderController.php:1616
|
2977 |
+
#: includes/REST/ProductController.php:2287
|
2978 |
+
msgid "Meta value."
|
2979 |
msgstr ""
|
2980 |
|
2981 |
+
#: includes/REST/OrderController.php:1179
|
2982 |
+
msgid "Line items data."
|
2983 |
msgstr ""
|
2984 |
|
2985 |
+
#: includes/REST/OrderController.php:1186
|
2986 |
+
#: includes/REST/OrderController.php:1314
|
2987 |
+
#: includes/REST/OrderController.php:1392
|
2988 |
+
#: includes/REST/OrderController.php:1478
|
2989 |
+
#: includes/REST/OrderController.php:1576
|
2990 |
+
msgid "Item ID."
|
2991 |
msgstr ""
|
2992 |
|
2993 |
+
#: includes/REST/OrderController.php:1192
|
2994 |
+
#: includes/REST/ProductController.php:1698
|
2995 |
+
msgid "Product name."
|
|
|
|
|
2996 |
msgstr ""
|
2997 |
|
2998 |
+
#: includes/REST/OrderController.php:1197
|
2999 |
+
msgid "Product ID."
|
3000 |
msgstr ""
|
3001 |
|
3002 |
+
#: includes/REST/OrderController.php:1202
|
3003 |
+
msgid "Variation ID, if applicable."
|
3004 |
msgstr ""
|
3005 |
|
3006 |
+
#: includes/REST/OrderController.php:1207
|
3007 |
+
msgid "Quantity ordered."
|
3008 |
msgstr ""
|
3009 |
|
3010 |
+
#: includes/REST/OrderController.php:1212
|
3011 |
+
msgid "Tax class of product."
|
3012 |
msgstr ""
|
3013 |
|
3014 |
+
#: includes/REST/OrderController.php:1217
|
3015 |
+
msgid "Line subtotal (before discounts)."
|
3016 |
msgstr ""
|
3017 |
|
3018 |
+
#: includes/REST/OrderController.php:1222
|
3019 |
+
msgid "Line subtotal tax (before discounts)."
|
3020 |
msgstr ""
|
3021 |
|
3022 |
+
#: includes/REST/OrderController.php:1228
|
3023 |
+
#: includes/REST/OrderController.php:1408
|
3024 |
+
#: includes/REST/OrderController.php:1500
|
3025 |
+
msgid "Line total (after discounts)."
|
3026 |
msgstr ""
|
3027 |
|
3028 |
+
#: includes/REST/OrderController.php:1233
|
3029 |
+
#: includes/REST/OrderController.php:1413
|
3030 |
+
#: includes/REST/OrderController.php:1505
|
3031 |
+
msgid "Line total tax (after discounts)."
|
3032 |
msgstr ""
|
3033 |
|
3034 |
+
#: includes/REST/OrderController.php:1239
|
3035 |
+
#: includes/REST/OrderController.php:1419
|
3036 |
+
#: includes/REST/OrderController.php:1511
|
3037 |
+
msgid "Line taxes."
|
3038 |
msgstr ""
|
3039 |
|
3040 |
+
#: includes/REST/OrderController.php:1247
|
3041 |
+
#: includes/REST/OrderController.php:1326
|
3042 |
+
#: includes/REST/OrderController.php:1427
|
3043 |
+
#: includes/REST/OrderController.php:1519
|
3044 |
+
msgid "Tax rate ID."
|
3045 |
msgstr ""
|
3046 |
|
3047 |
+
#: includes/REST/OrderController.php:1252
|
3048 |
+
#: includes/REST/OrderController.php:1433
|
3049 |
+
#: includes/REST/OrderController.php:1525
|
3050 |
+
msgid "Tax total."
|
3051 |
msgstr ""
|
3052 |
|
3053 |
+
#: includes/REST/OrderController.php:1257
|
3054 |
+
#: includes/REST/OrderController.php:1531
|
3055 |
+
msgid "Tax subtotal."
|
3056 |
msgstr ""
|
3057 |
|
3058 |
+
#: includes/REST/OrderController.php:1291
|
3059 |
+
msgid "Product SKU."
|
3060 |
msgstr ""
|
3061 |
|
3062 |
+
#: includes/REST/OrderController.php:1297
|
3063 |
+
msgid "Product price."
|
3064 |
msgstr ""
|
3065 |
|
3066 |
+
#: includes/REST/OrderController.php:1306
|
3067 |
+
msgid "Tax lines data."
|
3068 |
msgstr ""
|
3069 |
|
3070 |
+
#: includes/REST/OrderController.php:1320
|
3071 |
+
msgid "Tax rate code."
|
3072 |
msgstr ""
|
3073 |
|
3074 |
+
#: includes/REST/OrderController.php:1332
|
3075 |
+
msgid "Tax rate label."
|
3076 |
msgstr ""
|
3077 |
|
3078 |
+
#: includes/REST/OrderController.php:1338
|
3079 |
+
msgid "Show if is a compound tax rate."
|
3080 |
msgstr ""
|
3081 |
|
3082 |
+
#: includes/REST/OrderController.php:1344
|
3083 |
+
msgid "Tax total (not including shipping taxes)."
|
3084 |
msgstr ""
|
3085 |
|
3086 |
+
#: includes/REST/OrderController.php:1350
|
3087 |
+
msgid "Shipping tax total."
|
3088 |
msgstr ""
|
3089 |
|
3090 |
+
#: includes/REST/OrderController.php:1385
|
3091 |
+
msgid "Shipping lines data."
|
3092 |
msgstr ""
|
3093 |
|
3094 |
+
#: includes/REST/OrderController.php:1398
|
3095 |
+
msgid "Shipping method name."
|
3096 |
msgstr ""
|
3097 |
|
3098 |
+
#: includes/REST/OrderController.php:1403
|
3099 |
+
msgid "Shipping method ID."
|
3100 |
msgstr ""
|
3101 |
|
3102 |
+
#: includes/REST/OrderController.php:1471
|
3103 |
+
msgid "Fee lines data."
|
3104 |
msgstr ""
|
3105 |
|
3106 |
+
#: includes/REST/OrderController.php:1484
|
3107 |
+
msgid "Fee name."
|
3108 |
msgstr ""
|
3109 |
|
3110 |
+
#: includes/REST/OrderController.php:1489
|
3111 |
+
msgid "Tax class of fee."
|
3112 |
msgstr ""
|
3113 |
|
3114 |
+
#: includes/REST/OrderController.php:1494
|
3115 |
+
msgid "Tax status of fee."
|
3116 |
msgstr ""
|
3117 |
|
3118 |
+
#: includes/REST/OrderController.php:1569
|
3119 |
+
msgid "Coupons line data."
|
3120 |
msgstr ""
|
3121 |
|
3122 |
+
#: includes/REST/OrderController.php:1582
|
3123 |
+
msgid "Coupon code."
|
3124 |
msgstr ""
|
3125 |
|
3126 |
+
#: includes/REST/OrderController.php:1587
|
3127 |
+
msgid "Discount total."
|
3128 |
msgstr ""
|
3129 |
|
3130 |
+
#: includes/REST/OrderController.php:1592
|
3131 |
+
msgid "Discount total tax."
|
3132 |
msgstr ""
|
3133 |
|
3134 |
+
#: includes/REST/OrderController.php:1627
|
3135 |
+
msgid "List of refunds."
|
3136 |
msgstr ""
|
3137 |
|
3138 |
+
#: includes/REST/OrderController.php:1635
|
3139 |
+
msgid "Refund ID."
|
3140 |
msgstr ""
|
3141 |
|
3142 |
+
#: includes/REST/OrderController.php:1641
|
3143 |
+
msgid "Refund reason."
|
3144 |
msgstr ""
|
3145 |
|
3146 |
+
#: includes/REST/OrderController.php:1647
|
3147 |
+
msgid "Refund total."
|
3148 |
msgstr ""
|
3149 |
|
3150 |
+
#: includes/REST/OrderController.php:1656
|
3151 |
+
msgid ""
|
3152 |
+
"Define if the order is paid. It will set the status to processing and "
|
3153 |
+
"reduce stock items."
|
3154 |
msgstr ""
|
3155 |
|
3156 |
+
#: includes/REST/ProductAttributeController.php:66
|
3157 |
+
#: includes/REST/ProductAttributeController.php:80
|
3158 |
+
#: includes/REST/ProductAttributeController.php:94
|
3159 |
+
msgid "Resource does not exist."
|
3160 |
msgstr ""
|
3161 |
|
3162 |
+
#: includes/REST/ProductAttributeTermsController.php:86
|
3163 |
+
msgid "The term cannot found"
|
|
|
|
|
|
|
|
|
|
|
|
|
3164 |
msgstr ""
|
3165 |
|
3166 |
+
#: includes/REST/ProductAttributeTermsController.php:94
|
3167 |
+
msgid "The resource cannot be deleted."
|
3168 |
msgstr ""
|
3169 |
|
3170 |
+
#: includes/REST/ProductController.php:104
|
3171 |
+
msgid "Whether to bypass trash and force deletion."
|
3172 |
msgstr ""
|
3173 |
|
3174 |
+
#: includes/REST/ProductController.php:126
|
3175 |
+
#: includes/REST/ProductController.php:140
|
3176 |
+
#: includes/REST/ProductController.php:163
|
3177 |
+
#: includes/REST/ProductController.php:186
|
3178 |
+
#: includes/REST/ProductController.php:209
|
3179 |
+
msgid "Number of product you want to get top rated product"
|
3180 |
msgstr ""
|
3181 |
|
3182 |
+
#: includes/REST/ProductController.php:145
|
3183 |
+
#: includes/REST/ProductController.php:168
|
3184 |
+
#: includes/REST/ProductController.php:191
|
3185 |
+
#: includes/REST/ProductController.php:214
|
3186 |
+
msgid "Number of page number"
|
3187 |
msgstr ""
|
3188 |
|
3189 |
+
#: includes/REST/ProductController.php:150
|
3190 |
+
#: includes/REST/ProductController.php:173
|
3191 |
+
#: includes/REST/ProductController.php:196
|
3192 |
+
#: includes/REST/ProductController.php:219
|
3193 |
+
msgid "Top rated product for specific vendor"
|
3194 |
msgstr ""
|
3195 |
|
3196 |
+
#: includes/REST/ProductController.php:260
|
3197 |
+
msgid "Product title must be required"
|
|
|
|
|
3198 |
msgstr ""
|
3199 |
|
3200 |
+
#: includes/REST/ProductController.php:266
|
3201 |
+
msgid "Category must be required"
|
|
|
|
|
3202 |
msgstr ""
|
3203 |
|
3204 |
+
#: includes/REST/ProductController.php:271
|
3205 |
+
msgid "You can not select more than category"
|
|
|
|
|
3206 |
msgstr ""
|
3207 |
|
3208 |
+
#: includes/REST/ProductController.php:1271
|
3209 |
+
#: includes/REST/ProductController.php:1272
|
3210 |
+
msgid "Placeholder"
|
|
|
3211 |
msgstr ""
|
3212 |
|
3213 |
+
#: includes/REST/ProductController.php:1484
|
3214 |
+
#. translators: %s: attachment id
|
3215 |
+
msgid "#%s is an invalid image ID."
|
|
|
|
|
|
|
3216 |
msgstr ""
|
3217 |
|
3218 |
+
#: includes/REST/ProductController.php:1703
|
3219 |
+
msgid "Product slug."
|
3220 |
msgstr ""
|
3221 |
|
3222 |
+
#: includes/REST/ProductController.php:1708
|
3223 |
+
msgid "Product URL."
|
3224 |
msgstr ""
|
3225 |
|
3226 |
+
#: includes/REST/ProductController.php:1715
|
3227 |
+
msgid "The date the product was created, in the site's timezone."
|
3228 |
msgstr ""
|
3229 |
|
3230 |
+
#: includes/REST/ProductController.php:1721
|
3231 |
+
msgid "The date the product was created, as GMT."
|
3232 |
msgstr ""
|
3233 |
|
3234 |
+
#: includes/REST/ProductController.php:1727
|
3235 |
+
msgid "The date the product was last modified, in the site's timezone."
|
3236 |
msgstr ""
|
3237 |
|
3238 |
+
#: includes/REST/ProductController.php:1733
|
3239 |
+
msgid "The date the product was last modified, as GMT."
|
3240 |
msgstr ""
|
3241 |
|
3242 |
+
#: includes/REST/ProductController.php:1739
|
3243 |
+
msgid "Product type."
|
3244 |
msgstr ""
|
3245 |
|
3246 |
+
#: includes/REST/ProductController.php:1746
|
3247 |
+
msgid "Product status (post status)."
|
|
|
|
|
3248 |
msgstr ""
|
3249 |
|
3250 |
+
#: includes/REST/ProductController.php:1753
|
3251 |
+
msgid "Featured product."
|
|
|
|
|
|
|
|
|
|
|
3252 |
msgstr ""
|
3253 |
|
3254 |
+
#: includes/REST/ProductController.php:1759
|
3255 |
+
msgid "Catalog visibility."
|
3256 |
msgstr ""
|
3257 |
|
3258 |
+
#: includes/REST/ProductController.php:1766
|
3259 |
+
msgid "Product description."
|
3260 |
msgstr ""
|
3261 |
|
3262 |
+
#: includes/REST/ProductController.php:1771
|
3263 |
+
msgid "Product short description."
|
|
|
|
|
3264 |
msgstr ""
|
3265 |
|
3266 |
+
#: includes/REST/ProductController.php:1776
|
3267 |
+
msgid "Unique identifier."
|
|
|
|
|
3268 |
msgstr ""
|
3269 |
|
3270 |
+
#: includes/REST/ProductController.php:1781
|
3271 |
+
msgid "Current product price."
|
|
|
|
|
3272 |
msgstr ""
|
3273 |
|
3274 |
+
#: includes/REST/ProductController.php:1787
|
3275 |
+
msgid "Product regular price."
|
|
|
|
|
3276 |
msgstr ""
|
3277 |
|
3278 |
+
#: includes/REST/ProductController.php:1792
|
3279 |
+
msgid "Product sale price."
|
3280 |
msgstr ""
|
3281 |
|
3282 |
+
#: includes/REST/ProductController.php:1797
|
3283 |
+
msgid "Start date of sale price, in the site's timezone."
|
|
|
|
|
|
|
3284 |
msgstr ""
|
3285 |
|
3286 |
+
#: includes/REST/ProductController.php:1802
|
3287 |
+
msgid "Start date of sale price, as GMT."
|
|
|
|
|
3288 |
msgstr ""
|
3289 |
|
3290 |
+
#: includes/REST/ProductController.php:1807
|
3291 |
+
msgid "End date of sale price, in the site's timezone."
|
3292 |
msgstr ""
|
3293 |
|
3294 |
+
#: includes/REST/ProductController.php:1812
|
3295 |
+
msgid "End date of sale price, as GMT."
|
|
|
|
|
|
|
|
|
3296 |
msgstr ""
|
3297 |
|
3298 |
+
#: includes/REST/ProductController.php:1817
|
3299 |
+
msgid "Price formatted in HTML."
|
|
|
|
|
|
|
3300 |
msgstr ""
|
3301 |
|
3302 |
+
#: includes/REST/ProductController.php:1823
|
3303 |
+
msgid "Shows if the product is on sale."
|
|
|
|
|
|
|
3304 |
msgstr ""
|
3305 |
|
3306 |
+
#: includes/REST/ProductController.php:1829
|
3307 |
+
msgid "Shows if the product can be bought."
|
3308 |
msgstr ""
|
3309 |
|
3310 |
+
#: includes/REST/ProductController.php:1835
|
3311 |
+
msgid "Amount of sales."
|
|
|
|
|
|
|
|
|
3312 |
msgstr ""
|
3313 |
|
3314 |
+
#: includes/REST/ProductController.php:1841
|
3315 |
+
msgid "If the product is virtual."
|
|
|
|
|
|
|
3316 |
msgstr ""
|
3317 |
|
3318 |
+
#: includes/REST/ProductController.php:1847
|
3319 |
+
msgid "If the product is downloadable."
|
3320 |
msgstr ""
|
3321 |
|
3322 |
+
#: includes/REST/ProductController.php:1853
|
3323 |
+
msgid "List of downloadable files."
|
3324 |
msgstr ""
|
3325 |
|
3326 |
+
#: includes/REST/ProductController.php:1860
|
3327 |
+
msgid "File MD5 hash."
|
|
|
|
|
|
|
|
|
3328 |
msgstr ""
|
3329 |
|
3330 |
+
#: includes/REST/ProductController.php:1866
|
3331 |
+
msgid "File name."
|
3332 |
msgstr ""
|
3333 |
|
3334 |
+
#: includes/REST/ProductController.php:1871
|
3335 |
+
msgid "File URL."
|
3336 |
msgstr ""
|
3337 |
|
3338 |
+
#: includes/REST/ProductController.php:1879
|
3339 |
+
msgid "Number of times downloadable files can be downloaded after purchase."
|
3340 |
msgstr ""
|
3341 |
|
3342 |
+
#: includes/REST/ProductController.php:1885
|
3343 |
+
msgid "Number of days until access to downloadable files expires."
|
|
|
3344 |
msgstr ""
|
3345 |
|
3346 |
+
#: includes/REST/ProductController.php:1891
|
3347 |
+
msgid "Product external URL. Only for external products."
|
|
|
3348 |
msgstr ""
|
3349 |
|
3350 |
+
#: includes/REST/ProductController.php:1897
|
3351 |
+
msgid "Product external button text. Only for external products."
|
|
|
3352 |
msgstr ""
|
3353 |
|
3354 |
+
#: includes/REST/ProductController.php:1902
|
3355 |
+
msgid "Tax status."
|
|
|
3356 |
msgstr ""
|
3357 |
|
3358 |
+
#: includes/REST/ProductController.php:1909
|
3359 |
+
msgid "Tax class."
|
|
|
3360 |
msgstr ""
|
3361 |
|
3362 |
+
#: includes/REST/ProductController.php:1914
|
3363 |
+
msgid "Stock management at product level."
|
|
|
3364 |
msgstr ""
|
3365 |
|
3366 |
+
#: includes/REST/ProductController.php:1920
|
3367 |
+
msgid "Stock quantity."
|
|
|
3368 |
msgstr ""
|
3369 |
|
3370 |
+
#: includes/REST/ProductController.php:1925
|
3371 |
+
msgid ""
|
3372 |
+
"Controls whether or not the product is listed as \"in stock\" or \"out of "
|
3373 |
+
"stock\" on the frontend."
|
3374 |
msgstr ""
|
3375 |
|
3376 |
+
#: includes/REST/ProductController.php:1931
|
3377 |
+
msgid "If managing stock, this controls if backorders are allowed."
|
3378 |
msgstr ""
|
3379 |
|
3380 |
+
#: includes/REST/ProductController.php:1938
|
3381 |
+
msgid "Shows if backorders are allowed."
|
3382 |
msgstr ""
|
3383 |
|
3384 |
+
#: includes/REST/ProductController.php:1944
|
3385 |
+
msgid "Shows if the product is on backordered."
|
|
|
|
|
3386 |
msgstr ""
|
3387 |
|
3388 |
+
#: includes/REST/ProductController.php:1950
|
3389 |
+
msgid "Allow one item to be bought in a single order."
|
|
|
3390 |
msgstr ""
|
3391 |
|
3392 |
+
#: includes/REST/ProductController.php:1957
|
3393 |
+
#. translators: %s: weight unit
|
3394 |
+
msgid "Product weight (%s)."
|
|
|
3395 |
msgstr ""
|
3396 |
|
3397 |
+
#: includes/REST/ProductController.php:1962
|
3398 |
+
msgid "Product dimensions."
|
|
|
|
|
3399 |
msgstr ""
|
3400 |
|
3401 |
+
#: includes/REST/ProductController.php:1968
|
3402 |
+
#. translators: %s: dimension unit
|
3403 |
+
msgid "Product length (%s)."
|
3404 |
msgstr ""
|
3405 |
|
3406 |
+
#: includes/REST/ProductController.php:1974
|
3407 |
+
#. translators: %s: dimension unit
|
3408 |
+
msgid "Product width (%s)."
|
3409 |
msgstr ""
|
3410 |
|
3411 |
+
#: includes/REST/ProductController.php:1980
|
3412 |
+
#. translators: %s: dimension unit
|
3413 |
+
msgid "Product height (%s)."
|
3414 |
msgstr ""
|
3415 |
|
3416 |
+
#: includes/REST/ProductController.php:1987
|
3417 |
+
msgid "Shows if the product need to be shipped."
|
3418 |
msgstr ""
|
3419 |
|
3420 |
+
#: includes/REST/ProductController.php:1993
|
3421 |
+
msgid "Shows whether or not the product shipping is taxable."
|
3422 |
msgstr ""
|
3423 |
|
3424 |
+
#: includes/REST/ProductController.php:1999
|
3425 |
+
msgid "Shipping class slug."
|
3426 |
msgstr ""
|
3427 |
|
3428 |
+
#: includes/REST/ProductController.php:2004
|
3429 |
+
msgid "Shipping class ID."
|
3430 |
msgstr ""
|
3431 |
|
3432 |
+
#: includes/REST/ProductController.php:2010
|
3433 |
+
msgid "Allow reviews."
|
3434 |
msgstr ""
|
3435 |
|
3436 |
+
#: includes/REST/ProductController.php:2016
|
3437 |
+
msgid "Reviews average rating."
|
3438 |
msgstr ""
|
3439 |
|
3440 |
+
#: includes/REST/ProductController.php:2022
|
3441 |
+
msgid "Amount of reviews that the product have."
|
3442 |
msgstr ""
|
3443 |
|
3444 |
+
#: includes/REST/ProductController.php:2028
|
3445 |
+
msgid "List of related products IDs."
|
3446 |
msgstr ""
|
3447 |
|
3448 |
+
#: includes/REST/ProductController.php:2037
|
3449 |
+
msgid "List of up-sell products IDs."
|
3450 |
msgstr ""
|
3451 |
|
3452 |
+
#: includes/REST/ProductController.php:2045
|
3453 |
+
msgid "List of cross-sell products IDs."
|
3454 |
msgstr ""
|
3455 |
|
3456 |
+
#: includes/REST/ProductController.php:2053
|
3457 |
+
msgid "Product parent ID."
|
3458 |
msgstr ""
|
3459 |
|
3460 |
+
#: includes/REST/ProductController.php:2058
|
3461 |
+
msgid "Optional note to send the customer after purchase."
|
3462 |
msgstr ""
|
3463 |
|
3464 |
+
#: includes/REST/ProductController.php:2063
|
3465 |
+
msgid "List of categories."
|
3466 |
msgstr ""
|
3467 |
|
3468 |
+
#: includes/REST/ProductController.php:2070
|
3469 |
+
msgid "Category ID."
|
|
|
3470 |
msgstr ""
|
3471 |
|
3472 |
+
#: includes/REST/ProductController.php:2075
|
3473 |
+
msgid "Category name."
|
3474 |
msgstr ""
|
3475 |
|
3476 |
+
#: includes/REST/ProductController.php:2081
|
3477 |
+
msgid "Category slug."
|
3478 |
msgstr ""
|
3479 |
|
3480 |
+
#: includes/REST/ProductController.php:2090
|
3481 |
+
msgid "List of tags."
|
3482 |
msgstr ""
|
3483 |
|
3484 |
+
#: includes/REST/ProductController.php:2097
|
3485 |
+
msgid "Tag ID."
|
3486 |
msgstr ""
|
3487 |
|
3488 |
+
#: includes/REST/ProductController.php:2102
|
3489 |
+
msgid "Tag name."
|
3490 |
msgstr ""
|
3491 |
|
3492 |
+
#: includes/REST/ProductController.php:2108
|
3493 |
+
msgid "Tag slug."
|
3494 |
msgstr ""
|
3495 |
|
3496 |
+
#: includes/REST/ProductController.php:2117
|
3497 |
+
msgid "List of images."
|
3498 |
msgstr ""
|
3499 |
|
3500 |
+
#: includes/REST/ProductController.php:2124
|
3501 |
+
msgid "Image ID."
|
3502 |
msgstr ""
|
3503 |
|
3504 |
+
#: includes/REST/ProductController.php:2129
|
3505 |
+
msgid "The date the image was created, in the site's timezone."
|
3506 |
msgstr ""
|
3507 |
|
3508 |
+
#: includes/REST/ProductController.php:2135
|
3509 |
+
msgid "The date the image was created, as GMT."
|
3510 |
msgstr ""
|
3511 |
|
3512 |
+
#: includes/REST/ProductController.php:2141
|
3513 |
+
msgid "The date the image was last modified, in the site's timezone."
|
3514 |
msgstr ""
|
3515 |
|
3516 |
+
#: includes/REST/ProductController.php:2147
|
3517 |
+
msgid "The date the image was last modified, as GMT."
|
3518 |
msgstr ""
|
3519 |
|
3520 |
+
#: includes/REST/ProductController.php:2153
|
3521 |
+
msgid "Image URL."
|
3522 |
msgstr ""
|
3523 |
|
3524 |
+
#: includes/REST/ProductController.php:2159
|
3525 |
+
msgid "Image name."
|
3526 |
+
msgstr ""
|
|
|
|
|
3527 |
|
3528 |
+
#: includes/REST/ProductController.php:2164
|
3529 |
+
msgid "Image alternative text."
|
3530 |
msgstr ""
|
3531 |
|
3532 |
+
#: includes/REST/ProductController.php:2169
|
3533 |
+
msgid "Image position. 0 means that the image is featured."
|
3534 |
msgstr ""
|
3535 |
|
3536 |
+
#: includes/REST/ProductController.php:2177
|
3537 |
+
msgid "List of attributes."
|
3538 |
msgstr ""
|
3539 |
|
3540 |
+
#: includes/REST/ProductController.php:2184
|
3541 |
+
#: includes/REST/ProductController.php:2229
|
3542 |
+
msgid "Attribute ID."
|
3543 |
msgstr ""
|
3544 |
|
3545 |
+
#: includes/REST/ProductController.php:2189
|
3546 |
+
#: includes/REST/ProductController.php:2234
|
3547 |
+
msgid "Attribute name."
|
|
|
3548 |
msgstr ""
|
3549 |
|
3550 |
+
#: includes/REST/ProductController.php:2194
|
3551 |
+
msgid "Attribute position."
|
3552 |
msgstr ""
|
3553 |
|
3554 |
+
#: includes/REST/ProductController.php:2199
|
3555 |
+
msgid ""
|
3556 |
+
"Define if the attribute is visible on the \"Additional information\" tab in "
|
3557 |
+
"the product's page."
|
3558 |
msgstr ""
|
3559 |
|
3560 |
+
#: includes/REST/ProductController.php:2205
|
3561 |
+
msgid "Define if the attribute can be used as variation."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3562 |
msgstr ""
|
3563 |
|
3564 |
+
#: includes/REST/ProductController.php:2211
|
3565 |
+
msgid "List of available term names of the attribute."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3566 |
msgstr ""
|
3567 |
|
3568 |
+
#: includes/REST/ProductController.php:2222
|
3569 |
+
msgid "Defaults variation attributes."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3570 |
msgstr ""
|
3571 |
|
3572 |
+
#: includes/REST/ProductController.php:2239
|
3573 |
+
msgid "Selected attribute term name."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3574 |
msgstr ""
|
3575 |
|
3576 |
+
#: includes/REST/ProductController.php:2247
|
3577 |
+
msgid "List of variations IDs."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3578 |
msgstr ""
|
3579 |
|
3580 |
+
#: includes/REST/ProductController.php:2256
|
3581 |
+
msgid "List of grouped products ID."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3582 |
msgstr ""
|
3583 |
|
3584 |
+
#: includes/REST/ProductController.php:2264
|
3585 |
+
msgid "Menu order, used to custom sort products."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3586 |
msgstr ""
|
3587 |
|
3588 |
+
#: includes/REST/StoreController.php:72
|
3589 |
+
msgid "Reassign the deleted user's posts and links to this user ID."
|
3590 |
msgstr ""
|
3591 |
|
3592 |
+
#: includes/REST/StoreController.php:132
|
3593 |
+
#: templates/widgets/store-contact-form.php:15
|
3594 |
+
msgid "Your Name"
|
|
|
3595 |
msgstr ""
|
3596 |
|
3597 |
+
#: includes/REST/StoreController.php:138
|
3598 |
+
msgid "Your email"
|
|
|
|
|
3599 |
msgstr ""
|
3600 |
|
3601 |
+
#: includes/REST/StoreController.php:143
|
3602 |
+
msgid "Your Message"
|
3603 |
msgstr ""
|
3604 |
|
3605 |
+
#: includes/REST/StoreController.php:158
|
3606 |
+
msgid "Status for the store object."
|
|
|
|
|
|
|
3607 |
msgstr ""
|
3608 |
|
3609 |
+
#: includes/REST/StoreController.php:244 includes/REST/StoreController.php:311
|
3610 |
+
#: includes/REST/StoreController.php:464
|
3611 |
+
msgid "No store found"
|
|
|
|
|
3612 |
msgstr ""
|
3613 |
|
3614 |
+
#: includes/REST/StoreController.php:265 includes/REST/StoreController.php:783
|
3615 |
+
msgid "No vendor found for updating status"
|
3616 |
msgstr ""
|
3617 |
|
3618 |
+
#: includes/REST/StoreController.php:270
|
3619 |
+
msgid "Invalid user ID for reassignment."
|
|
|
|
|
3620 |
msgstr ""
|
3621 |
|
3622 |
+
#: includes/REST/StoreController.php:481 includes/REST/StoreController.php:500
|
3623 |
+
msgid "No reviews found"
|
3624 |
msgstr ""
|
3625 |
|
3626 |
+
#: includes/REST/StoreController.php:689
|
3627 |
+
msgid "This email address is not valid"
|
3628 |
msgstr ""
|
3629 |
|
3630 |
+
#: includes/REST/StoreController.php:732
|
3631 |
+
msgid "No vendor is found to be send an email."
|
3632 |
msgstr ""
|
3633 |
|
3634 |
+
#: includes/REST/StoreController.php:777
|
3635 |
+
msgid "Status parameter must be active or inactive"
|
|
|
|
|
3636 |
msgstr ""
|
3637 |
|
3638 |
+
#: includes/REST/StoreController.php:808
|
3639 |
+
msgid "No items found for bulk updating"
|
3640 |
msgstr ""
|
3641 |
|
3642 |
+
#: includes/REST/WithdrawController.php:42
|
3643 |
+
msgid "IDs of withdraws"
|
3644 |
msgstr ""
|
3645 |
|
3646 |
+
#: includes/REST/WithdrawController.php:197
|
3647 |
+
msgid "Withdraw not found"
|
3648 |
msgstr ""
|
3649 |
|
3650 |
+
#: includes/REST/WithdrawController.php:238
|
3651 |
+
#: includes/REST/WithdrawController.php:302
|
3652 |
+
msgid "No vendor found"
|
|
|
3653 |
msgstr ""
|
3654 |
|
3655 |
+
#: includes/REST/WithdrawController.php:292
|
3656 |
+
msgid "User does not have permission to withdraw"
|
3657 |
msgstr ""
|
3658 |
|
3659 |
+
#: includes/REST/WithdrawController.php:657
|
3660 |
+
msgid "Requested User"
|
3661 |
msgstr ""
|
3662 |
|
3663 |
+
#: includes/REST/WithdrawController.php:664
|
3664 |
+
msgid "Requested User ID"
|
3665 |
msgstr ""
|
3666 |
|
3667 |
+
#: includes/REST/WithdrawController.php:670
|
3668 |
msgid ""
|
3669 |
+
"The amount of discount. Should always be numeric, even if setting a "
|
3670 |
+
"percentage."
|
3671 |
msgstr ""
|
3672 |
|
3673 |
+
#: includes/REST/WithdrawController.php:675
|
3674 |
+
msgid "The date the withdraw request has beed created in the site's timezone."
|
3675 |
msgstr ""
|
3676 |
|
3677 |
+
#: includes/REST/WithdrawController.php:682
|
3678 |
+
msgid "Withdraw status"
|
3679 |
msgstr ""
|
3680 |
|
3681 |
+
#: includes/REST/WithdrawController.php:690
|
3682 |
+
msgid "Withdraw Method"
|
3683 |
msgstr ""
|
3684 |
|
3685 |
+
#: includes/REST/WithdrawController.php:697
|
3686 |
+
msgid "Withdraw Notes"
|
3687 |
msgstr ""
|
3688 |
|
3689 |
+
#: includes/REST/WithdrawController.php:703
|
3690 |
+
msgid "User IP"
|
3691 |
msgstr ""
|
3692 |
|
3693 |
+
#: includes/REST/WithdrawController.php:729
|
3694 |
+
msgid "List of withdraw IDs to be approved"
|
3695 |
msgstr ""
|
3696 |
|
3697 |
+
#: includes/REST/WithdrawController.php:739
|
3698 |
+
msgid "List of withdraw IDs to be cancelled"
|
3699 |
msgstr ""
|
3700 |
|
3701 |
+
#: includes/REST/WithdrawController.php:749
|
3702 |
+
msgid "List of withdraw IDs to be deleted"
|
3703 |
msgstr ""
|
3704 |
|
3705 |
+
#: includes/Registration.php:48
|
3706 |
+
msgid "Nonce verification failed"
|
3707 |
msgstr ""
|
3708 |
|
3709 |
+
#: includes/Registration.php:56
|
3710 |
+
msgid "Cheating, eh?"
|
3711 |
msgstr ""
|
3712 |
|
3713 |
+
#: includes/Registration.php:62
|
3714 |
+
msgid "Please enter your first name."
|
3715 |
msgstr ""
|
3716 |
|
|