Version Description
= 2.0 =
WC Vendors 2.0 is a major update. This is not compatible with ANY of our existing extensions. You should test this update on a staging server before updating. update your theme and extensions, and review update details here before upgrading.
Download this release
Release Info
Developer | digitalchild |
Plugin | WC Vendors |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.15 to 2.0.0
- assets/css/_variables.scss +23 -0
- assets/css/wcv-activation.css +21 -0
- assets/css/wcv-activation.min.css +1 -0
- assets/css/wcv-activation.scss +68 -0
- assets/css/wcv-admin.css +162 -0
- assets/css/wcv-admin.min.css +1 -0
- assets/css/wcv-admin.scss +474 -0
- assets/css/wcv-setup.css +185 -0
- assets/css/wcv-setup.min.css +1 -0
- assets/css/wcv-setup.scss +540 -0
- assets/images/extensions/screenshot-1.png +0 -0
- assets/images/extensions/screenshot-2.png +0 -0
- assets/images/extensions/screenshot-3.png +0 -0
- assets/images/wcvendors_logo.png +0 -0
- assets/js/admin/settings.js +40 -0
- assets/js/admin/wcv-setup.js +0 -0
- changelog.txt +47 -2
- class-wc-vendors.php +105 -180
- classes/admin/class-admin-menus.php +185 -0
- classes/admin/class-admin-reports.php +50 -55
- classes/admin/class-admin-users.php +59 -119
- classes/admin/class-product-meta.php +32 -32
- classes/admin/class-setup-wizard.php +348 -0
- classes/admin/class-vendor-admin-dashboard.php +171 -144
- classes/admin/class-vendor-applicants.php +7 -7
- classes/admin/class-wcv-admin-extensions.php +25 -0
- classes/admin/class-wcv-admin-help.php +120 -0
- classes/admin/class-wcv-admin-notices.php +249 -0
- classes/admin/class-wcv-admin-settings.php +668 -0
- classes/admin/class-wcv-admin-setup.php +275 -0
- classes/admin/class-wcv-commissions-csv-exporter.php +9 -9
- classes/admin/class-wcv-commissions-page.php +553 -0
- classes/admin/emails/class-emails.php +144 -75
- classes/admin/emails/class-wc-approve-vendor.php +18 -18
- classes/admin/emails/class-wc-notify-admin.php +17 -17
- classes/admin/emails/class-wc-notify-shipped.php +21 -21
- classes/admin/emails/class-wc-notify-vendor.php +70 -70
- classes/admin/emails/class-wcv-admin-notify-application.php +185 -0
- classes/admin/emails/class-wcv-admin-notify-product.php +192 -0
- classes/admin/emails/class-wcv-admin-notify-shipped.php +181 -0
- classes/admin/emails/class-wcv-customer-notify-shipped.php +235 -0
- classes/admin/emails/class-wcv-vendor-notify-application.php +167 -0
- classes/admin/emails/class-wcv-vendor-notify-approved.php +185 -0
- classes/admin/emails/class-wcv-vendor-notify-denied.php +203 -0
- classes/admin/emails/class-wcv-vendor-notify-order.php +213 -0
- classes/admin/settings/class-wcv-settings-capabilities.php +316 -0
- classes/admin/settings/class-wcv-settings-commission.php +88 -0
- classes/admin/settings/class-wcv-settings-display.php +255 -0
- classes/admin/settings/class-wcv-settings-general.php +109 -0
- classes/admin/settings/class-wcv-settings-page.php +144 -0
- classes/admin/settings/class-wcv-settings-payments.php +143 -0
- classes/admin/views/html-admin-commission-page.php +39 -0
- classes/admin/views/html-admin-page-extensions.php +92 -0
- classes/admin/views/html-admin-settings.php +46 -0
- classes/admin/views/html-vendor-meta.php +153 -0
- classes/admin/views/html-vendor-settings-page.php +51 -13
- classes/admin/views/notices/html-notice-custom.php +14 -0
- classes/admin/views/notices/html-notice-install.php +14 -0
- classes/admin/views/notices/html-notice-template-check.php +17 -0
- classes/admin/views/notices/html-notice-theme-support.php +0 -0
- classes/admin/views/notices/html-notice-update.php +19 -0
- classes/admin/views/notices/html-notice-updated.php +14 -0
- classes/admin/views/notices/html-notice-updating.php +13 -0
- classes/admin/views/setup/capabilities.php +134 -0
- classes/admin/views/setup/footer.php +20 -0
- classes/admin/views/setup/general.php +99 -0
- classes/admin/views/setup/header.php +22 -0
- classes/admin/views/setup/pages.php +87 -0
- classes/admin/views/setup/ready.php +78 -0
- classes/admin/views/setup/steps.php +24 -0
- classes/class-commission.php +30 -5
- classes/class-cron.php +3 -3
- classes/class-install.php +319 -162
- classes/class-shipping.php +54 -51
- classes/class-vendor-post-types.php +1 -1
- classes/class-vendors.php +111 -97
- classes/front/class-vendor-cart.php +8 -8
- classes/front/class-vendor-shop.php +91 -97
- classes/front/dashboard/class-vendor-dashboard.php +103 -80
- classes/front/orders/class-export-csv.php +17 -17
- classes/front/orders/class-orders.php +59 -104
- classes/front/orders/class-submit-comment.php +2 -2
- classes/front/signup/class-vendor-signup.php +12 -12
- classes/front/signup/views/html-vendor-signup.php +8 -9
- classes/gateways/PayPal_AdvPayments/paypal_ap.php +44 -44
- classes/gateways/PayPal_Masspay/class-paypal-masspay.php +14 -14
- classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php +19 -19
- classes/includes/class-dependencies.php +1 -37
- classes/includes/class-functions.php +44 -25
- classes/includes/class-sf-settings.php +30 -0
- classes/includes/wcv-template-functions.php +168 -0
- classes/includes/wcv-update-functions.php +115 -0
- gulpfile.js +36 -10
- languages/default.pot +1362 -425
- languages/wc-vendors-pt_BR.mo +0 -0
- languages/wc-vendors-pt_BR.po +2445 -0
- languages/wc-vendors.pot +2462 -0
- package.json +10 -8
- readme.txt +122 -64
- templates/dashboard/date-picker.php +4 -4
- templates/dashboard/denied.php +8 -11
- templates/dashboard/links.php +6 -6
- templates/dashboard/orders.php +38 -38
- templates/dashboard/reports.php +9 -9
- templates/dashboard/settings/paypal-email-form.php +2 -2
- templates/dashboard/settings/seller-info.php +2 -2
- templates/dashboard/settings/settings.php +24 -2
- templates/dashboard/settings/shop-description.php +2 -2
- templates/dashboard/settings/shop-name.php +2 -2
- templates/emails/admin-notify-application.php +32 -0
- templates/emails/admin-notify-product.php +29 -0
- templates/emails/admin-notify-shipped.php +22 -0
- templates/emails/application-status.php +7 -4
- templates/emails/customer-notify-shipped.php +45 -0
- templates/emails/new-product.php +8 -5
- templates/emails/notify-vendor-shipped.php +13 -12
- templates/emails/plain/admin-notify-application.php +26 -0
- templates/emails/plain/admin-notify-product.php +27 -0
- templates/emails/plain/admin-notify-shipped.php +21 -0
- templates/emails/plain/customer-notify-shipped.php +29 -0
- templates/emails/plain/vendor-notify-application.php +23 -0
- templates/emails/plain/vendor-notify-approved.php +21 -0
- templates/emails/plain/vendor-notify-denied.php +23 -0
- templates/emails/plain/vendor-notify-order.php +32 -0
- templates/emails/plain/vendor-order-details.php +49 -0
- templates/emails/plain/vendor-order-items.php +41 -0
- templates/emails/vendor-new-order.php +20 -19
- templates/emails/vendor-notify-application.php +31 -0
- templates/emails/vendor-notify-approved.php +27 -0
- templates/emails/vendor-notify-denied.php +28 -0
- templates/emails/vendor-notify-order.php +30 -0
- templates/emails/vendor-order-details.php +91 -0
- templates/emails/vendor-order-items.php +67 -0
- templates/orders/comments/add-new-comment.php +2 -2
- templates/orders/comments/existing-comments.php +1 -1
- templates/orders/csv-export.php +2 -2
- templates/orders/customer-note/customer-note.php +3 -3
- templates/orders/orders.php +9 -9
- templates/orders/shipping/shipping-form.php +6 -7
- templates/orders/table-body.php +20 -8
- wpml-config.xml +1 -2
assets/css/_variables.scss
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WooCommerce CSS Variables
|
3 |
+
*/
|
4 |
+
|
5 |
+
$wcvendors: #005580;
|
6 |
+
$wcvendors-light: #5897b6;
|
7 |
+
$green: #7ad03a;
|
8 |
+
$red: #a00;
|
9 |
+
$orange: #ffba00;
|
10 |
+
$blue: #2ea2cc;
|
11 |
+
|
12 |
+
$primary: #a46497; // Primary color for buttons (alt)
|
13 |
+
$primarytext: desaturate(lighten($primary, 50%), 18%); // Text on primary color bg
|
14 |
+
|
15 |
+
$secondary: desaturate(lighten($primary, 40%), 21%); // Secondary buttons
|
16 |
+
$secondarytext: desaturate(darken($secondary, 60%), 21%); // Text on secondary color bg
|
17 |
+
|
18 |
+
$highlight: adjust-hue($primary, 150deg); // Prices, In stock labels, sales flash
|
19 |
+
$highlightext: desaturate(lighten($highlight, 50%), 18%); // Text on highlight color bg
|
20 |
+
|
21 |
+
$contentbg: #fff; // Content BG - Tabs (active state)
|
22 |
+
$subtext: #777; // small, breadcrumbs etc
|
23 |
+
$white: #fff;
|
assets/css/wcv-activation.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** activation.scss Styles applied to elements displayed on activation */
|
2 |
+
/** Styling begins */
|
3 |
+
div.wcvendors-message { overflow: hidden; position: relative; border-left-color: #005580 !important; }
|
4 |
+
|
5 |
+
div.wcvendors-message p { max-width: 700px; }
|
6 |
+
|
7 |
+
div.wcvendors-message p:last-child { max-width: inherit; }
|
8 |
+
|
9 |
+
p.wcvendors-actions .button-primary, .wcvendors-message .button-primary { background: #005580; border-color: #005580; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597; color: #fff; text-shadow: 0 -1px 1px #005580, 1px 0 1px #005580, 0 1px 1px #005580, -1px 0 1px #005580; }
|
10 |
+
|
11 |
+
p.wcvendors-actions .button-primary:hover, p.wcvendors-actions .button-primary:focus, p.wcvendors-actions .button-primary:active, .wcvendors-message .button-primary:hover, .wcvendors-message .button-primary:focus, .wcvendors-message .button-primary:active { background: #005580; border-color: #005580; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #005580; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #005580; }
|
12 |
+
|
13 |
+
p.wcvendors-actions a.wcvendors-message-close, .wcvendors-message a.wcvendors-message-close { position: absolute; top: 0; right: 0; padding: 10px 15px 10px 21px; font-size: 13px; line-height: 1.23076923; text-decoration: none; }
|
14 |
+
|
15 |
+
p.wcvendors-actions a.wcvendors-message-close::before, .wcvendors-message a.wcvendors-message-close::before { position: absolute; top: 8px; left: 0; -webkit-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; }
|
16 |
+
|
17 |
+
p.wcvendors-actions .button-primary, p.wcvendors-actions .button-secondary, .wcvendors-message .button-primary, .wcvendors-message .button-secondary { text-decoration: none !important; }
|
18 |
+
|
19 |
+
p.wcvendors-actions .twitter-share-button, .wcvendors-message .twitter-share-button { margin-top: -3px; margin-left: 3px; vertical-align: middle; }
|
20 |
+
|
21 |
+
p.wcvendors-actions, .wcvendors-about-text { margin-bottom: 1em !important; }
|
assets/css/wcv-activation.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
div.wcvendors-message{overflow:hidden;position:relative;border-left-color:#005580!important}div.wcvendors-message p{max-width:700px}div.wcvendors-message p:last-child{max-width:inherit}.wcvendors-message .button-primary,p.wcvendors-actions .button-primary{background:#005580;border-color:#005580;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #005580,1px 0 1px #005580,0 1px 1px #005580,-1px 0 1px #005580}.wcvendors-message .button-primary:active,.wcvendors-message .button-primary:focus,.wcvendors-message .button-primary:hover,p.wcvendors-actions .button-primary:active,p.wcvendors-actions .button-primary:focus,p.wcvendors-actions .button-primary:hover{background:#005580;border-color:#005580;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #005580;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #005580}.wcvendors-message a.wcvendors-message-close,p.wcvendors-actions a.wcvendors-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.wcvendors-message a.wcvendors-message-close::before,p.wcvendors-actions a.wcvendors-message-close::before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.wcvendors-message .button-primary,.wcvendors-message .button-secondary,p.wcvendors-actions .button-primary,p.wcvendors-actions .button-secondary{text-decoration:none!important}.wcvendors-message .twitter-share-button,p.wcvendors-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.wcvendors-about-text,p.wcvendors-actions{margin-bottom:1em!important}
|
assets/css/wcv-activation.scss
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* activation.scss
|
3 |
+
* Styles applied to elements displayed on activation
|
4 |
+
*/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Styling begins
|
8 |
+
*/
|
9 |
+
div.wcvendors-message {
|
10 |
+
overflow: hidden;
|
11 |
+
position: relative;
|
12 |
+
border-left-color: #005580 !important;
|
13 |
+
p {
|
14 |
+
max-width: 700px;
|
15 |
+
}
|
16 |
+
p:last-child {
|
17 |
+
max-width: inherit;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
p.wcvendors-actions,
|
22 |
+
.wcvendors-message {
|
23 |
+
.button-primary {
|
24 |
+
background: #005580;
|
25 |
+
border-color: #005580;
|
26 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
|
27 |
+
color: #fff;
|
28 |
+
text-shadow: 0 -1px 1px #005580, 1px 0 1px #005580, 0 1px 1px #005580, -1px 0 1px #005580;
|
29 |
+
|
30 |
+
&:hover, &:focus, &:active {
|
31 |
+
background: #005580;
|
32 |
+
border-color: #005580;
|
33 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #005580;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
a.wcvendors-message-close {
|
38 |
+
position: absolute;
|
39 |
+
top: 0;
|
40 |
+
right: 0;
|
41 |
+
padding: 10px 15px 10px 21px;
|
42 |
+
font-size: 13px;
|
43 |
+
line-height: 1.23076923;
|
44 |
+
text-decoration: none;
|
45 |
+
&::before {
|
46 |
+
position: absolute;
|
47 |
+
top: 8px;
|
48 |
+
left: 0;
|
49 |
+
transition: all 0.1s ease-in-out;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
.button-primary,
|
54 |
+
.button-secondary {
|
55 |
+
text-decoration: none !important;
|
56 |
+
}
|
57 |
+
|
58 |
+
.twitter-share-button {
|
59 |
+
margin-top: -3px;
|
60 |
+
margin-left: 3px;
|
61 |
+
vertical-align: middle;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
p.wcvendors-actions,
|
66 |
+
.wcvendors-about-text {
|
67 |
+
margin-bottom: 1em !important;
|
68 |
+
}
|
assets/css/wcv-admin.css
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wcv_addons_wrap { max-width: 1200px; }
|
2 |
+
|
3 |
+
.wcv_addons_wrap h1.search-form-title { clear: left; padding: 0; }
|
4 |
+
|
5 |
+
.wcv_addons_wrap .update-plugins .update-count { background-color: #d54e21; border-radius: 10px; color: #fff; display: inline-block; font-size: 9px; font-weight: 600; line-height: 17px; margin: 1px 0 0 2px; padding: 0 6px; vertical-align: text-top; }
|
6 |
+
|
7 |
+
.wcv_addons_wrap .addons-featured { margin: 0; }
|
8 |
+
|
9 |
+
.wcv_addons_wrap ul.feature-list { list-style: inherit; }
|
10 |
+
|
11 |
+
.wcv_addons_wrap ul.feature-list li { margin-left: 20px; }
|
12 |
+
|
13 |
+
.wcv_addons_wrap ul.subsubsub.subsubsub { margin: -2px 0 12px; }
|
14 |
+
|
15 |
+
.wcv_addons_wrap .subsubsub li::after { content: '|'; }
|
16 |
+
|
17 |
+
.wcv_addons_wrap .subsubsub li:last-child::after { content: ''; }
|
18 |
+
|
19 |
+
.wcv_addons_wrap .addons-banner-block-item-icon, .wcv_addons_wrap .addons-column-block-item-icon { -webkit-box-align: center; -ms-flex-align: center; align-items: center; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
|
20 |
+
|
21 |
+
.wcv_addons_wrap .addons-banner-block, .wcv_addons_wrap .addons-wcs-banner-block { background: #ffffff; border: 1px solid #ddd; margin: 0 0 1em 0; padding: 2em 2em 1em; }
|
22 |
+
|
23 |
+
.wcv_addons_wrap .addons-banner-block img { height: 62px; }
|
24 |
+
|
25 |
+
.wcv_addons_wrap .addons-banner-block p { margin: 0 0 20px; }
|
26 |
+
|
27 |
+
.wcv_addons_wrap .addons-banner-block-items { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-pack: distribute; justify-content: space-around; margin: 0 -10px 0 -10px; }
|
28 |
+
|
29 |
+
.wcv_addons_wrap .addons-banner-block-item { border: 1px solid #e6e6e6; border-radius: 3px; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; margin: 1em; min-width: 200px; width: 30%; }
|
30 |
+
|
31 |
+
.wcv_addons_wrap .addons-banner-block-item-icon { background: #f7f7f7; height: 143px; }
|
32 |
+
|
33 |
+
.wcv_addons_wrap .addons-banner-block-item-content { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; height: 184px; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; padding: 24px; }
|
34 |
+
|
35 |
+
.wcv_addons_wrap .addons-banner-block-item-content h3 { margin-top: 0; }
|
36 |
+
|
37 |
+
.wcv_addons_wrap .addons-banner-block-item-content p { margin: 0 0 auto; }
|
38 |
+
|
39 |
+
.wcv_addons_wrap .addons-wcs-banner-block { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
|
40 |
+
|
41 |
+
.wcv_addons_wrap .addons-wcs-banner-block-image { background: #f7f7f7; border: 1px solid #e6e6e6; margin-right: 2em; width: 400px; padding: 1em; text-align: center; }
|
42 |
+
|
43 |
+
.wcv_addons_wrap .addons-wcs-banner-block-image .addons-img { margin: auto 0; max-height: 350px; max-width: 350px; }
|
44 |
+
|
45 |
+
.wcv_addons_wrap .addons-shipping-methods .addons-wcs-banner-block { margin-left: 0; margin-right: 0; margin-top: 1em; }
|
46 |
+
|
47 |
+
.wcv_addons_wrap .addons-wcs-banner-block-content { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -ms-flex-pack: distribute; justify-content: space-around; -ms-flex-item-align: stretch; align-self: stretch; padding: 1em 0; }
|
48 |
+
|
49 |
+
.wcv_addons_wrap .addons-wcs-banner-block-content h1 { padding-bottom: 0; }
|
50 |
+
|
51 |
+
.wcv_addons_wrap .addons-wcs-banner-block-content p { margin-bottom: 0; }
|
52 |
+
|
53 |
+
.wcv_addons_wrap .addons-wcs-banner-block-content .wcs-service-logo { max-width: 40px; }
|
54 |
+
|
55 |
+
.wcv_addons_wrap .addons-column-section { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-pack: distribute; justify-content: space-around; }
|
56 |
+
|
57 |
+
.wcv_addons_wrap .addons-column { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; width: 50%; padding: 0 .5em; }
|
58 |
+
|
59 |
+
.wcv_addons_wrap .addons-column:nth-child(2) { margin-right: 0; }
|
60 |
+
|
61 |
+
.wcv_addons_wrap .addons-small-light-block, .wcv_addons_wrap .addons-small-dark-block, .wcv_addons_wrap .addons-column-block { -webkit-box-sizing: border-box; box-sizing: border-box; border: 1px solid #ddd; margin: 0 0 1em; padding: 20px; }
|
62 |
+
|
63 |
+
.wcv_addons_wrap .addons-column-block img { max-height: 50px; max-width: 50px; }
|
64 |
+
|
65 |
+
.wcv_addons_wrap .addons-small-light-block, .wcv_addons_wrap .addons-column-block { background: #ffffff; }
|
66 |
+
|
67 |
+
.wcv_addons_wrap .addons-column-block-left { float: left; }
|
68 |
+
|
69 |
+
.wcv_addons_wrap .addons-column-block-right { float: right; }
|
70 |
+
|
71 |
+
.wcv_addons_wrap .addons-column-block-item { border-top: 2px solid #f9f9f9; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin: 0 -20px; padding: 20px; }
|
72 |
+
|
73 |
+
.wcv_addons_wrap .addons-column-block-item-icon { background: #f7f7f7; border: 1px solid #e6e6e6; height: 100px; margin: 0 10px 10px 0; width: 100px; }
|
74 |
+
|
75 |
+
.wcv_addons_wrap .addons-column-block-item-content { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; -ms-flex-wrap: wrap; flex-wrap: wrap; height: 20%; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; min-width: 200px; }
|
76 |
+
|
77 |
+
.wcv_addons_wrap .addons-column-block-item-content h2 { float: left; margin-top: 8px; }
|
78 |
+
|
79 |
+
.wcv_addons_wrap .addons-column-block-item-content a { float: right; }
|
80 |
+
|
81 |
+
.wcv_addons_wrap .addons-column-block-item-content p { float: left; }
|
82 |
+
|
83 |
+
.wcv_addons_wrap .addons-banner-block-item, .wcv_addons_wrap .addons-column-block-item { display: none; }
|
84 |
+
|
85 |
+
.wcv_addons_wrap .addons-banner-block-item:nth-child(-n+3) { display: block; }
|
86 |
+
|
87 |
+
.wcv_addons_wrap .addons-column-block-item:nth-of-type(-n+3) { display: -webkit-box; display: -ms-flexbox; display: flex; }
|
88 |
+
|
89 |
+
.wcv_addons_wrap .addons-small-dark-block { background-color: #54687d; text-align: center; }
|
90 |
+
|
91 |
+
.wcv_addons_wrap .addons-small-dark-items { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -ms-flex-pack: distribute; justify-content: space-around; }
|
92 |
+
|
93 |
+
.wcv_addons_wrap .addons-small-dark-item { margin: 0 0 20px; }
|
94 |
+
|
95 |
+
.wcv_addons_wrap .addons-small-dark-block h1 { color: #ffffff; }
|
96 |
+
|
97 |
+
.wcv_addons_wrap .addons-small-dark-block p { color: #fafafa; }
|
98 |
+
|
99 |
+
.wcv_addons_wrap .addons-small-dark-item-icon img { height: 30px; }
|
100 |
+
|
101 |
+
.wcv_addons_wrap .addons-small-dark-item a { margin: 28px auto 0; }
|
102 |
+
|
103 |
+
.wcv_addons_wrap .addons-small-light-block { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; }
|
104 |
+
|
105 |
+
.wcv_addons_wrap .addons-small-light-block h1 { margin-top: -12px; }
|
106 |
+
|
107 |
+
.wcv_addons_wrap .addons-small-light-block p { margin-top: 0; }
|
108 |
+
|
109 |
+
.wcv_addons_wrap .addons-small-light-block img { height: 225px; margin: 0 0 0 -20px; }
|
110 |
+
|
111 |
+
.wcv_addons_wrap .addons-small-light-block-content { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-flex: 1; -ms-flex: 1 1 100px; flex: 1 1 100px; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -ms-flex-pack: distribute; justify-content: space-around; }
|
112 |
+
|
113 |
+
.wcv_addons_wrap .addons-small-light-block-buttons { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }
|
114 |
+
|
115 |
+
.wcv_addons_wrap .addons-small-light-block-content a { width: 48%; }
|
116 |
+
|
117 |
+
.wcv_addons_wrap .product-addons-button { cursor: pointer; display: block; height: 37px; line-height: 37px; text-align: center; text-decoration: none; width: 124px; }
|
118 |
+
|
119 |
+
.wcv_addons_wrap .product-addons-button-solid { background-color: #005580; color: #ffffff; }
|
120 |
+
|
121 |
+
.wcv_addons_wrap .addons-button { border-radius: 3px; cursor: pointer; display: block; height: 37px; line-height: 37px; text-align: center; text-decoration: none; width: 124px; }
|
122 |
+
|
123 |
+
.wcv_addons_wrap .addons-button-solid { background-color: #005580; color: #ffffff; }
|
124 |
+
|
125 |
+
.wcv_addons_wrap .addons-button-solid:hover { color: #ffffff; opacity: 0.8; }
|
126 |
+
|
127 |
+
.wcv_addons_wrap .addons-button-outline-green { border: 1px solid #73ae39; color: #73ae39; }
|
128 |
+
|
129 |
+
.wcv_addons_wrap .addons-button-outline-green:hover { color: #73ae39; opacity: 0.8; }
|
130 |
+
|
131 |
+
.wcv_addons_wrap .addons-button-outline-white { border: 1px solid #ffffff; color: #ffffff; }
|
132 |
+
|
133 |
+
.wcv_addons_wrap .addons-button-outline-white:hover { color: #ffffff; opacity: 0.8; }
|
134 |
+
|
135 |
+
.wcv_addons_wrap .addons-button-installed { background: #e6e6e6; color: #3c3c3c; }
|
136 |
+
|
137 |
+
.wcv_addons_wrap .addons-button-installed:hover { color: #3c3c3c; opacity: 0.8; }
|
138 |
+
|
139 |
+
@media only screen and (max-width: 400px) { .wcv_addons_wrap .addons-featured { margin: -1% -5%; }
|
140 |
+
.wcv_addons_wrap .addons-button { width: 100%; }
|
141 |
+
.wcv_addons_wrap .addons-small-dark-item { width: 100%; }
|
142 |
+
.wcv_addons_wrap .addons-column-block-item-icon { background: none; border: none; height: 75px; margin: 0 10px 10px 0; width: 75px; } }
|
143 |
+
|
144 |
+
.wcv_addons_wrap .products { overflow: hidden; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-flow: row; flex-flow: row; -ms-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -.5em; }
|
145 |
+
|
146 |
+
.wcv_addons_wrap .products li { float: left; border: 1px solid #ddd; margin: 0 .5em 1em !important; padding: 0; vertical-align: top; width: 25%; min-width: 280px; min-height: 220px; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; overflow: hidden; background: #f5f5f5; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.1); }
|
147 |
+
|
148 |
+
.wcv_addons_wrap .products li a { text-decoration: none; color: inherit; display: block; height: 100%; }
|
149 |
+
|
150 |
+
.wcv_addons_wrap .products li a .product-img-wrap { background: #fff; display: block; }
|
151 |
+
|
152 |
+
.wcv_addons_wrap .products li a img { max-width: 258px; max-height: 24px; padding: 17px 20px; display: block; margin: 0; background: #fff; border-right: 260px solid #fff; }
|
153 |
+
|
154 |
+
.wcv_addons_wrap .products li a img.extension-thumb + h3 { display: none; }
|
155 |
+
|
156 |
+
.wcv_addons_wrap .products li a .price { display: none; }
|
157 |
+
|
158 |
+
.wcv_addons_wrap .products li a h2, .wcv_addons_wrap .products li a h3 { margin: 0 !important; padding: 20px !important; background: #fff; }
|
159 |
+
|
160 |
+
.wcv_addons_wrap .products li a p { padding: 20px !important; margin: 0 !important; border-top: 1px solid #f1f1f1; }
|
161 |
+
|
162 |
+
.wcv_addons_wrap .products li a:hover, .wcv_addons_wrap .products li a:focus { background-color: #fff; }
|
assets/css/wcv-admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wcv_addons_wrap{max-width:1200px}.wcv_addons_wrap h1.search-form-title{clear:left;padding:0}.wcv_addons_wrap .update-plugins .update-count{background-color:#d54e21;border-radius:10px;color:#fff;display:inline-block;font-size:9px;font-weight:600;line-height:17px;margin:1px 0 0 2px;padding:0 6px;vertical-align:text-top}.wcv_addons_wrap .addons-featured{margin:0}.wcv_addons_wrap ul.feature-list{list-style:inherit}.wcv_addons_wrap ul.feature-list li{margin-left:20px}.wcv_addons_wrap ul.subsubsub.subsubsub{margin:-2px 0 12px}.wcv_addons_wrap .subsubsub li::after{content:'|'}.wcv_addons_wrap .subsubsub li:last-child::after{content:''}.wcv_addons_wrap .addons-banner-block-item-icon,.wcv_addons_wrap .addons-column-block-item-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.wcv_addons_wrap .addons-banner-block,.wcv_addons_wrap .addons-wcs-banner-block{background:#fff;border:1px solid #ddd;margin:0 0 1em 0;padding:2em 2em 1em}.wcv_addons_wrap .addons-banner-block img{height:62px}.wcv_addons_wrap .addons-banner-block p{margin:0 0 20px}.wcv_addons_wrap .addons-banner-block-items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around;margin:0 -10px 0 -10px}.wcv_addons_wrap .addons-banner-block-item{border:1px solid #e6e6e6;border-radius:3px;-webkit-box-flex:1;-ms-flex:1;flex:1;margin:1em;min-width:200px;width:30%}.wcv_addons_wrap .addons-banner-block-item-icon{background:#f7f7f7;height:143px}.wcv_addons_wrap .addons-banner-block-item-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:184px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:24px}.wcv_addons_wrap .addons-banner-block-item-content h3{margin-top:0}.wcv_addons_wrap .addons-banner-block-item-content p{margin:0 0 auto}.wcv_addons_wrap .addons-wcs-banner-block{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.wcv_addons_wrap .addons-wcs-banner-block-image{background:#f7f7f7;border:1px solid #e6e6e6;margin-right:2em;width:400px;padding:1em;text-align:center}.wcv_addons_wrap .addons-wcs-banner-block-image .addons-img{margin:auto 0;max-height:350px;max-width:350px}.wcv_addons_wrap .addons-shipping-methods .addons-wcs-banner-block{margin-left:0;margin-right:0;margin-top:1em}.wcv_addons_wrap .addons-wcs-banner-block-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around;-ms-flex-item-align:stretch;align-self:stretch;padding:1em 0}.wcv_addons_wrap .addons-wcs-banner-block-content h1{padding-bottom:0}.wcv_addons_wrap .addons-wcs-banner-block-content p{margin-bottom:0}.wcv_addons_wrap .addons-wcs-banner-block-content .wcs-service-logo{max-width:40px}.wcv_addons_wrap .addons-column-section{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}.wcv_addons_wrap .addons-column{-webkit-box-flex:1;-ms-flex:1;flex:1;width:50%;padding:0 .5em}.wcv_addons_wrap .addons-column:nth-child(2){margin-right:0}.wcv_addons_wrap .addons-column-block,.wcv_addons_wrap .addons-small-dark-block,.wcv_addons_wrap .addons-small-light-block{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #ddd;margin:0 0 1em;padding:20px}.wcv_addons_wrap .addons-column-block img{max-height:50px;max-width:50px}.wcv_addons_wrap .addons-column-block,.wcv_addons_wrap .addons-small-light-block{background:#fff}.wcv_addons_wrap .addons-column-block-left{float:left}.wcv_addons_wrap .addons-column-block-right{float:right}.wcv_addons_wrap .addons-column-block-item{border-top:2px solid #f9f9f9;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:0 -20px;padding:20px}.wcv_addons_wrap .addons-column-block-item-icon{background:#f7f7f7;border:1px solid #e6e6e6;height:100px;margin:0 10px 10px 0;width:100px}.wcv_addons_wrap .addons-column-block-item-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-wrap:wrap;flex-wrap:wrap;height:20%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-width:200px}.wcv_addons_wrap .addons-column-block-item-content h2{float:left;margin-top:8px}.wcv_addons_wrap .addons-column-block-item-content a{float:right}.wcv_addons_wrap .addons-column-block-item-content p{float:left}.wcv_addons_wrap .addons-banner-block-item,.wcv_addons_wrap .addons-column-block-item{display:none}.wcv_addons_wrap .addons-banner-block-item:nth-child(-n+3){display:block}.wcv_addons_wrap .addons-column-block-item:nth-of-type(-n+3){display:-webkit-box;display:-ms-flexbox;display:flex}.wcv_addons_wrap .addons-small-dark-block{background-color:#54687d;text-align:center}.wcv_addons_wrap .addons-small-dark-items{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}.wcv_addons_wrap .addons-small-dark-item{margin:0 0 20px}.wcv_addons_wrap .addons-small-dark-block h1{color:#fff}.wcv_addons_wrap .addons-small-dark-block p{color:#fafafa}.wcv_addons_wrap .addons-small-dark-item-icon img{height:30px}.wcv_addons_wrap .addons-small-dark-item a{margin:28px auto 0}.wcv_addons_wrap .addons-small-light-block{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.wcv_addons_wrap .addons-small-light-block h1{margin-top:-12px}.wcv_addons_wrap .addons-small-light-block p{margin-top:0}.wcv_addons_wrap .addons-small-light-block img{height:225px;margin:0 0 0 -20px}.wcv_addons_wrap .addons-small-light-block-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 1 100px;flex:1 1 100px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}.wcv_addons_wrap .addons-small-light-block-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.wcv_addons_wrap .addons-small-light-block-content a{width:48%}.wcv_addons_wrap .product-addons-button{cursor:pointer;display:block;height:37px;line-height:37px;text-align:center;text-decoration:none;width:124px}.wcv_addons_wrap .product-addons-button-solid{background-color:#005580;color:#fff}.wcv_addons_wrap .addons-button{border-radius:3px;cursor:pointer;display:block;height:37px;line-height:37px;text-align:center;text-decoration:none;width:124px}.wcv_addons_wrap .addons-button-solid{background-color:#005580;color:#fff}.wcv_addons_wrap .addons-button-solid:hover{color:#fff;opacity:.8}.wcv_addons_wrap .addons-button-outline-green{border:1px solid #73ae39;color:#73ae39}.wcv_addons_wrap .addons-button-outline-green:hover{color:#73ae39;opacity:.8}.wcv_addons_wrap .addons-button-outline-white{border:1px solid #fff;color:#fff}.wcv_addons_wrap .addons-button-outline-white:hover{color:#fff;opacity:.8}.wcv_addons_wrap .addons-button-installed{background:#e6e6e6;color:#3c3c3c}.wcv_addons_wrap .addons-button-installed:hover{color:#3c3c3c;opacity:.8}@media only screen and (max-width:400px){.wcv_addons_wrap .addons-featured{margin:-1% -5%}.wcv_addons_wrap .addons-button{width:100%}.wcv_addons_wrap .addons-small-dark-item{width:100%}.wcv_addons_wrap .addons-column-block-item-icon{background:0 0;border:none;height:75px;margin:0 10px 10px 0;width:75px}}.wcv_addons_wrap .products{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row;flex-flow:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0 -.5em}.wcv_addons_wrap .products li{float:left;border:1px solid #ddd;margin:0 .5em 1em!important;padding:0;vertical-align:top;width:25%;min-width:280px;min-height:220px;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;background:#f5f5f5;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(0,0,0,.1)}.wcv_addons_wrap .products li a{text-decoration:none;color:inherit;display:block;height:100%}.wcv_addons_wrap .products li a .product-img-wrap{background:#fff;display:block}.wcv_addons_wrap .products li a img{max-width:258px;max-height:24px;padding:17px 20px;display:block;margin:0;background:#fff;border-right:260px solid #fff}.wcv_addons_wrap .products li a img.extension-thumb+h3{display:none}.wcv_addons_wrap .products li a .price{display:none}.wcv_addons_wrap .products li a h2,.wcv_addons_wrap .products li a h3{margin:0!important;padding:20px!important;background:#fff}.wcv_addons_wrap .products li a p{padding:20px!important;margin:0!important;border-top:1px solid #f1f1f1}.wcv_addons_wrap .products li a:focus,.wcv_addons_wrap .products li a:hover{background-color:#fff}
|
assets/css/wcv-admin.scss
ADDED
@@ -0,0 +1,474 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wcv_addons_wrap {
|
2 |
+
max-width: 1200px;
|
3 |
+
|
4 |
+
h1.search-form-title {
|
5 |
+
clear: left;
|
6 |
+
padding: 0;
|
7 |
+
}
|
8 |
+
|
9 |
+
.update-plugins .update-count {
|
10 |
+
background-color: #d54e21;
|
11 |
+
border-radius: 10px;
|
12 |
+
color: #fff;
|
13 |
+
display: inline-block;
|
14 |
+
font-size: 9px;
|
15 |
+
font-weight: 600;
|
16 |
+
line-height: 17px;
|
17 |
+
margin: 1px 0 0 2px;
|
18 |
+
padding: 0 6px;
|
19 |
+
vertical-align: text-top;
|
20 |
+
}
|
21 |
+
|
22 |
+
.addons-featured {
|
23 |
+
margin: 0;
|
24 |
+
}
|
25 |
+
|
26 |
+
ul.feature-list {
|
27 |
+
list-style: inherit;
|
28 |
+
|
29 |
+
li {
|
30 |
+
margin-left: 20px;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
ul.subsubsub.subsubsub {
|
35 |
+
margin: -2px 0 12px;
|
36 |
+
}
|
37 |
+
|
38 |
+
.subsubsub li::after {
|
39 |
+
content: '|';
|
40 |
+
}
|
41 |
+
|
42 |
+
.subsubsub li:last-child::after {
|
43 |
+
content: '';
|
44 |
+
}
|
45 |
+
|
46 |
+
.addons-banner-block-item-icon,
|
47 |
+
.addons-column-block-item-icon {
|
48 |
+
align-items: center;
|
49 |
+
display: flex;
|
50 |
+
justify-content: center;
|
51 |
+
}
|
52 |
+
|
53 |
+
.addons-banner-block,
|
54 |
+
.addons-wcs-banner-block {
|
55 |
+
background: #ffffff;
|
56 |
+
border: 1px solid #ddd;
|
57 |
+
margin: 0 0 1em 0;
|
58 |
+
padding: 2em 2em 1em;
|
59 |
+
}
|
60 |
+
|
61 |
+
.addons-banner-block img {
|
62 |
+
height: 62px;
|
63 |
+
}
|
64 |
+
|
65 |
+
.addons-banner-block p {
|
66 |
+
margin: 0 0 20px;
|
67 |
+
}
|
68 |
+
|
69 |
+
.addons-banner-block-items {
|
70 |
+
display: flex;
|
71 |
+
flex-direction: row;
|
72 |
+
flex-wrap: wrap;
|
73 |
+
justify-content: space-around;
|
74 |
+
margin: 0 -10px 0 -10px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.addons-banner-block-item {
|
78 |
+
border: 1px solid #e6e6e6;
|
79 |
+
border-radius: 3px;
|
80 |
+
flex: 1;
|
81 |
+
margin: 1em;
|
82 |
+
min-width: 200px;
|
83 |
+
width: 30%;
|
84 |
+
}
|
85 |
+
|
86 |
+
.addons-banner-block-item-icon {
|
87 |
+
background: #f7f7f7;
|
88 |
+
height: 143px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.addons-banner-block-item-content {
|
92 |
+
display: flex;
|
93 |
+
flex-direction: column;
|
94 |
+
height: 184px;
|
95 |
+
justify-content: space-between;
|
96 |
+
padding: 24px;
|
97 |
+
}
|
98 |
+
|
99 |
+
.addons-banner-block-item-content h3 {
|
100 |
+
margin-top: 0;
|
101 |
+
}
|
102 |
+
|
103 |
+
.addons-banner-block-item-content p {
|
104 |
+
margin: 0 0 auto;
|
105 |
+
}
|
106 |
+
|
107 |
+
.addons-wcs-banner-block {
|
108 |
+
display: flex;
|
109 |
+
align-items: center;
|
110 |
+
}
|
111 |
+
|
112 |
+
.addons-wcs-banner-block-image {
|
113 |
+
background: #f7f7f7;
|
114 |
+
border: 1px solid #e6e6e6;
|
115 |
+
margin-right: 2em;
|
116 |
+
width: 400px;
|
117 |
+
padding: 1em;
|
118 |
+
text-align: center;
|
119 |
+
|
120 |
+
.addons-img {
|
121 |
+
margin: auto 0;
|
122 |
+
max-height: 350px;
|
123 |
+
max-width: 350px;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
.addons-shipping-methods .addons-wcs-banner-block {
|
128 |
+
margin-left: 0;
|
129 |
+
margin-right: 0;
|
130 |
+
margin-top: 1em;
|
131 |
+
}
|
132 |
+
|
133 |
+
.addons-wcs-banner-block-content {
|
134 |
+
display: flex;
|
135 |
+
flex-direction: column;
|
136 |
+
justify-content: space-around;
|
137 |
+
align-self: stretch;
|
138 |
+
padding: 1em 0;
|
139 |
+
|
140 |
+
h1 {
|
141 |
+
padding-bottom: 0;
|
142 |
+
}
|
143 |
+
|
144 |
+
p {
|
145 |
+
margin-bottom: 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
.wcs-service-logo {
|
149 |
+
max-width: 40px;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
.addons-column-section {
|
154 |
+
display: flex;
|
155 |
+
flex-direction: row;
|
156 |
+
flex-wrap: wrap;
|
157 |
+
justify-content: space-around;
|
158 |
+
}
|
159 |
+
|
160 |
+
.addons-column {
|
161 |
+
flex: 1;
|
162 |
+
width: 50%;
|
163 |
+
padding: 0 .5em;
|
164 |
+
}
|
165 |
+
|
166 |
+
.addons-column:nth-child(2) {
|
167 |
+
margin-right: 0;
|
168 |
+
}
|
169 |
+
|
170 |
+
.addons-small-light-block,
|
171 |
+
.addons-small-dark-block,
|
172 |
+
.addons-column-block {
|
173 |
+
box-sizing: border-box;
|
174 |
+
border: 1px solid #ddd;
|
175 |
+
margin: 0 0 1em;
|
176 |
+
padding: 20px;
|
177 |
+
}
|
178 |
+
|
179 |
+
.addons-column-block img {
|
180 |
+
max-height: 50px;
|
181 |
+
max-width: 50px;
|
182 |
+
}
|
183 |
+
|
184 |
+
.addons-small-light-block,
|
185 |
+
.addons-column-block {
|
186 |
+
background: #ffffff;
|
187 |
+
}
|
188 |
+
|
189 |
+
.addons-column-block-left {
|
190 |
+
float: left;
|
191 |
+
}
|
192 |
+
|
193 |
+
.addons-column-block-right {
|
194 |
+
float: right;
|
195 |
+
}
|
196 |
+
|
197 |
+
.addons-column-block-item {
|
198 |
+
border-top: 2px solid #f9f9f9;
|
199 |
+
flex-direction: row;
|
200 |
+
flex-wrap: wrap;
|
201 |
+
justify-content: space-between;
|
202 |
+
margin: 0 -20px;
|
203 |
+
padding: 20px;
|
204 |
+
}
|
205 |
+
|
206 |
+
.addons-column-block-item-icon {
|
207 |
+
background: #f7f7f7;
|
208 |
+
border: 1px solid #e6e6e6;
|
209 |
+
height: 100px;
|
210 |
+
margin: 0 10px 10px 0;
|
211 |
+
width: 100px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.addons-column-block-item-content {
|
215 |
+
display: flex;
|
216 |
+
flex: 1;
|
217 |
+
flex-wrap: wrap;
|
218 |
+
height: 20%;
|
219 |
+
justify-content: space-between;
|
220 |
+
min-width: 200px;
|
221 |
+
}
|
222 |
+
|
223 |
+
.addons-column-block-item-content h2 {
|
224 |
+
float: left;
|
225 |
+
margin-top: 8px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.addons-column-block-item-content a {
|
229 |
+
float: right;
|
230 |
+
}
|
231 |
+
|
232 |
+
.addons-column-block-item-content p {
|
233 |
+
float: left;
|
234 |
+
}
|
235 |
+
|
236 |
+
.addons-banner-block-item,
|
237 |
+
.addons-column-block-item {
|
238 |
+
display: none;
|
239 |
+
}
|
240 |
+
|
241 |
+
.addons-banner-block-item:nth-child(-n+3) {
|
242 |
+
display: block;
|
243 |
+
}
|
244 |
+
.addons-column-block-item:nth-of-type(-n+3) {
|
245 |
+
display: flex;
|
246 |
+
}
|
247 |
+
|
248 |
+
.addons-small-dark-block {
|
249 |
+
background-color: #54687d;
|
250 |
+
text-align: center;
|
251 |
+
}
|
252 |
+
|
253 |
+
.addons-small-dark-items {
|
254 |
+
display: flex;
|
255 |
+
flex-wrap: wrap;
|
256 |
+
justify-content: space-around;
|
257 |
+
}
|
258 |
+
|
259 |
+
.addons-small-dark-item {
|
260 |
+
margin: 0 0 20px;
|
261 |
+
}
|
262 |
+
|
263 |
+
.addons-small-dark-block h1 {
|
264 |
+
color: #ffffff;
|
265 |
+
}
|
266 |
+
|
267 |
+
.addons-small-dark-block p {
|
268 |
+
color: #fafafa;
|
269 |
+
}
|
270 |
+
|
271 |
+
.addons-small-dark-item-icon img {
|
272 |
+
height: 30px;
|
273 |
+
}
|
274 |
+
|
275 |
+
.addons-small-dark-item a {
|
276 |
+
margin: 28px auto 0;
|
277 |
+
}
|
278 |
+
|
279 |
+
.addons-small-light-block {
|
280 |
+
display: flex;
|
281 |
+
flex-wrap: wrap;
|
282 |
+
}
|
283 |
+
|
284 |
+
.addons-small-light-block h1 {
|
285 |
+
margin-top: -12px;
|
286 |
+
}
|
287 |
+
|
288 |
+
.addons-small-light-block p {
|
289 |
+
margin-top: 0;
|
290 |
+
}
|
291 |
+
|
292 |
+
.addons-small-light-block img {
|
293 |
+
height: 225px;
|
294 |
+
margin: 0 0 0 -20px;
|
295 |
+
}
|
296 |
+
|
297 |
+
.addons-small-light-block-content {
|
298 |
+
display: flex;
|
299 |
+
flex: 1 1 100px;
|
300 |
+
flex-direction: column;
|
301 |
+
justify-content: space-around;
|
302 |
+
}
|
303 |
+
|
304 |
+
.addons-small-light-block-buttons {
|
305 |
+
display: flex;
|
306 |
+
justify-content: space-between;
|
307 |
+
}
|
308 |
+
|
309 |
+
.addons-small-light-block-content a {
|
310 |
+
width: 48%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.product-addons-button {
|
314 |
+
// border-radius: 3px;
|
315 |
+
cursor: pointer;
|
316 |
+
display: block;
|
317 |
+
height: 37px;
|
318 |
+
line-height: 37px;
|
319 |
+
text-align: center;
|
320 |
+
text-decoration: none;
|
321 |
+
width: 124px;
|
322 |
+
}
|
323 |
+
|
324 |
+
.product-addons-button-solid {
|
325 |
+
background-color: #005580;
|
326 |
+
color: #ffffff;
|
327 |
+
}
|
328 |
+
|
329 |
+
.addons-button {
|
330 |
+
border-radius: 3px;
|
331 |
+
cursor: pointer;
|
332 |
+
display: block;
|
333 |
+
height: 37px;
|
334 |
+
line-height: 37px;
|
335 |
+
text-align: center;
|
336 |
+
text-decoration: none;
|
337 |
+
width: 124px;
|
338 |
+
}
|
339 |
+
|
340 |
+
.addons-button-solid {
|
341 |
+
background-color: #005580;
|
342 |
+
color: #ffffff;
|
343 |
+
}
|
344 |
+
|
345 |
+
.addons-button-solid:hover {
|
346 |
+
color: #ffffff;
|
347 |
+
opacity: 0.8;
|
348 |
+
}
|
349 |
+
|
350 |
+
.addons-button-outline-green {
|
351 |
+
border: 1px solid #73ae39;
|
352 |
+
color: #73ae39;
|
353 |
+
}
|
354 |
+
|
355 |
+
.addons-button-outline-green:hover {
|
356 |
+
color: #73ae39;
|
357 |
+
opacity: 0.8;
|
358 |
+
}
|
359 |
+
|
360 |
+
.addons-button-outline-white {
|
361 |
+
border: 1px solid #ffffff;
|
362 |
+
color: #ffffff;
|
363 |
+
}
|
364 |
+
|
365 |
+
.addons-button-outline-white:hover {
|
366 |
+
color: #ffffff;
|
367 |
+
opacity: 0.8;
|
368 |
+
}
|
369 |
+
|
370 |
+
.addons-button-installed {
|
371 |
+
background: #e6e6e6;
|
372 |
+
color: #3c3c3c;
|
373 |
+
}
|
374 |
+
|
375 |
+
.addons-button-installed:hover {
|
376 |
+
color: #3c3c3c;
|
377 |
+
opacity: 0.8;
|
378 |
+
}
|
379 |
+
|
380 |
+
@media only screen and (max-width : 400px) {
|
381 |
+
.addons-featured {
|
382 |
+
margin: -1% -5%;
|
383 |
+
}
|
384 |
+
|
385 |
+
.addons-button {
|
386 |
+
width: 100%;
|
387 |
+
}
|
388 |
+
|
389 |
+
.addons-small-dark-item {
|
390 |
+
width: 100%;
|
391 |
+
}
|
392 |
+
|
393 |
+
.addons-column-block-item-icon {
|
394 |
+
background: none;
|
395 |
+
border: none;
|
396 |
+
height: 75px;
|
397 |
+
margin: 0 10px 10px 0;
|
398 |
+
width: 75px;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
.products {
|
403 |
+
overflow: hidden;
|
404 |
+
display: flex;
|
405 |
+
flex-flow: row;
|
406 |
+
flex-wrap: wrap;
|
407 |
+
margin: 0 -.5em;
|
408 |
+
|
409 |
+
li {
|
410 |
+
float: left;
|
411 |
+
border: 1px solid #ddd;
|
412 |
+
margin: 0 .5em 1em !important;
|
413 |
+
padding: 0;
|
414 |
+
vertical-align: top;
|
415 |
+
width: 25%;
|
416 |
+
min-width: 280px;
|
417 |
+
min-height: 220px;
|
418 |
+
flex: 1;
|
419 |
+
overflow: hidden;
|
420 |
+
background: #f5f5f5;
|
421 |
+
box-shadow:
|
422 |
+
inset 0 1px 0 rgba(255, 255, 255, 0.2),
|
423 |
+
inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
424 |
+
|
425 |
+
a {
|
426 |
+
text-decoration: none;
|
427 |
+
color: inherit;
|
428 |
+
display: block;
|
429 |
+
height: 100%;
|
430 |
+
|
431 |
+
.product-img-wrap {
|
432 |
+
background: #fff;
|
433 |
+
display: block;
|
434 |
+
}
|
435 |
+
|
436 |
+
img {
|
437 |
+
max-width: 258px;
|
438 |
+
max-height: 24px;
|
439 |
+
padding: 17px 20px;
|
440 |
+
display: block;
|
441 |
+
margin: 0;
|
442 |
+
background: #fff;
|
443 |
+
border-right: 260px solid #fff;
|
444 |
+
}
|
445 |
+
|
446 |
+
img.extension-thumb + h3 {
|
447 |
+
display: none;
|
448 |
+
}
|
449 |
+
|
450 |
+
.price {
|
451 |
+
display: none;
|
452 |
+
}
|
453 |
+
|
454 |
+
h2, h3 {
|
455 |
+
margin: 0 !important;
|
456 |
+
padding: 20px !important;
|
457 |
+
background: #fff;
|
458 |
+
}
|
459 |
+
|
460 |
+
p {
|
461 |
+
padding: 20px !important;
|
462 |
+
margin: 0 !important;
|
463 |
+
border-top: 1px solid #f1f1f1;
|
464 |
+
}
|
465 |
+
|
466 |
+
&:hover,
|
467 |
+
&:focus {
|
468 |
+
background-color: #fff;
|
469 |
+
}
|
470 |
+
}
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
}
|
assets/css/wcv-setup.css
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** WC Vendors setup wizard styles */
|
2 |
+
/** WooCommerce CSS Variables */
|
3 |
+
body { margin: 65px auto 24px; -webkit-box-shadow: none; box-shadow: none; background: #f1f1f1; padding: 0; }
|
4 |
+
|
5 |
+
#wcv-logo { border: 0; margin: 0 0 24px; padding: 0; text-align: center; }
|
6 |
+
|
7 |
+
#wcv-logo img { max-width: 30%; }
|
8 |
+
|
9 |
+
.wcv-setup-content { -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13); padding: 2em; margin: 0 0 20px; background: #fff; overflow: hidden; zoom: 1; }
|
10 |
+
|
11 |
+
.wcv-setup-content h1, .wcv-setup-content h2, .wcv-setup-content h3, .wcv-setup-content table { margin: 0 0 20px; border: 0; padding: 0; color: #666; clear: none; font-weight: 500; }
|
12 |
+
|
13 |
+
.wcv-setup-content p { margin: 20px 0; font-size: 1em; line-height: 1.75em; color: #666; }
|
14 |
+
|
15 |
+
.wcv-setup-content table { font-size: 1em; line-height: 1.75em; color: #666; }
|
16 |
+
|
17 |
+
.wcv-setup-content a { color: #005580; }
|
18 |
+
|
19 |
+
.wcv-setup-content a:hover, .wcv-setup-content a:focus { color: #111; }
|
20 |
+
|
21 |
+
.wcv-setup-content h4.help-title { text-align: center; }
|
22 |
+
|
23 |
+
.wcv-setup-content .wcv-setup-input input { padding: 5px 10px; font-size: 1em; }
|
24 |
+
|
25 |
+
.wcv-setup-content .wcv-setup-next-steps { overflow: hidden; margin: 0 0 24px; padding-bottom: 2px; }
|
26 |
+
|
27 |
+
.wcv-setup-content .wcv-setup-next-steps h2 { margin-bottom: 12px; }
|
28 |
+
|
29 |
+
.wcv-setup-content .wcv-setup-next-steps .wcv-setup-next-steps-first { float: left; width: 50%; -webkit-box-sizing: border-box; box-sizing: border-box; }
|
30 |
+
|
31 |
+
.wcv-setup-content .wcv-setup-next-steps .wcv-setup-next-steps-last { float: right; width: 50%; -webkit-box-sizing: border-box; box-sizing: border-box; }
|
32 |
+
|
33 |
+
.wcv-setup-content .wcv-setup-next-steps ul { padding: 0 2em 0 0; list-style: none outside; margin: 0; }
|
34 |
+
|
35 |
+
.wcv-setup-content .wcv-setup-next-steps ul li a { display: block; padding: 0 0 0.75em; }
|
36 |
+
|
37 |
+
.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button { background-color: #f7f7f7; border-color: #ccc; color: #23282d; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #ccc; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #ccc; text-shadow: 1px 0 1px #eee, 0 1px 1px #eee; font-size: 1em; height: auto; line-height: 1.75em; margin: 0 0 0.75em; opacity: 1; padding: 1em; text-align: center; }
|
38 |
+
|
39 |
+
.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:hover, .wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:focus, .wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:active { background: #5897b6; border-color: #aaa; }
|
40 |
+
|
41 |
+
.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary { color: #fff; background-color: #bb77ae; border-color: #5897b6; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; text-shadow: 0 -1px 1px #5897b6, 1px 0 1px #5897b6, 0 1px 1px #5897b6, -1px 0 1px #5897b6; }
|
42 |
+
|
43 |
+
.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:hover, .wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:focus, .wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:active { color: #fff; background: #5897b6; border-color: #5897b6; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; }
|
44 |
+
|
45 |
+
.wcv-setup-content .wcv-setup-next-steps ul li a::before { color: #82878c; font: normal 20px/1 'dashicons'; speak: none; display: inline-block; padding: 0 10px 0 0; top: 1px; position: relative; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-decoration: none !important; vertical-align: top; }
|
46 |
+
|
47 |
+
.wcv-setup-content .wcv-setup-next-steps ul .learn-more a::before { content: '\f105'; }
|
48 |
+
|
49 |
+
.wcv-setup-content .wcv-setup-next-steps ul .video-walkthrough a::before { content: '\f126'; }
|
50 |
+
|
51 |
+
.wcv-setup-content .wcv-setup-next-steps ul .newsletter a::before { content: '\f465'; }
|
52 |
+
|
53 |
+
.wcv-setup-content .wcvendors-newsletter, .wcv-setup-content .wcvendors-tracker, .wcv-setup-content .updated { padding: 24px 24px 0; margin: 0 0 24px; overflow: hidden; background: #f5f5f5; }
|
54 |
+
|
55 |
+
.wcv-setup-content .wcvendors-newsletter p, .wcv-setup-content .wcvendors-tracker p, .wcv-setup-content .updated p { padding: 0; margin: 0 0 12px; }
|
56 |
+
|
57 |
+
.wcv-setup-content .wcvendors-newsletter form, .wcv-setup-content .wcvendors-newsletter p:last-child, .wcv-setup-content .wcvendors-tracker form, .wcv-setup-content .wcvendors-tracker p:last-child, .wcv-setup-content .updated form, .wcv-setup-content .updated p:last-child { margin: 0 0 24px; }
|
58 |
+
|
59 |
+
.wcv-setup-content .wcvendors-tracker + .wcvendors-newsletter { margin-top: -24px; border-top: 2px dashed #ddd; }
|
60 |
+
|
61 |
+
.wcv-setup-steps { padding: 0 0 24px; margin: 0; list-style: none outside; overflow: hidden; color: #ccc; width: 100%; display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; }
|
62 |
+
|
63 |
+
.wcv-setup-steps li { width: 25%; float: left; padding: 0 0 0.8em; margin: 0; text-align: center; position: relative; border-bottom: 4px solid #ccc; line-height: 1.4em; }
|
64 |
+
|
65 |
+
.wcv-setup-steps li::before { content: ''; border: 4px solid #ccc; border-radius: 100%; width: 4px; height: 4px; position: absolute; bottom: 0; left: 50%; margin-left: -6px; margin-bottom: -8px; background: #fff; }
|
66 |
+
|
67 |
+
.wcv-setup-steps li.active { border-color: #5897b6; color: #005580; }
|
68 |
+
|
69 |
+
.wcv-setup-steps li.active::before { border-color: #005580; }
|
70 |
+
|
71 |
+
.wcv-setup-steps li.done { border-color: #5897b6; color: #005580; }
|
72 |
+
|
73 |
+
.wcv-setup-steps li.done::before { border-color: #5897b6; background: #5897b6; }
|
74 |
+
|
75 |
+
.wcv-setup .wcv-setup-actions { overflow: hidden; margin: 20px 0 0; }
|
76 |
+
|
77 |
+
.wcv-setup .wcv-setup-actions .button { font-size: 1.25em; line-height: 1em; margin-right: 0.5em; margin-bottom: 2px; height: auto; border-radius: 4px; }
|
78 |
+
|
79 |
+
.wcv-setup .wcv-setup-actions .button-primary { background-color: #005580; border-color: #5897b6; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; text-shadow: 0 -1px 1px #5897b6, 1px 0 1px #5897b6, 0 1px 1px #5897b6, -1px 0 1px #5897b6; margin: 0; opacity: 1; }
|
80 |
+
|
81 |
+
.wcv-setup .wcv-setup-actions .button-primary:hover, .wcv-setup .wcv-setup-actions .button-primary:focus, .wcv-setup .wcv-setup-actions .button-primary:active { background: #5897b6; border-color: #5897b6; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #5897b6; }
|
82 |
+
|
83 |
+
.wcv-setup-content p:last-child { margin-bottom: 0; }
|
84 |
+
|
85 |
+
.wcv-setup-content p.store-setup { margin-top: 0; }
|
86 |
+
|
87 |
+
.wcv-return-to-dashboard { font-size: 0.85em; color: #b5b5b5; margin: 1.18em 0; display: block; text-align: center; }
|
88 |
+
|
89 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-intro { padding: 40px 40px 0; background: #F5F5F5; text-align: center; }
|
90 |
+
|
91 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-intro img { margin: 40px 0 0 0; width: 100%; display: block; }
|
92 |
+
|
93 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-features { list-style: none outside; margin: 0 0 20px; padding: 0 0 0 30px; overflow: hidden; }
|
94 |
+
|
95 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-feature { margin: 0; padding: 20px 30px 20px 2em; width: 50%; -webkit-box-sizing: border-box; box-sizing: border-box; }
|
96 |
+
|
97 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-feature::before { margin-left: -2em; position: absolute; }
|
98 |
+
|
99 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-feature.first { clear: both; float: left; }
|
100 |
+
|
101 |
+
.wcv-wizard-storefront .wcv-wizard-storefront-feature.last { float: right; }
|
102 |
+
|
103 |
+
.hide { display: none; }
|
104 |
+
|
105 |
+
.wcv-wizard-features { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; list-style: none; padding: 0; }
|
106 |
+
|
107 |
+
.wcv-wizard-features .wcv-wizard-feature-item { -ms-flex-preferred-size: calc( 50% - 4em - 3px); flex-basis: calc( 50% - 4em - 3px); border: 1px solid #eee; padding: 2em; }
|
108 |
+
|
109 |
+
.wcv-wizard-features .wcv-wizard-feature-item:nth-child(1) { border-radius: 4px 0 0 0; }
|
110 |
+
|
111 |
+
.wcv-wizard-features .wcv-wizard-feature-item:nth-child(2) { border-left: 0; border-radius: 0 4px 0 0; }
|
112 |
+
|
113 |
+
.wcv-wizard-features .wcv-wizard-feature-item:nth-child(3) { border-top: 0; border-radius: 0 0 0 4px; }
|
114 |
+
|
115 |
+
.wcv-wizard-features .wcv-wizard-feature-item:nth-child(4) { border-top: 0; border-left: 0; border-radius: 0 0 4px 0; }
|
116 |
+
|
117 |
+
.wcv-wizard-features p.wcv-wizard-feature-name, .wcv-wizard-features p.wcv-wizard-feature-description { margin: 0; line-height: 1.5em; }
|
118 |
+
|
119 |
+
.step { text-align: center; }
|
120 |
+
|
121 |
+
.wcv-setup .wcv-setup-actions .button { font-weight: 300; font-size: 16px; padding: 0.5em 1em; -webkit-box-shadow: none; box-shadow: none; min-width: 12em; min-width: auto; margin-top: 10px; background-color: #005580; color: #fff; }
|
122 |
+
|
123 |
+
.wcv-setup .wcv-setup-actions .button:focus, .wcv-setup .wcv-setup-actions .button:hover, .wcv-setup .wcv-setup-actions .button:active { -webkit-box-shadow: none; box-shadow: none; background-color: #5897b6; }
|
124 |
+
|
125 |
+
.location-prompt { color: #666; font-size: 13px; font-weight: 500; margin-bottom: 0.5em; margin-top: 1em; display: inline-block; }
|
126 |
+
|
127 |
+
.address-step .select2 { min-width: 100%; }
|
128 |
+
|
129 |
+
.store-address-container { margin-bottom: 24px; }
|
130 |
+
|
131 |
+
.store-address-container .city-and-postcode { display: -webkit-box; display: -ms-flexbox; display: flex; }
|
132 |
+
|
133 |
+
.store-address-container .city-and-postcode div { -ms-flex-preferred-size: 50%; flex-basis: 50%; margin-right: 1em; }
|
134 |
+
|
135 |
+
.store-address-container .city-and-postcode div:last-of-type { margin-right: 0; }
|
136 |
+
|
137 |
+
.wcv-wizard-service-settings .payment-email-input { border: 1px solid #aaa; border-color: #ddd; border-radius: 4px; height: 30px; padding: 0 8px; font-size: 14px; color: #444; background-color: #fff; display: inline-block; }
|
138 |
+
|
139 |
+
.newsletter-form-container { display: -webkit-box; display: -ms-flexbox; display: flex; }
|
140 |
+
|
141 |
+
.newsletter-form-container .newsletter-form-email { border: 1px solid #aaa; border-color: #ddd; border-radius: 4px; height: 42px; padding: 0 8px; font-size: 16px; color: #666; background-color: #fff; display: inline-block; margin-right: 6px; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; }
|
142 |
+
|
143 |
+
.newsletter-form-container .newsletter-form-button-container { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; }
|
144 |
+
|
145 |
+
.wcv-setup .wcv-setup-actions .button.newsletter-form-button { height: 42px; padding: 0 1em; margin: 0; }
|
146 |
+
|
147 |
+
.wcv-wizard-next-steps { border: 1px solid #eee; border-radius: 4px; list-style: none; padding: 0; }
|
148 |
+
|
149 |
+
.wcv-wizard-next-steps li { padding: 0; }
|
150 |
+
|
151 |
+
.wcv-wizard-next-steps .wcv-wizard-next-step-item { display: -webkit-box; display: -ms-flexbox; display: flex; border-top: 1px solid #eee; }
|
152 |
+
|
153 |
+
.wcv-wizard-next-steps .wcv-wizard-next-step-item:first-child { border-top: 0; }
|
154 |
+
|
155 |
+
.wcv-wizard-next-steps .wcv-wizard-next-step-description { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; margin: 1.5em; }
|
156 |
+
|
157 |
+
.wcv-wizard-next-steps .wcv-wizard-next-step-action { -webkit-box-flex: 0; -ms-flex-positive: 0; flex-grow: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
|
158 |
+
|
159 |
+
.wcv-wizard-next-steps .wcv-wizard-next-step-action .button { margin: 1em; }
|
160 |
+
|
161 |
+
.wcv-wizard-next-steps p.next-step-heading { margin: 0; font-size: 0.95em; font-weight: 400; font-variant: all-petite-caps; }
|
162 |
+
|
163 |
+
.wcv-wizard-next-steps p.next-step-extra-info { margin: 0; }
|
164 |
+
|
165 |
+
.wcv-wizard-next-steps h3.next-step-description { margin: 0; font-size: 16px; font-weight: 600; }
|
166 |
+
|
167 |
+
p.next-steps-help-text { color: #9f9f9f; padding: 0 2em; text-align: center; font-size: .9em; }
|
168 |
+
|
169 |
+
.wcv-setup-table { width: 100%; }
|
170 |
+
|
171 |
+
.wcv-setup-table .table-desc { width: 80%; }
|
172 |
+
|
173 |
+
.wcv-setup-table .table-check { width: 20%; text-align: right; }
|
174 |
+
|
175 |
+
.wcv-setup-table .table-check input.option_check { line-height: 4em; }
|
176 |
+
|
177 |
+
.wcv-setup-table-pages { width: 100%; }
|
178 |
+
|
179 |
+
.wcv-setup-table-pages .table-desc { width: 60%; }
|
180 |
+
|
181 |
+
.wcv-setup-table-pages .table-check { width: 40%; }
|
182 |
+
|
183 |
+
.wcv-setup-table-pages select { width: 100%; }
|
184 |
+
|
185 |
+
.wcv-setup-table-pages .tool-tip { font-size: 0.75em; }
|
assets/css/wcv-setup.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body{margin:65px auto 24px;-webkit-box-shadow:none;box-shadow:none;background:#f1f1f1;padding:0}#wcv-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wcv-logo img{max-width:30%}.wcv-setup-content{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.13);box-shadow:0 1px 3px rgba(0,0,0,.13);padding:2em;margin:0 0 20px;background:#fff;overflow:hidden;zoom:1}.wcv-setup-content h1,.wcv-setup-content h2,.wcv-setup-content h3,.wcv-setup-content table{margin:0 0 20px;border:0;padding:0;color:#666;clear:none;font-weight:500}.wcv-setup-content p{margin:20px 0;font-size:1em;line-height:1.75em;color:#666}.wcv-setup-content table{font-size:1em;line-height:1.75em;color:#666}.wcv-setup-content a{color:#005580}.wcv-setup-content a:focus,.wcv-setup-content a:hover{color:#111}.wcv-setup-content h4.help-title{text-align:center}.wcv-setup-content .wcv-setup-input input{padding:5px 10px;font-size:1em}.wcv-setup-content .wcv-setup-next-steps{overflow:hidden;margin:0 0 24px;padding-bottom:2px}.wcv-setup-content .wcv-setup-next-steps h2{margin-bottom:12px}.wcv-setup-content .wcv-setup-next-steps .wcv-setup-next-steps-first{float:left;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box}.wcv-setup-content .wcv-setup-next-steps .wcv-setup-next-steps-last{float:right;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box}.wcv-setup-content .wcv-setup-next-steps ul{padding:0 2em 0 0;list-style:none outside;margin:0}.wcv-setup-content .wcv-setup-next-steps ul li a{display:block;padding:0 0 .75em}.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button{background-color:#f7f7f7;border-color:#ccc;color:#23282d;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #ccc;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #ccc;text-shadow:1px 0 1px #eee,0 1px 1px #eee;font-size:1em;height:auto;line-height:1.75em;margin:0 0 .75em;opacity:1;padding:1em;text-align:center}.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:active,.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:focus,.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button:hover{background:#5897b6;border-color:#aaa}.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary{color:#fff;background-color:#bb77ae;border-color:#5897b6;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;text-shadow:0 -1px 1px #5897b6,1px 0 1px #5897b6,0 1px 1px #5897b6,-1px 0 1px #5897b6}.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:active,.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:focus,.wcv-setup-content .wcv-setup-next-steps ul .setup-product a.button-primary:hover{color:#fff;background:#5897b6;border-color:#5897b6;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6}.wcv-setup-content .wcv-setup-next-steps ul li a::before{color:#82878c;font:normal 20px/1 dashicons;speak:none;display:inline-block;padding:0 10px 0 0;top:1px;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;vertical-align:top}.wcv-setup-content .wcv-setup-next-steps ul .learn-more a::before{content:'\f105'}.wcv-setup-content .wcv-setup-next-steps ul .video-walkthrough a::before{content:'\f126'}.wcv-setup-content .wcv-setup-next-steps ul .newsletter a::before{content:'\f465'}.wcv-setup-content .updated,.wcv-setup-content .wcvendors-newsletter,.wcv-setup-content .wcvendors-tracker{padding:24px 24px 0;margin:0 0 24px;overflow:hidden;background:#f5f5f5}.wcv-setup-content .updated p,.wcv-setup-content .wcvendors-newsletter p,.wcv-setup-content .wcvendors-tracker p{padding:0;margin:0 0 12px}.wcv-setup-content .updated form,.wcv-setup-content .updated p:last-child,.wcv-setup-content .wcvendors-newsletter form,.wcv-setup-content .wcvendors-newsletter p:last-child,.wcv-setup-content .wcvendors-tracker form,.wcv-setup-content .wcvendors-tracker p:last-child{margin:0 0 24px}.wcv-setup-content .wcvendors-tracker+.wcvendors-newsletter{margin-top:-24px;border-top:2px dashed #ddd}.wcv-setup-steps{padding:0 0 24px;margin:0;list-style:none outside;overflow:hidden;color:#ccc;width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.wcv-setup-steps li{width:25%;float:left;padding:0 0 .8em;margin:0;text-align:center;position:relative;border-bottom:4px solid #ccc;line-height:1.4em}.wcv-setup-steps li::before{content:'';border:4px solid #ccc;border-radius:100%;width:4px;height:4px;position:absolute;bottom:0;left:50%;margin-left:-6px;margin-bottom:-8px;background:#fff}.wcv-setup-steps li.active{border-color:#5897b6;color:#005580}.wcv-setup-steps li.active::before{border-color:#005580}.wcv-setup-steps li.done{border-color:#5897b6;color:#005580}.wcv-setup-steps li.done::before{border-color:#5897b6;background:#5897b6}.wcv-setup .wcv-setup-actions{overflow:hidden;margin:20px 0 0}.wcv-setup .wcv-setup-actions .button{font-size:1.25em;line-height:1em;margin-right:.5em;margin-bottom:2px;height:auto;border-radius:4px}.wcv-setup .wcv-setup-actions .button-primary{background-color:#005580;border-color:#5897b6;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;text-shadow:0 -1px 1px #5897b6,1px 0 1px #5897b6,0 1px 1px #5897b6,-1px 0 1px #5897b6;margin:0;opacity:1}.wcv-setup .wcv-setup-actions .button-primary:active,.wcv-setup .wcv-setup-actions .button-primary:focus,.wcv-setup .wcv-setup-actions .button-primary:hover{background:#5897b6;border-color:#5897b6;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #5897b6}.wcv-setup-content p:last-child{margin-bottom:0}.wcv-setup-content p.store-setup{margin-top:0}.wcv-return-to-dashboard{font-size:.85em;color:#b5b5b5;margin:1.18em 0;display:block;text-align:center}.wcv-wizard-storefront .wcv-wizard-storefront-intro{padding:40px 40px 0;background:#f5f5f5;text-align:center}.wcv-wizard-storefront .wcv-wizard-storefront-intro img{margin:40px 0 0 0;width:100%;display:block}.wcv-wizard-storefront .wcv-wizard-storefront-features{list-style:none outside;margin:0 0 20px;padding:0 0 0 30px;overflow:hidden}.wcv-wizard-storefront .wcv-wizard-storefront-feature{margin:0;padding:20px 30px 20px 2em;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box}.wcv-wizard-storefront .wcv-wizard-storefront-feature::before{margin-left:-2em;position:absolute}.wcv-wizard-storefront .wcv-wizard-storefront-feature.first{clear:both;float:left}.wcv-wizard-storefront .wcv-wizard-storefront-feature.last{float:right}.hide{display:none}.wcv-wizard-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;list-style:none;padding:0}.wcv-wizard-features .wcv-wizard-feature-item{-ms-flex-preferred-size:calc(50% - 4em - 3px);flex-basis:calc(50% - 4em - 3px);border:1px solid #eee;padding:2em}.wcv-wizard-features .wcv-wizard-feature-item:nth-child(1){border-radius:4px 0 0 0}.wcv-wizard-features .wcv-wizard-feature-item:nth-child(2){border-left:0;border-radius:0 4px 0 0}.wcv-wizard-features .wcv-wizard-feature-item:nth-child(3){border-top:0;border-radius:0 0 0 4px}.wcv-wizard-features .wcv-wizard-feature-item:nth-child(4){border-top:0;border-left:0;border-radius:0 0 4px 0}.wcv-wizard-features p.wcv-wizard-feature-description,.wcv-wizard-features p.wcv-wizard-feature-name{margin:0;line-height:1.5em}.step{text-align:center}.wcv-setup .wcv-setup-actions .button{font-weight:300;font-size:16px;padding:.5em 1em;-webkit-box-shadow:none;box-shadow:none;min-width:12em;min-width:auto;margin-top:10px;background-color:#005580;color:#fff}.wcv-setup .wcv-setup-actions .button:active,.wcv-setup .wcv-setup-actions .button:focus,.wcv-setup .wcv-setup-actions .button:hover{-webkit-box-shadow:none;box-shadow:none;background-color:#5897b6}.location-prompt{color:#666;font-size:13px;font-weight:500;margin-bottom:.5em;margin-top:1em;display:inline-block}.address-step .select2{min-width:100%}.store-address-container{margin-bottom:24px}.store-address-container .city-and-postcode{display:-webkit-box;display:-ms-flexbox;display:flex}.store-address-container .city-and-postcode div{-ms-flex-preferred-size:50%;flex-basis:50%;margin-right:1em}.store-address-container .city-and-postcode div:last-of-type{margin-right:0}.wcv-wizard-service-settings .payment-email-input{border:1px solid #aaa;border-color:#ddd;border-radius:4px;height:30px;padding:0 8px;font-size:14px;color:#444;background-color:#fff;display:inline-block}.newsletter-form-container{display:-webkit-box;display:-ms-flexbox;display:flex}.newsletter-form-container .newsletter-form-email{border:1px solid #aaa;border-color:#ddd;border-radius:4px;height:42px;padding:0 8px;font-size:16px;color:#666;background-color:#fff;display:inline-block;margin-right:6px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.newsletter-form-container .newsletter-form-button-container{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.wcv-setup .wcv-setup-actions .button.newsletter-form-button{height:42px;padding:0 1em;margin:0}.wcv-wizard-next-steps{border:1px solid #eee;border-radius:4px;list-style:none;padding:0}.wcv-wizard-next-steps li{padding:0}.wcv-wizard-next-steps .wcv-wizard-next-step-item{display:-webkit-box;display:-ms-flexbox;display:flex;border-top:1px solid #eee}.wcv-wizard-next-steps .wcv-wizard-next-step-item:first-child{border-top:0}.wcv-wizard-next-steps .wcv-wizard-next-step-description{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:1.5em}.wcv-wizard-next-steps .wcv-wizard-next-step-action{-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.wcv-wizard-next-steps .wcv-wizard-next-step-action .button{margin:1em}.wcv-wizard-next-steps p.next-step-heading{margin:0;font-size:.95em;font-weight:400;font-variant:all-petite-caps}.wcv-wizard-next-steps p.next-step-extra-info{margin:0}.wcv-wizard-next-steps h3.next-step-description{margin:0;font-size:16px;font-weight:600}p.next-steps-help-text{color:#9f9f9f;padding:0 2em;text-align:center;font-size:.9em}.wcv-setup-table{width:100%}.wcv-setup-table .table-desc{width:80%}.wcv-setup-table .table-check{width:20%;text-align:right}.wcv-setup-table .table-check input.option_check{line-height:4em}.wcv-setup-table-pages{width:100%}.wcv-setup-table-pages .table-desc{width:60%}.wcv-setup-table-pages .table-check{width:40%}.wcv-setup-table-pages select{width:100%}.wcv-setup-table-pages .tool-tip{font-size:.75em}
|
assets/css/wcv-setup.scss
ADDED
@@ -0,0 +1,540 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* WC Vendors setup wizard styles
|
3 |
+
*/
|
4 |
+
|
5 |
+
@import 'variables';
|
6 |
+
|
7 |
+
body {
|
8 |
+
margin: 65px auto 24px;
|
9 |
+
box-shadow: none;
|
10 |
+
background: #f1f1f1;
|
11 |
+
padding: 0;
|
12 |
+
}
|
13 |
+
#wcv-logo {
|
14 |
+
border: 0;
|
15 |
+
margin: 0 0 24px;
|
16 |
+
padding: 0;
|
17 |
+
text-align: center;
|
18 |
+
img {
|
19 |
+
max-width: 30%;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
.wcv-setup-content {
|
23 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
|
24 |
+
padding: 2em;
|
25 |
+
margin: 0 0 20px;
|
26 |
+
background: #fff;
|
27 |
+
overflow: hidden;
|
28 |
+
zoom: 1;
|
29 |
+
|
30 |
+
h1, h2, h3, table {
|
31 |
+
margin: 0 0 20px;
|
32 |
+
border: 0;
|
33 |
+
padding: 0;
|
34 |
+
color: #666;
|
35 |
+
clear: none;
|
36 |
+
font-weight: 500;
|
37 |
+
}
|
38 |
+
p {
|
39 |
+
margin: 20px 0;
|
40 |
+
font-size: 1em;
|
41 |
+
line-height: 1.75em;
|
42 |
+
color: #666;
|
43 |
+
}
|
44 |
+
table {
|
45 |
+
font-size: 1em;
|
46 |
+
line-height: 1.75em;
|
47 |
+
color: #666;
|
48 |
+
}
|
49 |
+
a {
|
50 |
+
color: $wcvendors;
|
51 |
+
&:hover, &:focus {
|
52 |
+
color: #111;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
h4.help-title {
|
56 |
+
text-align: center;
|
57 |
+
}
|
58 |
+
.wcv-setup-input {
|
59 |
+
|
60 |
+
input {
|
61 |
+
padding: 5px 10px;
|
62 |
+
font-size: 1em;
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
66 |
+
.wcv-setup-next-steps {
|
67 |
+
overflow: hidden;
|
68 |
+
margin: 0 0 24px;
|
69 |
+
padding-bottom: 2px;
|
70 |
+
h2 {
|
71 |
+
margin-bottom: 12px;
|
72 |
+
}
|
73 |
+
.wcv-setup-next-steps-first {
|
74 |
+
float: left;
|
75 |
+
width: 50%;
|
76 |
+
box-sizing: border-box;
|
77 |
+
}
|
78 |
+
.wcv-setup-next-steps-last {
|
79 |
+
float: right;
|
80 |
+
width: 50%;
|
81 |
+
box-sizing: border-box;
|
82 |
+
}
|
83 |
+
ul {
|
84 |
+
padding: 0 2em 0 0;
|
85 |
+
list-style: none outside;
|
86 |
+
margin: 0;
|
87 |
+
li a {
|
88 |
+
display: block;
|
89 |
+
padding: 0 0 0.75em;
|
90 |
+
}
|
91 |
+
.setup-product {
|
92 |
+
a.button {
|
93 |
+
background-color: #f7f7f7;
|
94 |
+
border-color: #ccc;
|
95 |
+
color: #23282d;
|
96 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #ccc;
|
97 |
+
text-shadow: 1px 0 1px #eee, 0 1px 1px #eee;
|
98 |
+
font-size: 1em;
|
99 |
+
height: auto;
|
100 |
+
line-height: 1.75em;
|
101 |
+
margin: 0 0 0.75em;
|
102 |
+
opacity: 1;
|
103 |
+
padding: 1em;
|
104 |
+
text-align: center;
|
105 |
+
|
106 |
+
&:hover, &:focus, &:active {
|
107 |
+
background: $wcvendors-light;
|
108 |
+
border-color: #aaa;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
a.button-primary {
|
112 |
+
color: #fff;
|
113 |
+
background-color: #bb77ae;
|
114 |
+
border-color: $wcvendors-light;
|
115 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 $wcvendors-light;
|
116 |
+
text-shadow: 0 -1px 1px $wcvendors-light, 1px 0 1px $wcvendors-light, 0 1px 1px $wcvendors-light, -1px 0 1px $wcvendors-light;
|
117 |
+
|
118 |
+
&:hover, &:focus, &:active {
|
119 |
+
color: #fff;
|
120 |
+
background: $wcvendors-light;
|
121 |
+
border-color: $wcvendors-light;
|
122 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 $wcvendors-light;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
li a::before {
|
127 |
+
color: #82878c;
|
128 |
+
font: normal 20px/1 'dashicons';
|
129 |
+
speak: none;
|
130 |
+
display: inline-block;
|
131 |
+
padding: 0 10px 0 0;
|
132 |
+
top: 1px;
|
133 |
+
position: relative;
|
134 |
+
-webkit-font-smoothing: antialiased;
|
135 |
+
-moz-osx-font-smoothing: grayscale;
|
136 |
+
text-decoration: none !important;
|
137 |
+
vertical-align: top;
|
138 |
+
}
|
139 |
+
.learn-more a::before {
|
140 |
+
content: '\f105';
|
141 |
+
}
|
142 |
+
.video-walkthrough a::before {
|
143 |
+
content: '\f126';
|
144 |
+
}
|
145 |
+
.newsletter a::before {
|
146 |
+
content: '\f465';
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
.wcvendors-newsletter,
|
151 |
+
.wcvendors-tracker,
|
152 |
+
.updated {
|
153 |
+
padding: 24px 24px 0;
|
154 |
+
margin: 0 0 24px;
|
155 |
+
overflow: hidden;
|
156 |
+
background: #f5f5f5;
|
157 |
+
p {
|
158 |
+
padding: 0;
|
159 |
+
margin: 0 0 12px;
|
160 |
+
}
|
161 |
+
form,
|
162 |
+
p:last-child {
|
163 |
+
margin: 0 0 24px;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
.wcvendors-tracker + .wcvendors-newsletter {
|
167 |
+
margin-top: -24px;
|
168 |
+
border-top: 2px dashed #ddd;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
.wcv-setup-steps {
|
172 |
+
padding: 0 0 24px;
|
173 |
+
margin: 0;
|
174 |
+
list-style: none outside;
|
175 |
+
overflow: hidden;
|
176 |
+
color: #ccc;
|
177 |
+
width:100%;
|
178 |
+
display: inline-flex;
|
179 |
+
li {
|
180 |
+
width: 25%;
|
181 |
+
float: left;
|
182 |
+
padding: 0 0 0.8em;
|
183 |
+
margin: 0;
|
184 |
+
text-align: center;
|
185 |
+
position: relative;
|
186 |
+
border-bottom: 4px solid #ccc;
|
187 |
+
line-height: 1.4em;
|
188 |
+
}
|
189 |
+
li::before {
|
190 |
+
content: '';
|
191 |
+
border: 4px solid #ccc;
|
192 |
+
border-radius: 100%;
|
193 |
+
width: 4px;
|
194 |
+
height: 4px;
|
195 |
+
position: absolute;
|
196 |
+
bottom: 0;
|
197 |
+
left: 50%;
|
198 |
+
margin-left: -6px;
|
199 |
+
margin-bottom: -8px;
|
200 |
+
background: #fff;
|
201 |
+
}
|
202 |
+
li.active {
|
203 |
+
border-color: $wcvendors-light;
|
204 |
+
color: $wcvendors;
|
205 |
+
&::before {
|
206 |
+
border-color: #005580;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
li.done {
|
210 |
+
border-color: $wcvendors-light;
|
211 |
+
color: $wcvendors;
|
212 |
+
&::before {
|
213 |
+
border-color: $wcvendors-light;
|
214 |
+
background: $wcvendors-light;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
.wcv-setup .wcv-setup-actions {
|
219 |
+
overflow: hidden;
|
220 |
+
margin: 20px 0 0;
|
221 |
+
.button {
|
222 |
+
font-size: 1.25em;
|
223 |
+
line-height: 1em;
|
224 |
+
margin-right: 0.5em;
|
225 |
+
margin-bottom: 2px;
|
226 |
+
height: auto;
|
227 |
+
border-radius: 4px;
|
228 |
+
}
|
229 |
+
.button-primary {
|
230 |
+
background-color: $wcvendors;
|
231 |
+
border-color: $wcvendors-light;
|
232 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 $wcvendors-light;
|
233 |
+
text-shadow: 0 -1px 1px $wcvendors-light, 1px 0 1px $wcvendors-light, 0 1px 1px $wcvendors-light, -1px 0 1px $wcvendors-light;
|
234 |
+
margin: 0;
|
235 |
+
opacity: 1;
|
236 |
+
|
237 |
+
&:hover, &:focus, &:active {
|
238 |
+
background: $wcvendors-light;
|
239 |
+
border-color: $wcvendors-light;
|
240 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 $wcvendors-light;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
.wcv-setup-content p:last-child {
|
246 |
+
margin-bottom: 0;
|
247 |
+
}
|
248 |
+
|
249 |
+
.wcv-setup-content p.store-setup {
|
250 |
+
margin-top: 0;
|
251 |
+
}
|
252 |
+
|
253 |
+
.wcv-return-to-dashboard {
|
254 |
+
font-size: 0.85em;
|
255 |
+
color: #b5b5b5;
|
256 |
+
margin: 1.18em 0;
|
257 |
+
display: block;
|
258 |
+
text-align: center;
|
259 |
+
}
|
260 |
+
|
261 |
+
.wcv-wizard-storefront {
|
262 |
+
.wcv-wizard-storefront-intro {
|
263 |
+
padding: 40px 40px 0;
|
264 |
+
background: #F5F5F5;
|
265 |
+
text-align: center;
|
266 |
+
|
267 |
+
img {
|
268 |
+
margin: 40px 0 0 0;
|
269 |
+
width: 100%;
|
270 |
+
display: block;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
.wcv-wizard-storefront-features {
|
274 |
+
list-style: none outside;
|
275 |
+
margin: 0 0 20px;
|
276 |
+
padding: 0 0 0 30px;
|
277 |
+
overflow: hidden;
|
278 |
+
}
|
279 |
+
.wcv-wizard-storefront-feature {
|
280 |
+
margin: 0;
|
281 |
+
padding: 20px 30px 20px 2em;
|
282 |
+
width: 50%;
|
283 |
+
box-sizing: border-box;
|
284 |
+
|
285 |
+
&::before {
|
286 |
+
margin-left: -2em;
|
287 |
+
position: absolute;
|
288 |
+
}
|
289 |
+
&.first {
|
290 |
+
clear: both;
|
291 |
+
float: left;
|
292 |
+
}
|
293 |
+
&.last {
|
294 |
+
float: right;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
.hide {
|
300 |
+
display: none;
|
301 |
+
}
|
302 |
+
|
303 |
+
.wcv-wizard-features {
|
304 |
+
display: flex;
|
305 |
+
flex-wrap: wrap;
|
306 |
+
list-style: none;
|
307 |
+
padding: 0;
|
308 |
+
|
309 |
+
.wcv-wizard-feature-item {
|
310 |
+
flex-basis: calc( 50% - 4em - 3px); // two columns, account for padding and borders
|
311 |
+
border: 1px solid #eee;
|
312 |
+
padding: 2em;
|
313 |
+
}
|
314 |
+
|
315 |
+
.wcv-wizard-feature-item:nth-child(1) {
|
316 |
+
border-radius: 4px 0 0 0;
|
317 |
+
}
|
318 |
+
|
319 |
+
.wcv-wizard-feature-item:nth-child(2) {
|
320 |
+
border-left: 0;
|
321 |
+
border-radius: 0 4px 0 0;
|
322 |
+
}
|
323 |
+
|
324 |
+
.wcv-wizard-feature-item:nth-child(3) {
|
325 |
+
border-top: 0;
|
326 |
+
border-radius: 0 0 0 4px;
|
327 |
+
}
|
328 |
+
|
329 |
+
.wcv-wizard-feature-item:nth-child(4) {
|
330 |
+
border-top: 0;
|
331 |
+
border-left: 0;
|
332 |
+
border-radius: 0 0 4px 0;
|
333 |
+
}
|
334 |
+
|
335 |
+
p.wcv-wizard-feature-name,
|
336 |
+
p.wcv-wizard-feature-description {
|
337 |
+
margin: 0;
|
338 |
+
line-height: 1.5em;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
.step {
|
343 |
+
text-align: center;
|
344 |
+
}
|
345 |
+
|
346 |
+
.wcv-setup .wcv-setup-actions .button {
|
347 |
+
font-weight: 300;
|
348 |
+
font-size: 16px;
|
349 |
+
padding: 0.5em 1em;
|
350 |
+
box-shadow: none;
|
351 |
+
min-width: 12em;
|
352 |
+
min-width: auto;
|
353 |
+
margin-top:10px;
|
354 |
+
background-color: $wcvendors;
|
355 |
+
color: $white;
|
356 |
+
|
357 |
+
&:focus,
|
358 |
+
&:hover,
|
359 |
+
&:active {
|
360 |
+
box-shadow: none;
|
361 |
+
background-color: $wcvendors-light;
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
.location-prompt {
|
366 |
+
color: #666;
|
367 |
+
font-size: 13px;
|
368 |
+
font-weight: 500;
|
369 |
+
margin-bottom: 0.5em;
|
370 |
+
margin-top: 1em;
|
371 |
+
display: inline-block;
|
372 |
+
}
|
373 |
+
|
374 |
+
.address-step {
|
375 |
+
.select2 {
|
376 |
+
min-width: 100%; // widen currency, product type dropdowns
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
.store-address-container {
|
381 |
+
margin-bottom: 24px; // match margin-bottom on top paragraph
|
382 |
+
|
383 |
+
.city-and-postcode {
|
384 |
+
display: flex;
|
385 |
+
|
386 |
+
div {
|
387 |
+
flex-basis: 50%;
|
388 |
+
margin-right: 1em;
|
389 |
+
|
390 |
+
&:last-of-type {
|
391 |
+
margin-right: 0;
|
392 |
+
}
|
393 |
+
}
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
.wcv-wizard-service-settings {
|
398 |
+
.payment-email-input {
|
399 |
+
border: 1px solid #aaa;
|
400 |
+
border-color: #ddd;
|
401 |
+
border-radius: 4px;
|
402 |
+
height: 30px;
|
403 |
+
padding: 0 8px;
|
404 |
+
font-size: 14px;
|
405 |
+
color: #444;
|
406 |
+
background-color: #fff;
|
407 |
+
display: inline-block;
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
.newsletter-form-container {
|
412 |
+
display: flex;
|
413 |
+
|
414 |
+
.newsletter-form-email {
|
415 |
+
border: 1px solid #aaa;
|
416 |
+
border-color: #ddd;
|
417 |
+
border-radius: 4px;
|
418 |
+
height: 42px;
|
419 |
+
padding: 0 8px;
|
420 |
+
font-size: 16px;
|
421 |
+
color: #666;
|
422 |
+
background-color: #fff;
|
423 |
+
display: inline-block;
|
424 |
+
margin-right: 6px;
|
425 |
+
flex-grow: 1;
|
426 |
+
}
|
427 |
+
|
428 |
+
.newsletter-form-button-container {
|
429 |
+
flex-grow: 0;
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
.wcv-setup .wcv-setup-actions .button.newsletter-form-button {
|
434 |
+
height: 42px;
|
435 |
+
padding: 0 1em;
|
436 |
+
margin: 0;
|
437 |
+
}
|
438 |
+
|
439 |
+
.wcv-wizard-next-steps {
|
440 |
+
border: 1px solid #eee;
|
441 |
+
border-radius: 4px;
|
442 |
+
list-style: none;
|
443 |
+
padding: 0;
|
444 |
+
|
445 |
+
li {
|
446 |
+
padding: 0;
|
447 |
+
}
|
448 |
+
|
449 |
+
.wcv-wizard-next-step-item {
|
450 |
+
display: flex;
|
451 |
+
border-top: 1px solid #eee;
|
452 |
+
|
453 |
+
&:first-child {
|
454 |
+
border-top: 0;
|
455 |
+
}
|
456 |
+
}
|
457 |
+
|
458 |
+
.wcv-wizard-next-step-description {
|
459 |
+
flex-grow: 1;
|
460 |
+
margin: 1.5em;
|
461 |
+
}
|
462 |
+
|
463 |
+
.wcv-wizard-next-step-action {
|
464 |
+
flex-grow: 0;
|
465 |
+
display: flex;
|
466 |
+
align-items: center;
|
467 |
+
|
468 |
+
.button {
|
469 |
+
margin: 1em;
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
+
p {
|
474 |
+
&.next-step-heading {
|
475 |
+
margin: 0;
|
476 |
+
font-size: 0.95em;
|
477 |
+
font-weight: 400;
|
478 |
+
font-variant: all-petite-caps;
|
479 |
+
}
|
480 |
+
|
481 |
+
&.next-step-extra-info {
|
482 |
+
margin: 0;
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
h3 {
|
487 |
+
&.next-step-description {
|
488 |
+
margin: 0;
|
489 |
+
font-size: 16px;
|
490 |
+
font-weight: 600;
|
491 |
+
}
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
p.next-steps-help-text {
|
496 |
+
color: #9f9f9f;
|
497 |
+
padding: 0 2em;
|
498 |
+
text-align: center;
|
499 |
+
font-size: .9em;
|
500 |
+
}
|
501 |
+
|
502 |
+
.wcv-setup-table {
|
503 |
+
width: 100%;
|
504 |
+
|
505 |
+
.table-desc {
|
506 |
+
width: 80%;
|
507 |
+
}
|
508 |
+
|
509 |
+
.table-check {
|
510 |
+
width: 20%;
|
511 |
+
text-align: right;
|
512 |
+
|
513 |
+
input.option_check {
|
514 |
+
line-height: 4em;
|
515 |
+
}
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
.wcv-setup-table-pages {
|
520 |
+
|
521 |
+
width: 100%;
|
522 |
+
|
523 |
+
.table-desc {
|
524 |
+
width: 60%;
|
525 |
+
}
|
526 |
+
|
527 |
+
.table-check{
|
528 |
+
width: 40%;
|
529 |
+
|
530 |
+
}
|
531 |
+
|
532 |
+
select {
|
533 |
+
width: 100%;
|
534 |
+
}
|
535 |
+
|
536 |
+
.tool-tip {
|
537 |
+
font-size: 0.75em;
|
538 |
+
}
|
539 |
+
|
540 |
+
}
|
assets/images/extensions/screenshot-1.png
ADDED
Binary file
|
assets/images/extensions/screenshot-2.png
ADDED
Binary file
|
assets/images/extensions/screenshot-3.png
ADDED
Binary file
|
assets/images/wcvendors_logo.png
ADDED
Binary file
|
assets/js/admin/settings.js
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global wcvendors_settings_params */
|
2 |
+
( function( $ ) {
|
3 |
+
|
4 |
+
// Edit prompt
|
5 |
+
$( function() {
|
6 |
+
var changed = false;
|
7 |
+
|
8 |
+
$( 'input, textarea, select, checkbox' ).change( function() {
|
9 |
+
changed = true;
|
10 |
+
});
|
11 |
+
|
12 |
+
$( '.wcv-nav-tab-wrapper a' ).click( function() {
|
13 |
+
if ( changed ) {
|
14 |
+
window.onbeforeunload = function() {
|
15 |
+
return wcvendors_settings_params.i18n_nav_warning;
|
16 |
+
};
|
17 |
+
} else {
|
18 |
+
window.onbeforeunload = '';
|
19 |
+
}
|
20 |
+
});
|
21 |
+
|
22 |
+
$( '.submit input' ).click( function() {
|
23 |
+
window.onbeforeunload = '';
|
24 |
+
});
|
25 |
+
});
|
26 |
+
|
27 |
+
// Select all/none
|
28 |
+
$( '.wcvendors' ).on( 'click', '.select_all', function() {
|
29 |
+
$( this ).closest( 'td' ).find( 'select option' ).attr( 'selected', 'selected' );
|
30 |
+
$( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
|
31 |
+
return false;
|
32 |
+
});
|
33 |
+
|
34 |
+
$( '.wcvendors' ).on( 'click', '.select_none', function() {
|
35 |
+
$( this ).closest( 'td' ).find( 'select option' ).removeAttr( 'selected' );
|
36 |
+
$( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
|
37 |
+
return false;
|
38 |
+
});
|
39 |
+
|
40 |
+
})( jQuery );
|
assets/js/admin/wcv-setup.js
ADDED
File without changes
|
changelog.txt
CHANGED
@@ -1,8 +1,53 @@
|
|
1 |
Changelog for WC Vendors
|
2 |
|
3 |
-
Version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
Version 1.9.14
|
8 |
|
1 |
Changelog for WC Vendors
|
2 |
|
3 |
+
Version 2.0.0
|
4 |
+
|
5 |
+
* Added: New WC Vendors Admin menu
|
6 |
+
* Added: Bank details fields for vendors
|
7 |
+
* Added: New all new email system and templates
|
8 |
+
* Added: New contextual help menus on settings pages
|
9 |
+
* Added: New settings system and admin notice system
|
10 |
+
* Added: Setup Wizard
|
11 |
+
* Added: Support for PHP 7.1+
|
12 |
+
* Updated: styles and script build script
|
13 |
+
* Updated: language file cleanup
|
14 |
+
* Updated: Brazilian Portuguese translation thanks CasperBraske
|
15 |
+
* Fixed: Permalinks not flushing on settings save
|
16 |
+
* Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
|
17 |
+
* Fixed: Depreciated calls on orders screen
|
18 |
+
* Fixed: Vendor role capabilities updated when new settings updated.
|
19 |
+
* Fixed: Vendors can delete media they uploaded
|
20 |
+
* Fixed: Added check for woocommerce shipping tax class setting
|
21 |
+
* Fixed: Tax classes not being used in shipping tax calculations
|
22 |
+
* Fixed: Make compatible with translate.wordpress.org #396
|
23 |
+
* Fixed: undefined index notice for reports that have been removed
|
24 |
+
* Fixed: Removed focus from select on vendor drop down on product edit screen
|
25 |
+
|
26 |
+
Templates Added:
|
27 |
+
templates/emails/plain/admin-notify-product.php
|
28 |
+
templates/emails/plain/admin-notify-shipped.php
|
29 |
+
templates/emails/plain/admin-notify-application.php
|
30 |
+
templates/emails/plain/customer-notify-shipped.php
|
31 |
+
templates/emails/plain/vendor-notify-application.php
|
32 |
+
templates/emails/plain/vendor-notify-approved.php
|
33 |
+
templates/emails/plain/vendor-notify-denied.php
|
34 |
+
templates/emails/plain/vendor-notify-order.php
|
35 |
+
templates/emails/plain/vendor-order-details.php
|
36 |
+
templates/emails/plain/vendor-order-items.php
|
37 |
+
templates/emails/admin-notify-product.php
|
38 |
+
templates/emails/admin-notify-shipped.php
|
39 |
+
templates/emails/admin-notify-application.php
|
40 |
+
templates/emails/customer-notify-shipped.php
|
41 |
+
templates/emails/vendor-notify-application.php
|
42 |
+
templates/emails/vendor-notify-approved.php
|
43 |
+
templates/emails/vendor-notify-denied.php
|
44 |
+
templates/emails/vendor-notify-order.php
|
45 |
+
templates/emails/vendor-order-details.php
|
46 |
+
templates/emails/vendor-order-items.php
|
47 |
|
48 |
+
Templates Updated:
|
49 |
+
templates/dashboard/settings/settings.php
|
50 |
+
templates/order/table-body.php
|
51 |
|
52 |
Version 1.9.14
|
53 |
|
class-wc-vendors.php
CHANGED
@@ -8,13 +8,13 @@
|
|
8 |
* Author URI: https://www.wcvendors.com
|
9 |
* GitHub Plugin URI: https://github.com/wcvendors/wcvendors
|
10 |
*
|
11 |
-
* Version:
|
12 |
* Requires at least: 4.4.0
|
13 |
* Tested up to: 4.9.5
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 3.3.5
|
16 |
*
|
17 |
-
* Text Domain:
|
18 |
* Domain Path: /languages/
|
19 |
*
|
20 |
* @category Plugin
|
@@ -50,7 +50,7 @@ function wcvendors_activate() {
|
|
50 |
*/
|
51 |
if ( !class_exists( 'WooCommerce' ) ) {
|
52 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
53 |
-
wp_die( __( 'WC Vendors requires WooCommerce to run. Please install WooCommerce and activate before attempting to activate again.', '
|
54 |
}
|
55 |
} // wcvendors_activate()
|
56 |
|
@@ -68,14 +68,11 @@ require_once trailingslashit( dirname( __FILE__ ) ) . 'classes/includes/class-fu
|
|
68 |
if ( wcv_is_woocommerce_activated() ) {
|
69 |
|
70 |
/* Define an absolute path to our plugin directory. */
|
71 |
-
if ( !defined( 'wcv_plugin_dir' ) ) define( 'wcv_plugin_dir', trailingslashit( dirname( __FILE__ ) )
|
72 |
if ( !defined( 'wcv_assets_url' ) ) define( 'wcv_assets_url', trailingslashit( plugins_url( 'assets', __FILE__ ) ) );
|
73 |
if ( !defined( 'wcv_plugin_base' ) ) define( 'wcv_plugin_base', plugin_basename( __FILE__ ) );
|
74 |
if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
75 |
|
76 |
-
|
77 |
-
define('WCV_VERSION', '1.9.15' );
|
78 |
-
|
79 |
/**
|
80 |
* Main Product Vendor class
|
81 |
*
|
@@ -84,6 +81,8 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
84 |
class WC_Vendors
|
85 |
{
|
86 |
|
|
|
|
|
87 |
/**
|
88 |
* @var
|
89 |
*/
|
@@ -99,46 +98,68 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
99 |
// Load text domain
|
100 |
add_action( 'plugins_loaded', array( $this, 'load_il8n' ) );
|
101 |
|
102 |
-
$this->title = __( 'WC Vendors', '
|
|
|
|
|
103 |
|
104 |
// Install & upgrade
|
105 |
add_action( 'admin_init', array( $this, 'check_install' ) );
|
106 |
-
add_action( '
|
|
|
107 |
add_action( 'admin_init', array( $this, 'wcv_required_ignore_notices' ) );
|
108 |
|
109 |
-
add_action( 'plugins_loaded', array( $this, 'load_settings' ) );
|
110 |
add_action( 'plugins_loaded', array( $this, 'include_gateways' ) );
|
111 |
add_action( 'plugins_loaded', array( $this, 'include_core' ) );
|
112 |
add_action( 'init', array( $this, 'include_init' ) );
|
113 |
add_action( 'current_screen', array( $this, 'include_assets' ) );
|
114 |
|
115 |
-
add_filter( 'plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2 );
|
116 |
-
add_action( self::$id . '_options_updated', array( $this, 'option_updates' ), 10, 2 );
|
117 |
-
|
118 |
// Start a PHP session, if not yet started then destroy if logged in or out
|
119 |
add_action( 'init', array( $this, 'init_session'), 1 );
|
120 |
add_action( 'wp_logout', array( $this, 'destroy_session') );
|
121 |
add_action( 'wp_login', array( $this, 'destroy_session') );
|
122 |
|
|
|
|
|
123 |
// Show update notices
|
124 |
$file = basename( __FILE__ );
|
125 |
$folder = basename( dirname( __FILE__ ) );
|
126 |
$hook = "in_plugin_update_message-{$folder}/{$file}";
|
127 |
add_action( $hook, array( $this, 'show_upgrade_notification') , 10, 2);
|
128 |
|
129 |
-
|
130 |
-
add_filter( 'wc_prd_vendor_options', array( $this, 'upgrade_pro_notice' ) );
|
131 |
}
|
132 |
|
133 |
|
134 |
/**
|
135 |
*
|
136 |
*/
|
137 |
-
public function invalid_wc_version()
|
138 |
-
|
139 |
-
echo '<div class="error"><p>' . __( '<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce v2.7.0.', 'wcvendors' ) . '</p></div>';
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
/**
|
143 |
* Start the session
|
144 |
*/
|
@@ -166,74 +187,73 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
166 |
*
|
167 |
* @return unknown
|
168 |
*/
|
169 |
-
public function check_install()
|
170 |
-
{
|
171 |
|
172 |
-
if ( version_compare( WC_VERSION, '
|
173 |
add_action( 'admin_notices', array( $this, 'invalid_wc_version' ) );
|
174 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
175 |
return false;
|
176 |
}
|
177 |
|
178 |
-
require_once wcv_plugin_dir . 'classes/class-install.php';
|
179 |
-
|
180 |
-
$this->load_settings();
|
181 |
-
$install = new WCV_Install;
|
182 |
-
$install->init();
|
183 |
}
|
184 |
|
185 |
|
186 |
/**
|
187 |
* Set static $pv_options to hold options class
|
188 |
*/
|
189 |
-
public function load_settings()
|
190 |
-
{
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
}
|
196 |
-
}
|
197 |
|
198 |
public function load_il8n() {
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
//Place your custom translations into wp-content/languages/wc-vendors to be upgrade safe
|
203 |
-
load_textdomain( 'wcvendors', WP_LANG_DIR.'/wc-vendors/wcvendors-'.$locale.'.mo');
|
204 |
-
|
205 |
-
load_plugin_textdomain( 'wcvendors', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
206 |
|
207 |
}
|
208 |
|
209 |
-
|
210 |
/**
|
211 |
* Include core files
|
212 |
*/
|
213 |
-
public function include_core()
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
|
235 |
if ( !function_exists( 'woocommerce_wp_text_input' ) && !is_admin() ) {
|
236 |
-
include_once(WC()->plugin_path() . '/includes/admin/wc-meta-box-functions.php');
|
237 |
}
|
238 |
|
239 |
new WCV_Vendors;
|
@@ -297,93 +317,23 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
297 |
require_once wcv_plugin_dir . 'classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php';
|
298 |
}
|
299 |
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Do an action when options are updated
|
303 |
-
*
|
304 |
-
* @param array $options
|
305 |
-
* @param unknown $tabname
|
306 |
-
*/
|
307 |
-
public function option_updates( $options, $tabname )
|
308 |
-
{
|
309 |
-
// Change the vendor role capabilities
|
310 |
-
if ( $tabname == sanitize_title(__( 'Capabilities', 'wcvendors' )) ) {
|
311 |
-
$can_add = $options[ 'can_submit_products' ];
|
312 |
-
$can_edit = $options[ 'can_edit_published_products' ];
|
313 |
-
$can_submit_live = $options[ 'can_submit_live_products' ];
|
314 |
-
$can_view_reports = $options[ 'can_view_backend_reports' ];
|
315 |
-
|
316 |
-
$args = array(
|
317 |
-
'assign_product_terms' => $can_add,
|
318 |
-
'edit_products' => $can_add || $can_edit,
|
319 |
-
'edit_published_products' => $can_edit,
|
320 |
-
'delete_published_products' => $can_edit,
|
321 |
-
'delete_products' => $can_edit,
|
322 |
-
'manage_product' => $can_add,
|
323 |
-
'publish_products' => $can_submit_live,
|
324 |
-
'read' => true,
|
325 |
-
'read_products' => $can_edit || $can_add,
|
326 |
-
'upload_files' => true,
|
327 |
-
'import' => true,
|
328 |
-
'view_woocommerce_reports' => false,
|
329 |
-
);
|
330 |
-
|
331 |
-
remove_role( 'vendor' );
|
332 |
-
|
333 |
-
add_role( 'vendor', __('Vendor', 'wcvendors'), $args );
|
334 |
-
} // Update permalinks
|
335 |
-
else if ( $tabname == sanitize_title(__( 'General', 'wcvendors' ) )) {
|
336 |
-
$old_permalink = WC_Vendors::$pv_options->get_option( 'vendor_shop_permalink' );
|
337 |
-
$new_permalink = $options[ 'vendor_shop_permalink' ];
|
338 |
-
|
339 |
-
if ( $old_permalink != $new_permalink ) {
|
340 |
-
update_option( WC_Vendors::$id . '_flush_rules', true );
|
341 |
-
}
|
342 |
-
}
|
343 |
-
|
344 |
-
do_action( 'wcvendors_option_updates', $options, $tabname );
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
|
349 |
/**
|
350 |
* If the settings are updated and the vendor page link has changed update permalinks
|
351 |
* @access public
|
352 |
*
|
353 |
*/
|
354 |
-
public function maybe_flush_permalinks()
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
update_option( WC_Vendors::$id . '_flush_rules', false );
|
359 |
}
|
360 |
}
|
361 |
|
362 |
-
|
363 |
-
|
364 |
-
* @param $links - links array from action
|
365 |
-
* @param $file - file reference for this plugin
|
366 |
-
* @access public
|
367 |
-
*
|
368 |
-
*/
|
369 |
-
public static function plugin_row_meta( $links, $file ) {
|
370 |
-
|
371 |
-
if ( $file == wcv_plugin_base ) {
|
372 |
-
|
373 |
-
$row_meta = array(
|
374 |
-
'docs' => '<a href="https://docs.wcvendors.com/?utm_source=plugin" target="_blank">'.__( 'Documentation', 'wcvendors' ).'</a>',
|
375 |
-
'pro' => '<strong><a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo" target="_blank">'.__( 'Upgrade to Pro', 'wcvendors').'</a></strong>',
|
376 |
-
'support' => '<a href="https://www.wcvendors.com/contact-us/?utm_source=plugin" target="_blank">'.__( 'Contact Us', 'wcvendors' ).'</a>'
|
377 |
-
);
|
378 |
-
|
379 |
-
if ( class_exists( 'WCVendors_Pro' ) ) unset( $row_meta[ 'pro' ] );
|
380 |
-
|
381 |
-
return array_merge( $links, $row_meta );
|
382 |
-
}
|
383 |
-
|
384 |
-
return (array) $links;
|
385 |
}
|
386 |
|
|
|
387 |
/**
|
388 |
* Add user meta to remember ignore notices
|
389 |
* @access public
|
@@ -406,61 +356,36 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
406 |
/**
|
407 |
* Class logger so that we can keep our debug and logging information cleaner
|
408 |
*
|
409 |
-
* @since
|
|
|
410 |
* @access public
|
411 |
*
|
412 |
* @param mixed - $data the data to go to the error log could be string, array or object
|
413 |
*/
|
414 |
-
public static function log( $data = '' ){
|
415 |
|
416 |
$trace = debug_backtrace( false, 2 );
|
417 |
-
$
|
418 |
-
|
419 |
-
// Only display the class file if there is actually a class file
|
420 |
-
$caller = ( isset( $trace[ 1 ] ) ) ? array_key_exists( 'class', $trace[ 1 ] ) ? $trace[ 1 ][ 'class' ] : $path_info[ 'basename' ] : '';
|
421 |
|
422 |
if ( is_array( $data ) || is_object( $data ) ) {
|
|
|
|
|
|
|
|
|
|
|
423 |
error_log( $caller . ' : ' . print_r( $data, true ) );
|
424 |
} else {
|
|
|
|
|
|
|
|
|
|
|
425 |
error_log( $caller . ' : ' . $data );
|
426 |
}
|
427 |
|
428 |
} // log()
|
429 |
|
430 |
|
431 |
-
public function upgrade_pro_notice( $options ){
|
432 |
-
|
433 |
-
if ( ! class_exists( 'WCVendors_Pro' ) ){
|
434 |
-
|
435 |
-
|
436 |
-
$options[ ] = array( 'name' => __( 'Upgrade to Pro', 'wcvendors' ), 'type' => 'heading' );
|
437 |
-
|
438 |
-
$options[ ] = array(
|
439 |
-
'name' => __( 'Upgrade to WC Vendors Pro!', 'wcvendors' ), 'type' => 'title', 'desc' =>
|
440 |
-
|
441 |
-
sprintf( __( 'WC Vendors Pro extends your marketplace to include some of the following enhanced features
|
442 |
-
<ul>
|
443 |
-
<li>Complete front end dashboard for your vendors</li>
|
444 |
-
<li>Vendor Coupons</li>
|
445 |
-
<li>Vendor product management</li>
|
446 |
-
<li>Vendor Order management</li>
|
447 |
-
<li>Vendor ratings</li>
|
448 |
-
<li>Vendors can upload their own store banners</li>
|
449 |
-
<li>A comprehensive shipping system for your vendors including two systems. Flat rate and Table rate shipping.</li>
|
450 |
-
<li>All default product types supported on the front end</li>
|
451 |
-
<li>Custom product-edit templates</li>
|
452 |
-
<li>Complete vendor signup form</li>
|
453 |
-
</ul>
|
454 |
-
<a href="http://www.wcvendors.com/home/comparison/?utm_source=plugin">See the complete comparison list here.</a>
|
455 |
-
<h1><a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo">Buy Pro Today</a></h1>', 'wcvendors' )
|
456 |
-
),
|
457 |
-
);
|
458 |
-
}
|
459 |
-
|
460 |
-
|
461 |
-
return $options;
|
462 |
-
}
|
463 |
-
|
464 |
/*
|
465 |
* Upgrade notice displayed on the plugin screen
|
466 |
*
|
@@ -490,7 +415,7 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
490 |
}
|
491 |
|
492 |
}
|
493 |
-
}
|
494 |
|
495 |
}
|
496 |
|
8 |
* Author URI: https://www.wcvendors.com
|
9 |
* GitHub Plugin URI: https://github.com/wcvendors/wcvendors
|
10 |
*
|
11 |
+
* Version: 2.0.0
|
12 |
* Requires at least: 4.4.0
|
13 |
* Tested up to: 4.9.5
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 3.3.5
|
16 |
*
|
17 |
+
* Text Domain: wc-vendors
|
18 |
* Domain Path: /languages/
|
19 |
*
|
20 |
* @category Plugin
|
50 |
*/
|
51 |
if ( !class_exists( 'WooCommerce' ) ) {
|
52 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
53 |
+
wp_die( __( 'WC Vendors requires WooCommerce to run. Please install WooCommerce and activate before attempting to activate again.', 'wc-vendors' ) );
|
54 |
}
|
55 |
} // wcvendors_activate()
|
56 |
|
68 |
if ( wcv_is_woocommerce_activated() ) {
|
69 |
|
70 |
/* Define an absolute path to our plugin directory. */
|
71 |
+
if ( !defined( 'wcv_plugin_dir' ) ) define( 'wcv_plugin_dir', trailingslashit( dirname( __FILE__ ) ) );
|
72 |
if ( !defined( 'wcv_assets_url' ) ) define( 'wcv_assets_url', trailingslashit( plugins_url( 'assets', __FILE__ ) ) );
|
73 |
if ( !defined( 'wcv_plugin_base' ) ) define( 'wcv_plugin_base', plugin_basename( __FILE__ ) );
|
74 |
if ( !defined( 'wcv_plugin_dir_path' ) ) define( 'wcv_plugin_dir_path', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
|
75 |
|
|
|
|
|
|
|
76 |
/**
|
77 |
* Main Product Vendor class
|
78 |
*
|
81 |
class WC_Vendors
|
82 |
{
|
83 |
|
84 |
+
public $version = '2.0.0';
|
85 |
+
|
86 |
/**
|
87 |
* @var
|
88 |
*/
|
98 |
// Load text domain
|
99 |
add_action( 'plugins_loaded', array( $this, 'load_il8n' ) );
|
100 |
|
101 |
+
$this->title = __( 'WC Vendors', 'wc-vendors' );
|
102 |
+
|
103 |
+
$this->define_constants();
|
104 |
|
105 |
// Install & upgrade
|
106 |
add_action( 'admin_init', array( $this, 'check_install' ) );
|
107 |
+
add_action( 'init', array( $this, 'maybe_flush_permalinks' ), 99 );
|
108 |
+
add_action( 'wcvendors_flush_rewrite_rules', array( $this, 'flush_rewrite_rules' ) );
|
109 |
add_action( 'admin_init', array( $this, 'wcv_required_ignore_notices' ) );
|
110 |
|
|
|
111 |
add_action( 'plugins_loaded', array( $this, 'include_gateways' ) );
|
112 |
add_action( 'plugins_loaded', array( $this, 'include_core' ) );
|
113 |
add_action( 'init', array( $this, 'include_init' ) );
|
114 |
add_action( 'current_screen', array( $this, 'include_assets' ) );
|
115 |
|
|
|
|
|
|
|
116 |
// Start a PHP session, if not yet started then destroy if logged in or out
|
117 |
add_action( 'init', array( $this, 'init_session'), 1 );
|
118 |
add_action( 'wp_logout', array( $this, 'destroy_session') );
|
119 |
add_action( 'wp_login', array( $this, 'destroy_session') );
|
120 |
|
121 |
+
|
122 |
+
|
123 |
// Show update notices
|
124 |
$file = basename( __FILE__ );
|
125 |
$folder = basename( dirname( __FILE__ ) );
|
126 |
$hook = "in_plugin_update_message-{$folder}/{$file}";
|
127 |
add_action( $hook, array( $this, 'show_upgrade_notification') , 10, 2);
|
128 |
|
|
|
|
|
129 |
}
|
130 |
|
131 |
|
132 |
/**
|
133 |
*
|
134 |
*/
|
135 |
+
public function invalid_wc_version() {
|
136 |
+
echo '<div class="error"><p>' . __( '<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce 3.0.0 to operate.', 'wc-vendors' ) . '</p></div>';
|
|
|
137 |
}
|
138 |
|
139 |
+
/**
|
140 |
+
* Define WC Constants.
|
141 |
+
*/
|
142 |
+
private function define_constants() {
|
143 |
+
|
144 |
+
$this->define( 'WCV_VERSION', $this->version );
|
145 |
+
$this->define( 'WCV_TEMPLATE_BASE', untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' );
|
146 |
+
$this->define( 'WCV_ABSPATH_ADMIN', dirname( __FILE__ ) . '/classes/admin/');
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Define constant if not already set.
|
152 |
+
*
|
153 |
+
* @param string $name Constant name.
|
154 |
+
* @param string|bool $value Constant value.
|
155 |
+
*/
|
156 |
+
private function define( $name, $value ) {
|
157 |
+
if ( ! defined( $name ) ) {
|
158 |
+
define( $name, $value );
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
/**
|
164 |
* Start the session
|
165 |
*/
|
187 |
*
|
188 |
* @return unknown
|
189 |
*/
|
190 |
+
public function check_install() {
|
|
|
191 |
|
192 |
+
if ( version_compare( WC_VERSION, '3.0.0', '<' ) ) {
|
193 |
add_action( 'admin_notices', array( $this, 'invalid_wc_version' ) );
|
194 |
deactivate_plugins( plugin_basename( __FILE__ ) );
|
195 |
return false;
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
|
200 |
|
201 |
/**
|
202 |
* Set static $pv_options to hold options class
|
203 |
*/
|
204 |
+
// public function load_settings() {
|
205 |
+
// if ( empty( self::$pv_options ) ) {
|
206 |
+
// include_once( wcv_plugin_dir . 'classes/includes/class-sf-settings.php' );
|
207 |
+
// self::$pv_options = new SF_Settings_API();
|
208 |
+
// }
|
209 |
+
// }
|
|
|
|
|
210 |
|
211 |
public function load_il8n() {
|
212 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), 'wc-vendors' );
|
213 |
+
load_textdomain( 'wc-vendors', WP_LANG_DIR.'/wc-vendors/wc-vendors-'.$locale.'.mo');
|
214 |
+
load_plugin_textdomain( 'wc-vendors', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' );
|
|
|
|
|
|
|
|
|
215 |
|
216 |
}
|
217 |
|
|
|
218 |
/**
|
219 |
* Include core files
|
220 |
*/
|
221 |
+
public function include_core() {
|
222 |
+
|
223 |
+
include_once( wcv_plugin_dir . 'classes/class-install.php' );
|
224 |
+
include_once( wcv_plugin_dir . 'classes/class-queries.php');
|
225 |
+
include_once( wcv_plugin_dir . 'classes/class-vendors.php');
|
226 |
+
include_once( wcv_plugin_dir . 'classes/class-cron.php');
|
227 |
+
include_once( wcv_plugin_dir . 'classes/class-commission.php');
|
228 |
+
include_once( wcv_plugin_dir . 'classes/class-shipping.php');
|
229 |
+
include_once( wcv_plugin_dir . 'classes/class-vendor-order.php');
|
230 |
+
include_once( wcv_plugin_dir . 'classes/class-vendor-post-types.php');
|
231 |
+
include_once( wcv_plugin_dir . 'classes/front/class-vendor-cart.php');
|
232 |
+
include_once( wcv_plugin_dir . 'classes/front/dashboard/class-vendor-dashboard.php');
|
233 |
+
include_once( wcv_plugin_dir . 'classes/front/class-vendor-shop.php');
|
234 |
+
include_once( wcv_plugin_dir . 'classes/front/signup/class-vendor-signup.php');
|
235 |
+
include_once( wcv_plugin_dir . 'classes/front/orders/class-orders.php');
|
236 |
+
include_once( wcv_plugin_dir . 'classes/admin/emails/class-emails.php');
|
237 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-vendor-applicants.php');
|
238 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-admin-reports.php');
|
239 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-commissions-page.php');
|
240 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-setup.php');
|
241 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-notices.php');
|
242 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-settings.php');
|
243 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-admin-menus.php');
|
244 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-extensions.php');
|
245 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-wcv-admin-help.php');
|
246 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-setup-wizard.php');
|
247 |
+
include_once( wcv_plugin_dir . 'classes/admin/class-vendor-admin-dashboard.php');
|
248 |
+
include_once( wcv_plugin_dir . 'classes/includes/class-wcv-shortcodes.php');
|
249 |
+
include_once( wcv_plugin_dir . 'classes/includes/wcv-update-functions.php');
|
250 |
+
include_once( wcv_plugin_dir . 'classes/includes/wcv-template-functions.php');
|
251 |
+
|
252 |
+
// Include
|
253 |
|
254 |
|
255 |
if ( !function_exists( 'woocommerce_wp_text_input' ) && !is_admin() ) {
|
256 |
+
include_once( WC()->plugin_path() . '/includes/admin/wc-meta-box-functions.php' );
|
257 |
}
|
258 |
|
259 |
new WCV_Vendors;
|
317 |
require_once wcv_plugin_dir . 'classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php';
|
318 |
}
|
319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
/**
|
321 |
* If the settings are updated and the vendor page link has changed update permalinks
|
322 |
* @access public
|
323 |
*
|
324 |
*/
|
325 |
+
public function maybe_flush_permalinks() {
|
326 |
+
if ( 'yes' === get_option( 'wcvendors_queue_flush_rewrite_rules' ) ) {
|
327 |
+
$this->flush_rewrite_rules();
|
328 |
+
update_option( 'wcvendors_queue_flush_rewrite_rules', 'no' );
|
|
|
329 |
}
|
330 |
}
|
331 |
|
332 |
+
public function flush_rewrite_rules(){
|
333 |
+
flush_rewrite_rules();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
}
|
335 |
|
336 |
+
|
337 |
/**
|
338 |
* Add user meta to remember ignore notices
|
339 |
* @access public
|
356 |
/**
|
357 |
* Class logger so that we can keep our debug and logging information cleaner
|
358 |
*
|
359 |
+
* @since 2.0.0
|
360 |
+
* @version 2.0.0
|
361 |
* @access public
|
362 |
*
|
363 |
* @param mixed - $data the data to go to the error log could be string, array or object
|
364 |
*/
|
365 |
+
public static function log( $data = '', $prefix = '' ){
|
366 |
|
367 |
$trace = debug_backtrace( false, 2 );
|
368 |
+
$caller = ( isset( $trace[ 1 ]['class'] ) ) ? $trace[ 1 ]['class'] : basename( $trace[ 1 ][ 'file' ] );
|
|
|
|
|
|
|
369 |
|
370 |
if ( is_array( $data ) || is_object( $data ) ) {
|
371 |
+
if ( $prefix ){
|
372 |
+
error_log( '===========================' );
|
373 |
+
error_log( $prefix );
|
374 |
+
error_log( '===========================' );
|
375 |
+
}
|
376 |
error_log( $caller . ' : ' . print_r( $data, true ) );
|
377 |
} else {
|
378 |
+
if ( $prefix ){
|
379 |
+
error_log( '===========================' );
|
380 |
+
error_log( $prefix );
|
381 |
+
error_log( '===========================' );
|
382 |
+
}
|
383 |
error_log( $caller . ' : ' . $data );
|
384 |
}
|
385 |
|
386 |
} // log()
|
387 |
|
388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
/*
|
390 |
* Upgrade notice displayed on the plugin screen
|
391 |
*
|
415 |
}
|
416 |
|
417 |
}
|
418 |
+
} // show_upgrade_notification()
|
419 |
|
420 |
}
|
421 |
|
classes/admin/class-admin-menus.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The admin class handles all admin custom page functions for admin view
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Admin
|
11 |
+
* @package WCVendors/Admin
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
class WCVendors_Admin_Menus {
|
15 |
+
|
16 |
+
public $commissions_table;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Constructor
|
20 |
+
*/
|
21 |
+
public function __construct(){
|
22 |
+
|
23 |
+
// Add menus
|
24 |
+
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
25 |
+
add_action( 'admin_menu', array( $this, 'commissions_menu' ), 50 );
|
26 |
+
add_action( 'admin_menu', array( $this, 'settings_menu' ), 70 );
|
27 |
+
add_action( 'admin_menu', array( $this, 'extensions_menu'), 80 );
|
28 |
+
add_action( 'admin_head', array( $this, 'commission_table_header_styles' ) );
|
29 |
+
|
30 |
+
add_filter( 'set-screen-option', array( __CLASS__, 'set_commissions_screen' ), 10, 3 );
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* WC Vendors menu
|
36 |
+
*/
|
37 |
+
public function admin_menu() {
|
38 |
+
|
39 |
+
global $menu;
|
40 |
+
|
41 |
+
if ( current_user_can( 'manage_woocommerce' ) ) {
|
42 |
+
$menu[] = array( '', 'read', 'separator-woocommerce', '', 'wp-menu-separator wcvendors' );
|
43 |
+
}
|
44 |
+
|
45 |
+
add_menu_page( __( 'WC Vendors', 'wc-vendors' ), __( 'WC Vendors', 'wc-vendors' ), 'manage_woocommerce', 'wc-vendors', array( $this, 'extensions_page' ), 'dashicons-cart', '50' );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Addons menu item.
|
50 |
+
*/
|
51 |
+
public function extensions_menu() {
|
52 |
+
add_submenu_page( 'wc-vendors', __( 'WC Vendors Extensions', 'wc-vendors' ), __( 'Extensions', 'wc-vendors' ), 'manage_woocommerce', 'wcv-extensions', array( $this, 'extensions_page' ) );
|
53 |
+
remove_submenu_page( 'wc-vendors', 'wc-vendors' );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Addons Page
|
58 |
+
*/
|
59 |
+
public function extensions_page(){
|
60 |
+
WCVendors_Admin_Extensions::output();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Add the commissions sub menu
|
65 |
+
*
|
66 |
+
* @since 1.0.0
|
67 |
+
* @access public
|
68 |
+
*
|
69 |
+
*/
|
70 |
+
public function commissions_menu() {
|
71 |
+
|
72 |
+
$commissions_page = add_submenu_page( 'wc-vendors', __( 'Commissions', 'wc-vendors' ), __( 'Commissions', 'wc-vendors' ), 'manage_woocommerce', 'wcv-commissions', array( $this, 'commissions_page' ) );\
|
73 |
+
add_action( "load-$commissions_page", array( $this, 'commission_screen_options' ) );
|
74 |
+
|
75 |
+
} // commissions_menu()
|
76 |
+
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Settings menu item
|
80 |
+
*/
|
81 |
+
public function settings_menu(){
|
82 |
+
$settings_page = add_submenu_page( 'wc-vendors', __( 'WC Vendors Settings', 'wcvendors' ), __( 'Settings', 'wcvendors' ), 'manage_woocommerce', 'wcv-settings', array( $this, 'settings_page' ) );
|
83 |
+
add_action( 'load-' . $settings_page, array( $this, 'settings_page_init') );
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Loads required objects into memory for use within settings
|
89 |
+
*/
|
90 |
+
public function settings_page_init() {
|
91 |
+
|
92 |
+
global $current_tab, $current_section;
|
93 |
+
|
94 |
+
// Include settings pages
|
95 |
+
WCVendors_Admin_Settings::get_settings_pages();
|
96 |
+
|
97 |
+
// Get current tab/section
|
98 |
+
$current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( $_GET['tab'] );
|
99 |
+
$current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );
|
100 |
+
|
101 |
+
// Save settings if data has been posted
|
102 |
+
if ( ! empty( $_POST ) ) {
|
103 |
+
WCVendors_Admin_Settings::save();
|
104 |
+
}
|
105 |
+
|
106 |
+
// Add any posted messages
|
107 |
+
if ( ! empty( $_GET['wcv_error'] ) ) {
|
108 |
+
WCVendors_Admin_Settings::add_error( stripslashes( $_GET['wcv_error'] ) );
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( ! empty( $_GET['wcv_message'] ) ) {
|
112 |
+
WCVendors_Admin_Settings::add_message( stripslashes( $_GET['wcv_message'] ) );
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Settings Page
|
118 |
+
*/
|
119 |
+
public function settings_page(){
|
120 |
+
WCVendors_Admin_Settings::output();
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Commission page output
|
125 |
+
*
|
126 |
+
* @since 2.0.0
|
127 |
+
*/
|
128 |
+
public function commissions_page(){
|
129 |
+
include( WCV_ABSPATH_ADMIN . 'views/html-admin-commission-page.php' );
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Screen options
|
135 |
+
*/
|
136 |
+
public function commission_screen_options() {
|
137 |
+
|
138 |
+
$option = 'per_page';
|
139 |
+
$args = [
|
140 |
+
'label' => 'Commissions',
|
141 |
+
'default' => 10,
|
142 |
+
'option' => 'commissions_per_page'
|
143 |
+
];
|
144 |
+
|
145 |
+
add_screen_option( $option, $args );
|
146 |
+
|
147 |
+
$this->commissions_table = new WCVendors_Commissions_Page();
|
148 |
+
}
|
149 |
+
|
150 |
+
public static function set_commissions_screen( $status, $option, $value ) {
|
151 |
+
return $value;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Load styles for the commissions table page
|
156 |
+
*/
|
157 |
+
public function commission_table_header_styles() {
|
158 |
+
|
159 |
+
$page = ( isset( $_GET[ 'page' ] ) ) ? esc_attr( $_GET[ 'page' ] ) : false;
|
160 |
+
|
161 |
+
|
162 |
+
wp_enqueue_style( 'wcv-admin-styles', wcv_assets_url . 'css/wcv-admin.css', array(), WCV_VERSION );
|
163 |
+
|
164 |
+
// Only load the styles on the license table page
|
165 |
+
|
166 |
+
if ( 'wcv_admin_commissions' !== $page ) return;
|
167 |
+
|
168 |
+
echo '<style type="text/css">';
|
169 |
+
echo '.wp-list-table .column-product_id { width: 20%; }';
|
170 |
+
echo '.wp-list-table .column-vendor_id { width: 15%; }';
|
171 |
+
echo '.wp-list-table .column-order_id { width: 8%; }';
|
172 |
+
echo '.wp-list-table .column-total_due { width: 10%;}';
|
173 |
+
echo '.wp-list-table .column-total_shipping { width: 10%;}';
|
174 |
+
echo '.wp-list-table .column-tax { width: 10%;}';
|
175 |
+
echo '.wp-list-table .column-totals { width: 10%;}';
|
176 |
+
echo '.wp-list-table .column-status { width: 5%;}';
|
177 |
+
echo '.wp-list-table .column-time { width: 10%;}';
|
178 |
+
echo '</style>';
|
179 |
+
|
180 |
+
} //table_header_styles()
|
181 |
+
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
new WCVendors_Admin_Menus();
|
classes/admin/class-admin-reports.php
CHANGED
@@ -38,41 +38,36 @@ class WCV_Admin_Reports
|
|
38 |
function reports_tab( $reports )
|
39 |
{
|
40 |
$reports[ 'vendors' ] = array(
|
41 |
-
'title' => __( 'WC Vendors', '
|
42 |
'charts' => array(
|
43 |
array(
|
44 |
-
'title' => __( 'Overview', '
|
45 |
'description' => '',
|
46 |
'hide_title' => true,
|
47 |
'function' => array( $this, 'sales' ),
|
48 |
),
|
49 |
array(
|
50 |
-
'title' => __( 'Commission by vendor', '
|
51 |
'description' => '',
|
52 |
'hide_title' => true,
|
53 |
'function' => array( $this, 'commission' ),
|
54 |
),
|
55 |
array(
|
56 |
-
'title' => __( 'Commission by product', '
|
57 |
'description' => '',
|
58 |
'hide_title' => true,
|
59 |
'function' => array( $this, 'commission' ),
|
60 |
),
|
61 |
array(
|
62 |
-
'title' => __( 'Commission Totals', '
|
63 |
-
'description' => __( 'Commission totals for all vendors includes shipping and taxes. By default no date range is used and all due commissions are returned. Use the date range to filter.', '
|
64 |
'hide_title' => true,
|
65 |
'function' => array( $this, 'commission_totals' ),
|
66 |
),
|
67 |
),
|
68 |
);
|
69 |
|
70 |
-
return $reports;
|
71 |
-
}
|
72 |
-
|
73 |
-
public function products()
|
74 |
-
{
|
75 |
-
# code...
|
76 |
}
|
77 |
|
78 |
|
@@ -121,41 +116,41 @@ class WCV_Admin_Reports
|
|
121 |
?>
|
122 |
|
123 |
<form method="post" action="">
|
124 |
-
<p><label for="from"><?php _e( 'From:', '
|
125 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $start_date ) ); ?>" name="start_date" class="range_datepicker from" id="from" />
|
126 |
-
<label for="to"><?php _e( 'To:', '
|
127 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $end_date ) ); ?>" name="end_date" class="range_datepicker to" id="to" />
|
128 |
-
<input type="submit" class="button" value="<?php _e( 'Show', '
|
129 |
</form>
|
130 |
|
131 |
<div id="poststuff" class="woocommerce-reports-wrap">
|
132 |
<div class="woocommerce-reports-sidebar">
|
133 |
<div class="postbox">
|
134 |
-
<h3><span><?php _e( 'Total paid in range', '
|
135 |
|
136 |
<div class="inside">
|
137 |
-
<p class="stat"><?php if ( $paid > 0 ) echo wc_price( $paid ); else _e( 'n/a', '
|
138 |
</div>
|
139 |
</div>
|
140 |
<div class="postbox">
|
141 |
-
<h3><span><?php _e( 'Total due in range', '
|
142 |
|
143 |
<div class="inside">
|
144 |
-
<p class="stat"><?php if ( $commission_due > 0 ) echo wc_price( $commission_due ); else _e( 'n/a', '
|
145 |
</div>
|
146 |
</div>
|
147 |
<div class="postbox">
|
148 |
-
<h3><span><?php _e( 'Total reversed in range', '
|
149 |
|
150 |
<div class="inside">
|
151 |
-
<p class="stat"><?php if ( $reversed > 0 ) echo wc_price( $reversed ); else _e( 'n/a', '
|
152 |
</div>
|
153 |
</div>
|
154 |
</div>
|
155 |
|
156 |
<div class="woocommerce-reports-main">
|
157 |
<div class="postbox">
|
158 |
-
<h3><span><?php _e( 'Recent Commission', '
|
159 |
|
160 |
<div>
|
161 |
<?php
|
@@ -173,12 +168,12 @@ class WCV_Admin_Reports
|
|
173 |
<table id="commission-table" class="woocommerce_order_items" cellspacing="0">
|
174 |
<thead>
|
175 |
<tr>
|
176 |
-
<th><?php _e( 'Order', '
|
177 |
-
<th><?php _e( 'Product', '
|
178 |
-
<th><?php _e( 'Vendor', '
|
179 |
-
<th><?php _e( 'Total', '
|
180 |
-
<th><?php _e( 'Date & Time', '
|
181 |
-
<th><?php _e( 'Status', '
|
182 |
</tr>
|
183 |
</thead>
|
184 |
<tbody>
|
@@ -186,12 +181,12 @@ class WCV_Admin_Reports
|
|
186 |
foreach ( $commission as $row ) : $i++ ?>
|
187 |
<tr<?php if ( $i % 2 == 1 ) echo ' class="alternate"' ?>>
|
188 |
<td><?php if ( $row->order_id ) : ?><a
|
189 |
-
href="<?php echo admin_url( 'post.php?post=' . $row->order_id . '&action=edit' ); ?>"><?php echo $row->order_id; ?></a><?php else : _e( 'N/A', '
|
190 |
</td>
|
191 |
<td><?php echo get_the_title( $row->product_id ); ?></td>
|
192 |
<td><?php echo WCV_Vendors::get_vendor_shop_name( $row->vendor_id ); ?></td>
|
193 |
<td><?php echo wc_price( $row->total_due + $row->total_shipping + $row->tax ) ?></td>
|
194 |
-
<td><?php echo date_i18n( __( 'D j M Y \a\t h:ia', '
|
195 |
<td><?php echo $commission_status_labels[ $row->status ]; ?></td>
|
196 |
</tr>
|
197 |
<?php endforeach; ?>
|
@@ -200,7 +195,7 @@ class WCV_Admin_Reports
|
|
200 |
</div>
|
201 |
<?php
|
202 |
} else {
|
203 |
-
?><p><?php _e( 'No commission yet', '
|
204 |
}
|
205 |
?>
|
206 |
</div>
|
@@ -234,7 +229,7 @@ class WCV_Admin_Reports
|
|
234 |
?>
|
235 |
|
236 |
<form method="post" action="" class="report_filters">
|
237 |
-
<label for="show_year"><?php _e( 'Show:', '
|
238 |
<select name="show_year" id="show_year">
|
239 |
<?php
|
240 |
for ( $i = $first_year; $i <= date( 'Y' ); $i++ )
|
@@ -246,7 +241,7 @@ class WCV_Admin_Reports
|
|
246 |
<input type="hidden" class="wc-product-search" style="width:203px;" name="product_ids[]" data-placeholder="<?php _e( 'Search for a product…', 'woocommerce' ); ?>" data-action="woocommerce_json_search_products_and_variations" />
|
247 |
<?php } else { ?>
|
248 |
<select id="product_ids" name="product_ids[]" class="ajax_chosen_select_products" multiple="multiple"
|
249 |
-
data-placeholder="<?php _e( 'Type in a product name to start searching...', '
|
250 |
style="width: 400px;"></select>
|
251 |
<script type="text/javascript">
|
252 |
jQuery(function () {
|
@@ -278,12 +273,12 @@ class WCV_Admin_Reports
|
|
278 |
<?php }
|
279 |
} else { ?>
|
280 |
<select class="chosen_select" id="show_vendor" name="show_vendor" style="width: 300px;"
|
281 |
-
data-placeholder="<?php _e( 'Select a vendor…', '
|
282 |
<option></option>
|
283 |
<?php foreach ( $vendors as $key => $vendor ) printf( '<option value="%s" %s>%s</option>', $vendor->ID, selected( $selected_vendor, $vendor->ID, false ), $vendor->display_name ); ?>
|
284 |
</select>
|
285 |
<?php } ?>
|
286 |
-
<input type="submit" class="button" value="<?php _e( 'Show', '
|
287 |
</form>
|
288 |
|
289 |
<?php
|
@@ -344,13 +339,13 @@ class WCV_Admin_Reports
|
|
344 |
<table class="widefat">
|
345 |
<thead>
|
346 |
<tr>
|
347 |
-
<th><?php _e( 'Month', '
|
348 |
-
<th class="total_row"><?php _e( 'Commission Totals', '
|
349 |
-
<th class="total_row"><?php _e( 'Tax', '
|
350 |
-
<th class="total_row"><?php _e( 'Shipping', '
|
351 |
-
<th class="total_row"><?php _e( 'Reversed', '
|
352 |
-
<th class="total_row"><?php _e( 'Paid', '
|
353 |
-
<th class="total_row"><?php _e( 'Due', '
|
354 |
</tr>
|
355 |
</thead>
|
356 |
<tfoot>
|
@@ -374,7 +369,7 @@ class WCV_Admin_Reports
|
|
374 |
$total[ 'total' ] += $commission[ 'total' ];
|
375 |
}
|
376 |
|
377 |
-
echo '<td>' . __( 'Total', '
|
378 |
|
379 |
foreach ( $total as $value ) {
|
380 |
echo '<td class="total_row">' . wc_price( $value ) . '</td>';
|
@@ -437,18 +432,18 @@ class WCV_Admin_Reports
|
|
437 |
$totals = $this->calculate_totals( $commissions );
|
438 |
|
439 |
?><form method="post" action="">
|
440 |
-
<p><label for="from"><?php _e( 'From:', '
|
441 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $total_start_date ) ); ?>" name="total_start_date" class="range_datepicker from" id="from" />
|
442 |
-
<label for="to"><?php _e( 'To:', '
|
443 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $total_end_date ) ); ?>" name="total_end_date" class="range_datepicker to" id="to" />
|
444 |
|
445 |
<select name="commission_status">
|
446 |
-
<option value="due"><?php _e( 'Due', '
|
447 |
-
<option value="paid"><?php _e( 'Paid', '
|
448 |
-
<option value="reversed"><?php _e( 'Reversed', '
|
449 |
</select>
|
450 |
|
451 |
-
<input type="submit" class="button" value="<?php _e( 'Show', '
|
452 |
|
453 |
<?php do_action( 'wcvendors_after_commission_reports', $commissions ); ?>
|
454 |
</p>
|
@@ -458,11 +453,11 @@ class WCV_Admin_Reports
|
|
458 |
<table class="widefat">
|
459 |
<thead>
|
460 |
<tr>
|
461 |
-
<th class="total_row"><?php _e( 'Vendor', '
|
462 |
-
<th class="total_row"><?php _e( 'Tax Total', '
|
463 |
-
<th class="total_row"><?php _e( 'Shipping Total', '
|
464 |
-
<th class="total_row"><?php _e( 'Status', '
|
465 |
-
<th class="total_row"><?php _e( 'Commission Total', '
|
466 |
</tr>
|
467 |
</thead>
|
468 |
<tbody>
|
@@ -484,7 +479,7 @@ class WCV_Admin_Reports
|
|
484 |
|
485 |
} else {
|
486 |
echo '<tr>';
|
487 |
-
echo '<td colspan="5">'. __( 'No commissions found.', '
|
488 |
echo '</tr>';
|
489 |
|
490 |
}
|
38 |
function reports_tab( $reports )
|
39 |
{
|
40 |
$reports[ 'vendors' ] = array(
|
41 |
+
'title' => __( 'WC Vendors', 'wc-vendors' ),
|
42 |
'charts' => array(
|
43 |
array(
|
44 |
+
'title' => __( 'Overview', 'wc-vendors' ),
|
45 |
'description' => '',
|
46 |
'hide_title' => true,
|
47 |
'function' => array( $this, 'sales' ),
|
48 |
),
|
49 |
array(
|
50 |
+
'title' => __( 'Commission by vendor', 'wc-vendors' ),
|
51 |
'description' => '',
|
52 |
'hide_title' => true,
|
53 |
'function' => array( $this, 'commission' ),
|
54 |
),
|
55 |
array(
|
56 |
+
'title' => __( 'Commission by product', 'wc-vendors' ),
|
57 |
'description' => '',
|
58 |
'hide_title' => true,
|
59 |
'function' => array( $this, 'commission' ),
|
60 |
),
|
61 |
array(
|
62 |
+
'title' => __( 'Commission Totals', 'wc-vendors' ),
|
63 |
+
'description' => __( 'Commission totals for all vendors includes shipping and taxes. By default no date range is used and all due commissions are returned. Use the date range to filter.', 'wc-vendors' ),
|
64 |
'hide_title' => true,
|
65 |
'function' => array( $this, 'commission_totals' ),
|
66 |
),
|
67 |
),
|
68 |
);
|
69 |
|
70 |
+
return apply_filters( 'wcvendors_admin_reports_tab', $reports );
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
|
116 |
?>
|
117 |
|
118 |
<form method="post" action="">
|
119 |
+
<p><label for="from"><?php _e( 'From:', 'wc-vendors' ); ?></label>
|
120 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $start_date ) ); ?>" name="start_date" class="range_datepicker from" id="from" />
|
121 |
+
<label for="to"><?php _e( 'To:', 'wc-vendors' ); ?></label>
|
122 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $end_date ) ); ?>" name="end_date" class="range_datepicker to" id="to" />
|
123 |
+
<input type="submit" class="button" value="<?php _e( 'Show', 'wc-vendors' ); ?>"/></p>
|
124 |
</form>
|
125 |
|
126 |
<div id="poststuff" class="woocommerce-reports-wrap">
|
127 |
<div class="woocommerce-reports-sidebar">
|
128 |
<div class="postbox">
|
129 |
+
<h3><span><?php _e( 'Total paid in range', 'wc-vendors' ); ?></span></h3>
|
130 |
|
131 |
<div class="inside">
|
132 |
+
<p class="stat"><?php if ( $paid > 0 ) echo wc_price( $paid ); else _e( 'n/a', 'wc-vendors' ); ?></p>
|
133 |
</div>
|
134 |
</div>
|
135 |
<div class="postbox">
|
136 |
+
<h3><span><?php _e( 'Total due in range', 'wc-vendors' ); ?></span></h3>
|
137 |
|
138 |
<div class="inside">
|
139 |
+
<p class="stat"><?php if ( $commission_due > 0 ) echo wc_price( $commission_due ); else _e( 'n/a', 'wc-vendors' ); ?></p>
|
140 |
</div>
|
141 |
</div>
|
142 |
<div class="postbox">
|
143 |
+
<h3><span><?php _e( 'Total reversed in range', 'wc-vendors' ); ?></span></h3>
|
144 |
|
145 |
<div class="inside">
|
146 |
+
<p class="stat"><?php if ( $reversed > 0 ) echo wc_price( $reversed ); else _e( 'n/a', 'wc-vendors' ); ?></p>
|
147 |
</div>
|
148 |
</div>
|
149 |
</div>
|
150 |
|
151 |
<div class="woocommerce-reports-main">
|
152 |
<div class="postbox">
|
153 |
+
<h3><span><?php _e( 'Recent Commission', 'wc-vendors' ); ?></span></h3>
|
154 |
|
155 |
<div>
|
156 |
<?php
|
168 |
<table id="commission-table" class="woocommerce_order_items" cellspacing="0">
|
169 |
<thead>
|
170 |
<tr>
|
171 |
+
<th><?php _e( 'Order', 'wc-vendors' ) ?></th>
|
172 |
+
<th><?php _e( 'Product', 'wc-vendors' ) ?></th>
|
173 |
+
<th><?php _e( 'Vendor', 'wc-vendors' ) ?></th>
|
174 |
+
<th><?php _e( 'Total', 'wc-vendors' ) ?></th>
|
175 |
+
<th><?php _e( 'Date & Time', 'wc-vendors' ) ?></th>
|
176 |
+
<th><?php _e( 'Status', 'wc-vendors' ) ?></th>
|
177 |
</tr>
|
178 |
</thead>
|
179 |
<tbody>
|
181 |
foreach ( $commission as $row ) : $i++ ?>
|
182 |
<tr<?php if ( $i % 2 == 1 ) echo ' class="alternate"' ?>>
|
183 |
<td><?php if ( $row->order_id ) : ?><a
|
184 |
+
href="<?php echo admin_url( 'post.php?post=' . $row->order_id . '&action=edit' ); ?>"><?php echo $row->order_id; ?></a><?php else : _e( 'N/A', 'wc-vendors' ); endif; ?>
|
185 |
</td>
|
186 |
<td><?php echo get_the_title( $row->product_id ); ?></td>
|
187 |
<td><?php echo WCV_Vendors::get_vendor_shop_name( $row->vendor_id ); ?></td>
|
188 |
<td><?php echo wc_price( $row->total_due + $row->total_shipping + $row->tax ) ?></td>
|
189 |
+
<td><?php echo date_i18n( __( 'D j M Y \a\t h:ia', 'wc-vendors' ), strtotime( $row->time ) ) ?></td>
|
190 |
<td><?php echo $commission_status_labels[ $row->status ]; ?></td>
|
191 |
</tr>
|
192 |
<?php endforeach; ?>
|
195 |
</div>
|
196 |
<?php
|
197 |
} else {
|
198 |
+
?><p><?php _e( 'No commission yet', 'wc-vendors' ) ?></p><?php
|
199 |
}
|
200 |
?>
|
201 |
</div>
|
229 |
?>
|
230 |
|
231 |
<form method="post" action="" class="report_filters">
|
232 |
+
<label for="show_year"><?php _e( 'Show:', 'wc-vendors' ); ?></label>
|
233 |
<select name="show_year" id="show_year">
|
234 |
<?php
|
235 |
for ( $i = $first_year; $i <= date( 'Y' ); $i++ )
|
241 |
<input type="hidden" class="wc-product-search" style="width:203px;" name="product_ids[]" data-placeholder="<?php _e( 'Search for a product…', 'woocommerce' ); ?>" data-action="woocommerce_json_search_products_and_variations" />
|
242 |
<?php } else { ?>
|
243 |
<select id="product_ids" name="product_ids[]" class="ajax_chosen_select_products" multiple="multiple"
|
244 |
+
data-placeholder="<?php _e( 'Type in a product name to start searching...', 'wc-vendors' ); ?>"
|
245 |
style="width: 400px;"></select>
|
246 |
<script type="text/javascript">
|
247 |
jQuery(function () {
|
273 |
<?php }
|
274 |
} else { ?>
|
275 |
<select class="chosen_select" id="show_vendor" name="show_vendor" style="width: 300px;"
|
276 |
+
data-placeholder="<?php _e( 'Select a vendor…', 'wc-vendors' ); ?>">
|
277 |
<option></option>
|
278 |
<?php foreach ( $vendors as $key => $vendor ) printf( '<option value="%s" %s>%s</option>', $vendor->ID, selected( $selected_vendor, $vendor->ID, false ), $vendor->display_name ); ?>
|
279 |
</select>
|
280 |
<?php } ?>
|
281 |
+
<input type="submit" class="button" value="<?php _e( 'Show', 'wc-vendors' ); ?>"/>
|
282 |
</form>
|
283 |
|
284 |
<?php
|
339 |
<table class="widefat">
|
340 |
<thead>
|
341 |
<tr>
|
342 |
+
<th><?php _e( 'Month', 'wc-vendors' ); ?></th>
|
343 |
+
<th class="total_row"><?php _e( 'Commission Totals', 'wc-vendors' ); ?></th>
|
344 |
+
<th class="total_row"><?php _e( 'Tax', 'wc-vendors' ); ?></th>
|
345 |
+
<th class="total_row"><?php _e( 'Shipping', 'wc-vendors' ); ?></th>
|
346 |
+
<th class="total_row"><?php _e( 'Reversed', 'wc-vendors' ); ?></th>
|
347 |
+
<th class="total_row"><?php _e( 'Paid', 'wc-vendors' ); ?></th>
|
348 |
+
<th class="total_row"><?php _e( 'Due', 'wc-vendors' ); ?></th>
|
349 |
</tr>
|
350 |
</thead>
|
351 |
<tfoot>
|
369 |
$total[ 'total' ] += $commission[ 'total' ];
|
370 |
}
|
371 |
|
372 |
+
echo '<td>' . __( 'Total', 'wc-vendors' ) . '</td>';
|
373 |
|
374 |
foreach ( $total as $value ) {
|
375 |
echo '<td class="total_row">' . wc_price( $value ) . '</td>';
|
432 |
$totals = $this->calculate_totals( $commissions );
|
433 |
|
434 |
?><form method="post" action="">
|
435 |
+
<p><label for="from"><?php _e( 'From:', 'wc-vendors' ); ?></label>
|
436 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $total_start_date ) ); ?>" name="total_start_date" class="range_datepicker from" id="from" />
|
437 |
+
<label for="to"><?php _e( 'To:', 'wc-vendors' ); ?></label>
|
438 |
<input type="text" size="9" placeholder="yyyy-mm-dd" value="<?php echo esc_attr( date( 'Y-m-d', $total_end_date ) ); ?>" name="total_end_date" class="range_datepicker to" id="to" />
|
439 |
|
440 |
<select name="commission_status">
|
441 |
+
<option value="due"><?php _e( 'Due', 'wc-vendors' ); ?></option>
|
442 |
+
<option value="paid"><?php _e( 'Paid', 'wc-vendors' ); ?></option>
|
443 |
+
<option value="reversed"><?php _e( 'Reversed', 'wc-vendors' ); ?></option>
|
444 |
</select>
|
445 |
|
446 |
+
<input type="submit" class="button" value="<?php _e( 'Show', 'wc-vendors' ); ?>"/>
|
447 |
|
448 |
<?php do_action( 'wcvendors_after_commission_reports', $commissions ); ?>
|
449 |
</p>
|
453 |
<table class="widefat">
|
454 |
<thead>
|
455 |
<tr>
|
456 |
+
<th class="total_row"><?php _e( 'Vendor', 'wc-vendors' ); ?></th>
|
457 |
+
<th class="total_row"><?php _e( 'Tax Total', 'wc-vendors' ); ?></th>
|
458 |
+
<th class="total_row"><?php _e( 'Shipping Total', 'wc-vendors' ); ?></th>
|
459 |
+
<th class="total_row"><?php _e( 'Status', 'wc-vendors' ); ?></th>
|
460 |
+
<th class="total_row"><?php _e( 'Commission Total', 'wc-vendors' ); ?></th>
|
461 |
</tr>
|
462 |
</thead>
|
463 |
<tbody>
|
479 |
|
480 |
} else {
|
481 |
echo '<tr>';
|
482 |
+
echo '<td colspan="5">'. __( 'No commissions found.', 'wc-vendors' ) . '</td>';
|
483 |
echo '</tr>';
|
484 |
|
485 |
}
|
classes/admin/class-admin-users.php
CHANGED
@@ -22,7 +22,7 @@ class WCV_Admin_Users
|
|
22 |
add_action( 'edit_user_profile', array( $this, 'show_extra_profile_fields' ) );
|
23 |
add_action( 'edit_user_profile_update', array( $this, 'save_extra_profile_fields' ) );
|
24 |
|
25 |
-
add_filter( 'add_menu_classes', array( $this, 'show_pending_number' ) );
|
26 |
|
27 |
// Disabling non-vendor related items on the admin screens
|
28 |
if ( WCV_Vendors::is_vendor( get_current_user_id() ) ) {
|
@@ -40,26 +40,24 @@ class WCV_Admin_Users
|
|
40 |
add_action( 'load-edit.php', array( $this, 'edit_nonvendors' ) );
|
41 |
add_filter( 'views_edit-product', array( $this, 'hide_nonvendor_links' ) );
|
42 |
|
43 |
-
// Filter user attachments so they only see their own attachements
|
44 |
-
add_action( 'ajax_query_attachments_args', array( $this, 'show_user_attachment_ajax' ) );
|
45 |
add_filter( 'parse_query', array( $this, 'show_user_attachment_page' ) );
|
46 |
|
47 |
add_action( 'admin_menu', array( $this, 'remove_menu_page' ), 99 );
|
48 |
add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 99 );
|
49 |
add_filter( 'product_type_selector', array( $this, 'filter_product_types' ), 99 );
|
50 |
add_filter( 'product_type_options', array( $this, 'filter_product_type_options' ), 99 );
|
51 |
-
add_filter( 'woocommerce_product_data_tabs', array( $this, 'filter_product_data_tabs' ), 99, 2 );
|
52 |
|
53 |
add_filter( 'woocommerce_duplicate_product_capability', array( $this, 'add_duplicate_capability' ) );
|
54 |
|
55 |
// WC > Product featured
|
56 |
-
|
57 |
-
|
58 |
-
if ( isset( $product_misc['featured'] ) ) {
|
59 |
add_filter( 'manage_product_posts_columns', array($this, 'manage_product_columns'), 99);
|
60 |
}
|
61 |
-
// WC > Product Hide duplicate
|
62 |
-
if (
|
63 |
add_filter( 'post_row_actions', array( $this, 'remove_dupe_link' ), 99, 2 );
|
64 |
}
|
65 |
}
|
@@ -72,7 +70,7 @@ class WCV_Admin_Users
|
|
72 |
return;
|
73 |
}
|
74 |
|
75 |
-
$can_submit =
|
76 |
if ( !$can_submit ) {
|
77 |
wp_die( 'You are not allowed to submit products.' );
|
78 |
}
|
@@ -105,26 +103,26 @@ class WCV_Admin_Users
|
|
105 |
*/
|
106 |
public function show_pending_number( $menu )
|
107 |
{
|
108 |
-
|
109 |
-
$args = array(
|
110 |
-
'post_type' => 'product',
|
111 |
-
'author' => get_current_user_id(),
|
112 |
'post_status' => 'pending'
|
113 |
-
);
|
114 |
|
115 |
if (!WCV_Vendors::is_vendor( get_current_user_id() ) ) unset( $args['author'] );
|
116 |
|
117 |
-
$pending_posts = get_posts( $args );
|
118 |
-
|
119 |
$pending_count = is_array( $pending_posts ) ? count( $pending_posts ) : 0;
|
120 |
|
121 |
$menu_str = 'edit.php?post_type=product';
|
122 |
|
123 |
foreach ( $menu as $menu_key => $menu_data ) {
|
124 |
-
|
125 |
if ( $menu_str != $menu_data[ 2 ] ) continue;
|
126 |
|
127 |
-
if ($pending_count > 0 ) {
|
128 |
$menu[ $menu_key ][ 0 ] .= " <span class='update-plugins counting-$pending_count'><span class='plugin-count'>" . number_format_i18n( $pending_count ) . '</span></span>';
|
129 |
}
|
130 |
}
|
@@ -143,9 +141,17 @@ class WCV_Admin_Users
|
|
143 |
function filter_product_types( $types )
|
144 |
{
|
145 |
|
146 |
-
$product_types =
|
147 |
-
$product_misc =
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
|
151 |
if ( !empty( $product_misc[ 'taxes' ] ) ) {
|
@@ -172,25 +178,25 @@ class WCV_Admin_Users
|
|
172 |
}
|
173 |
|
174 |
/**
|
175 |
-
* Filter the product meta tabs in wp-admin
|
176 |
* @since 1.9.0
|
177 |
*/
|
178 |
-
function filter_product_data_tabs( $tabs ){
|
179 |
|
180 |
-
$product_panel =
|
181 |
|
182 |
-
if ( !$product_panel ) return $tabs;
|
183 |
|
184 |
-
foreach ( $tabs as $key => $value ){
|
185 |
if ( !empty( $product_panel[ $key ] ) ) {
|
186 |
unset( $tabs[ $key ] );
|
187 |
}
|
188 |
|
189 |
}
|
190 |
|
191 |
-
return $tabs;
|
192 |
|
193 |
-
} // filter_product_data_tabs()
|
194 |
|
195 |
|
196 |
/**
|
@@ -202,7 +208,7 @@ class WCV_Admin_Users
|
|
202 |
*/
|
203 |
function filter_product_type_options( $types )
|
204 |
{
|
205 |
-
$product_options =
|
206 |
|
207 |
if ( !$product_options ) return $types;
|
208 |
|
@@ -221,7 +227,7 @@ class WCV_Admin_Users
|
|
221 |
*
|
222 |
* @param object $query
|
223 |
*/
|
224 |
-
function show_user_attachment_ajax ( $query ) {
|
225 |
|
226 |
$user_id = get_current_user_id();
|
227 |
if ( $user_id ) {
|
@@ -361,8 +367,16 @@ class WCV_Admin_Users
|
|
361 |
update_user_meta( $vendor_id, 'pv_custom_commission_rate', $_POST[ 'pv_custom_commission_rate' ] );
|
362 |
update_user_meta( $vendor_id, 'pv_shop_description', $_POST[ 'pv_shop_description' ] );
|
363 |
update_user_meta( $vendor_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
364 |
-
update_user_meta( $vendor_id, 'wcv_give_vendor_tax', isset( $_POST[ 'wcv_give_vendor_tax' ] ) );
|
365 |
-
update_user_meta( $vendor_id, 'wcv_give_vendor_shipping', isset( $_POST[ 'wcv_give_vendor_shipping' ] ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
|
367 |
do_action( 'wcvendors_update_admin_user', $vendor_id );
|
368 |
}
|
@@ -373,93 +387,19 @@ class WCV_Admin_Users
|
|
373 |
*
|
374 |
* @param unknown $user
|
375 |
*/
|
376 |
-
public function show_extra_profile_fields( $user )
|
377 |
-
|
|
|
|
|
|
|
378 |
|
379 |
-
|
380 |
-
return;
|
381 |
-
}
|
382 |
-
|
383 |
-
?>
|
384 |
-
<h3><?php _e( 'WC Vendors', 'wcvendors' ); ?></h3>
|
385 |
-
<table class="form-table">
|
386 |
-
<tbody>
|
387 |
-
<?php do_action( 'wcvendors_admin_before_shop_html', $user ); ?>
|
388 |
-
<tr>
|
389 |
-
<th scope="row">Shop HTML</th>
|
390 |
-
<td>
|
391 |
-
<label for="pv_shop_html_enabled">
|
392 |
-
<input name="pv_shop_html_enabled" type="checkbox"
|
393 |
-
id="pv_shop_html_enabled" <?php checked( true, get_user_meta( $user->ID, 'pv_shop_html_enabled', true ), $echo = true ) ?>/>
|
394 |
-
<?php _e( 'Enable HTML for the shop description', 'wcvendors' ); ?>
|
395 |
-
</label>
|
396 |
-
</td>
|
397 |
-
</tr>
|
398 |
-
<?php do_action( 'wcvendors_admin_after_shop_html', $user ); ?>
|
399 |
-
<tr>
|
400 |
-
<th><label for="pv_shop_name"><?php _e( 'Shop name', 'wcvendors' ); ?></label></th>
|
401 |
-
<td><input type="text" name="pv_shop_name" id="pv_shop_name"
|
402 |
-
value="<?php echo get_user_meta( $user->ID, 'pv_shop_name', true ); ?>" class="regular-text">
|
403 |
-
</td>
|
404 |
-
</tr>
|
405 |
-
<?php do_action( 'wcvendors_admin_after_shop_name', $user ); ?>
|
406 |
-
<tr>
|
407 |
-
<th><label for="pv_paypal"><?php _e( 'PayPal E-mail', 'wcvendors' ); ?> <span
|
408 |
-
class="description">(<?php _e( 'required', 'wcvendors' ); ?>)</span></label></th>
|
409 |
-
<td><input type="email" name="pv_paypal" id="pv_paypal"
|
410 |
-
value="<?php echo get_user_meta( $user->ID, 'pv_paypal', true ); ?>" class="regular-text">
|
411 |
-
</td>
|
412 |
-
</tr>
|
413 |
-
<?php do_action( 'wcvendors_admin_after_paypal', $user ); ?>
|
414 |
-
<tr>
|
415 |
-
<th><label for="pv_custom_commission_rate"><?php _e( 'Commission rate', 'wcvendors' ); ?> (%)</label></th>
|
416 |
-
<td><input type="number" step="0.01" max="100" min="0" name="pv_custom_commission_rate" placeholder="<?php _e( 'Leave blank for default', 'wcvendors' ); ?>" id="pv_custom_commission_rate"
|
417 |
-
value="<?php echo get_user_meta( $user->ID, 'pv_custom_commission_rate', true ); ?>" class="regular-text">
|
418 |
-
</td>
|
419 |
-
</tr>
|
420 |
-
<?php do_action( 'wcvendors_admin_after_commission_due', $user ); ?>
|
421 |
-
<tr>
|
422 |
-
<th><label for="wcv_give_vendor_tax"><?php _e( 'Give Tax', 'wcvendors' ); ?> (%)</label></th>
|
423 |
-
<td>
|
424 |
-
<label for="wcv_give_vendor_tax">
|
425 |
-
<input name="wcv_give_vendor_tax" type="checkbox"
|
426 |
-
id="wcv_give_vendor_tax" <?php checked( true, get_user_meta( $user->ID, 'wcv_give_vendor_tax', true ), $echo = true ) ?>/>
|
427 |
-
<?php _e( 'Tax override for vendor', 'wcvendors' ); ?>
|
428 |
-
</label>
|
429 |
-
</td>
|
430 |
-
</tr>
|
431 |
-
<?php do_action( 'wcvendors_admin_after_give_tax', $user ); ?>
|
432 |
-
<tr>
|
433 |
-
<th><label for="wcv_give_vendor_shipping"><?php _e( 'Give Shipping', 'wcvendors' ); ?> (%)</label></th>
|
434 |
-
<td>
|
435 |
-
<label for="wcv_give_vendor_shipping">
|
436 |
-
<input name="wcv_give_vendor_shipping" type="checkbox"
|
437 |
-
id="wcv_give_vendor_shipping" <?php checked( true, get_user_meta( $user->ID, 'wcv_give_vendor_shipping', true ), $echo = true ) ?>/>
|
438 |
-
<?php _e( 'Shipping override for vendor', 'wcvendors' ); ?>
|
439 |
-
</label>
|
440 |
-
</td>
|
441 |
-
</tr>
|
442 |
-
<?php do_action( 'wcvendors_admin_after_give_shipping', $user ); ?>
|
443 |
-
<tr>
|
444 |
-
<th><label for="pv_seller_info"><?php _e( 'Seller info', 'wcvendors' ); ?></label></th>
|
445 |
-
<td><?php wp_editor( get_user_meta( $user->ID, 'pv_seller_info', true ), 'pv_seller_info' ); ?></td>
|
446 |
-
</tr>
|
447 |
-
<?php do_action( 'wcvendors_admin_after_seller_info', $user ); ?>
|
448 |
-
<tr>
|
449 |
-
<th><label for="pv_shop_description"><?php _e( 'Shop description', 'wcvendors' ); ?></label>
|
450 |
-
</th>
|
451 |
-
<td><?php wp_editor( get_user_meta( $user->ID, 'pv_shop_description', true ), 'pv_shop_description' ); ?></td>
|
452 |
-
</tr>
|
453 |
-
<?php do_action( 'wcvendors_admin_after_shop_description', $user ); ?>
|
454 |
-
</tbody>
|
455 |
-
</table>
|
456 |
-
<?php
|
457 |
}
|
458 |
|
459 |
-
/*
|
460 |
Remove featured check box from the product listing
|
461 |
*/
|
462 |
-
public function manage_product_columns( $columns ){
|
463 |
global $woocommerce;
|
464 |
unset($columns['featured']);
|
465 |
return $columns;
|
@@ -467,11 +407,11 @@ class WCV_Admin_Users
|
|
467 |
|
468 |
|
469 |
/**
|
470 |
-
* Hide the duplicate product link by removing it from the row actions
|
471 |
*/
|
472 |
-
public function remove_dupe_link( $actions, $post ) {
|
473 |
-
unset($actions['duplicate']);
|
474 |
-
return $actions;
|
475 |
}
|
476 |
|
477 |
|
22 |
add_action( 'edit_user_profile', array( $this, 'show_extra_profile_fields' ) );
|
23 |
add_action( 'edit_user_profile_update', array( $this, 'save_extra_profile_fields' ) );
|
24 |
|
25 |
+
add_filter( 'add_menu_classes', array( $this, 'show_pending_number' ) );
|
26 |
|
27 |
// Disabling non-vendor related items on the admin screens
|
28 |
if ( WCV_Vendors::is_vendor( get_current_user_id() ) ) {
|
40 |
add_action( 'load-edit.php', array( $this, 'edit_nonvendors' ) );
|
41 |
add_filter( 'views_edit-product', array( $this, 'hide_nonvendor_links' ) );
|
42 |
|
43 |
+
// Filter user attachments so they only see their own attachements
|
44 |
+
add_action( 'ajax_query_attachments_args', array( $this, 'show_user_attachment_ajax' ) );
|
45 |
add_filter( 'parse_query', array( $this, 'show_user_attachment_page' ) );
|
46 |
|
47 |
add_action( 'admin_menu', array( $this, 'remove_menu_page' ), 99 );
|
48 |
add_action( 'add_meta_boxes', array( $this, 'remove_meta_boxes' ), 99 );
|
49 |
add_filter( 'product_type_selector', array( $this, 'filter_product_types' ), 99 );
|
50 |
add_filter( 'product_type_options', array( $this, 'filter_product_type_options' ), 99 );
|
51 |
+
add_filter( 'woocommerce_product_data_tabs', array( $this, 'filter_product_data_tabs' ), 99, 2 );
|
52 |
|
53 |
add_filter( 'woocommerce_duplicate_product_capability', array( $this, 'add_duplicate_capability' ) );
|
54 |
|
55 |
// WC > Product featured
|
56 |
+
if ( get_option( 'wcvendors_capability_product_featured' ) ) {
|
|
|
|
|
57 |
add_filter( 'manage_product_posts_columns', array($this, 'manage_product_columns'), 99);
|
58 |
}
|
59 |
+
// WC > Product Hide duplicate
|
60 |
+
if ( get_option( 'wcvendors_capability_product_duplicate' )) {
|
61 |
add_filter( 'post_row_actions', array( $this, 'remove_dupe_link' ), 99, 2 );
|
62 |
}
|
63 |
}
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
+
$can_submit = get_option( 'wcvendors_capability_products_enabled' );
|
74 |
if ( !$can_submit ) {
|
75 |
wp_die( 'You are not allowed to submit products.' );
|
76 |
}
|
103 |
*/
|
104 |
public function show_pending_number( $menu )
|
105 |
{
|
106 |
+
|
107 |
+
$args = array(
|
108 |
+
'post_type' => 'product',
|
109 |
+
'author' => get_current_user_id(),
|
110 |
'post_status' => 'pending'
|
111 |
+
);
|
112 |
|
113 |
if (!WCV_Vendors::is_vendor( get_current_user_id() ) ) unset( $args['author'] );
|
114 |
|
115 |
+
$pending_posts = get_posts( $args );
|
116 |
+
|
117 |
$pending_count = is_array( $pending_posts ) ? count( $pending_posts ) : 0;
|
118 |
|
119 |
$menu_str = 'edit.php?post_type=product';
|
120 |
|
121 |
foreach ( $menu as $menu_key => $menu_data ) {
|
122 |
+
|
123 |
if ( $menu_str != $menu_data[ 2 ] ) continue;
|
124 |
|
125 |
+
if ($pending_count > 0 ) {
|
126 |
$menu[ $menu_key ][ 0 ] .= " <span class='update-plugins counting-$pending_count'><span class='plugin-count'>" . number_format_i18n( $pending_count ) . '</span></span>';
|
127 |
}
|
128 |
}
|
141 |
function filter_product_types( $types )
|
142 |
{
|
143 |
|
144 |
+
$product_types = get_option( 'wcvendors_capability_product_types' );
|
145 |
+
$product_misc = array(
|
146 |
+
'taxes' => get_option( 'wcvendors_capability_product_taxes' ),
|
147 |
+
'sku' => get_option( 'wcvendors_capability_product_sku' ),
|
148 |
+
'duplicate' => get_option( 'wcvendors_capability_product_duplicate' ),
|
149 |
+
'delete' => get_option( 'wcvendors_capability_product_delete' ),
|
150 |
+
'featured' => get_option( 'wcvendors_capability_product_featured' )
|
151 |
+
);
|
152 |
+
|
153 |
+
|
154 |
+
$css = get_option( 'wcvendors_display_advanced_stylesheet' );
|
155 |
|
156 |
|
157 |
if ( !empty( $product_misc[ 'taxes' ] ) ) {
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
+
* Filter the product meta tabs in wp-admin
|
182 |
* @since 1.9.0
|
183 |
*/
|
184 |
+
function filter_product_data_tabs( $tabs ){
|
185 |
|
186 |
+
$product_panel = get_option( 'wcvendors_capability_product_data_tabs' );
|
187 |
|
188 |
+
if ( !$product_panel ) return $tabs;
|
189 |
|
190 |
+
foreach ( $tabs as $key => $value ){
|
191 |
if ( !empty( $product_panel[ $key ] ) ) {
|
192 |
unset( $tabs[ $key ] );
|
193 |
}
|
194 |
|
195 |
}
|
196 |
|
197 |
+
return $tabs;
|
198 |
|
199 |
+
} // filter_product_data_tabs()
|
200 |
|
201 |
|
202 |
/**
|
208 |
*/
|
209 |
function filter_product_type_options( $types )
|
210 |
{
|
211 |
+
$product_options = get_option( 'wcvendors_capability_product_type_options' );
|
212 |
|
213 |
if ( !$product_options ) return $types;
|
214 |
|
227 |
*
|
228 |
* @param object $query
|
229 |
*/
|
230 |
+
function show_user_attachment_ajax ( $query ) {
|
231 |
|
232 |
$user_id = get_current_user_id();
|
233 |
if ( $user_id ) {
|
367 |
update_user_meta( $vendor_id, 'pv_custom_commission_rate', $_POST[ 'pv_custom_commission_rate' ] );
|
368 |
update_user_meta( $vendor_id, 'pv_shop_description', $_POST[ 'pv_shop_description' ] );
|
369 |
update_user_meta( $vendor_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
370 |
+
update_user_meta( $vendor_id, 'wcv_give_vendor_tax', isset( $_POST[ 'wcv_give_vendor_tax' ] ) );
|
371 |
+
update_user_meta( $vendor_id, 'wcv_give_vendor_shipping', isset( $_POST[ 'wcv_give_vendor_shipping' ] ) );
|
372 |
+
|
373 |
+
// Bank details
|
374 |
+
update_user_meta( $vendor_id, 'wcv_bank_account_name', $_POST['wcv_bank_account_name'] );
|
375 |
+
update_user_meta( $vendor_id, 'wcv_bank_account_number', $_POST['wcv_bank_account_number'] );
|
376 |
+
update_user_meta( $vendor_id, 'wcv_bank_name', $_POST['wcv_bank_name'] );
|
377 |
+
update_user_meta( $vendor_id, 'wcv_bank_routing_number', $_POST['wcv_bank_routing_number'] );
|
378 |
+
update_user_meta( $vendor_id, 'wcv_bank_iban', $_POST['wcv_bank_iban'] );
|
379 |
+
update_user_meta( $vendor_id, 'wcv_bank_bic_swift', $_POST['wcv_bank_bic_swift'] );
|
380 |
|
381 |
do_action( 'wcvendors_update_admin_user', $vendor_id );
|
382 |
}
|
387 |
*
|
388 |
* @param unknown $user
|
389 |
*/
|
390 |
+
public function show_extra_profile_fields( $user ) {
|
391 |
+
|
392 |
+
if ( ! WCV_Vendors::is_vendor( $user->ID ) && ! WCV_Vendors::is_pending( $user->ID ) ) {
|
393 |
+
return;
|
394 |
+
}
|
395 |
|
396 |
+
include( apply_filters( 'wcvendors_vendor_meta_partial', WCV_ABSPATH_ADMIN . 'views/html-vendor-meta.php' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
|
399 |
+
/*
|
400 |
Remove featured check box from the product listing
|
401 |
*/
|
402 |
+
public function manage_product_columns( $columns ){
|
403 |
global $woocommerce;
|
404 |
unset($columns['featured']);
|
405 |
return $columns;
|
407 |
|
408 |
|
409 |
/**
|
410 |
+
* Hide the duplicate product link by removing it from the row actions
|
411 |
*/
|
412 |
+
public function remove_dupe_link( $actions, $post ) {
|
413 |
+
unset($actions['duplicate']);
|
414 |
+
return $actions;
|
415 |
}
|
416 |
|
417 |
|
classes/admin/class-product-meta.php
CHANGED
@@ -23,16 +23,16 @@ class WCV_Product_Meta
|
|
23 |
|
24 |
add_action( 'add_meta_boxes', array( $this, 'change_author_meta_box_title' ) );
|
25 |
add_action( 'wp_dropdown_users', array( $this, 'author_vendor_roles' ), 0, 1 );
|
26 |
-
if ( apply_filters( 'wcv_product_commission_tab', true ) ) {
|
27 |
add_action( 'woocommerce_product_write_panel_tabs', array( $this, 'add_tab' ) );
|
28 |
add_action( 'woocommerce_product_data_panels', array( $this, 'add_panel' ) );
|
29 |
add_action( 'woocommerce_process_product_meta', array( $this, 'save_panel' ) );
|
30 |
}
|
31 |
|
32 |
-
add_action( 'woocommerce_product_quick_edit_end', array($this, 'display_vendor_dd_quick_edit') );
|
33 |
-
add_action( 'woocommerce_product_quick_edit_save', array($this, 'save_vendor_quick_edit'), 2, 99 );
|
34 |
-
add_action( 'manage_product_posts_custom_column', array($this, 'display_vendor_column'), 2, 99 );
|
35 |
-
add_filter( 'manage_product_posts_columns', array($this, 'vendor_column_quickedit') );
|
36 |
|
37 |
}
|
38 |
|
@@ -43,7 +43,7 @@ class WCV_Product_Meta
|
|
43 |
public function change_author_meta_box_title()
|
44 |
{
|
45 |
global $wp_meta_boxes;
|
46 |
-
$wp_meta_boxes[ 'product' ][ 'normal' ][ 'core' ][ 'authordiv' ][ 'title' ] = __( 'Vendor', '
|
47 |
}
|
48 |
|
49 |
|
@@ -121,8 +121,8 @@ class WCV_Product_Meta
|
|
121 |
|
122 |
// Convert this selectbox with select2
|
123 |
$output .= '
|
124 |
-
<script type="text/javascript">jQuery(function() { jQuery("#' . $id . '").select2()
|
125 |
-
|
126 |
return $output;
|
127 |
}
|
128 |
|
@@ -148,7 +148,7 @@ class WCV_Product_Meta
|
|
148 |
{
|
149 |
?>
|
150 |
<li class="commission_tab">
|
151 |
-
<a href="#commission"><?php _e( 'Commission', '
|
152 |
</li> <?php
|
153 |
}
|
154 |
|
@@ -164,14 +164,14 @@ class WCV_Product_Meta
|
|
164 |
<fieldset>
|
165 |
|
166 |
<p class='form-field commission_rate_field'>
|
167 |
-
<label for='pv_commission_rate'><?php _e( 'Commission', '
|
168 |
<input type='number' id='pv_commission_rate'
|
169 |
name='pv_commission_rate'
|
170 |
class='short'
|
171 |
max="100"
|
172 |
min="0"
|
173 |
step='any'
|
174 |
-
placeholder='<?php _e( 'Leave blank for default', '
|
175 |
value="<?php echo get_post_meta( $post->ID, 'pv_commission_rate', true ); ?>"/>
|
176 |
</p>
|
177 |
|
@@ -180,22 +180,22 @@ class WCV_Product_Meta
|
|
180 |
|
181 |
}
|
182 |
|
183 |
-
/*
|
184 |
* Rename the Authors column to Vendor on products page
|
185 |
-
*/
|
186 |
-
public function vendor_column_quickedit($posts_columns) {
|
187 |
-
$posts_columns['author'] = __( 'Vendor', '
|
188 |
|
189 |
-
return $posts_columns;
|
190 |
}
|
191 |
|
192 |
-
/*
|
193 |
* Display the vendor drop down on the quick edit screen
|
194 |
-
*/
|
195 |
-
public function display_vendor_dd_quick_edit() {
|
196 |
|
197 |
-
global $post;
|
198 |
-
$selected = $post->post_author;
|
199 |
|
200 |
$roles = array( 'vendor', 'administrator' );
|
201 |
$user_args = array( 'fields' => array( 'ID', 'display_name' ) );
|
@@ -220,32 +220,32 @@ class WCV_Product_Meta
|
|
220 |
?>
|
221 |
<br class="clear" />
|
222 |
<label class="inline-edit-author-new">
|
223 |
-
<span class="title"><?php _e('Vendor', '
|
224 |
<?php echo $output; ?>
|
225 |
</label>
|
226 |
<?php
|
227 |
-
}
|
228 |
|
229 |
|
230 |
-
/*
|
231 |
-
* Save the vendor on the quick edit screen
|
232 |
*/
|
233 |
-
public function save_vendor_quick_edit( $product ) {
|
234 |
|
235 |
if ( $product->is_type('simple') || $product->is_type('external') ) {
|
236 |
if ( isset( $_REQUEST['_vendor'] ) ) {
|
237 |
$vendor = wc_clean($_REQUEST['_vendor']);
|
238 |
-
$post = get_post( $product->get_id() );
|
239 |
-
$post->post_author = $vendor;
|
240 |
}
|
241 |
}
|
242 |
-
return $product;
|
243 |
}
|
244 |
|
245 |
-
/*
|
246 |
-
* Display hidden column data for js
|
247 |
*/
|
248 |
-
public function display_vendor_column( $column, $post_id ){
|
249 |
|
250 |
$vendor = get_post_field( 'post_author', $post_id );
|
251 |
|
23 |
|
24 |
add_action( 'add_meta_boxes', array( $this, 'change_author_meta_box_title' ) );
|
25 |
add_action( 'wp_dropdown_users', array( $this, 'author_vendor_roles' ), 0, 1 );
|
26 |
+
if ( apply_filters( 'wcv_product_commission_tab', true ) ) {
|
27 |
add_action( 'woocommerce_product_write_panel_tabs', array( $this, 'add_tab' ) );
|
28 |
add_action( 'woocommerce_product_data_panels', array( $this, 'add_panel' ) );
|
29 |
add_action( 'woocommerce_process_product_meta', array( $this, 'save_panel' ) );
|
30 |
}
|
31 |
|
32 |
+
add_action( 'woocommerce_product_quick_edit_end', array($this, 'display_vendor_dd_quick_edit') );
|
33 |
+
add_action( 'woocommerce_product_quick_edit_save', array($this, 'save_vendor_quick_edit'), 2, 99 );
|
34 |
+
add_action( 'manage_product_posts_custom_column', array($this, 'display_vendor_column'), 2, 99 );
|
35 |
+
add_filter( 'manage_product_posts_columns', array($this, 'vendor_column_quickedit') );
|
36 |
|
37 |
}
|
38 |
|
43 |
public function change_author_meta_box_title()
|
44 |
{
|
45 |
global $wp_meta_boxes;
|
46 |
+
$wp_meta_boxes[ 'product' ][ 'normal' ][ 'core' ][ 'authordiv' ][ 'title' ] = __( 'Vendor', 'wc-vendors' );;
|
47 |
}
|
48 |
|
49 |
|
121 |
|
122 |
// Convert this selectbox with select2
|
123 |
$output .= '
|
124 |
+
<script type="text/javascript">jQuery(function() { jQuery("#' . $id . '").select2(); } );</script>';
|
125 |
+
|
126 |
return $output;
|
127 |
}
|
128 |
|
148 |
{
|
149 |
?>
|
150 |
<li class="commission_tab">
|
151 |
+
<a href="#commission"><?php _e( 'Commission', 'wc-vendors' ) ?></a>
|
152 |
</li> <?php
|
153 |
}
|
154 |
|
164 |
<fieldset>
|
165 |
|
166 |
<p class='form-field commission_rate_field'>
|
167 |
+
<label for='pv_commission_rate'><?php _e( 'Commission', 'wc-vendors' ); ?> (%)</label>
|
168 |
<input type='number' id='pv_commission_rate'
|
169 |
name='pv_commission_rate'
|
170 |
class='short'
|
171 |
max="100"
|
172 |
min="0"
|
173 |
step='any'
|
174 |
+
placeholder='<?php _e( 'Leave blank for default', 'wc-vendors' ); ?>'
|
175 |
value="<?php echo get_post_meta( $post->ID, 'pv_commission_rate', true ); ?>"/>
|
176 |
</p>
|
177 |
|
180 |
|
181 |
}
|
182 |
|
183 |
+
/*
|
184 |
* Rename the Authors column to Vendor on products page
|
185 |
+
*/
|
186 |
+
public function vendor_column_quickedit($posts_columns) {
|
187 |
+
$posts_columns['author'] = __( 'Vendor', 'wc-vendors' );
|
188 |
|
189 |
+
return $posts_columns;
|
190 |
}
|
191 |
|
192 |
+
/*
|
193 |
* Display the vendor drop down on the quick edit screen
|
194 |
+
*/
|
195 |
+
public function display_vendor_dd_quick_edit() {
|
196 |
|
197 |
+
global $post;
|
198 |
+
$selected = $post->post_author;
|
199 |
|
200 |
$roles = array( 'vendor', 'administrator' );
|
201 |
$user_args = array( 'fields' => array( 'ID', 'display_name' ) );
|
220 |
?>
|
221 |
<br class="clear" />
|
222 |
<label class="inline-edit-author-new">
|
223 |
+
<span class="title"><?php _e('Vendor', 'wc-vendors' ); ?></span>
|
224 |
<?php echo $output; ?>
|
225 |
</label>
|
226 |
<?php
|
227 |
+
}
|
228 |
|
229 |
|
230 |
+
/*
|
231 |
+
* Save the vendor on the quick edit screen
|
232 |
*/
|
233 |
+
public function save_vendor_quick_edit( $product ) {
|
234 |
|
235 |
if ( $product->is_type('simple') || $product->is_type('external') ) {
|
236 |
if ( isset( $_REQUEST['_vendor'] ) ) {
|
237 |
$vendor = wc_clean($_REQUEST['_vendor']);
|
238 |
+
$post = get_post( $product->get_id() );
|
239 |
+
$post->post_author = $vendor;
|
240 |
}
|
241 |
}
|
242 |
+
return $product;
|
243 |
}
|
244 |
|
245 |
+
/*
|
246 |
+
* Display hidden column data for js
|
247 |
*/
|
248 |
+
public function display_vendor_column( $column, $post_id ){
|
249 |
|
250 |
$vendor = get_post_field( 'post_author', $post_id );
|
251 |
|
classes/admin/class-setup-wizard.php
ADDED
@@ -0,0 +1,348 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin setup wziard
|
4 |
+
*
|
5 |
+
* @author WooCommerce, Jamie Madden, WC Vendors
|
6 |
+
* @category Admin
|
7 |
+
* @package WCVendors/Admin
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WCVendors_Admin_Setup_Wizard class.
|
17 |
+
*/
|
18 |
+
class WCVendors_Admin_Setup_Wizard {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Current step
|
22 |
+
*
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
private $step = '';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Steps for the setup wizard
|
29 |
+
*
|
30 |
+
* @var array
|
31 |
+
*/
|
32 |
+
private $steps = array();
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Actions to be executed after the HTTP response has completed
|
36 |
+
*
|
37 |
+
* @var array
|
38 |
+
*/
|
39 |
+
private $deferred_actions = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Hook in tabs.
|
43 |
+
*/
|
44 |
+
public function __construct() {
|
45 |
+
|
46 |
+
if ( apply_filters( 'wcv_enable_setup_wizard', true ) && current_user_can( 'manage_woocommerce' ) ) {
|
47 |
+
add_action( 'admin_menu', array( $this, 'admin_menus' ) );
|
48 |
+
add_action( 'admin_init', array( $this, 'setup_wizard' ) );
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Add admin menus/screens.
|
54 |
+
*/
|
55 |
+
public function admin_menus() {
|
56 |
+
add_dashboard_page( '', '', 'manage_options', 'wcv-setup', '' );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Show the setup wizard.
|
61 |
+
*/
|
62 |
+
public function setup_wizard() {
|
63 |
+
|
64 |
+
if ( empty( $_GET['page'] ) || 'wcv-setup' !== $_GET['page'] ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
$default_steps = array(
|
68 |
+
'store_setup' => array(
|
69 |
+
'name' => __( 'Start', 'wc-vendors' ),
|
70 |
+
'view' => array( $this, 'wcv_setup_general' ),
|
71 |
+
'handler' => array( $this, 'wcv_setup_general_save' ),
|
72 |
+
),
|
73 |
+
'capabilities' => array(
|
74 |
+
'name' => __( 'Capabilities', 'wc-vendors' ),
|
75 |
+
'view' => array( $this, 'wcv_setup_capabilities' ),
|
76 |
+
'handler' => array( $this, 'wcv_setup_capabilities_save' ),
|
77 |
+
),
|
78 |
+
'shipping' => array(
|
79 |
+
'name' => __( 'Pages', 'wc-vendors' ),
|
80 |
+
'view' => array( $this, 'wcv_setup_pages' ),
|
81 |
+
'handler' => array( $this, 'wcv_setup_pages_save' ),
|
82 |
+
),
|
83 |
+
'ready' => array(
|
84 |
+
'name' => __( 'Ready!', 'wc-vendors' ),
|
85 |
+
'view' => array( $this, 'wcv_setup_ready' ),
|
86 |
+
'handler' => '',
|
87 |
+
),
|
88 |
+
);
|
89 |
+
|
90 |
+
$this->steps = apply_filters( 'wcv_setup_wizard_steps', $default_steps );
|
91 |
+
$this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) );
|
92 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
93 |
+
|
94 |
+
wp_register_script( 'jquery-blockui', WC()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
|
95 |
+
wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.0' );
|
96 |
+
wp_register_script( 'wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), WC_VERSION );
|
97 |
+
wp_localize_script( 'wc-enhanced-select', 'wc_enhanced_select_params', array(
|
98 |
+
'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'wcvendors' ),
|
99 |
+
'i18n_ajax_error' => _x( 'Loading failed', 'enhanced select', 'wcvendors' ),
|
100 |
+
'i18n_input_too_short_1' => _x( 'Please enter 1 or more characters', 'enhanced select', 'wcvendors' ),
|
101 |
+
'i18n_input_too_short_n' => _x( 'Please enter %qty% or more characters', 'enhanced select', 'wcvendors' ),
|
102 |
+
'i18n_input_too_long_1' => _x( 'Please delete 1 character', 'enhanced select', 'wcvendors' ),
|
103 |
+
'i18n_input_too_long_n' => _x( 'Please delete %qty% characters', 'enhanced select', 'wcvendors' ),
|
104 |
+
'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'wcvendors' ),
|
105 |
+
'i18n_selection_too_long_n' => _x( 'You can only select %qty% items', 'enhanced select', 'wcvendors' ),
|
106 |
+
'i18n_load_more' => _x( 'Loading more results…', 'enhanced select', 'wcvendors' ),
|
107 |
+
'i18n_searching' => _x( 'Searching…', 'enhanced select', 'wcvendors' ),
|
108 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
109 |
+
'search_products_nonce' => wp_create_nonce( 'search-products' ),
|
110 |
+
'search_customers_nonce' => wp_create_nonce( 'search-customers' ),
|
111 |
+
) );
|
112 |
+
// @todo fix the select2 styles in our admin.css
|
113 |
+
wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION );
|
114 |
+
|
115 |
+
wp_enqueue_style( 'wcv-setup', wcv_assets_url . 'css/wcv-setup.css', array( 'dashicons', 'install' ), WCV_VERSION );
|
116 |
+
wp_register_script( 'wcv-setup', wcv_assets_url . 'js/admin/wcv-setup.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui', 'wp-util' ), WCV_VERSION );
|
117 |
+
|
118 |
+
if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) {
|
119 |
+
call_user_func( $this->steps[ $this->step ]['handler'], $this );
|
120 |
+
}
|
121 |
+
|
122 |
+
ob_start();
|
123 |
+
$this->setup_wizard_header();
|
124 |
+
$this->setup_wizard_steps();
|
125 |
+
$this->setup_wizard_content();
|
126 |
+
$this->setup_wizard_footer();
|
127 |
+
exit;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Get the URL for the next step's screen.
|
132 |
+
*
|
133 |
+
* @param string $step slug (default: current step).
|
134 |
+
* @return string URL for next step if a next step exists.
|
135 |
+
* Admin URL if it's the last step.
|
136 |
+
* Empty string on failure.
|
137 |
+
* @since 2.0.0
|
138 |
+
*/
|
139 |
+
public function get_next_step_link( $step = '' ) {
|
140 |
+
if ( ! $step ) {
|
141 |
+
$step = $this->step;
|
142 |
+
}
|
143 |
+
|
144 |
+
$keys = array_keys( $this->steps );
|
145 |
+
if ( end( $keys ) === $step ) {
|
146 |
+
return admin_url();
|
147 |
+
}
|
148 |
+
|
149 |
+
$step_index = array_search( $step, $keys );
|
150 |
+
if ( false === $step_index ) {
|
151 |
+
return '';
|
152 |
+
}
|
153 |
+
|
154 |
+
return add_query_arg( 'step', $keys[ $step_index + 1 ], remove_query_arg( 'activate_error' ) );
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Setup Wizard Header.
|
159 |
+
*/
|
160 |
+
public function setup_wizard_header() {
|
161 |
+
|
162 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/header.php' );
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Setup Wizard Footer.
|
167 |
+
*/
|
168 |
+
public function setup_wizard_footer() {
|
169 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/footer.php' );
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Output the steps.
|
174 |
+
*/
|
175 |
+
public function setup_wizard_steps() {
|
176 |
+
$output_steps = $this->steps;
|
177 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/steps.php' );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Output the content for the current step.
|
182 |
+
*/
|
183 |
+
public function setup_wizard_content() {
|
184 |
+
echo '<div class="wcv-setup-content">';
|
185 |
+
if ( ! empty( $this->steps[ $this->step ]['view'] ) ) {
|
186 |
+
call_user_func( $this->steps[ $this->step ]['view'], $this );
|
187 |
+
}
|
188 |
+
echo '</div>';
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Helper method to retrieve the current user's email address.
|
193 |
+
*
|
194 |
+
* @return string Email address
|
195 |
+
*/
|
196 |
+
protected function get_current_user_email() {
|
197 |
+
$current_user = wp_get_current_user();
|
198 |
+
$user_email = $current_user->user_email;
|
199 |
+
|
200 |
+
return $user_email;
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Initial "marketplace setup" step.
|
205 |
+
* Vendor registration, taxes and shipping
|
206 |
+
*/
|
207 |
+
public function wcv_setup_general() {
|
208 |
+
|
209 |
+
$allow_registration = get_option( 'wcvendors_vendor_allow_registration', 'yes' );
|
210 |
+
$manual_approval = get_option( 'wcvendors_vendor_approve_registration', 'yes' );
|
211 |
+
$vendor_taxes = get_option( 'wcvendors_vendor_give_taxes', 'yes' );
|
212 |
+
$vendor_shipping = get_option( 'wcvendors_vendor_give_shipping', 'yes' );
|
213 |
+
$commission_rate = get_option( 'wcvendors_vendor_commission_rate' );
|
214 |
+
|
215 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/general.php' );
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Save initial marketplace settings.
|
220 |
+
*/
|
221 |
+
public function wcv_setup_general_save() {
|
222 |
+
|
223 |
+
check_admin_referer( 'wcv-setup' );
|
224 |
+
|
225 |
+
$allow_registration = isset( $_POST[ 'wcv_vendor_allow_registration' ] ) ? sanitize_text_field( $_POST[ 'wcv_vendor_allow_registration' ] ) : '';
|
226 |
+
$manual_approval = isset( $_POST[ 'wcv_vendor_approve_registration'] ) ? sanitize_text_field( $_POST[ 'wcv_vendor_approve_registration' ] ) : '';
|
227 |
+
$vendor_taxes = isset( $_POST[ 'wcv_vendor_give_taxes' ] ) ? sanitize_text_field( $_POST[ 'wcv_vendor_give_taxes' ] ) : '';
|
228 |
+
$vendor_shipping = isset( $_POST[ 'wcv_vendor_give_shipping' ] ) ? sanitize_text_field( $_POST[ 'wcv_vendor_give_shipping' ] ) : '';
|
229 |
+
$commission_rate = sanitize_text_field( $_POST[ 'wcv_vendor_commission_rate' ] );
|
230 |
+
|
231 |
+
update_option( 'wcvendors_vendor_allow_registration', $allow_registration );
|
232 |
+
update_option( 'wcvendors_vendor_approve_registration', $manual_approval );
|
233 |
+
update_option( 'wcvendors_vendor_give_taxes', $vendor_taxes );
|
234 |
+
update_option( 'wcvendors_vendor_give_shipping', $vendor_shipping );
|
235 |
+
update_option( 'wcvendors_vendor_commission_rate', $commission_rate );
|
236 |
+
|
237 |
+
WCVendors_Install::create_pages();
|
238 |
+
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
239 |
+
exit;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* General setup
|
244 |
+
* Vendor registration, taxes and shipping
|
245 |
+
*/
|
246 |
+
public function wcv_setup_capabilities() {
|
247 |
+
|
248 |
+
$products_enabled = get_option( 'wcvendors_capability_products_enabled', 'yes' );
|
249 |
+
$live_products = get_option( 'wcvendors_capability_products_edit', 'yes' );
|
250 |
+
$products_approval = get_option( 'wcvendors_capability_products_live', 'yes' );
|
251 |
+
$orders_enabled = get_option( 'wcvendors_capability_orders_enabled', 'yes' );
|
252 |
+
$export_orders = get_option( 'wcvendors_capability_orders_export', 'yes' );
|
253 |
+
$view_order_notes = get_option( 'wcvendors_capability_order_read_notes', 'yes' );
|
254 |
+
$add_order_notes = get_option( 'wcvendors_capability_order_update_notes', 'yes' );
|
255 |
+
|
256 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/capabilities.php' );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Save capabilities settings.
|
261 |
+
*/
|
262 |
+
public function wcv_setup_capabilities_save() {
|
263 |
+
|
264 |
+
check_admin_referer( 'wcv-setup' );
|
265 |
+
|
266 |
+
$products_enabled = isset( $_POST[ 'wcv_capability_products_enabled' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_products_enabled' ] ) : '';
|
267 |
+
$live_products = isset( $_POST[ 'wcv_capability_products_edit' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_products_edit' ] ) : '';
|
268 |
+
$products_approval = isset( $_POST[ 'wcv_capability_products_live' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_products_live' ] ) : '';
|
269 |
+
$orders_enabled = isset( $_POST[ 'wcv_capability_orders_enabled' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_orders_enabled' ] ) : '';
|
270 |
+
$export_orders = isset( $_POST[ 'wcv_capability_orders_export' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_orders_export' ] ) : '';
|
271 |
+
$view_order_notes = isset( $_POST[ 'wcv_capability_order_read_notes' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_order_read_notes' ] ) : '';
|
272 |
+
$add_order_notes = isset( $_POST[ 'wcv_capability_order_update_notes' ] ) ? sanitize_text_field( $_POST[ 'wcv_capability_order_update_notes' ] ) : '';
|
273 |
+
|
274 |
+
update_option( 'wcvendors_capability_products_enabled', $products_enabled );
|
275 |
+
update_option( 'wcvendors_capability_products_edit', $live_products );
|
276 |
+
update_option( 'wcvendors_capability_products_live', $products_approval );
|
277 |
+
update_option( 'wcvendors_capability_orders_enabled', $orders_enabled );
|
278 |
+
update_option( 'wcvendors_capability_orders_export', $export_orders );
|
279 |
+
update_option( 'wcvendors_capability_order_read_notes', $view_order_notes );
|
280 |
+
update_option( 'wcvendors_capability_order_update_notes', $add_order_notes );
|
281 |
+
|
282 |
+
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
283 |
+
exit;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Initial "marketplace setup" step.
|
288 |
+
* Vendor registration, taxes and shipping
|
289 |
+
*/
|
290 |
+
public function wcv_setup_pages() {
|
291 |
+
|
292 |
+
$vendor_dashboard_page_id = get_option( 'wcvendors_vendor_dashboard_page_id' );
|
293 |
+
$shop_settings_page_id = get_option( 'wcvendors_shop_settings_page_id' );
|
294 |
+
$product_orders_page_id = get_option( 'wcvendors_product_orders_page_id' );
|
295 |
+
$vendors_page_id = get_option( 'wcvendors_vendors_page_id' );
|
296 |
+
$terms_page_id = get_option( 'wcvendors_vendor_terms_page_id' );
|
297 |
+
|
298 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/pages.php' );
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Initial "marketplace setup" step.
|
303 |
+
* Vendor registration, taxes and shipping
|
304 |
+
*/
|
305 |
+
public function wcv_setup_pages_save() {
|
306 |
+
|
307 |
+
|
308 |
+
$vendor_dashboard_page_id = sanitize_text_field( $_POST[ 'wcvendors_vendor_dashboard_page_id' ] );
|
309 |
+
$shop_settings_page_id = sanitize_text_field( $_POST[ 'wcvendors_shop_settings_page_id' ] );
|
310 |
+
$product_orders_page_id = sanitize_text_field( $_POST[ 'wcvendors_product_orders_page_id' ] );
|
311 |
+
$vendors_page_id = sanitize_text_field( $_POST[ 'wcvendors_vendors_page_id' ] );
|
312 |
+
$terms_page_id = sanitize_text_field( $_POST[ 'wcvendors_vendor_terms_page_id' ] );
|
313 |
+
|
314 |
+
update_option( 'wcvendors_vendor_dashboard_page_id', $vendor_dashboard_page_id );
|
315 |
+
update_option( 'wcvendors_shop_settings_page_id', $shop_settings_page_id );
|
316 |
+
update_option( 'wcvendors_product_orders_page_id', $product_orders_page_id );
|
317 |
+
update_option( 'wcvendors_vendors_page_id', $vendors_page_id );
|
318 |
+
update_option( 'wcvendors_vendor_terms_page_id', $terms_page_id );
|
319 |
+
|
320 |
+
wp_redirect( esc_url_raw( $this->get_next_step_link() ) );
|
321 |
+
exit;
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Final step.
|
327 |
+
*/
|
328 |
+
public function wcv_setup_ready() {
|
329 |
+
|
330 |
+
WCVendors_Admin_Notices::remove_notice( 'install' );
|
331 |
+
WCVendors_Install::update_db_version();
|
332 |
+
flush_rewrite_rules();
|
333 |
+
|
334 |
+
$user_email = $this->get_current_user_email();
|
335 |
+
$forums = 'https://wordpress.org/support/plugin/wc-vendors';
|
336 |
+
$docs_url = 'https://docs.wcvendors.com/?utm_source=setup_wizard&utm_medium=plugin&utm_campaign=setup_complete';
|
337 |
+
$help_text = sprintf(
|
338 |
+
/* translators: %1$s: link to videos, %2$s: link to docs */
|
339 |
+
__( 'Don\'t forget to check our <a href="%1$s" target="_blank">documentation</a> to learn more about setting up WC Vendors and if you need help, be sure to visit our <a href="%2$s" target="_blank">free support forums</a>.', 'wc-vendors' ),
|
340 |
+
$docs_url,
|
341 |
+
$forums
|
342 |
+
);
|
343 |
+
|
344 |
+
include( WCV_ABSPATH_ADMIN . 'views/setup/ready.php' );
|
345 |
+
}
|
346 |
+
}
|
347 |
+
|
348 |
+
new WCVendors_Admin_Setup_Wizard();
|
classes/admin/class-vendor-admin-dashboard.php
CHANGED
@@ -1,80 +1,87 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* WC Vendor Admin Dashboard - Vendor WP-Admin Dashboard Pages
|
4 |
-
*
|
5 |
* @author Jamie Madden <http://wcvendors.com / https://github.com/digitalchild>
|
6 |
* @package WCVendors
|
7 |
*/
|
8 |
|
9 |
-
Class WCV_Vendor_Admin_Dashboard {
|
10 |
|
11 |
-
public $dashboard_error_msg;
|
12 |
|
13 |
-
function __construct(){
|
14 |
-
// Add Shop Settings page
|
15 |
-
add_action( 'admin_menu', array( $this, 'vendor_dashboard_pages') );
|
16 |
-
// Hook into init for form processing
|
17 |
add_action( 'admin_init', array( $this, 'save_shop_settings' ) );
|
18 |
-
add_action( 'admin_head', array( $this, 'admin_enqueue_order_style') );
|
19 |
}
|
20 |
|
21 |
function vendor_dashboard_pages(){
|
22 |
-
add_menu_page( __('Shop Settings', '
|
23 |
-
$hook = add_menu_page( __( 'Orders', '
|
24 |
add_action( "load-$hook", array( 'WCV_Vendor_Admin_Dashboard', 'add_options' ) );
|
25 |
}
|
26 |
-
|
27 |
-
function settings_page() {
|
28 |
-
$user_id = get_current_user_id();
|
29 |
-
$paypal_address = true;
|
30 |
-
$shop_description = true;
|
31 |
$description = get_user_meta( $user_id, 'pv_shop_description', true );
|
32 |
$seller_info = get_user_meta( $user_id, 'pv_seller_info', true );
|
33 |
$has_html = get_user_meta( $user_id, 'pv_shop_html_enabled', true );
|
34 |
$shop_page = WCV_Vendors::get_vendor_shop_page( wp_get_current_user()->user_login );
|
35 |
-
$global_html =
|
36 |
-
include('views/html-vendor-settings-page.php');
|
37 |
}
|
38 |
|
39 |
-
function admin_enqueue_order_style() {
|
|
|
|
|
40 |
|
41 |
-
$screen
|
42 |
-
$screen_id = $screen->id;
|
43 |
|
44 |
-
|
|
|
|
|
45 |
|
46 |
add_thickbox();
|
47 |
wp_enqueue_style( 'admin_order_styles', wcv_assets_url . 'css/admin-orders.css' );
|
48 |
-
}
|
49 |
}
|
50 |
|
51 |
-
/**
|
52 |
-
* Save shop settings
|
53 |
*/
|
54 |
public function save_shop_settings()
|
55 |
{
|
56 |
$user_id = get_current_user_id();
|
57 |
-
$error = false;
|
58 |
$error_msg = '';
|
59 |
|
60 |
-
if (isset ( $_POST[ 'wc-vendors-nonce' ] ) ) {
|
61 |
|
62 |
if ( !wp_verify_nonce( $_POST[ 'wc-vendors-nonce' ], 'save-shop-settings-admin' ) ) {
|
63 |
return false;
|
64 |
}
|
65 |
|
66 |
-
if (
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
} else {
|
70 |
-
|
71 |
}
|
72 |
-
|
73 |
if ( !empty( $_POST[ 'pv_shop_name' ] ) ) {
|
74 |
$users = get_users( array( 'meta_key' => 'pv_shop_slug', 'meta_value' => sanitize_title( $_POST[ 'pv_shop_name' ] ) ) );
|
75 |
if ( !empty( $users ) && $users[ 0 ]->ID != $user_id ) {
|
76 |
-
$error_msg .= __( 'That shop name is already taken. Your shop name must be unique.', '
|
77 |
-
$error = true;
|
78 |
} else {
|
79 |
update_user_meta( $user_id, 'pv_shop_name', $_POST[ 'pv_shop_name' ] );
|
80 |
update_user_meta( $user_id, 'pv_shop_slug', sanitize_title( $_POST[ 'pv_shop_name' ] ) );
|
@@ -89,41 +96,63 @@ Class WCV_Vendor_Admin_Dashboard {
|
|
89 |
update_user_meta( $user_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
do_action( 'wcvendors_shop_settings_admin_saved', $user_id );
|
93 |
|
94 |
if ( ! $error ) {
|
95 |
-
add_action( 'admin_notices', array( $this, 'add_admin_notice_success' ) );
|
96 |
-
} else {
|
97 |
-
$this->dashboard_error_msg = $error_msg;
|
98 |
-
add_action( 'admin_notices', array( $this, 'add_admin_notice_error' ) );
|
99 |
}
|
100 |
}
|
101 |
}
|
102 |
|
103 |
/**
|
104 |
* Output a sucessful message after saving the shop settings
|
105 |
-
*
|
106 |
-
* @since 1.9.9
|
107 |
-
* @access public
|
108 |
*/
|
109 |
-
public function add_admin_notice_success( ){
|
110 |
|
111 |
echo '<div class="updated"><p>';
|
112 |
-
echo __( 'Settings saved.', '
|
113 |
echo '</p></div>';
|
114 |
|
115 |
-
} // add_admin_notice_success()
|
116 |
|
117 |
/**
|
118 |
-
* Output an error message
|
119 |
-
*
|
120 |
-
* @since 1.9.9
|
121 |
-
* @access public
|
122 |
*/
|
123 |
-
public function add_admin_notice_error( ){
|
124 |
|
125 |
echo '<div class="error"><p>';
|
126 |
-
echo $this->dashboard_error_msg;
|
127 |
echo '</p></div>';
|
128 |
|
129 |
} // add_admin_notice_error()
|
@@ -165,7 +194,7 @@ Class WCV_Vendor_Admin_Dashboard {
|
|
165 |
|
166 |
|
167 |
/**
|
168 |
-
* HTML setup for the Orders Page
|
169 |
*/
|
170 |
public static function orders_page()
|
171 |
{
|
@@ -177,7 +206,7 @@ Class WCV_Vendor_Admin_Dashboard {
|
|
177 |
<div class="wrap">
|
178 |
|
179 |
<div id="icon-woocommerce" class="icon32 icon32-woocommerce-reports"><br/></div>
|
180 |
-
<h2><?php _e( 'Orders', '
|
181 |
|
182 |
<form id="posts-filter" method="get">
|
183 |
|
@@ -196,10 +225,10 @@ Class WCV_Vendor_Admin_Dashboard {
|
|
196 |
if ( !class_exists( 'WP_List_Table' ) ) require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
197 |
|
198 |
/**
|
199 |
-
* WCV Vendor Order Page
|
200 |
-
*
|
201 |
* @author Jamie Madden <http://wcvendors.com / https://github.com/digitalchild>
|
202 |
-
* @package WCVendors
|
203 |
* @extends WP_List_Table
|
204 |
*/
|
205 |
class WCV_Vendor_Order_Page extends WP_List_Table
|
@@ -209,7 +238,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
209 |
|
210 |
/**
|
211 |
* can_view_comments
|
212 |
-
*
|
213 |
* @since 1.0.0
|
214 |
* @access public
|
215 |
* @var string $can_view_comments permission check for view comments
|
@@ -219,7 +248,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
219 |
|
220 |
/**
|
221 |
* can_add_comments
|
222 |
-
*
|
223 |
* @since 1.0.0
|
224 |
* @access public
|
225 |
* @var string $can_add_comments permission check for add comments
|
@@ -240,13 +269,13 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
240 |
|
241 |
//Set parent defaults
|
242 |
parent::__construct( array(
|
243 |
-
'singular' => __( 'order', '
|
244 |
-
'plural' => __( 'orders', '
|
245 |
'ajax' => false
|
246 |
) );
|
247 |
|
248 |
-
$this->can_view_comments =
|
249 |
-
$this->can_add_comments
|
250 |
}
|
251 |
|
252 |
|
@@ -267,19 +296,19 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
267 |
switch ( $column_name ) {
|
268 |
case 'order_id' :
|
269 |
return $item->order_id;
|
270 |
-
case 'customer' :
|
271 |
-
return $item->customer;
|
272 |
case 'products' :
|
273 |
-
return $item->products;
|
274 |
-
case 'total' :
|
275 |
-
return $item->total;
|
276 |
-
// case 'comments' :
|
277 |
-
// return $item->comments;
|
278 |
-
case 'date' :
|
279 |
-
return $item->date;
|
280 |
-
case 'status' :
|
281 |
return $item->status;
|
282 |
-
default:
|
283 |
return apply_filters( 'wcvendors_vendor_order_page_column_default', '', $item, $column_name );
|
284 |
}
|
285 |
}
|
@@ -316,13 +345,13 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
316 |
{
|
317 |
$columns = array(
|
318 |
'cb' => '<input type="checkbox" />',
|
319 |
-
'order_id' => __( 'Order ID', '
|
320 |
-
'customer' => __( 'Customer', '
|
321 |
-
'products' => __( 'Products', '
|
322 |
-
'total' => __( 'Total', '
|
323 |
-
// 'comments' => __( 'Comments to Customer', '
|
324 |
-
'date' => __( 'Date', '
|
325 |
-
'status' => __( 'Shipped', '
|
326 |
);
|
327 |
|
328 |
if ( !$this->can_view_comments ) unset( $columns['comments'] );
|
@@ -358,7 +387,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
358 |
function get_bulk_actions()
|
359 |
{
|
360 |
$actions = array(
|
361 |
-
'mark_shipped' => apply_filters( 'wcvendors_mark_shipped_label', __( 'Mark shipped', '
|
362 |
);
|
363 |
|
364 |
return $actions;
|
@@ -374,16 +403,17 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
374 |
{
|
375 |
if ( !isset( $_GET[ 'order_id' ] ) ) return;
|
376 |
|
377 |
-
if (is_array( $_GET[ 'order_id' ] ) ) {
|
378 |
|
379 |
$items = array_map( 'intval', $_GET[ 'order_id' ] );
|
|
|
380 |
switch ( $this->current_action() ) {
|
381 |
case 'mark_shipped':
|
382 |
|
383 |
$result = $this->mark_shipped( $items );
|
384 |
|
385 |
if ( $result )
|
386 |
-
echo '<div class="updated"><p>' . __( 'Orders marked shipped.', '
|
387 |
break;
|
388 |
|
389 |
default:
|
@@ -391,64 +421,69 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
391 |
break;
|
392 |
}
|
393 |
|
394 |
-
} else {
|
395 |
|
396 |
if ( !isset( $_GET[ 'action' ] ) ) return;
|
397 |
}
|
398 |
-
|
399 |
|
400 |
}
|
401 |
|
402 |
|
403 |
/**
|
404 |
-
* Mark orders as shipped
|
405 |
*
|
406 |
* @param unknown $ids (optional)
|
407 |
*
|
|
|
408 |
* @return unknown
|
409 |
*/
|
410 |
-
public function mark_shipped( $ids = array() )
|
411 |
-
{
|
412 |
-
global $woocommerce;
|
413 |
|
414 |
$user_id = get_current_user_id();
|
415 |
|
416 |
if ( !empty( $ids ) ) {
|
|
|
417 |
foreach ($ids as $order_id ) {
|
418 |
-
$order
|
419 |
-
$vendors
|
420 |
-
$vendor_ids
|
|
|
421 |
if ( !in_array( $user_id, $vendor_ids ) ) {
|
422 |
-
|
423 |
}
|
|
|
424 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
425 |
-
|
|
|
|
|
426 |
$shippers[] = $user_id;
|
427 |
-
|
428 |
if ( !empty( $mails ) ) {
|
429 |
-
|
430 |
}
|
431 |
-
do_action('wcvendors_vendor_ship', $order_id, $user_id);
|
432 |
}
|
|
|
433 |
update_post_meta( $order_id, 'wc_pv_shipped', $shippers );
|
434 |
}
|
435 |
-
return true;
|
436 |
}
|
437 |
-
return false;
|
438 |
}
|
439 |
|
440 |
|
441 |
|
442 |
/**
|
443 |
-
* Get Orders to display in admin
|
444 |
*
|
445 |
* @return $orders
|
446 |
*/
|
447 |
-
function get_orders() {
|
448 |
|
449 |
-
$user_id = get_current_user_id();
|
450 |
|
451 |
-
$orders = array();
|
452 |
|
453 |
$vendor_products = $this->get_vendor_products( $user_id );
|
454 |
|
@@ -460,15 +495,15 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
460 |
}
|
461 |
|
462 |
$_orders = $this->get_orders_for_vendor_products( $products );
|
463 |
-
|
464 |
-
$model_id = 0;
|
465 |
|
466 |
-
|
|
|
|
|
467 |
|
468 |
foreach ( $_orders as $order ) {
|
469 |
|
470 |
$order = wc_get_order( $order->order_id );
|
471 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
472 |
$valid_items = WCV_Queries::get_products_for_order( $order_id );
|
473 |
$valid = array();
|
474 |
|
@@ -480,25 +515,19 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
480 |
}
|
481 |
}
|
482 |
|
483 |
-
$products = '';
|
484 |
|
485 |
foreach ( $valid as $order_item_id => $item ) {
|
486 |
-
|
487 |
-
$wc_product = new WC_Product( $item['product_id'] );
|
488 |
|
489 |
-
$
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
} else {
|
494 |
-
$_item = $order->get_item( $order_item_id );
|
495 |
-
$meta_data = $_item->get_meta_data();
|
496 |
-
}
|
497 |
|
498 |
if ( !empty( $metadata ) ) {
|
499 |
|
500 |
$products .= '<table cellspacing="0" class="wcv_display_meta">';
|
501 |
-
|
502 |
foreach ( $metadata as $meta ) {
|
503 |
|
504 |
// Skip hidden core fields
|
@@ -511,9 +540,9 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
511 |
'_line_subtotal_tax',
|
512 |
'_line_total',
|
513 |
'_line_tax',
|
514 |
-
'_vendor_order_item_id',
|
515 |
-
'_vendor_commission',
|
516 |
-
|
517 |
) ) ) ) {
|
518 |
continue;
|
519 |
}
|
@@ -536,52 +565,50 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
536 |
}
|
537 |
$products .= '</table>';
|
538 |
}
|
539 |
-
|
540 |
}
|
541 |
|
542 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
543 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
544 |
-
$shipped = in_array($user_id, $shippers) ? __( 'Yes', '
|
545 |
-
|
546 |
-
$sum = WCV_Queries::sum_for_orders( array( $order_id ), array('vendor_id' =>get_current_user_id() ), false );
|
547 |
-
$sum = reset( $sum );
|
548 |
|
549 |
-
|
|
|
550 |
|
551 |
-
$total = $sum->line_total;
|
552 |
|
553 |
$comment_output = '';
|
554 |
|
555 |
-
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
556 |
|
557 |
-
// Make sure the correct address is shown based on the WooCommerce options
|
558 |
$customer = $order->get_formatted_billing_address();
|
559 |
if ( ( get_option( 'woocommerce_ship_to_billing_address_only' ) === 'no' ) && ( $order->get_formatted_shipping_address() ) ) {
|
560 |
$customer = $order->get_formatted_shipping_address();
|
561 |
-
}
|
562 |
|
563 |
-
$order_items = array();
|
564 |
$order_items[ 'order_id' ] = $order_id;
|
565 |
$order_items[ 'customer' ] = $customer;
|
566 |
-
$order_items[ 'products' ] = $products;
|
567 |
$order_items[ 'total' ] = wc_price( $total );
|
568 |
-
$order_items[ 'date' ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
569 |
$order_items[ 'status' ] = $shipped;
|
570 |
|
571 |
-
$orders[] = (object) $order_items;
|
572 |
|
573 |
$model_id++;
|
574 |
}
|
575 |
}
|
576 |
-
return $orders;
|
577 |
|
578 |
}
|
579 |
|
580 |
|
581 |
/**
|
582 |
-
* Get the vendor products sold
|
583 |
*
|
584 |
-
* @param $user_id - the user_id to get the products of
|
585 |
*
|
586 |
* @return unknown
|
587 |
*/
|
@@ -592,7 +619,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
592 |
$vendor_products = array();
|
593 |
$sql = '';
|
594 |
|
595 |
-
$sql .= "SELECT product_id FROM {$wpdb->prefix}pv_commission WHERE vendor_id = {$user_id} AND status != 'reversed' GROUP BY product_id";
|
596 |
|
597 |
$results = $wpdb->get_results( $sql );
|
598 |
|
@@ -601,7 +628,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
601 |
}
|
602 |
|
603 |
if ( !empty( $ids ) ) {
|
604 |
-
$vendor_products = get_posts(
|
605 |
array(
|
606 |
'numberposts' => -1,
|
607 |
'orderby' => 'post_date',
|
@@ -670,7 +697,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
670 |
function prepare_items()
|
671 |
{
|
672 |
|
673 |
-
|
674 |
/**
|
675 |
* Init column headers
|
676 |
*/
|
@@ -685,7 +712,7 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
685 |
/**
|
686 |
* Get items
|
687 |
*/
|
688 |
-
|
689 |
$this->items = $this->get_orders();
|
690 |
|
691 |
/**
|
@@ -694,4 +721,4 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
694 |
}
|
695 |
|
696 |
|
697 |
-
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* WC Vendor Admin Dashboard - Vendor WP-Admin Dashboard Pages
|
4 |
+
*
|
5 |
* @author Jamie Madden <http://wcvendors.com / https://github.com/digitalchild>
|
6 |
* @package WCVendors
|
7 |
*/
|
8 |
|
9 |
+
Class WCV_Vendor_Admin_Dashboard {
|
10 |
|
11 |
+
public $dashboard_error_msg;
|
12 |
|
13 |
+
function __construct(){
|
14 |
+
// Add Shop Settings page
|
15 |
+
add_action( 'admin_menu', array( $this, 'vendor_dashboard_pages') );
|
16 |
+
// Hook into init for form processing
|
17 |
add_action( 'admin_init', array( $this, 'save_shop_settings' ) );
|
18 |
+
add_action( 'admin_head', array( $this, 'admin_enqueue_order_style') );
|
19 |
}
|
20 |
|
21 |
function vendor_dashboard_pages(){
|
22 |
+
add_menu_page( __('Shop Settings', 'wc-vendors'), __('Shop Settings', 'wc-vendors'), 'manage_product', 'wcv-vendor-shopsettings', array( $this, 'settings_page' ) );
|
23 |
+
$hook = add_menu_page( __( 'Orders', 'wc-vendors' ), __( 'Orders', 'wc-vendors' ), 'manage_product', 'wcv-vendor-orders', array( 'WCV_Vendor_Admin_Dashboard', 'orders_page' ) );
|
24 |
add_action( "load-$hook", array( 'WCV_Vendor_Admin_Dashboard', 'add_options' ) );
|
25 |
}
|
26 |
+
|
27 |
+
function settings_page() {
|
28 |
+
$user_id = get_current_user_id();
|
29 |
+
$paypal_address = true;
|
30 |
+
$shop_description = true;
|
31 |
$description = get_user_meta( $user_id, 'pv_shop_description', true );
|
32 |
$seller_info = get_user_meta( $user_id, 'pv_seller_info', true );
|
33 |
$has_html = get_user_meta( $user_id, 'pv_shop_html_enabled', true );
|
34 |
$shop_page = WCV_Vendors::get_vendor_shop_page( wp_get_current_user()->user_login );
|
35 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
36 |
+
include('views/html-vendor-settings-page.php');
|
37 |
}
|
38 |
|
39 |
+
function admin_enqueue_order_style() {
|
40 |
+
|
41 |
+
$screen = get_current_screen();
|
42 |
|
43 |
+
if ( ! $screen ) return;
|
|
|
44 |
|
45 |
+
$screen_id = $screen->id;
|
46 |
+
|
47 |
+
if ( 'wcv-vendor-orders' === $screen_id ){
|
48 |
|
49 |
add_thickbox();
|
50 |
wp_enqueue_style( 'admin_order_styles', wcv_assets_url . 'css/admin-orders.css' );
|
51 |
+
}
|
52 |
}
|
53 |
|
54 |
+
/**
|
55 |
+
* Save shop settings
|
56 |
*/
|
57 |
public function save_shop_settings()
|
58 |
{
|
59 |
$user_id = get_current_user_id();
|
60 |
+
$error = false;
|
61 |
$error_msg = '';
|
62 |
|
63 |
+
if (isset ( $_POST[ 'wc-vendors-nonce' ] ) ) {
|
64 |
|
65 |
if ( !wp_verify_nonce( $_POST[ 'wc-vendors-nonce' ], 'save-shop-settings-admin' ) ) {
|
66 |
return false;
|
67 |
}
|
68 |
|
69 |
+
if ( isset( $_POST[ 'pv_paypal' ] ) && '' !== $_POST[ 'pv_paypal' ] ) {
|
70 |
+
if ( !is_email( $_POST[ 'pv_paypal' ] ) ) {
|
71 |
+
$error_msg .= __( 'Your PayPal address is not a valid email address.', 'wc-vendors' );
|
72 |
+
$error = true;
|
73 |
+
} else {
|
74 |
+
update_user_meta( $user_id, 'pv_paypal', $_POST[ 'pv_paypal' ] );
|
75 |
+
}
|
76 |
} else {
|
77 |
+
update_user_meta( $user_id, 'pv_paypal', $_POST[ 'pv_paypal' ] );
|
78 |
}
|
79 |
+
|
80 |
if ( !empty( $_POST[ 'pv_shop_name' ] ) ) {
|
81 |
$users = get_users( array( 'meta_key' => 'pv_shop_slug', 'meta_value' => sanitize_title( $_POST[ 'pv_shop_name' ] ) ) );
|
82 |
if ( !empty( $users ) && $users[ 0 ]->ID != $user_id ) {
|
83 |
+
$error_msg .= __( 'That shop name is already taken. Your shop name must be unique.', 'wc-vendors' );
|
84 |
+
$error = true;
|
85 |
} else {
|
86 |
update_user_meta( $user_id, 'pv_shop_name', $_POST[ 'pv_shop_name' ] );
|
87 |
update_user_meta( $user_id, 'pv_shop_slug', sanitize_title( $_POST[ 'pv_shop_name' ] ) );
|
96 |
update_user_meta( $user_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
97 |
}
|
98 |
|
99 |
+
// Bank details
|
100 |
+
if ( isset( $_POST[ 'wcv_bank_account_name' ] ) ){
|
101 |
+
update_user_meta( $user_id, 'wcv_bank_account_name', $_POST['wcv_bank_account_name'] );
|
102 |
+
}
|
103 |
+
if ( isset( $_POST[ 'wcv_bank_account_number' ] ) ){
|
104 |
+
update_user_meta( $user_id, 'wcv_bank_account_name', $_POST['wcv_bank_account_name'] );
|
105 |
+
}
|
106 |
+
if ( isset( $_POST[ 'wcv_bank_name' ] ) ){
|
107 |
+
update_user_meta( $user_id, 'wcv_bank_name', $_POST['wcv_bank_name'] );
|
108 |
+
}
|
109 |
+
if ( isset( $_POST[ 'wcv_bank_routing_number' ] ) ){
|
110 |
+
update_user_meta( $user_id, 'wcv_bank_routing_number', $_POST['wcv_bank_routing_number'] );
|
111 |
+
}
|
112 |
+
if ( isset( $_POST[ 'wcv_bank_iban' ] ) ){
|
113 |
+
update_user_meta( $user_id, 'wcv_bank_iban', $_POST['wcv_bank_iban'] );
|
114 |
+
}
|
115 |
+
if ( isset( $_POST[ 'wcv_bank_bic_swift' ] ) ){
|
116 |
+
update_user_meta( $user_id, 'wcv_bank_bic_swift', $_POST['wcv_bank_bic_swift'] );
|
117 |
+
}
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
do_action( 'wcvendors_shop_settings_admin_saved', $user_id );
|
122 |
|
123 |
if ( ! $error ) {
|
124 |
+
add_action( 'admin_notices', array( $this, 'add_admin_notice_success' ) );
|
125 |
+
} else {
|
126 |
+
$this->dashboard_error_msg = $error_msg;
|
127 |
+
add_action( 'admin_notices', array( $this, 'add_admin_notice_error' ) );
|
128 |
}
|
129 |
}
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
* Output a sucessful message after saving the shop settings
|
134 |
+
*
|
135 |
+
* @since 1.9.9
|
136 |
+
* @access public
|
137 |
*/
|
138 |
+
public function add_admin_notice_success( ){
|
139 |
|
140 |
echo '<div class="updated"><p>';
|
141 |
+
echo __( 'Settings saved.', 'wc-vendors' );
|
142 |
echo '</p></div>';
|
143 |
|
144 |
+
} // add_admin_notice_success()
|
145 |
|
146 |
/**
|
147 |
+
* Output an error message
|
148 |
+
*
|
149 |
+
* @since 1.9.9
|
150 |
+
* @access public
|
151 |
*/
|
152 |
+
public function add_admin_notice_error( ){
|
153 |
|
154 |
echo '<div class="error"><p>';
|
155 |
+
echo $this->dashboard_error_msg;
|
156 |
echo '</p></div>';
|
157 |
|
158 |
} // add_admin_notice_error()
|
194 |
|
195 |
|
196 |
/**
|
197 |
+
* HTML setup for the Orders Page
|
198 |
*/
|
199 |
public static function orders_page()
|
200 |
{
|
206 |
<div class="wrap">
|
207 |
|
208 |
<div id="icon-woocommerce" class="icon32 icon32-woocommerce-reports"><br/></div>
|
209 |
+
<h2><?php _e( 'Orders', 'wc-vendors' ); ?></h2>
|
210 |
|
211 |
<form id="posts-filter" method="get">
|
212 |
|
225 |
if ( !class_exists( 'WP_List_Table' ) ) require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
226 |
|
227 |
/**
|
228 |
+
* WCV Vendor Order Page
|
229 |
+
*
|
230 |
* @author Jamie Madden <http://wcvendors.com / https://github.com/digitalchild>
|
231 |
+
* @package WCVendors
|
232 |
* @extends WP_List_Table
|
233 |
*/
|
234 |
class WCV_Vendor_Order_Page extends WP_List_Table
|
238 |
|
239 |
/**
|
240 |
* can_view_comments
|
241 |
+
*
|
242 |
* @since 1.0.0
|
243 |
* @access public
|
244 |
* @var string $can_view_comments permission check for view comments
|
248 |
|
249 |
/**
|
250 |
* can_add_comments
|
251 |
+
*
|
252 |
* @since 1.0.0
|
253 |
* @access public
|
254 |
* @var string $can_add_comments permission check for add comments
|
269 |
|
270 |
//Set parent defaults
|
271 |
parent::__construct( array(
|
272 |
+
'singular' => __( 'order', 'wc-vendors' ),
|
273 |
+
'plural' => __( 'orders', 'wc-vendors' ),
|
274 |
'ajax' => false
|
275 |
) );
|
276 |
|
277 |
+
$this->can_view_comments = get_option( 'wcvendors_capability_order_read_notes' );
|
278 |
+
$this->can_add_comments = get_option( 'wcvendors_capability_order_update_notes' );
|
279 |
}
|
280 |
|
281 |
|
296 |
switch ( $column_name ) {
|
297 |
case 'order_id' :
|
298 |
return $item->order_id;
|
299 |
+
case 'customer' :
|
300 |
+
return $item->customer;
|
301 |
case 'products' :
|
302 |
+
return $item->products;
|
303 |
+
case 'total' :
|
304 |
+
return $item->total;
|
305 |
+
// case 'comments' :
|
306 |
+
// return $item->comments;
|
307 |
+
case 'date' :
|
308 |
+
return $item->date;
|
309 |
+
case 'status' :
|
310 |
return $item->status;
|
311 |
+
default:
|
312 |
return apply_filters( 'wcvendors_vendor_order_page_column_default', '', $item, $column_name );
|
313 |
}
|
314 |
}
|
345 |
{
|
346 |
$columns = array(
|
347 |
'cb' => '<input type="checkbox" />',
|
348 |
+
'order_id' => __( 'Order ID', 'wc-vendors' ),
|
349 |
+
'customer' => __( 'Customer', 'wc-vendors' ),
|
350 |
+
'products' => __( 'Products', 'wc-vendors' ),
|
351 |
+
'total' => __( 'Total', 'wc-vendors' ),
|
352 |
+
// 'comments' => __( 'Comments to Customer', 'wc-vendors' ),
|
353 |
+
'date' => __( 'Date', 'wc-vendors' ),
|
354 |
+
'status' => __( 'Shipped', 'wc-vendors' ),
|
355 |
);
|
356 |
|
357 |
if ( !$this->can_view_comments ) unset( $columns['comments'] );
|
387 |
function get_bulk_actions()
|
388 |
{
|
389 |
$actions = array(
|
390 |
+
'mark_shipped' => apply_filters( 'wcvendors_mark_shipped_label', __( 'Mark shipped', 'wc-vendors' ) ),
|
391 |
);
|
392 |
|
393 |
return $actions;
|
403 |
{
|
404 |
if ( !isset( $_GET[ 'order_id' ] ) ) return;
|
405 |
|
406 |
+
if (is_array( $_GET[ 'order_id' ] ) ) {
|
407 |
|
408 |
$items = array_map( 'intval', $_GET[ 'order_id' ] );
|
409 |
+
|
410 |
switch ( $this->current_action() ) {
|
411 |
case 'mark_shipped':
|
412 |
|
413 |
$result = $this->mark_shipped( $items );
|
414 |
|
415 |
if ( $result )
|
416 |
+
echo '<div class="updated"><p>' . __( 'Orders marked shipped.', 'wc-vendors' ) . '</p></div>';
|
417 |
break;
|
418 |
|
419 |
default:
|
421 |
break;
|
422 |
}
|
423 |
|
424 |
+
} else {
|
425 |
|
426 |
if ( !isset( $_GET[ 'action' ] ) ) return;
|
427 |
}
|
428 |
+
|
429 |
|
430 |
}
|
431 |
|
432 |
|
433 |
/**
|
434 |
+
* Mark orders as shipped
|
435 |
*
|
436 |
* @param unknown $ids (optional)
|
437 |
*
|
438 |
+
* @version 2.0.0
|
439 |
* @return unknown
|
440 |
*/
|
441 |
+
public function mark_shipped( $ids = array() ){
|
|
|
|
|
442 |
|
443 |
$user_id = get_current_user_id();
|
444 |
|
445 |
if ( !empty( $ids ) ) {
|
446 |
+
|
447 |
foreach ($ids as $order_id ) {
|
448 |
+
$order = wc_get_order( $order_id );
|
449 |
+
$vendors = WCV_Vendors::get_vendors_from_order( $order );
|
450 |
+
$vendor_ids = array_keys( $vendors );
|
451 |
+
|
452 |
if ( !in_array( $user_id, $vendor_ids ) ) {
|
453 |
+
return;
|
454 |
}
|
455 |
+
|
456 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
457 |
+
|
458 |
+
if( !in_array($user_id, $shippers ) ) {
|
459 |
+
|
460 |
$shippers[] = $user_id;
|
461 |
+
|
462 |
if ( !empty( $mails ) ) {
|
463 |
+
WC()->mailer()->emails[ 'WC_Email_Notify_Shipped' ]->trigger( $order_id, $user_id );
|
464 |
}
|
465 |
+
do_action( 'wcvendors_vendor_ship', $order_id, $user_id, $order );
|
466 |
}
|
467 |
+
|
468 |
update_post_meta( $order_id, 'wc_pv_shipped', $shippers );
|
469 |
}
|
470 |
+
return true;
|
471 |
}
|
472 |
+
return false;
|
473 |
}
|
474 |
|
475 |
|
476 |
|
477 |
/**
|
478 |
+
* Get Orders to display in admin
|
479 |
*
|
480 |
* @return $orders
|
481 |
*/
|
482 |
+
function get_orders() {
|
483 |
|
484 |
+
$user_id = get_current_user_id();
|
485 |
|
486 |
+
$orders = array();
|
487 |
|
488 |
$vendor_products = $this->get_vendor_products( $user_id );
|
489 |
|
495 |
}
|
496 |
|
497 |
$_orders = $this->get_orders_for_vendor_products( $products );
|
|
|
|
|
498 |
|
499 |
+
$model_id = 0;
|
500 |
+
|
501 |
+
if ( !empty( $_orders ) ) {
|
502 |
|
503 |
foreach ( $_orders as $order ) {
|
504 |
|
505 |
$order = wc_get_order( $order->order_id );
|
506 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
507 |
$valid_items = WCV_Queries::get_products_for_order( $order_id );
|
508 |
$valid = array();
|
509 |
|
515 |
}
|
516 |
}
|
517 |
|
518 |
+
$products = '';
|
519 |
|
520 |
foreach ( $valid as $order_item_id => $item ) {
|
|
|
|
|
521 |
|
522 |
+
$wc_product = new WC_Product( $item['product_id'] );
|
523 |
+
$products .= '<strong>'. $item['qty'] . ' x ' . $item['name'] . '</strong><br />';
|
524 |
+
$_item = $order->get_item( $order_item_id );
|
525 |
+
$meta_data = $_item->get_meta_data();
|
|
|
|
|
|
|
|
|
526 |
|
527 |
if ( !empty( $metadata ) ) {
|
528 |
|
529 |
$products .= '<table cellspacing="0" class="wcv_display_meta">';
|
530 |
+
|
531 |
foreach ( $metadata as $meta ) {
|
532 |
|
533 |
// Skip hidden core fields
|
540 |
'_line_subtotal_tax',
|
541 |
'_line_total',
|
542 |
'_line_tax',
|
543 |
+
'_vendor_order_item_id',
|
544 |
+
'_vendor_commission',
|
545 |
+
get_option( 'wcvendors_label_sold_by' ),
|
546 |
) ) ) ) {
|
547 |
continue;
|
548 |
}
|
565 |
}
|
566 |
$products .= '</table>';
|
567 |
}
|
568 |
+
|
569 |
}
|
570 |
|
571 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
572 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
573 |
+
$shipped = in_array($user_id, $shippers) ? __( 'Yes', 'wc-vendors' ) : __( 'No', 'wc-vendors' ) ;
|
|
|
|
|
|
|
574 |
|
575 |
+
$sum = WCV_Queries::sum_for_orders( array( $order_id ), array('vendor_id' =>get_current_user_id() ), false );
|
576 |
+
$sum = reset( $sum );
|
577 |
|
578 |
+
$total = $sum->line_total;
|
579 |
|
580 |
$comment_output = '';
|
581 |
|
582 |
+
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
583 |
|
584 |
+
// Make sure the correct address is shown based on the WooCommerce options
|
585 |
$customer = $order->get_formatted_billing_address();
|
586 |
if ( ( get_option( 'woocommerce_ship_to_billing_address_only' ) === 'no' ) && ( $order->get_formatted_shipping_address() ) ) {
|
587 |
$customer = $order->get_formatted_shipping_address();
|
588 |
+
}
|
589 |
|
590 |
+
$order_items = array();
|
591 |
$order_items[ 'order_id' ] = $order_id;
|
592 |
$order_items[ 'customer' ] = $customer;
|
593 |
+
$order_items[ 'products' ] = $products;
|
594 |
$order_items[ 'total' ] = wc_price( $total );
|
595 |
+
$order_items[ 'date' ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
596 |
$order_items[ 'status' ] = $shipped;
|
597 |
|
598 |
+
$orders[] = (object) $order_items;
|
599 |
|
600 |
$model_id++;
|
601 |
}
|
602 |
}
|
603 |
+
return $orders;
|
604 |
|
605 |
}
|
606 |
|
607 |
|
608 |
/**
|
609 |
+
* Get the vendor products sold
|
610 |
*
|
611 |
+
* @param $user_id - the user_id to get the products of
|
612 |
*
|
613 |
* @return unknown
|
614 |
*/
|
619 |
$vendor_products = array();
|
620 |
$sql = '';
|
621 |
|
622 |
+
$sql .= "SELECT product_id FROM {$wpdb->prefix}pv_commission WHERE vendor_id = {$user_id} AND status != 'reversed' GROUP BY product_id";
|
623 |
|
624 |
$results = $wpdb->get_results( $sql );
|
625 |
|
628 |
}
|
629 |
|
630 |
if ( !empty( $ids ) ) {
|
631 |
+
$vendor_products = get_posts(
|
632 |
array(
|
633 |
'numberposts' => -1,
|
634 |
'orderby' => 'post_date',
|
697 |
function prepare_items()
|
698 |
{
|
699 |
|
700 |
+
|
701 |
/**
|
702 |
* Init column headers
|
703 |
*/
|
712 |
/**
|
713 |
* Get items
|
714 |
*/
|
715 |
+
|
716 |
$this->items = $this->get_orders();
|
717 |
|
718 |
/**
|
721 |
}
|
722 |
|
723 |
|
724 |
+
}
|
classes/admin/class-vendor-applicants.php
CHANGED
@@ -23,7 +23,7 @@ class WCV_Vendor_Applicants
|
|
23 |
function user_row_actions( $actions, $user_object )
|
24 |
{
|
25 |
|
26 |
-
if ( in_array( 'pending_vendor', $user_object->roles ) ){
|
27 |
$actions[ 'approve_vendor' ] = "<a href='?role=pending_vendor&action=approve_vendor&user_id=" . $user_object->ID . "'>" . __( 'Approve', 'cgc_ub' ) . "</a>";
|
28 |
$actions[ 'deny_vendor' ] = "<a href='?role=pending_vendor&action=deny_vendor&user_id=" . $user_object->ID . "'>" . __( 'Deny', 'cgc_ub' ) . "</a>";
|
29 |
}
|
@@ -33,7 +33,7 @@ class WCV_Vendor_Applicants
|
|
33 |
|
34 |
|
35 |
/**
|
36 |
-
*
|
37 |
*/
|
38 |
public function user_row_actions_commit()
|
39 |
{
|
@@ -45,13 +45,13 @@ class WCV_Vendor_Applicants
|
|
45 |
case 'approve_vendor':
|
46 |
$role = 'vendor';
|
47 |
add_action( 'admin_notices', array( $this, 'approved' ) );
|
48 |
-
do_action( 'wcvendors_approve_vendor', $wp_user_object );
|
49 |
break;
|
50 |
|
51 |
case 'deny_vendor':
|
52 |
$role = apply_filters( 'wcvendors_denied_vendor_role', 'subscriber' );
|
53 |
add_action( 'admin_notices', array( $this, 'denied' ) );
|
54 |
-
do_action( 'wcvendors_deny_vendor', $wp_user_object );
|
55 |
break;
|
56 |
|
57 |
default:
|
@@ -71,7 +71,7 @@ class WCV_Vendor_Applicants
|
|
71 |
public function denied()
|
72 |
{
|
73 |
echo '<div class="updated">';
|
74 |
-
echo '<p>' . __( 'Vendor has been <b>denied</b>.', '
|
75 |
echo '</div>';
|
76 |
}
|
77 |
|
@@ -82,7 +82,7 @@ class WCV_Vendor_Applicants
|
|
82 |
public function approved()
|
83 |
{
|
84 |
echo '<div class="updated">';
|
85 |
-
echo '<p>' . __( 'Vendor has been <b>approved</b>.', '
|
86 |
echo '</div>';
|
87 |
}
|
88 |
|
@@ -96,7 +96,7 @@ class WCV_Vendor_Applicants
|
|
96 |
*/
|
97 |
public function show_pending_vendors_link( $values )
|
98 |
{
|
99 |
-
$values[ 'pending_vendors' ] = '<a href="?role=asd">' . __( 'Pending Vendors', '
|
100 |
|
101 |
return $values;
|
102 |
}
|
23 |
function user_row_actions( $actions, $user_object )
|
24 |
{
|
25 |
|
26 |
+
if ( in_array( 'pending_vendor', $user_object->roles ) ){
|
27 |
$actions[ 'approve_vendor' ] = "<a href='?role=pending_vendor&action=approve_vendor&user_id=" . $user_object->ID . "'>" . __( 'Approve', 'cgc_ub' ) . "</a>";
|
28 |
$actions[ 'deny_vendor' ] = "<a href='?role=pending_vendor&action=deny_vendor&user_id=" . $user_object->ID . "'>" . __( 'Deny', 'cgc_ub' ) . "</a>";
|
29 |
}
|
33 |
|
34 |
|
35 |
/**
|
36 |
+
*
|
37 |
*/
|
38 |
public function user_row_actions_commit()
|
39 |
{
|
45 |
case 'approve_vendor':
|
46 |
$role = 'vendor';
|
47 |
add_action( 'admin_notices', array( $this, 'approved' ) );
|
48 |
+
do_action( 'wcvendors_approve_vendor', $wp_user_object );
|
49 |
break;
|
50 |
|
51 |
case 'deny_vendor':
|
52 |
$role = apply_filters( 'wcvendors_denied_vendor_role', 'subscriber' );
|
53 |
add_action( 'admin_notices', array( $this, 'denied' ) );
|
54 |
+
do_action( 'wcvendors_deny_vendor', $wp_user_object );
|
55 |
break;
|
56 |
|
57 |
default:
|
71 |
public function denied()
|
72 |
{
|
73 |
echo '<div class="updated">';
|
74 |
+
echo '<p>' . __( 'Vendor has been <b>denied</b>.', 'wc-vendors' ) . '</p>';
|
75 |
echo '</div>';
|
76 |
}
|
77 |
|
82 |
public function approved()
|
83 |
{
|
84 |
echo '<div class="updated">';
|
85 |
+
echo '<p>' . __( 'Vendor has been <b>approved</b>.', 'wc-vendors' ) . '</p>';
|
86 |
echo '</div>';
|
87 |
}
|
88 |
|
96 |
*/
|
97 |
public function show_pending_vendors_link( $values )
|
98 |
{
|
99 |
+
$values[ 'pending_vendors' ] = '<a href="?role=asd">' . __( 'Pending Vendors', 'wc-vendors' ) . ' <span class="count">(3)</span></a>';
|
100 |
|
101 |
return $values;
|
102 |
}
|
classes/admin/class-wcv-admin-extensions.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WC Vendors Extensions Page
|
4 |
+
*
|
5 |
+
* @author WooThemes
|
6 |
+
* @category Admin
|
7 |
+
* @package WooCommerce/Admin
|
8 |
+
* @version 2.5.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WC_Admin_Addons Class.
|
17 |
+
*/
|
18 |
+
class WCVendors_Admin_Extensions {
|
19 |
+
|
20 |
+
public static function output(){
|
21 |
+
|
22 |
+
include_once dirname( __FILE__ ) . '/views/html-admin-page-extensions.php';
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
classes/admin/class-wcv-admin-help.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Add some content to the help tab
|
4 |
+
*
|
5 |
+
* @package WC Vendors/Admin
|
6 |
+
* @version 2.0.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( class_exists( 'WCVendors_Admin_Help', false ) ) {
|
14 |
+
return new WCVendors_Admin_Help();
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WCVendors_Admin_Help Class.
|
19 |
+
*/
|
20 |
+
class WCVendors_Admin_Help {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Hook in tabs.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
add_action( 'current_screen', array( $this, 'add_tabs' ), 60 );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Add help tabs.
|
31 |
+
*/
|
32 |
+
public function add_tabs() {
|
33 |
+
|
34 |
+
$screen = get_current_screen();
|
35 |
+
|
36 |
+
if ( ! $screen || ! in_array( $screen->id, wcv_get_screen_ids() ) ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
// Rquired to unhook woocommerce tabs on these pages due to adding wc vendors pages into the wc_get_screen_ids to load woocommerce assets
|
41 |
+
$screen->remove_help_tab( 'woocommerce_support_tab' );
|
42 |
+
$screen->remove_help_tab( 'woocommerce_bugs_tab' );
|
43 |
+
$screen->remove_help_tab( 'woocommerce_education_tab' );
|
44 |
+
$screen->remove_help_tab( 'woocommerce_onboard_tab' );
|
45 |
+
|
46 |
+
$screen->add_help_tab( array(
|
47 |
+
'id' => 'wcv_support_tab',
|
48 |
+
'title' => __( 'Help & Support', 'wc-vendors' ),
|
49 |
+
'content' =>
|
50 |
+
'<h2>' . __( 'Welcome to WC Vendors Help & Support', 'wc-vendors' ) . '</h2>' .
|
51 |
+
'<p>' . sprintf(
|
52 |
+
/* translators: %s: Documentation URL */
|
53 |
+
__( 'Should you need any help with using or extending WC Vendors, <a href="%s">please read our documentation</a>. You will find all kinds of resources including code snippets, guides and much more.', 'wc-vendors' ),
|
54 |
+
'https://docs.wcvendors.com/?utm_source=plugin&utm_medium=help&utm_campaign=settings'
|
55 |
+
) . '</p>' .
|
56 |
+
'<p>' . sprintf(
|
57 |
+
/* translators: %s: Forum URL */
|
58 |
+
__( 'Do you have a question about WC Vendors? For assistance please see our <a href="%1$s">community forum</a>. If you need help with premium extensions sold by WC Vendors, please <a href="%2$s">submit a ticket</a>.', 'wc-vendors' ),
|
59 |
+
'https://wordpress.org/support/plugin/wc-vendors',
|
60 |
+
'https://www.wcvendors.com/submit-ticket/?utm_source=plugin&utm_medium=help&utm_campaign=pluginsettings'
|
61 |
+
) . '</p>' .
|
62 |
+
'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration. <strong>Anything showing red should be fixed before contacting us.</strong>', 'wc-vendors' ) . '</p>' .
|
63 |
+
'<p>' . sprintf( __( 'Please follow our <a href="%s">debuggin guide</a> to ensure that you have narrowed down the issue. ', 'wc-vendors' ), 'https://docs.wcvendors.com/knowledge-base/the-debugging-guide/?utm_source=plugin&utm_medium=help&utm_campaign=settings' ) .
|
64 |
+
'<p><a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button button-primary">' . __( 'System status', 'wc-vendors' ) . '</a> <a href="https://wordpress.org/support/plugin/wc-vendors" class="button">' . __( 'Community forum', 'wc-vendors' ) . '</a> <a href="https://www.wcvendors.com/submit-ticket/?utm_source=plugin&utm_medium=help&utm_campaign=pluginsettings" class="button">' . __( 'WC Vendors Premium Support', 'wc-vendors' ) . '</a></p>',
|
65 |
+
) );
|
66 |
+
|
67 |
+
$screen->add_help_tab( array(
|
68 |
+
'id' => 'wcvendors_getting_started_tab',
|
69 |
+
'title' => __( 'Getting Started', 'wc-vendors' ),
|
70 |
+
'content' =>
|
71 |
+
'<h2>' . __( 'Getting Started', 'wc-vendors' ) . '</h2>' .
|
72 |
+
'<p>' . sprintf( __( 'If you are new to WC Vendors then we highly recommend that you go through our <a href="%s">getting started guides</a>.', 'wc-vendors' ), 'https://docs.wcvendors.com/article-categories/getting-started/' ). '</p>'
|
73 |
+
) );
|
74 |
+
|
75 |
+
$screen->add_help_tab( array(
|
76 |
+
'id' => 'wcvendors_bugs_tab',
|
77 |
+
'title' => __( 'Found a bug?', 'wc-vendors' ),
|
78 |
+
'content' =>
|
79 |
+
'<h2>' . __( 'Found a bug?', 'wc-vendors' ) . '</h2>' .
|
80 |
+
/* translators: 1: GitHub issues URL 2: System status report URL */
|
81 |
+
'<p>' . sprintf( __( 'If you think you have found a bug in WC Vendors you can create a ticket via <a href="%1$s">Github issues</a>. To help us solve your issue, please be as descriptive as possible and include your <a href="%2$s">system status report</a>.', 'wc-vendors' ), 'https://github.com/wcvendors/wcvendors/issues?state=open', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .
|
82 |
+
'<p><a href="https://github.com/wcvendors/wcvendors/issues?state=open" class="button button-primary">' . __( 'Report a bug', 'wc-vendors' ) . '</a> <a href="' . admin_url( 'admin.php?page=wc-status' ) . '" class="button">' . __( 'System status', 'wc-vendors' ) . '</a></p>',
|
83 |
+
|
84 |
+
) );
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
$screen->add_help_tab( array(
|
89 |
+
'id' => 'wcvendors_onboard_tab',
|
90 |
+
'title' => __( 'Setup wizard', 'wc-vendors' ),
|
91 |
+
'content' =>
|
92 |
+
'<h2>' . __( 'Setup wizard', 'wc-vendors' ) . '</h2>' .
|
93 |
+
'<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'wc-vendors' ) . '</p>' .
|
94 |
+
'<p><a href="' . admin_url( 'index.php?page=wcv-setup' ) . '" class="button button-primary">' . __( 'Setup wizard', 'wc-vendors' ) . '</a></p>',
|
95 |
+
|
96 |
+
) );
|
97 |
+
|
98 |
+
$screen->add_help_tab( array(
|
99 |
+
'id' => 'wcvendors_upgrade_tab',
|
100 |
+
'title' => __( 'Update', 'wc-vendors' ),
|
101 |
+
'content' =>
|
102 |
+
'<h2>' . __( 'Upgrade', 'wc-vendors' ) . '</h2>' .
|
103 |
+
'<p>' . __( 'If you need to manually run the updates, please click on the button below.', 'wc-vendors' ) . '</p>' .
|
104 |
+
'<p><a href="' . esc_url( add_query_arg( 'do_update_wcvendors', 'true', admin_url( 'admin.php?page=wcv-settings' ) ) ). '" class="button button-primary">' . __( 'Run the updater', 'wc-vendors' ) . '</a></p>',
|
105 |
+
|
106 |
+
) );
|
107 |
+
|
108 |
+
$screen->set_help_sidebar(
|
109 |
+
'<p><strong>' . __( 'For more information:', 'wc-vendors' ) . '</strong></p>' .
|
110 |
+
'<p><a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_medium=help&utm_campaign=settings" target="_blank">' . __( 'Upgrade to Pro', 'wc-vendors' ) . '</a></p>' .
|
111 |
+
'<p><a href="https://www.wcvendors.com/extensions/?utm_source=plugin&utm_medium=help&utm_campaign=settings" target="_blank">' . __( 'Buy extensions', 'wc-vendors' ) . '</a></p>' .
|
112 |
+
'<p><a href="https://woocommerce.com/?utm_source=helptab&utm_medium=product&utm_content=about&utm_campaign=woocommerceplugin" target="_blank">' . __( 'About WC Vendors', 'wc-vendors' ) . '</a></p>' .
|
113 |
+
'<p><a href="https://wordpress.org/plugins/wc-vendors/" target="_blank">' . __( 'WC Vendors on WordPress.org', 'wc-vendors' ) . '</a></p>' .
|
114 |
+
'<p><a href="https://github.com/wcvendors/wcvendors" target="_blank">' . __( 'WC Vendors Github', 'wc-vendors' ) . '</a></p>'
|
115 |
+
|
116 |
+
);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
return new WCVendors_Admin_Help();
|
classes/admin/class-wcv-admin-notices.php
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Display notices in admin
|
4 |
+
*
|
5 |
+
* @author Jamie Madden, WC Vendors
|
6 |
+
* @category Admin
|
7 |
+
* @package WCVendors/Admin
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WC_Admin_Notices Class.
|
17 |
+
*/
|
18 |
+
class WCVendors_Admin_Notices {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Stores notices.
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
private static $notices = array();
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Array of notices - name => callback.
|
28 |
+
* @var array
|
29 |
+
*/
|
30 |
+
private static $core_notices = array(
|
31 |
+
'install' => 'install_notice',
|
32 |
+
'update' => 'update_notice',
|
33 |
+
'template_files' => 'template_file_check_notice',
|
34 |
+
'theme_support' => 'theme_check_notice',
|
35 |
+
);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Constructor.
|
39 |
+
*/
|
40 |
+
public static function init() {
|
41 |
+
self::$notices = get_option( 'wcvendors_admin_notices', array() );
|
42 |
+
|
43 |
+
add_action( 'switch_theme', array( __CLASS__, 'reset_admin_notices' ) );
|
44 |
+
add_action( 'wcvendors_installed', array( __CLASS__, 'reset_admin_notices' ) );
|
45 |
+
add_action( 'wp_loaded', array( __CLASS__, 'hide_notices' ) );
|
46 |
+
add_action( 'shutdown', array( __CLASS__, 'store_notices' ) );
|
47 |
+
|
48 |
+
if ( current_user_can( 'manage_woocommerce' ) ) {
|
49 |
+
add_action( 'admin_print_styles', array( __CLASS__, 'add_notices' ) );
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Store notices to DB
|
55 |
+
*/
|
56 |
+
public static function store_notices() {
|
57 |
+
update_option( 'wcvendors_admin_notices', self::get_notices() );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get notices
|
62 |
+
* @return array
|
63 |
+
*/
|
64 |
+
public static function get_notices() {
|
65 |
+
return self::$notices;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Remove all notices.
|
70 |
+
*/
|
71 |
+
public static function remove_all_notices() {
|
72 |
+
self::$notices = array();
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Reset notices for themes when switched or a new version of WC is installed.
|
77 |
+
*/
|
78 |
+
public static function reset_admin_notices() {
|
79 |
+
self::add_notice( 'template_files' );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Show a notice.
|
84 |
+
* @param string $name
|
85 |
+
*/
|
86 |
+
public static function add_notice( $name ) {
|
87 |
+
self::$notices = array_unique( array_merge( self::get_notices(), array( $name ) ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Remove a notice from being displayed.
|
92 |
+
* @param string $name
|
93 |
+
*/
|
94 |
+
public static function remove_notice( $name ) {
|
95 |
+
self::$notices = array_diff( self::get_notices(), array( $name ) );
|
96 |
+
delete_option( 'wcvendors_admin_notice_' . $name );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* See if a notice is being shown.
|
101 |
+
* @param string $name
|
102 |
+
* @return boolean
|
103 |
+
*/
|
104 |
+
public static function has_notice( $name ) {
|
105 |
+
return in_array( $name, self::get_notices() );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Hide a notice if the GET variable is set.
|
110 |
+
*/
|
111 |
+
public static function hide_notices() {
|
112 |
+
if ( isset( $_GET['wcv-hide-notice'] ) && isset( $_GET['_wcv_notice_nonce'] ) ) {
|
113 |
+
if ( ! wp_verify_nonce( $_GET['_wcv_notice_nonce'], 'wcvendors_hide_notices_nonce' ) ) {
|
114 |
+
wp_die( __( 'Action failed. Please refresh the page and retry.', 'wcvendors' ) );
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
118 |
+
wp_die( __( 'Cheatin’ huh?', 'wcvendors' ) );
|
119 |
+
}
|
120 |
+
|
121 |
+
$hide_notice = sanitize_text_field( $_GET['wcv-hide-notice'] );
|
122 |
+
self::remove_notice( $hide_notice );
|
123 |
+
do_action( 'wcvendors_hide_' . $hide_notice . '_notice' );
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Add notices + styles if needed.
|
129 |
+
*/
|
130 |
+
public static function add_notices() {
|
131 |
+
$notices = self::get_notices();
|
132 |
+
|
133 |
+
if ( ! empty( $notices ) ) {
|
134 |
+
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
135 |
+
wp_enqueue_style( 'wcv-setup', wcv_assets_url . 'css/wcv-activation' . $suffix .'.css', WCV_VERSION );
|
136 |
+
foreach ( $notices as $notice ) {
|
137 |
+
if ( ! empty( self::$core_notices[ $notice ] ) && apply_filters( 'wcvendors_show_admin_notice', true, $notice ) ) {
|
138 |
+
add_action( 'admin_notices', array( __CLASS__, self::$core_notices[ $notice ] ) );
|
139 |
+
} else {
|
140 |
+
add_action( 'admin_notices', array( __CLASS__, 'output_custom_notices' ) );
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Add a custom notice.
|
148 |
+
* @param string $name
|
149 |
+
* @param string $notice_html
|
150 |
+
*/
|
151 |
+
public static function add_custom_notice( $name, $notice_html ) {
|
152 |
+
self::add_notice( $name );
|
153 |
+
update_option( 'wcvendors_admin_notice_' . $name, wp_kses_post( $notice_html ) );
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Output any stored custom notices.
|
158 |
+
*/
|
159 |
+
public static function output_custom_notices() {
|
160 |
+
$notices = self::get_notices();
|
161 |
+
|
162 |
+
if ( ! empty( $notices ) ) {
|
163 |
+
foreach ( $notices as $notice ) {
|
164 |
+
if ( empty( self::$core_notices[ $notice ] ) ) {
|
165 |
+
$notice_html = get_option( 'wcvendors_admin_notice_' . $notice );
|
166 |
+
|
167 |
+
if ( $notice_html ) {
|
168 |
+
include( 'views/notices/html-notice-custom.php' );
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* If we need to update, include a message with the update button.
|
177 |
+
*/
|
178 |
+
public static function update_notice() {
|
179 |
+
if ( version_compare( get_option( 'wcvendors_db_version' ), WCV_VERSION, '<' ) ) {
|
180 |
+
$updater = new WC_Background_Updater();
|
181 |
+
if ( $updater->is_updating() || ! empty( $_GET['do_update_wcvendors'] ) ) {
|
182 |
+
include( 'views/notices/html-notice-updating.php' );
|
183 |
+
} else {
|
184 |
+
include( 'views/notices/html-notice-update.php' );
|
185 |
+
}
|
186 |
+
} else {
|
187 |
+
include( 'views/notices/html-notice-updated.php' );
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* If we have just installed, show a message with the install pages button.
|
193 |
+
*/
|
194 |
+
public static function install_notice() {
|
195 |
+
include( 'views/notices/html-notice-install.php' );
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Show the Theme Check notice.
|
200 |
+
*/
|
201 |
+
public static function theme_check_notice() {
|
202 |
+
if ( ! current_theme_supports( 'wcvendors' ) && ! in_array( get_option( 'template' ), wc_get_core_supported_themes() ) ) {
|
203 |
+
include( 'views/notices/html-notice-theme-support.php' );
|
204 |
+
} else {
|
205 |
+
self::remove_notice( 'theme_support' );
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Show a notice highlighting bad template files.
|
211 |
+
*/
|
212 |
+
public static function template_file_check_notice() {
|
213 |
+
|
214 |
+
$core_templates = WC_Admin_Status::scan_template_files( wcv_plugin_dir_path . '/templates' );
|
215 |
+
$outdated = false;
|
216 |
+
|
217 |
+
foreach ( $core_templates as $file ) {
|
218 |
+
|
219 |
+
$theme_file = false;
|
220 |
+
if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
|
221 |
+
$theme_file = get_stylesheet_directory() . '/' . $file;
|
222 |
+
} elseif ( file_exists( get_stylesheet_directory() . '/wc-vendors/' . $file ) ) {
|
223 |
+
$theme_file = get_stylesheet_directory() . '/wc-vendors/' . $file;
|
224 |
+
} elseif ( file_exists( get_template_directory() . '/' . $file ) ) {
|
225 |
+
$theme_file = get_template_directory() . '/' . $file;
|
226 |
+
} elseif ( file_exists( get_template_directory() . '/wc-vendors/' . $file ) ) {
|
227 |
+
$theme_file = get_template_directory() . '/wc-vendors/' . $file;
|
228 |
+
}
|
229 |
+
|
230 |
+
if ( false !== $theme_file ) {
|
231 |
+
$core_version = WC_Admin_Status::get_file_version( wcv_plugin_dir_path . '/templates/' . $file );
|
232 |
+
$theme_version = WC_Admin_Status::get_file_version( $theme_file );
|
233 |
+
|
234 |
+
if ( $core_version && $theme_version && version_compare( $theme_version, $core_version, '<' ) ) {
|
235 |
+
$outdated = true;
|
236 |
+
break;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
if ( $outdated ) {
|
242 |
+
include( 'views/notices/html-notice-template-check.php' );
|
243 |
+
} else {
|
244 |
+
self::remove_notice( 'template_files' );
|
245 |
+
}
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
WCVendors_Admin_Notices::init();
|
classes/admin/class-wcv-admin-settings.php
ADDED
@@ -0,0 +1,668 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The admin settings class handles all settings in the admin area. This is a modified version of the WooCommerce Admin Settings class
|
8 |
+
*
|
9 |
+
* @author WooCommerce, Jamie Madden, WC Vendors
|
10 |
+
* @category Admin
|
11 |
+
* @package WCVendors/Admin
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
class WCVendors_Admin_Settings extends WC_Admin_Settings {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Setting pages.
|
19 |
+
*
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
private static $settings = array();
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Error messages.
|
26 |
+
*
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
private static $errors = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Update messages.
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
private static $messages = array();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Include the settings page classes.
|
40 |
+
*/
|
41 |
+
public static function get_settings_pages() {
|
42 |
+
|
43 |
+
if ( empty( self::$settings ) ) {
|
44 |
+
$settings = array();
|
45 |
+
|
46 |
+
// Include the setings page.
|
47 |
+
include_once( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-page.php' );
|
48 |
+
|
49 |
+
$settings[] = include( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-general.php' );
|
50 |
+
$settings[] = include( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-commission.php' );
|
51 |
+
$settings[] = include( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-capabilities.php' );
|
52 |
+
$settings[] = include( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-display.php' );
|
53 |
+
$settings[] = include( WCV_ABSPATH_ADMIN . 'settings/class-wcv-settings-payments.php' );
|
54 |
+
|
55 |
+
self::$settings = apply_filters( 'wcvendors_get_settings_pages', $settings );
|
56 |
+
}
|
57 |
+
|
58 |
+
return self::$settings;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Save the settings.
|
63 |
+
*/
|
64 |
+
public static function save() {
|
65 |
+
global $current_tab;
|
66 |
+
|
67 |
+
if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'wcvendors-settings' ) ) {
|
68 |
+
die( __( 'Action failed. Please refresh the page and retry.', 'wc-vendors' ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
// Trigger actions
|
72 |
+
do_action( 'wcvendors_settings_save_' . $current_tab );
|
73 |
+
do_action( 'wcvendors_update_options_' . $current_tab );
|
74 |
+
do_action( 'wcvendors_update_options' );
|
75 |
+
|
76 |
+
self::add_message( __( 'Your settings have been saved.', 'wc-vendors' ) );
|
77 |
+
|
78 |
+
update_option( 'wcvendors_queue_flush_rewrite_rules', 'yes' );
|
79 |
+
do_action( 'wcvendors_settings_saved' );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Settings page.
|
84 |
+
*
|
85 |
+
* Handles the display of the main woocommerce settings page in admin.
|
86 |
+
*/
|
87 |
+
public static function output() {
|
88 |
+
global $current_section, $current_tab;
|
89 |
+
|
90 |
+
// $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
91 |
+
$suffix = '';
|
92 |
+
|
93 |
+
do_action( 'wcvendors_settings_start' );
|
94 |
+
wp_enqueue_script( 'wcvendors_settings', wcv_assets_url . '/js/admin/settings' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'selectWoo' ), WCV_VERSION, true );
|
95 |
+
wp_localize_script( 'wcvendors_settings', 'wcvendors_settings_params', array(
|
96 |
+
'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'wc-vendors' ),
|
97 |
+
) );
|
98 |
+
|
99 |
+
// Get tabs for the settings page
|
100 |
+
$tabs = apply_filters( 'wcvendors_settings_tabs_array', array() );
|
101 |
+
|
102 |
+
include( WCV_ABSPATH_ADMIN . 'views/html-admin-settings.php' );
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Output admin fields.
|
107 |
+
*
|
108 |
+
* Loops though the wcvendors options array and outputs each field.
|
109 |
+
*
|
110 |
+
* @param array[] $options Opens array to output
|
111 |
+
*/
|
112 |
+
public static function output_fields( $options ) {
|
113 |
+
|
114 |
+
foreach ( $options as $value ) {
|
115 |
+
if ( ! isset( $value['type'] ) ) {
|
116 |
+
continue;
|
117 |
+
}
|
118 |
+
if ( ! isset( $value['id'] ) ) {
|
119 |
+
$value['id'] = '';
|
120 |
+
}
|
121 |
+
if ( ! isset( $value['title'] ) ) {
|
122 |
+
$value['title'] = isset( $value['name'] ) ? $value['name'] : '';
|
123 |
+
}
|
124 |
+
if ( ! isset( $value['class'] ) ) {
|
125 |
+
$value['class'] = '';
|
126 |
+
}
|
127 |
+
if ( ! isset( $value['css'] ) ) {
|
128 |
+
$value['css'] = '';
|
129 |
+
}
|
130 |
+
if ( ! isset( $value['default'] ) ) {
|
131 |
+
$value['default'] = '';
|
132 |
+
}
|
133 |
+
if ( ! isset( $value['desc'] ) ) {
|
134 |
+
$value['desc'] = '';
|
135 |
+
}
|
136 |
+
if ( ! isset( $value['desc_tip'] ) ) {
|
137 |
+
$value['desc_tip'] = false;
|
138 |
+
}
|
139 |
+
if ( ! isset( $value['placeholder'] ) ) {
|
140 |
+
$value['placeholder'] = '';
|
141 |
+
}
|
142 |
+
if ( ! isset( $value['suffix'] ) ) {
|
143 |
+
$value['suffix'] = '';
|
144 |
+
}
|
145 |
+
|
146 |
+
// Custom attribute handling
|
147 |
+
$custom_attributes = array();
|
148 |
+
|
149 |
+
if ( ! empty( $value['custom_attributes'] ) && is_array( $value['custom_attributes'] ) ) {
|
150 |
+
foreach ( $value['custom_attributes'] as $attribute => $attribute_value ) {
|
151 |
+
$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
// Description handling
|
156 |
+
$field_description = self::get_field_description( $value );
|
157 |
+
extract( $field_description );
|
158 |
+
|
159 |
+
// Switch based on type
|
160 |
+
switch ( $value['type'] ) {
|
161 |
+
|
162 |
+
// Section Titles
|
163 |
+
case 'title':
|
164 |
+
if ( ! empty( $value['title'] ) ) {
|
165 |
+
echo '<h2>' . esc_html( $value['title'] ) . '</h2>';
|
166 |
+
}
|
167 |
+
if ( ! empty( $value['desc'] ) ) {
|
168 |
+
echo wpautop( wptexturize( wp_kses_post( $value['desc'] ) ) );
|
169 |
+
}
|
170 |
+
echo '<table class="form-table">' . "\n\n";
|
171 |
+
if ( ! empty( $value['id'] ) ) {
|
172 |
+
do_action( 'wcvendors_settings_' . sanitize_title( $value['id'] ) );
|
173 |
+
}
|
174 |
+
break;
|
175 |
+
|
176 |
+
// Section Ends
|
177 |
+
case 'sectionend':
|
178 |
+
if ( ! empty( $value['id'] ) ) {
|
179 |
+
do_action( 'wcvendors_settings_' . sanitize_title( $value['id'] ) . '_end' );
|
180 |
+
}
|
181 |
+
echo '</table>';
|
182 |
+
if ( ! empty( $value['id'] ) ) {
|
183 |
+
do_action( 'wcvendors_settings_' . sanitize_title( $value['id'] ) . '_after' );
|
184 |
+
}
|
185 |
+
break;
|
186 |
+
|
187 |
+
// Standard text inputs and subtypes like 'number'
|
188 |
+
case 'text':
|
189 |
+
case 'email':
|
190 |
+
case 'number':
|
191 |
+
case 'password' :
|
192 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
193 |
+
|
194 |
+
?><tr valign="top">
|
195 |
+
<th scope="row" class="titledesc">
|
196 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
197 |
+
<?php echo $tooltip_html; ?>
|
198 |
+
</th>
|
199 |
+
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
200 |
+
<input
|
201 |
+
name="<?php echo esc_attr( $value['id'] ); ?>"
|
202 |
+
id="<?php echo esc_attr( $value['id'] ); ?>"
|
203 |
+
type="<?php echo esc_attr( $value['type'] ); ?>"
|
204 |
+
style="<?php echo esc_attr( $value['css'] ); ?>"
|
205 |
+
value="<?php echo esc_attr( $option_value ); ?>"
|
206 |
+
class="<?php echo esc_attr( $value['class'] ); ?>"
|
207 |
+
placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
|
208 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
209 |
+
/><?php echo esc_html( $value['suffix'] ); ?> <?php echo $description; ?>
|
210 |
+
</td>
|
211 |
+
</tr><?php
|
212 |
+
break;
|
213 |
+
|
214 |
+
// Color picker.
|
215 |
+
case 'color' :
|
216 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
217 |
+
|
218 |
+
?><tr valign="top">
|
219 |
+
<th scope="row" class="titledesc">
|
220 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
221 |
+
<?php echo $tooltip_html; ?>
|
222 |
+
</th>
|
223 |
+
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">‎
|
224 |
+
<span class="colorpickpreview" style="background: <?php echo esc_attr( $option_value ); ?>"></span>
|
225 |
+
<input
|
226 |
+
name="<?php echo esc_attr( $value['id'] ); ?>"
|
227 |
+
id="<?php echo esc_attr( $value['id'] ); ?>"
|
228 |
+
type="text"
|
229 |
+
dir="ltr"
|
230 |
+
style="<?php echo esc_attr( $value['css'] ); ?>"
|
231 |
+
value="<?php echo esc_attr( $option_value ); ?>"
|
232 |
+
class="<?php echo esc_attr( $value['class'] ); ?>colorpick"
|
233 |
+
placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
|
234 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
235 |
+
/>‎ <?php echo $description; ?>
|
236 |
+
<div id="colorPickerDiv_<?php echo esc_attr( $value['id'] ); ?>" class="colorpickdiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;display:none;"></div>
|
237 |
+
</td>
|
238 |
+
</tr><?php
|
239 |
+
break;
|
240 |
+
|
241 |
+
// Textarea
|
242 |
+
case 'textarea':
|
243 |
+
|
244 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
245 |
+
|
246 |
+
?><tr valign="top">
|
247 |
+
<th scope="row" class="titledesc">
|
248 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
249 |
+
<?php echo $tooltip_html; ?>
|
250 |
+
</th>
|
251 |
+
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
252 |
+
<?php echo $description; ?>
|
253 |
+
|
254 |
+
<textarea
|
255 |
+
name="<?php echo esc_attr( $value['id'] ); ?>"
|
256 |
+
id="<?php echo esc_attr( $value['id'] ); ?>"
|
257 |
+
style="<?php echo esc_attr( $value['css'] ); ?>"
|
258 |
+
class="<?php echo esc_attr( $value['class'] ); ?>"
|
259 |
+
placeholder="<?php echo esc_attr( $value['placeholder'] ); ?>"
|
260 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
261 |
+
><?php echo esc_textarea( $option_value ); ?></textarea>
|
262 |
+
</td>
|
263 |
+
</tr><?php
|
264 |
+
break;
|
265 |
+
|
266 |
+
// Select boxes
|
267 |
+
case 'select' :
|
268 |
+
case 'multiselect' :
|
269 |
+
|
270 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
271 |
+
|
272 |
+
?><tr valign="top">
|
273 |
+
<th scope="row" class="titledesc">
|
274 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
275 |
+
<?php echo $tooltip_html; ?>
|
276 |
+
</th>
|
277 |
+
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
278 |
+
<select
|
279 |
+
name="<?php echo esc_attr( $value['id'] ); ?><?php echo ( 'multiselect' === $value['type'] ) ? '[]' : ''; ?>"
|
280 |
+
id="<?php echo esc_attr( $value['id'] ); ?>"
|
281 |
+
style="<?php echo esc_attr( $value['css'] ); ?>"
|
282 |
+
class="<?php echo esc_attr( $value['class'] ); ?>"
|
283 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
284 |
+
<?php echo ( 'multiselect' == $value['type'] ) ? 'multiple="multiple"' : ''; ?>
|
285 |
+
>
|
286 |
+
<?php
|
287 |
+
foreach ( $value['options'] as $key => $val ) {
|
288 |
+
?>
|
289 |
+
<option value="<?php echo esc_attr( $key ); ?>" <?php
|
290 |
+
|
291 |
+
if ( is_array( $option_value ) ) {
|
292 |
+
selected( in_array( $key, $option_value ), true );
|
293 |
+
} else {
|
294 |
+
selected( $option_value, $key );
|
295 |
+
}
|
296 |
+
|
297 |
+
?>><?php echo $val ?></option>
|
298 |
+
<?php
|
299 |
+
}
|
300 |
+
?>
|
301 |
+
</select> <?php echo $description; ?>
|
302 |
+
</td>
|
303 |
+
</tr><?php
|
304 |
+
break;
|
305 |
+
|
306 |
+
// Radio inputs
|
307 |
+
case 'radio' :
|
308 |
+
|
309 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
310 |
+
|
311 |
+
?><tr valign="top">
|
312 |
+
<th scope="row" class="titledesc">
|
313 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
314 |
+
<?php echo $tooltip_html; ?>
|
315 |
+
</th>
|
316 |
+
<td class="forminp forminp-<?php echo sanitize_title( $value['type'] ) ?>">
|
317 |
+
<fieldset>
|
318 |
+
<?php echo $description; ?>
|
319 |
+
<ul>
|
320 |
+
<?php
|
321 |
+
foreach ( $value['options'] as $key => $val ) {
|
322 |
+
?>
|
323 |
+
<li>
|
324 |
+
<label><input
|
325 |
+
name="<?php echo esc_attr( $value['id'] ); ?>"
|
326 |
+
value="<?php echo $key; ?>"
|
327 |
+
type="radio"
|
328 |
+
style="<?php echo esc_attr( $value['css'] ); ?>"
|
329 |
+
class="<?php echo esc_attr( $value['class'] ); ?>"
|
330 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
331 |
+
<?php checked( $key, $option_value ); ?>
|
332 |
+
/> <?php echo $val ?></label>
|
333 |
+
</li>
|
334 |
+
<?php
|
335 |
+
}
|
336 |
+
?>
|
337 |
+
</ul>
|
338 |
+
</fieldset>
|
339 |
+
</td>
|
340 |
+
</tr><?php
|
341 |
+
break;
|
342 |
+
|
343 |
+
// Checkbox input
|
344 |
+
case 'checkbox' :
|
345 |
+
|
346 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
347 |
+
$visibility_class = array();
|
348 |
+
|
349 |
+
if ( ! isset( $value['hide_if_checked'] ) ) {
|
350 |
+
$value['hide_if_checked'] = false;
|
351 |
+
}
|
352 |
+
if ( ! isset( $value['show_if_checked'] ) ) {
|
353 |
+
$value['show_if_checked'] = false;
|
354 |
+
}
|
355 |
+
if ( 'yes' == $value['hide_if_checked'] || 'yes' == $value['show_if_checked'] ) {
|
356 |
+
$visibility_class[] = 'hidden_option';
|
357 |
+
}
|
358 |
+
if ( 'option' == $value['hide_if_checked'] ) {
|
359 |
+
$visibility_class[] = 'hide_options_if_checked';
|
360 |
+
}
|
361 |
+
if ( 'option' == $value['show_if_checked'] ) {
|
362 |
+
$visibility_class[] = 'show_options_if_checked';
|
363 |
+
}
|
364 |
+
|
365 |
+
if ( ! isset( $value['checkboxgroup'] ) || 'start' == $value['checkboxgroup'] ) {
|
366 |
+
?>
|
367 |
+
<tr valign="top" class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
|
368 |
+
<th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?></th>
|
369 |
+
<td class="forminp forminp-checkbox">
|
370 |
+
<fieldset>
|
371 |
+
<?php
|
372 |
+
} else {
|
373 |
+
?>
|
374 |
+
<fieldset class="<?php echo esc_attr( implode( ' ', $visibility_class ) ); ?>">
|
375 |
+
<?php
|
376 |
+
}
|
377 |
+
|
378 |
+
if ( ! empty( $value['title'] ) ) {
|
379 |
+
?>
|
380 |
+
<legend class="screen-reader-text"><span><?php echo esc_html( $value['title'] ) ?></span></legend>
|
381 |
+
<?php
|
382 |
+
}
|
383 |
+
|
384 |
+
?>
|
385 |
+
<label for="<?php echo $value['id'] ?>">
|
386 |
+
<input
|
387 |
+
name="<?php echo esc_attr( $value['id'] ); ?>"
|
388 |
+
id="<?php echo esc_attr( $value['id'] ); ?>"
|
389 |
+
type="checkbox"
|
390 |
+
class="<?php echo esc_attr( isset( $value['class'] ) ? $value['class'] : '' ); ?>"
|
391 |
+
value="1"
|
392 |
+
<?php checked( $option_value, 'yes' ); ?>
|
393 |
+
<?php echo implode( ' ', $custom_attributes ); ?>
|
394 |
+
/> <?php echo $description ?>
|
395 |
+
</label> <?php echo $tooltip_html; ?>
|
396 |
+
<?php
|
397 |
+
|
398 |
+
if ( ! isset( $value['checkboxgroup'] ) || 'end' == $value['checkboxgroup'] ) {
|
399 |
+
?>
|
400 |
+
</fieldset>
|
401 |
+
</td>
|
402 |
+
</tr>
|
403 |
+
<?php
|
404 |
+
} else {
|
405 |
+
?>
|
406 |
+
</fieldset>
|
407 |
+
<?php
|
408 |
+
}
|
409 |
+
break;
|
410 |
+
|
411 |
+
// Single page selects
|
412 |
+
case 'single_select_page' :
|
413 |
+
|
414 |
+
$args = array(
|
415 |
+
'name' => $value['id'],
|
416 |
+
'id' => $value['id'],
|
417 |
+
'sort_column' => 'menu_order',
|
418 |
+
'sort_order' => 'ASC',
|
419 |
+
'show_option_none' => ' ',
|
420 |
+
'class' => $value['class'],
|
421 |
+
'echo' => false,
|
422 |
+
'selected' => absint( self::get_option( $value['id'] ) ),
|
423 |
+
);
|
424 |
+
|
425 |
+
if ( isset( $value['args'] ) ) {
|
426 |
+
$args = wp_parse_args( $value['args'], $args );
|
427 |
+
}
|
428 |
+
|
429 |
+
?><tr valign="top" class="single_select_page">
|
430 |
+
<th scope="row" class="titledesc"><?php echo esc_html( $value['title'] ) ?> <?php echo $tooltip_html; ?></th>
|
431 |
+
<td class="forminp">
|
432 |
+
<?php echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page…', 'wc-vendors' ) . "' style='" . $value['css'] . "' class='" . $value['class'] . "' id=", wp_dropdown_pages( $args ) ); ?> <?php echo $description; ?>
|
433 |
+
</td>
|
434 |
+
</tr><?php
|
435 |
+
break;
|
436 |
+
|
437 |
+
// Single country selects
|
438 |
+
case 'single_select_country' :
|
439 |
+
$country_setting = (string) self::get_option( $value['id'] );
|
440 |
+
|
441 |
+
if ( strstr( $country_setting, ':' ) ) {
|
442 |
+
$country_setting = explode( ':', $country_setting );
|
443 |
+
$country = current( $country_setting );
|
444 |
+
$state = end( $country_setting );
|
445 |
+
} else {
|
446 |
+
$country = $country_setting;
|
447 |
+
$state = '*';
|
448 |
+
}
|
449 |
+
?><tr valign="top">
|
450 |
+
<th scope="row" class="titledesc">
|
451 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
452 |
+
<?php echo $tooltip_html; ?>
|
453 |
+
</th>
|
454 |
+
<td class="forminp"><select name="<?php echo esc_attr( $value['id'] ); ?>" style="<?php echo esc_attr( $value['css'] ); ?>" data-placeholder="<?php esc_attr_e( 'Choose a country…', 'wc-vendors' ); ?>" aria-label="<?php esc_attr_e( 'Country', 'wc-vendors' ) ?>" class="wc-enhanced-select">
|
455 |
+
<?php WC()->countries->country_dropdown_options( $country, $state ); ?>
|
456 |
+
</select> <?php echo $description; ?>
|
457 |
+
</td>
|
458 |
+
</tr><?php
|
459 |
+
break;
|
460 |
+
|
461 |
+
// Country multiselects
|
462 |
+
case 'multi_select_countries' :
|
463 |
+
|
464 |
+
$selections = (array) self::get_option( $value['id'] );
|
465 |
+
|
466 |
+
if ( ! empty( $value['options'] ) ) {
|
467 |
+
$countries = $value['options'];
|
468 |
+
} else {
|
469 |
+
$countries = WC()->countries->countries;
|
470 |
+
}
|
471 |
+
|
472 |
+
asort( $countries );
|
473 |
+
?><tr valign="top">
|
474 |
+
<th scope="row" class="titledesc">
|
475 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
476 |
+
<?php echo $tooltip_html; ?>
|
477 |
+
</th>
|
478 |
+
<td class="forminp">
|
479 |
+
<select multiple="multiple" name="<?php echo esc_attr( $value['id'] ); ?>[]" style="width:350px" data-placeholder="<?php esc_attr_e( 'Choose countries…', 'wc-vendors' ); ?>" aria-label="<?php esc_attr_e( 'Country', 'wc-vendors' ) ?>" class="wc-enhanced-select">
|
480 |
+
<?php
|
481 |
+
if ( ! empty( $countries ) ) {
|
482 |
+
foreach ( $countries as $key => $val ) {
|
483 |
+
echo '<option value="' . esc_attr( $key ) . '" ' . selected( in_array( $key, $selections ), true, false ) . '>' . $val . '</option>';
|
484 |
+
}
|
485 |
+
}
|
486 |
+
?>
|
487 |
+
</select> <?php echo ( $description ) ? $description : ''; ?> <br /><a class="select_all button" href="#"><?php _e( 'Select all', 'wc-vendors' ); ?></a> <a class="select_none button" href="#"><?php _e( 'Select none', 'wc-vendors' ); ?></a>
|
488 |
+
</td>
|
489 |
+
</tr><?php
|
490 |
+
break;
|
491 |
+
|
492 |
+
case 'image':
|
493 |
+
|
494 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
495 |
+
|
496 |
+
?><tr valign="top">
|
497 |
+
<th scope="row" class="titledesc">
|
498 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
499 |
+
<?php echo $tooltip_html; ?>
|
500 |
+
</th>
|
501 |
+
<td class="forminp">
|
502 |
+
<img class="wcv-image-container-<?php echo $value['id']; ?>" src="<?php echo $option_value; ?>" alt="" style="max-width:100%;" />
|
503 |
+
<br />
|
504 |
+
<input id="wcv-add-<?php echo $value['id']; ?>" type="button" class="<?php echo $value['css']; ?>" value="<?php echo sprintf( __( 'Update %s', 'wc-vendors' ), strtolower( $value['title'] ) ); ?>" data-id="<?php echo $value['id']; ?>" data-save_button="<?php echo sprintf( __( 'Add %s', 'wc-vendors' ), $value['title'] ); ?>" data-window_title="<?php echo sprintf( __( 'Add %s', 'wc-vendors' ), strtolower( $value['title'] ) ); ?>" data-upload_notice="<?php echo sprintf( __( 'Upload an image for the %s', 'wc-vendors' ), strtolower( $value['title'] ) ); ?>" />
|
505 |
+
<input type="hidden" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="<?php echo $option_value; ?>">
|
506 |
+
</td>
|
507 |
+
</tr><?php
|
508 |
+
|
509 |
+
break;
|
510 |
+
|
511 |
+
case 'wysiwyg':
|
512 |
+
|
513 |
+
$option_value = self::get_option( $value['id'], $value['default'] );
|
514 |
+
|
515 |
+
?>
|
516 |
+
<tr valign="top">
|
517 |
+
<th scope="row" class="titledesc">
|
518 |
+
<label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo esc_html( $value['title'] ); ?></label>
|
519 |
+
<?php echo $tooltip_html; ?>
|
520 |
+
</th>
|
521 |
+
<td class="forminp">
|
522 |
+
<?php wp_editor( $option_value, $value[ 'id' ], array( 'textarea_name' => $value['id'] ) ); ?>
|
523 |
+
<?php echo $description;?>
|
524 |
+
</td>
|
525 |
+
</tr>
|
526 |
+
<?php
|
527 |
+
|
528 |
+
|
529 |
+
break;
|
530 |
+
|
531 |
+
// Default: run an action
|
532 |
+
default:
|
533 |
+
do_action( 'wcvendors_admin_field_' . $value['type'], $value );
|
534 |
+
break;
|
535 |
+
}
|
536 |
+
}
|
537 |
+
}
|
538 |
+
|
539 |
+
/**
|
540 |
+
* Save admin fields.
|
541 |
+
*
|
542 |
+
* Loops though the options array and saves each field.
|
543 |
+
*
|
544 |
+
* @param array $options Options array to output
|
545 |
+
* @param array $data Optional. Data to use for saving. Defaults to $_POST.
|
546 |
+
* @return bool
|
547 |
+
*/
|
548 |
+
public static function save_fields( $options, $data = null ) {
|
549 |
+
if ( is_null( $data ) ) {
|
550 |
+
$data = $_POST;
|
551 |
+
}
|
552 |
+
if ( empty( $data ) ) {
|
553 |
+
return false;
|
554 |
+
}
|
555 |
+
|
556 |
+
// Options to update will be stored here and saved later.
|
557 |
+
$update_options = array();
|
558 |
+
|
559 |
+
// Loop options and get values to save.
|
560 |
+
foreach ( $options as $option ) {
|
561 |
+
if ( ! isset( $option['id'] ) || ! isset( $option['type'] ) ) {
|
562 |
+
continue;
|
563 |
+
}
|
564 |
+
|
565 |
+
// Get posted value.
|
566 |
+
if ( strstr( $option['id'], '[' ) ) {
|
567 |
+
parse_str( $option['id'], $option_name_array );
|
568 |
+
$option_name = current( array_keys( $option_name_array ) );
|
569 |
+
$setting_name = key( $option_name_array[ $option_name ] );
|
570 |
+
$raw_value = isset( $data[ $option_name ][ $setting_name ] ) ? wp_unslash( $data[ $option_name ][ $setting_name ] ) : null;
|
571 |
+
} else {
|
572 |
+
$option_name = $option['id'];
|
573 |
+
$setting_name = '';
|
574 |
+
$raw_value = isset( $data[ $option['id'] ] ) ? wp_unslash( $data[ $option['id'] ] ) : null;
|
575 |
+
}
|
576 |
+
|
577 |
+
// Format the value based on option type.
|
578 |
+
switch ( $option['type'] ) {
|
579 |
+
case 'checkbox' :
|
580 |
+
$value = '1' === $raw_value || 'yes' === $raw_value ? 'yes' : 'no';
|
581 |
+
break;
|
582 |
+
case 'textarea' :
|
583 |
+
$value = wp_kses_post( trim( $raw_value ) );
|
584 |
+
break;
|
585 |
+
case 'multiselect' :
|
586 |
+
case 'multi_select_countries' :
|
587 |
+
$value = array_filter( array_map( 'wc_clean', (array) $raw_value ) );
|
588 |
+
break;
|
589 |
+
case 'image_width' :
|
590 |
+
$value = array();
|
591 |
+
if ( isset( $raw_value['width'] ) ) {
|
592 |
+
$value['width'] = wc_clean( $raw_value['width'] );
|
593 |
+
$value['height'] = wc_clean( $raw_value['height'] );
|
594 |
+
$value['crop'] = isset( $raw_value['crop'] ) ? 1 : 0;
|
595 |
+
} else {
|
596 |
+
$value['width'] = $option['default']['width'];
|
597 |
+
$value['height'] = $option['default']['height'];
|
598 |
+
$value['crop'] = $option['default']['crop'];
|
599 |
+
}
|
600 |
+
break;
|
601 |
+
case 'thumbnail_cropping' :
|
602 |
+
$value = wc_clean( $raw_value );
|
603 |
+
|
604 |
+
if ( 'custom' === $value ) {
|
605 |
+
$width_ratio = wc_clean( wp_unslash( $_POST['thumbnail_cropping_aspect_ratio_width'] ) );
|
606 |
+
$height_ratio = wc_clean( wp_unslash( $_POST['thumbnail_cropping_aspect_ratio_height'] ) );
|
607 |
+
$value = $width_ratio . ':' . $height_ratio;
|
608 |
+
}
|
609 |
+
break;
|
610 |
+
case 'select':
|
611 |
+
$allowed_values = empty( $option['options'] ) ? array() : array_keys( $option['options'] );
|
612 |
+
if ( empty( $option['default'] ) && empty( $allowed_values ) ) {
|
613 |
+
$value = null;
|
614 |
+
break;
|
615 |
+
}
|
616 |
+
$default = ( empty( $option['default'] ) ? $allowed_values[0] : $option['default'] );
|
617 |
+
$value = in_array( $raw_value, $allowed_values ) ? $raw_value : $default;
|
618 |
+
break;
|
619 |
+
default :
|
620 |
+
$value = wc_clean( $raw_value );
|
621 |
+
break;
|
622 |
+
}
|
623 |
+
|
624 |
+
/**
|
625 |
+
* Sanitize the value of an option.
|
626 |
+
* @since 2.4.0
|
627 |
+
*/
|
628 |
+
$value = apply_filters( 'wcvendors_admin_settings_sanitize_option', $value, $option, $raw_value );
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Sanitize the value of an option by option name.
|
632 |
+
* @since 2.4.0
|
633 |
+
*/
|
634 |
+
$value = apply_filters( "wcvendors_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value );
|
635 |
+
|
636 |
+
if ( is_null( $value ) ) {
|
637 |
+
continue;
|
638 |
+
}
|
639 |
+
|
640 |
+
// Check if option is an array and handle that differently to single values.
|
641 |
+
if ( $option_name && $setting_name ) {
|
642 |
+
if ( ! isset( $update_options[ $option_name ] ) ) {
|
643 |
+
$update_options[ $option_name ] = get_option( $option_name, array() );
|
644 |
+
}
|
645 |
+
if ( ! is_array( $update_options[ $option_name ] ) ) {
|
646 |
+
$update_options[ $option_name ] = array();
|
647 |
+
}
|
648 |
+
$update_options[ $option_name ][ $setting_name ] = $value;
|
649 |
+
} else {
|
650 |
+
$update_options[ $option_name ] = $value;
|
651 |
+
}
|
652 |
+
|
653 |
+
/**
|
654 |
+
* Fire an action before saved.
|
655 |
+
* @deprecated 2.4.0 - doesn't allow manipulation of values!
|
656 |
+
*/
|
657 |
+
do_action( 'wcvendors_update_option', $option );
|
658 |
+
}
|
659 |
+
|
660 |
+
// Save all options in our array.
|
661 |
+
foreach ( $update_options as $name => $value ) {
|
662 |
+
update_option( $name, $value );
|
663 |
+
}
|
664 |
+
|
665 |
+
return true;
|
666 |
+
}
|
667 |
+
|
668 |
+
}
|
classes/admin/class-wcv-admin-setup.php
ADDED
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Admin setup
|
5 |
+
*
|
6 |
+
* @author Jamie Madden, WC Vendors
|
7 |
+
* @category Admin
|
8 |
+
* @package WCVendors/Admin
|
9 |
+
* @version 2.0.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
class WCV_Admin_Setup {
|
18 |
+
|
19 |
+
public function __construct() {
|
20 |
+
|
21 |
+
|
22 |
+
// add_action( 'admin_menu', array( 'WCV_Admin_Setup', 'menu' ), 10 );
|
23 |
+
add_action( 'woocommerce_admin_order_data_after_shipping_address', array( $this, 'add_vendor_details' ), 10, 2 );
|
24 |
+
add_action( 'woocommerce_admin_order_actions_end', array( $this, 'append_actions' ), 10, 1 );
|
25 |
+
add_filter( 'woocommerce_debug_tools', array( $this, 'wcvendors_tools' ) );
|
26 |
+
|
27 |
+
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );
|
28 |
+
add_action( 'admin_init', array( $this, 'export_commissions' ) );
|
29 |
+
add_filter( 'woocommerce_screen_ids', array( $this, 'wcv_screen_ids' ) );
|
30 |
+
add_action( 'wcvendors_update_options_capabilities', array( $this, 'update_vendor_role' ) );
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
public function add_vendor_details( $order )
|
35 |
+
{
|
36 |
+
$actions = $this->append_actions( $order, true );
|
37 |
+
|
38 |
+
if (empty( $actions['wc_pv_shipped']['name'] )) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
echo '<h4>' . __('Vendors shipped', 'wc-vendors') . '</h4><br/>';
|
43 |
+
echo $actions['wc_pv_shipped']['name'];
|
44 |
+
}
|
45 |
+
|
46 |
+
public function append_actions( $order, $order_page = false )
|
47 |
+
{
|
48 |
+
global $woocommerce;
|
49 |
+
|
50 |
+
$order_id = $order->get_id();
|
51 |
+
|
52 |
+
$authors = WCV_Vendors::get_vendors_from_order( $order );
|
53 |
+
$authors = $authors ? array_keys( $authors ) : array();
|
54 |
+
if ( empty( $authors ) ) return false;
|
55 |
+
|
56 |
+
$shipped = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
57 |
+
$string = '</br></br>';
|
58 |
+
|
59 |
+
foreach ($authors as $author ) {
|
60 |
+
$string .= in_array( $author, $shipped ) ? '✔ ' : '✕ ';
|
61 |
+
$string .= WCV_Vendors::get_vendor_shop_name( $author );
|
62 |
+
$string .= '</br>';
|
63 |
+
}
|
64 |
+
|
65 |
+
$response = array(
|
66 |
+
'url' => '#',
|
67 |
+
'name' => __('Vendors Shipped', 'wc-vendors') . $string,
|
68 |
+
'action' => 'wc_pv_shipped',
|
69 |
+
'image_url' => wcv_assets_url . '/images/icons/truck.png',
|
70 |
+
);
|
71 |
+
|
72 |
+
if ( ! $order_page ) {
|
73 |
+
printf( '<a class="button tips %s" href="%s" data-tip="%s"><img style="width:16px;height:16px;" src="%s"></a>', $response['action'], $response['url'], $response['name'], $response['image_url'] );
|
74 |
+
} else {
|
75 |
+
echo $response['name'];
|
76 |
+
}
|
77 |
+
|
78 |
+
return $response;
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Add tools to the woocommerce status tools page
|
86 |
+
*
|
87 |
+
* @since 1.9.2
|
88 |
+
* @access public
|
89 |
+
*/
|
90 |
+
public function wcvendors_tools( $tools ){
|
91 |
+
|
92 |
+
$tools[ 'reset_wcvendor_roles' ] = array(
|
93 |
+
'name' => __( 'Reset WC Vendors roles ', 'wc-vendors' ),
|
94 |
+
'button' => __( 'Reset WC Vendor Roles', 'wc-vendors' ),
|
95 |
+
'desc' => __( 'This will reset the wcvendors roles ( vendor & pending_vendor ), back to the default capabilities.', 'wc-vendors' ),
|
96 |
+
'callback' => array( 'WCV_Admin_Setup', 'reset_vendor_roles' )
|
97 |
+
);
|
98 |
+
|
99 |
+
$tools[ 'reset_wcvendors' ] = array(
|
100 |
+
'name' => __( 'Reset WC Vendors ', 'wc-vendors' ),
|
101 |
+
'button' => __( 'Reset WC Vendors Settings', 'wc-vendors' ),
|
102 |
+
'desc' => __( 'This will reset wcvendors back to defaults. This DELETES ALL YOUR Settings.', 'wc-vendors' ),
|
103 |
+
'callback' => array( 'WCV_Admin_Setup', 'reset_wcvendors' )
|
104 |
+
);
|
105 |
+
|
106 |
+
return $tools;
|
107 |
+
|
108 |
+
} // wcvendors_tools()
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Reset the vendor roles
|
112 |
+
*
|
113 |
+
* @since 1.9.2
|
114 |
+
* @access public
|
115 |
+
*/
|
116 |
+
public static function reset_vendor_roles(){
|
117 |
+
|
118 |
+
$can_add = get_option( 'wcvendors_capability_products_enabled' );
|
119 |
+
$can_edit = get_option( 'wcvendors_capability_products_edit' );
|
120 |
+
$can_submit_live = get_option( 'wcvendors_capability_products_live' );
|
121 |
+
|
122 |
+
$args = array(
|
123 |
+
'assign_product_terms' => $can_add,
|
124 |
+
'edit_products' => $can_add || $can_edit,
|
125 |
+
'edit_published_products' => $can_edit,
|
126 |
+
'delete_published_products' => $can_edit,
|
127 |
+
'delete_products' => $can_edit,
|
128 |
+
'manage_product' => $can_add,
|
129 |
+
'publish_products' => $can_submit_live,
|
130 |
+
'delete_posts' => true,
|
131 |
+
'read' => true,
|
132 |
+
'read_products' => $can_edit || $can_add,
|
133 |
+
'upload_files' => true,
|
134 |
+
'import' => true,
|
135 |
+
'view_woocommerce_reports' => false,
|
136 |
+
);
|
137 |
+
|
138 |
+
remove_role( 'vendor' );
|
139 |
+
add_role( 'vendor', __('Vendor', 'wc-vendors'), $args );
|
140 |
+
|
141 |
+
remove_role( 'pending_vendor');
|
142 |
+
add_role( 'pending_vendor', __( 'Pending Vendor', 'wc-vendors' ), array(
|
143 |
+
'read' => true,
|
144 |
+
'edit_posts' => false,
|
145 |
+
'delete_posts' => false
|
146 |
+
) );
|
147 |
+
|
148 |
+
echo '<div class="updated inline"><p>' . __( 'WC Vendor roles successfully reset.', 'wc-vendors' ) . '</p></div>';
|
149 |
+
|
150 |
+
} // reset_vendor_roles()
|
151 |
+
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Reset wcvendors
|
155 |
+
*
|
156 |
+
* @since 1.9.2
|
157 |
+
* @access public
|
158 |
+
*/
|
159 |
+
public static function reset_wcvendors(){
|
160 |
+
|
161 |
+
delete_option( WC_Vendors::$id . '_options' );
|
162 |
+
echo '<div class="updated inline"><p>' . __( 'WC Vendors was successfully reset. All settings have been reset.', 'wc-vendors' ) . '</p></div>';
|
163 |
+
|
164 |
+
} // reset_wcvendors()
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
/*
|
169 |
+
* Export commissions via csv
|
170 |
+
*/
|
171 |
+
public function export_commissions(){
|
172 |
+
|
173 |
+
// prepare the items to export
|
174 |
+
|
175 |
+
|
176 |
+
if ( isset( $_GET['action'], $_GET['nonce'] ) && wp_verify_nonce( wp_unslash( $_GET['nonce'] ), 'export_commissions' ) && 'export_commissions' === wp_unslash( $_GET['action'] ) ) {
|
177 |
+
|
178 |
+
include_once( 'class-wcv-commissions-csv-exporter.php' );
|
179 |
+
|
180 |
+
$exporter = new WCV_Commissions_CSV_Export();
|
181 |
+
|
182 |
+
$date = date( 'Y-M-d' );
|
183 |
+
|
184 |
+
if ( ! empty( $_GET['com_status'] ) ) { // WPCS: input var ok.
|
185 |
+
$exporter->set_filename( 'wcv_commissions_'. wp_unslash( $_GET['com_status'] ) . '-' . $date . '.csv' ); // WPCS: input var ok, sanitization ok.
|
186 |
+
} else {
|
187 |
+
$exporter->set_filename( 'wcv_commissions-' . $date . '.csv' ); // WPCS: input var ok, sanitization ok.
|
188 |
+
}
|
189 |
+
|
190 |
+
$exporter->export();
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Add wc vendors screens to woocommerce screen ids to utilise js and css assets from woocommerce.
|
197 |
+
*
|
198 |
+
* @since 2.0.0
|
199 |
+
*/
|
200 |
+
public function wcv_screen_ids( $screen_ids ) {
|
201 |
+
|
202 |
+
$screen = get_current_screen();
|
203 |
+
|
204 |
+
$wcv_screen_ids = wcv_get_screen_ids();
|
205 |
+
$screen_ids = array_merge( $wcv_screen_ids, $screen_ids );
|
206 |
+
|
207 |
+
return $screen_ids;
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Change the admin footer text on WooCommerce admin pages.
|
213 |
+
*
|
214 |
+
* @since 2.0.0
|
215 |
+
* @param string $footer_text
|
216 |
+
* @return string
|
217 |
+
*/
|
218 |
+
public function admin_footer_text( $footer_text ) {
|
219 |
+
|
220 |
+
if ( ! current_user_can( 'manage_woocommerce' ) || ! function_exists( 'wcv_get_screen_ids' ) ) {
|
221 |
+
return $footer_text;
|
222 |
+
}
|
223 |
+
$current_screen = get_current_screen();
|
224 |
+
$wcv_pages = wcv_get_screen_ids();
|
225 |
+
|
226 |
+
// Set only WC pages.
|
227 |
+
// $wcv_pages = array_diff( $wcv_pages, array( 'profile', 'user-edit' ) );
|
228 |
+
|
229 |
+
// Check to make sure we're on a WooCommerce admin page.
|
230 |
+
if ( isset( $current_screen->id ) && apply_filters( 'wcvendors_display_admin_footer_text', in_array( $current_screen->id, $wcv_pages ) ) ) {
|
231 |
+
// Change the footer text
|
232 |
+
$footer_text = sprintf(
|
233 |
+
/* translators: 1: WooCommerce 2:: five stars */
|
234 |
+
__( 'If you like %1$s please leave us a %2$s rating. A huge thanks in advance!', 'wc-vendors' ),
|
235 |
+
sprintf( '<strong>%s</strong>', esc_html__( 'WC Vendors', 'wc-vendors' ) ),
|
236 |
+
'<a href="https://wordpress.org/support/plugin/wc-vendors/reviews?rate=5#new-post" target="_blank" class="wcv-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'wc-vendors' ) . '">★★★★★</a>'
|
237 |
+
);
|
238 |
+
}
|
239 |
+
|
240 |
+
return $footer_text;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Update the vendor role based on the capabilities saved.
|
245 |
+
*
|
246 |
+
*/
|
247 |
+
public function update_vendor_role( ){
|
248 |
+
|
249 |
+
$can_add = get_option( 'wcvendors_capability_products_enabled' );
|
250 |
+
$can_edit = get_option( 'wcvendors_capability_products_edit' );
|
251 |
+
$can_submit_live = get_option( 'wcvendors_capability_products_live' );
|
252 |
+
|
253 |
+
$args = array(
|
254 |
+
'assign_product_terms' => $can_add,
|
255 |
+
'edit_products' => $can_add || $can_edit,
|
256 |
+
'edit_published_products' => $can_edit,
|
257 |
+
'delete_published_products' => $can_edit,
|
258 |
+
'delete_products' => $can_edit,
|
259 |
+
'delete_posts' => true,
|
260 |
+
'manage_product' => $can_add,
|
261 |
+
'publish_products' => $can_submit_live,
|
262 |
+
'read' => true,
|
263 |
+
'read_products' => $can_edit || $can_add,
|
264 |
+
'upload_files' => true,
|
265 |
+
'import' => true,
|
266 |
+
'view_woocommerce_reports' => false,
|
267 |
+
);
|
268 |
+
|
269 |
+
remove_role( 'vendor' );
|
270 |
+
add_role( 'vendor', __('Vendor', 'wc-vendors'), $args );
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
|
275 |
+
}
|
classes/admin/class-wcv-commissions-csv-exporter.php
CHANGED
@@ -38,15 +38,15 @@ class WCV_Commissions_CSV_Export extends WC_CSV_Exporter {
|
|
38 |
public function get_default_column_names() {
|
39 |
|
40 |
return apply_filters( 'wcv_commissions_export_columns', array(
|
41 |
-
'product_id' => __( 'Product', '
|
42 |
-
'order_id' => __( 'Order ID', '
|
43 |
-
'vendor_id' => __( 'Vendor', '
|
44 |
-
'total_due' => __( 'Commission', '
|
45 |
-
'total_shipping' => __( 'Shipping', '
|
46 |
-
'tax' => __( 'Tax', '
|
47 |
-
'totals' => __( 'Total', '
|
48 |
-
'status' => __( 'Status', '
|
49 |
-
'time' => __( 'Date', '
|
50 |
) );
|
51 |
}
|
52 |
|
38 |
public function get_default_column_names() {
|
39 |
|
40 |
return apply_filters( 'wcv_commissions_export_columns', array(
|
41 |
+
'product_id' => __( 'Product', 'wc-vendors' ),
|
42 |
+
'order_id' => __( 'Order ID', 'wc-vendors' ),
|
43 |
+
'vendor_id' => __( 'Vendor', 'wc-vendors' ),
|
44 |
+
'total_due' => __( 'Commission', 'wc-vendors' ),
|
45 |
+
'total_shipping' => __( 'Shipping', 'wc-vendors' ),
|
46 |
+
'tax' => __( 'Tax', 'wc-vendors' ),
|
47 |
+
'totals' => __( 'Total', 'wc-vendors' ),
|
48 |
+
'status' => __( 'Status', 'wc-vendors' ),
|
49 |
+
'time' => __( 'Date', 'wc-vendors' ),
|
50 |
) );
|
51 |
}
|
52 |
|
classes/admin/class-wcv-commissions-page.php
ADDED
@@ -0,0 +1,553 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists( 'WP_List_Table' ) ) require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* WCVendors_Commissions_Page class.
|
7 |
+
*
|
8 |
+
* @category Admin
|
9 |
+
* @package WCVendors/Admin
|
10 |
+
* @version 2.0.0
|
11 |
+
* @extends WP_List_Table
|
12 |
+
*/
|
13 |
+
class WCVendors_Commissions_Page extends WP_List_Table {
|
14 |
+
|
15 |
+
public $index;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* __construct function.
|
19 |
+
*
|
20 |
+
* @access public
|
21 |
+
*/
|
22 |
+
public function __construct() {
|
23 |
+
global $status, $page;
|
24 |
+
|
25 |
+
$this->index = 0;
|
26 |
+
|
27 |
+
//Set parent defaults
|
28 |
+
parent::__construct( array(
|
29 |
+
'singular' => 'commission',
|
30 |
+
'plural' => 'commissions',
|
31 |
+
'ajax' => false
|
32 |
+
) );
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
/**
|
37 |
+
* column_default function.
|
38 |
+
*
|
39 |
+
* @access public
|
40 |
+
*
|
41 |
+
* @param unknown $item
|
42 |
+
* @param mixed $column_name
|
43 |
+
*
|
44 |
+
* @return unknown
|
45 |
+
*/
|
46 |
+
public function column_default( $item, $column_name ) {
|
47 |
+
global $wpdb;
|
48 |
+
|
49 |
+
switch ( $column_name ) {
|
50 |
+
case 'id' :
|
51 |
+
return $item->id;
|
52 |
+
case 'vendor_id' :
|
53 |
+
$user = get_userdata( $item->vendor_id );
|
54 |
+
return '<a href="' . admin_url( 'user-edit.php?user_id=' . $item->vendor_id ) . '">' . WCV_Vendors::get_vendor_shop_name( $item->vendor_id ) . '</a>';
|
55 |
+
case 'total_due' :
|
56 |
+
return wc_price( $item->total_due );
|
57 |
+
case 'total_shipping':
|
58 |
+
return wc_price($item->total_shipping );
|
59 |
+
case 'tax':
|
60 |
+
return wc_price( $item->tax );
|
61 |
+
case 'totals' :
|
62 |
+
$totals = ( wc_tax_enabled() ) ? $item->total_due + $item->total_shipping + $item->tax : $item->total_due + $item->total_shipping;
|
63 |
+
return wc_price( $totals );
|
64 |
+
case 'product_id' :
|
65 |
+
$parent = get_post_ancestors( $item->product_id );
|
66 |
+
$product_id = $parent ? $parent[ 0 ] : $item->product_id;
|
67 |
+
$wcv_total_sales = get_post_meta( $product_id, 'total_sales', true );
|
68 |
+
if ( ! get_post_status( $product_id ) ) {
|
69 |
+
$product_id = WCV_Vendors::find_parent_id_from_order( $item->order_id, $product_id );
|
70 |
+
}
|
71 |
+
return '<a href="' . admin_url( 'post.php?post=' . $product_id . '&action=edit' ) . '">' . get_the_title( $product_id ) . '</a> (<span title="' . get_the_title( $product_id ) .' has sold ' . $wcv_total_sales . ' times total.">' . $wcv_total_sales . '</span>)';
|
72 |
+
case 'order_id' :
|
73 |
+
$order = wc_get_order( $item->order_id );
|
74 |
+
if ( $order ) {
|
75 |
+
return '<a href="' . admin_url( 'post.php?post=' . $item->order_id . '&action=edit' ) . '">' . $order->get_order_number() . '</a>';
|
76 |
+
} else {
|
77 |
+
return $item->order_id;
|
78 |
+
}
|
79 |
+
case 'status' :
|
80 |
+
return $item->status;
|
81 |
+
case 'time' :
|
82 |
+
return date_i18n( get_option( 'date_format' ), strtotime( $item->time ) );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* column_cb function.
|
89 |
+
*
|
90 |
+
* @access public
|
91 |
+
*
|
92 |
+
* @param mixed $item
|
93 |
+
*
|
94 |
+
* @return unknown
|
95 |
+
*/
|
96 |
+
public function column_cb( $item ) {
|
97 |
+
return sprintf(
|
98 |
+
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
99 |
+
/*$1%s*/
|
100 |
+
'id',
|
101 |
+
/*$2%s*/
|
102 |
+
$item->id
|
103 |
+
);
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
/**
|
108 |
+
* get_columns function.
|
109 |
+
*
|
110 |
+
* @access public
|
111 |
+
* @return unknown
|
112 |
+
*/
|
113 |
+
public function get_columns() {
|
114 |
+
$columns = array(
|
115 |
+
'cb' => '<input type="checkbox" />',
|
116 |
+
'product_id' => __( 'Product', 'wc-vendors' ),
|
117 |
+
'order_id' => __( 'Order ID', 'wc-vendors' ),
|
118 |
+
'vendor_id' => __( 'Vendor', 'wc-vendors' ),
|
119 |
+
'total_due' => __( 'Commission', 'wc-vendors' ),
|
120 |
+
'total_shipping' => __( 'Shipping', 'wc-vendors' ),
|
121 |
+
'tax' => __( 'Tax', 'wc-vendors' ),
|
122 |
+
'totals' => __( 'Total', 'wc-vendors' ),
|
123 |
+
'status' => __( 'Status', 'wc-vendors' ),
|
124 |
+
'time' => __( 'Date', 'wc-vendors' ),
|
125 |
+
);
|
126 |
+
|
127 |
+
if ( ! wc_tax_enabled() ) unset( $columns[ 'tax'] );
|
128 |
+
|
129 |
+
return $columns;
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
/**
|
134 |
+
* get_sortable_columns function.
|
135 |
+
*
|
136 |
+
* @access public
|
137 |
+
* @return unknown
|
138 |
+
*/
|
139 |
+
public function get_sortable_columns() {
|
140 |
+
$sortable_columns = array(
|
141 |
+
'time' => array( 'time', true ),
|
142 |
+
'product_id' => array( 'product_id', false ),
|
143 |
+
'order_id' => array( 'order_id', false ),
|
144 |
+
'total_due' => array( 'total_due', false ),
|
145 |
+
'total_shipping' => array( 'total_shipping', false ),
|
146 |
+
'tax' => array( 'tax', false ),
|
147 |
+
'totals' => array( 'totals', false ),
|
148 |
+
'status' => array( 'status', false ),
|
149 |
+
'vendor_id' => array( 'vendor_id', false ),
|
150 |
+
'status' => array( 'status', false ),
|
151 |
+
);
|
152 |
+
|
153 |
+
if ( ! wc_tax_enabled() ) unset( $sortable_columns[ 'tax'] );
|
154 |
+
|
155 |
+
return $sortable_columns;
|
156 |
+
}
|
157 |
+
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get bulk actions
|
161 |
+
*
|
162 |
+
* @return unknown
|
163 |
+
*/
|
164 |
+
public function get_bulk_actions() {
|
165 |
+
$actions = array(
|
166 |
+
'mark_paid' => __( 'Mark paid', 'wc-vendors' ),
|
167 |
+
'mark_due' => __( 'Mark due', 'wc-vendors' ),
|
168 |
+
'mark_reversed' => __( 'Mark reversed', 'wc-vendors' ),
|
169 |
+
// 'delete' => __('Delete', 'wc-vendors'),
|
170 |
+
);
|
171 |
+
|
172 |
+
$actions = apply_filters('wcv_edit_bulk_actions', $actions);
|
173 |
+
|
174 |
+
return $actions;
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
/**
|
179 |
+
*
|
180 |
+
*/
|
181 |
+
public function extra_tablenav( $which ) {
|
182 |
+
$m = isset( $_GET[ 'm' ] ) ? (int) $_GET[ 'm' ] : 0;
|
183 |
+
$com_status = isset( $_GET[ 'com_status' ] ) ? $_GET[ 'com_status' ] : '';
|
184 |
+
$vendor_id = isset( $_GET[ 'vendor_id' ] ) ? $_GET[ 'vendor_id' ] : '';
|
185 |
+
$args_url = '';
|
186 |
+
|
187 |
+
if ( $m ) $args_url .= '&m='. $m;
|
188 |
+
if ( $com_status ) $args_url .= '&com_status='. $com_status;
|
189 |
+
if ( $vendor_id ) $args_url .= '&vendor_id='. $vendor_id;
|
190 |
+
|
191 |
+
if ( $which == 'top' ) {
|
192 |
+
echo '<div class="alignleft actions" style="width: 70%;">';
|
193 |
+
|
194 |
+
// Months drop down
|
195 |
+
$this->months_dropdown( 'commission' );
|
196 |
+
|
197 |
+
// commission status drop down
|
198 |
+
$this->status_dropdown( 'commission' );
|
199 |
+
|
200 |
+
// Vendor drop down
|
201 |
+
$this->vendor_dropdown( 'commission' );
|
202 |
+
|
203 |
+
submit_button( __( 'Filter', 'wc-vendors' ), false, false, false, array( 'id' => "post-query-submit", 'name' => 'do-filter' ) );
|
204 |
+
submit_button( __( 'Clear', 'wc-vendors' ), 'secondary', 'reset', false, array( 'type' => 'reset' ) );
|
205 |
+
|
206 |
+
echo '<a class="button" style="width: 110px; float: left;" href="' . wp_nonce_url( admin_url( 'admin.php?page=wcv-commissions&action=export_commissions'. $args_url ), 'export_commissions', 'nonce' ) . '">' . __('Export to CSV') . '</a>';
|
207 |
+
echo '</div>';
|
208 |
+
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Display a monthly dropdown for filtering items
|
215 |
+
*
|
216 |
+
* @since 3.1.0
|
217 |
+
* @access protected
|
218 |
+
*
|
219 |
+
* @param unknown $post_type
|
220 |
+
*/
|
221 |
+
public function months_dropdown( $post_type )
|
222 |
+
{
|
223 |
+
global $wpdb, $wp_locale;
|
224 |
+
|
225 |
+
$table_name = $wpdb->prefix . "pv_commission";
|
226 |
+
|
227 |
+
$months = $wpdb->get_results( "
|
228 |
+
SELECT DISTINCT YEAR( time ) AS year, MONTH( time ) AS month
|
229 |
+
FROM $table_name
|
230 |
+
ORDER BY time DESC
|
231 |
+
" );
|
232 |
+
|
233 |
+
$month_count = count( $months );
|
234 |
+
|
235 |
+
if ( !$month_count || ( 1 == $month_count && 0 == $months[ 0 ]->month ) )
|
236 |
+
return;
|
237 |
+
|
238 |
+
$m = isset( $_GET[ 'm' ] ) ? (int) $_GET[ 'm' ] : 0;
|
239 |
+
?>
|
240 |
+
<select name="m" id="filter-by-date" class="wc-enhanced-select-nostd" style="min-width:150px;">
|
241 |
+
<option<?php selected( $m, 0 ); ?> value='0'><?php _e( 'Show all dates', 'wc-vendors' ); ?></option>
|
242 |
+
<?php
|
243 |
+
foreach ( $months as $arc_row ) {
|
244 |
+
if ( 0 == $arc_row->year )
|
245 |
+
continue;
|
246 |
+
|
247 |
+
$month = zeroise( $arc_row->month, 2 );
|
248 |
+
$year = $arc_row->year;
|
249 |
+
|
250 |
+
printf( "<option %s value='%s'>%s</option>\n",
|
251 |
+
selected( $m, $year . $month, false ),
|
252 |
+
esc_attr( $arc_row->year . $month ),
|
253 |
+
/* translators: 1: month name, 2: 4-digit year */
|
254 |
+
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
255 |
+
);
|
256 |
+
}
|
257 |
+
?>
|
258 |
+
</select>
|
259 |
+
|
260 |
+
<?php
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Display a status dropdown for filtering items
|
265 |
+
*
|
266 |
+
* @since 3.1.0
|
267 |
+
* @access protected
|
268 |
+
*
|
269 |
+
* @param unknown $post_type
|
270 |
+
*/
|
271 |
+
public function status_dropdown( $post_type )
|
272 |
+
{
|
273 |
+
$com_status = isset( $_GET[ 'com_status' ] ) ? $_GET[ 'com_status' ] : '';
|
274 |
+
?>
|
275 |
+
<select name="com_status" class="wc-enhanced-select">
|
276 |
+
<option<?php selected( $com_status, '' ); ?> value=''><?php _e( 'Show all Statuses', 'wc-vendors' ); ?></option>
|
277 |
+
<option<?php selected( $com_status, 'due' ); ?> value="due"><?php _e( 'Due', 'wc-vendors' ); ?></option>
|
278 |
+
<option<?php selected( $com_status, 'paid' ); ?> value="paid"><?php _e( 'Paid', 'wc-vendors' ); ?></option>
|
279 |
+
<option<?php selected( $com_status, 'reversed' ); ?> value="reversed"><?php _e( 'Reversed', 'wc-vendors' ); ?></option>
|
280 |
+
</select>
|
281 |
+
<?php
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Display a vendor dropdown for filtering commissions
|
286 |
+
*
|
287 |
+
* @since 1.9.2
|
288 |
+
* @access public
|
289 |
+
*
|
290 |
+
* @param unknown $post_type
|
291 |
+
*/
|
292 |
+
public function vendor_dropdown( $post_type ){
|
293 |
+
|
294 |
+
$user_args = array( 'fields' => array( 'ID', 'display_name' ) );
|
295 |
+
$vendor_id = isset( $_GET[ 'vendor_id' ] ) ? $_GET[ 'vendor_id' ] : '';
|
296 |
+
$new_args = $user_args;
|
297 |
+
$new_args[ 'role' ] = 'vendor';
|
298 |
+
$users = get_users( $new_args );
|
299 |
+
|
300 |
+
// Generate the drop down
|
301 |
+
$output = '<select style="width:250px;" name="vendor_id" id="vendor_id" class="wc-enhanced-select">';
|
302 |
+
$output .= "<option></option>";
|
303 |
+
foreach ( (array) $users as $user ) {
|
304 |
+
$select = selected( $user->ID, $vendor_id, false );
|
305 |
+
$output .= "<option value='$user->ID' $select>$user->display_name</option>";
|
306 |
+
}
|
307 |
+
$output .= '</select>';
|
308 |
+
|
309 |
+
echo $output;
|
310 |
+
|
311 |
+
} // vendor_dropdown()
|
312 |
+
|
313 |
+
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Process bulk actions
|
317 |
+
*
|
318 |
+
* @return unknown
|
319 |
+
*/
|
320 |
+
public function process_bulk_action()
|
321 |
+
{
|
322 |
+
if ( !isset( $_GET[ 'id' ] ) ) return;
|
323 |
+
|
324 |
+
$items = array_map( 'intval', $_GET[ 'id' ] );
|
325 |
+
$ids = implode( ',', $items );
|
326 |
+
|
327 |
+
switch ( $this->current_action() ) {
|
328 |
+
case 'mark_paid':
|
329 |
+
$result = $this->mark_paid( $ids );
|
330 |
+
|
331 |
+
if ( $result )
|
332 |
+
echo '<div class="updated"><p>' . __( 'Commission marked paid.', 'wc-vendors' ) . '</p></div>';
|
333 |
+
break;
|
334 |
+
|
335 |
+
case 'mark_due':
|
336 |
+
$result = $this->mark_due( $ids );
|
337 |
+
|
338 |
+
if ( $result )
|
339 |
+
echo '<div class="updated"><p>' . __( 'Commission marked due.', 'wc-vendors' ) . '</p></div>';
|
340 |
+
break;
|
341 |
+
|
342 |
+
case 'mark_reversed':
|
343 |
+
$result = $this->mark_reversed( $ids );
|
344 |
+
|
345 |
+
if ( $result )
|
346 |
+
echo '<div class="updated"><p>' . __( 'Commission marked reversed.', 'wc-vendors' ) . '</p></div>';
|
347 |
+
break;
|
348 |
+
|
349 |
+
default:
|
350 |
+
// code...
|
351 |
+
do_action('wcv_edit_process_bulk_actions', $this->current_action(), $ids);
|
352 |
+
break;
|
353 |
+
}
|
354 |
+
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
/**
|
359 |
+
*
|
360 |
+
*
|
361 |
+
* @param unknown $ids (optional)
|
362 |
+
*
|
363 |
+
* @return unknown
|
364 |
+
*/
|
365 |
+
public function mark_paid( $ids = array() )
|
366 |
+
{
|
367 |
+
global $wpdb;
|
368 |
+
|
369 |
+
$table_name = $wpdb->prefix . "pv_commission";
|
370 |
+
|
371 |
+
$query = "UPDATE `{$table_name}` SET `status` = 'paid' WHERE id IN ($ids) AND `status` = 'due'";
|
372 |
+
$result = $wpdb->query( $query );
|
373 |
+
|
374 |
+
return $result;
|
375 |
+
}
|
376 |
+
|
377 |
+
|
378 |
+
/**
|
379 |
+
*
|
380 |
+
*
|
381 |
+
* @param unknown $ids (optional)
|
382 |
+
*
|
383 |
+
* @return unknown
|
384 |
+
*/
|
385 |
+
public function mark_reversed( $ids = array() )
|
386 |
+
{
|
387 |
+
global $wpdb;
|
388 |
+
|
389 |
+
$table_name = $wpdb->prefix . "pv_commission";
|
390 |
+
$query = "UPDATE `{$table_name}` SET `status` = 'reversed' WHERE id IN ($ids)";
|
391 |
+
$result = $wpdb->query( $query );
|
392 |
+
|
393 |
+
return $result;
|
394 |
+
|
395 |
+
}
|
396 |
+
|
397 |
+
|
398 |
+
/**
|
399 |
+
*
|
400 |
+
*
|
401 |
+
* @param unknown $ids (optional)
|
402 |
+
*
|
403 |
+
* @return unknown
|
404 |
+
*/
|
405 |
+
public function mark_due( $ids = array() )
|
406 |
+
{
|
407 |
+
global $wpdb;
|
408 |
+
|
409 |
+
$table_name = $wpdb->prefix . "pv_commission";
|
410 |
+
|
411 |
+
$query = "UPDATE `{$table_name}` SET `status` = 'due' WHERE id IN ($ids)";
|
412 |
+
$result = $wpdb->query( $query );
|
413 |
+
|
414 |
+
return $result;
|
415 |
+
}
|
416 |
+
|
417 |
+
|
418 |
+
/**
|
419 |
+
* cubrid_prepare(conn_identifier, prepare_stmt)_items function.
|
420 |
+
*
|
421 |
+
* @access public
|
422 |
+
*/
|
423 |
+
public function prepare_items() {
|
424 |
+
global $wpdb;
|
425 |
+
|
426 |
+
|
427 |
+
$_SERVER['REQUEST_URI'] = remove_query_arg( '_wp_http_referer', $_SERVER['REQUEST_URI'] );
|
428 |
+
|
429 |
+
$per_page = $this->get_items_per_page( 'commissions_per_page', 10 );
|
430 |
+
$current_page = $this->get_pagenum();
|
431 |
+
|
432 |
+
$orderby = !empty( $_REQUEST[ 'orderby' ] ) ? esc_attr( $_REQUEST[ 'orderby' ] ) : 'time';
|
433 |
+
$order = ( !empty( $_REQUEST[ 'order' ] ) && $_REQUEST[ 'order' ] == 'asc' ) ? 'ASC' : 'DESC';
|
434 |
+
$com_status = !empty( $_REQUEST[ 'com_status' ] ) ? esc_attr( $_REQUEST[ 'com_status' ] ) : '';
|
435 |
+
$vendor_id = !empty( $_REQUEST[ 'vendor_id' ] ) ? esc_attr( $_REQUEST[ 'vendor_id' ] ) : '';
|
436 |
+
$status_sql = '';
|
437 |
+
$time_sql = '';
|
438 |
+
|
439 |
+
/**
|
440 |
+
* Init column headers
|
441 |
+
*/
|
442 |
+
$this->_column_headers = $this->get_column_info();
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Process bulk actions
|
446 |
+
*/
|
447 |
+
$this->process_bulk_action();
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Get items
|
451 |
+
*/
|
452 |
+
$sql = "SELECT COUNT(id) FROM {$wpdb->prefix}pv_commission";
|
453 |
+
|
454 |
+
if ( !empty( $_GET[ 'm' ] ) ) {
|
455 |
+
|
456 |
+
$year = substr( $_GET[ 'm' ], 0, 4 );
|
457 |
+
$month = substr( $_GET[ 'm' ], 4, 2 );
|
458 |
+
|
459 |
+
$time_sql = "
|
460 |
+
WHERE MONTH(`time`) = '$month'
|
461 |
+
AND YEAR(`time`) = '$year'
|
462 |
+
";
|
463 |
+
|
464 |
+
$sql .= $time_sql;
|
465 |
+
}
|
466 |
+
|
467 |
+
if ( !empty( $_GET[ 'com_status' ] ) ) {
|
468 |
+
|
469 |
+
if ( $time_sql == '' ) {
|
470 |
+
$status_sql = "
|
471 |
+
WHERE status = '$com_status'
|
472 |
+
";
|
473 |
+
} else {
|
474 |
+
$status_sql = "
|
475 |
+
AND status = '$com_status'
|
476 |
+
";
|
477 |
+
}
|
478 |
+
|
479 |
+
$sql .= $status_sql;
|
480 |
+
}
|
481 |
+
|
482 |
+
|
483 |
+
if ( !empty( $_GET[ 'vendor_id' ] ) ) {
|
484 |
+
|
485 |
+
if ( $time_sql == '' && $status_sql == '' ) {
|
486 |
+
$vendor_sql = "
|
487 |
+
WHERE vendor_id = '$vendor_id'
|
488 |
+
";
|
489 |
+
} else {
|
490 |
+
$vendor_sql = "
|
491 |
+
AND vendor_id = '$vendor_id'
|
492 |
+
";
|
493 |
+
}
|
494 |
+
|
495 |
+
$sql .= $vendor_sql;
|
496 |
+
}
|
497 |
+
|
498 |
+
$max = $wpdb->get_var( $sql );
|
499 |
+
|
500 |
+
$sql = "
|
501 |
+
SELECT * FROM {$wpdb->prefix}pv_commission
|
502 |
+
";
|
503 |
+
|
504 |
+
if ( !empty( $_GET[ 'm' ] ) ) {
|
505 |
+
$sql .= $time_sql;
|
506 |
+
}
|
507 |
+
|
508 |
+
if ( !empty( $_GET['com_status'] ) ) {
|
509 |
+
$sql .= $status_sql;
|
510 |
+
}
|
511 |
+
|
512 |
+
if ( !empty( $_GET['vendor_id'] ) ) {
|
513 |
+
$sql .= $vendor_sql;
|
514 |
+
}
|
515 |
+
|
516 |
+
$offset = ( $current_page - 1 ) * $per_page;
|
517 |
+
|
518 |
+
$sql .= "
|
519 |
+
ORDER BY `{$orderby}` {$order}
|
520 |
+
LIMIT {$offset}, {$per_page}
|
521 |
+
";
|
522 |
+
|
523 |
+
// $this->items = $wpdb->get_results( $wpdb->prepare( $sql, ( $current_page - 1 ) * $per_page, $per_page ) );
|
524 |
+
$this->items = $wpdb->get_results( $sql );
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Pagination
|
528 |
+
*/
|
529 |
+
$this->set_pagination_args( array(
|
530 |
+
'total_items' => $max,
|
531 |
+
'per_page' => $per_page,
|
532 |
+
'total_pages' => ceil( $max / $per_page )
|
533 |
+
) );
|
534 |
+
}
|
535 |
+
|
536 |
+
/**
|
537 |
+
* Get Views for commissions page
|
538 |
+
*
|
539 |
+
*/
|
540 |
+
public function get_views() {
|
541 |
+
$views = array(
|
542 |
+
'all' => '<li class="all"><a href="' . admin_url( 'admin.php?page=wcv-commissions' ) . '">' . __( 'All', 'wc-vendors' ) . '</a></li>',
|
543 |
+
'due' => '<li class="all"><a href="' . admin_url( 'admin.php?page=wcv-commissions&com_status=due' ) . '">' . __( 'Due', 'wc-vendors' ) . '</a></li>',
|
544 |
+
'paid' => '<li class="all"><a href="' . admin_url( 'admin.php?page=wcv-commissions&com_status=paid' ) . '">' . __( 'Paid', 'wc-vendors' ) . '</a></li>',
|
545 |
+
'void' => '<li class="all"><a href="' . admin_url( 'admin.php?page=wcv-commissions&com_status=reversed' ) . '">' . __( 'Reversed', 'wc-vendors' ) . '</a></li>',
|
546 |
+
);
|
547 |
+
|
548 |
+
return $views;
|
549 |
+
}
|
550 |
+
|
551 |
+
|
552 |
+
|
553 |
+
}
|
classes/admin/emails/class-emails.php
CHANGED
@@ -17,21 +17,33 @@ class WCV_Emails
|
|
17 |
/**
|
18 |
*
|
19 |
*/
|
20 |
-
function __construct()
|
21 |
-
|
22 |
-
add_filter( 'woocommerce_email_classes', array( $this, '
|
23 |
-
add_filter( '
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
add_action( 'set_user_role', array( $this, 'application_status_email' ), 10, 2 );
|
28 |
add_action( 'transition_post_status', array( $this, 'trigger_new_product' ), 10, 3 );
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
add_filter( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
|
|
|
|
35 |
public function trigger_new_product( $from, $to, $post )
|
36 |
{
|
37 |
global $woocommerce;
|
@@ -46,23 +58,23 @@ class WCV_Emails
|
|
46 |
|
47 |
|
48 |
/**
|
49 |
-
*
|
50 |
*
|
51 |
* @param unknown $user_id
|
52 |
* @param unknown $role
|
53 |
*/
|
54 |
-
function application_status_email( $user_id, $role )
|
55 |
-
|
56 |
global $woocommerce;
|
57 |
|
58 |
if ( !empty( $_POST[ 'apply_for_vendor' ] ) || ( !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'approve_vendor' || $_GET[ 'action' ] == 'deny_vendor' ) ) ) {
|
59 |
|
60 |
if ( $role == 'pending_vendor' ) {
|
61 |
-
$status = __( 'pending', '
|
62 |
} else if ( $role == 'vendor' ) {
|
63 |
-
$status = __( 'approved', '
|
64 |
} else if ( !empty( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deny_vendor' ) {
|
65 |
-
$status = __( 'denied', '
|
66 |
}
|
67 |
|
68 |
$mails = $woocommerce->mailer()->get_emails();
|
@@ -73,45 +85,6 @@ class WCV_Emails
|
|
73 |
}
|
74 |
}
|
75 |
|
76 |
-
|
77 |
-
/**
|
78 |
-
*
|
79 |
-
*
|
80 |
-
* @param unknown $name
|
81 |
-
* @param unknown $_product
|
82 |
-
*
|
83 |
-
* @return unknown
|
84 |
-
*/
|
85 |
-
function show_vendor_in_email( $name, $_product )
|
86 |
-
{
|
87 |
-
$product = get_post( $_product->get_id() );
|
88 |
-
$sold_by_label = WC_Vendors::$pv_options->get_option( 'sold_by_label' );
|
89 |
-
$sold_by = WCV_Vendors::is_vendor( $product->post_author )
|
90 |
-
? sprintf( '<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page( $product->post_author ), WCV_Vendors::get_vendor_sold_by( $product->post_author ) )
|
91 |
-
: get_bloginfo( 'name' );
|
92 |
-
|
93 |
-
$name .= '<small class="wcvendors_sold_by_in_email"><br />' . apply_filters('wcvendors_sold_by_in_email', $sold_by_label, $_product->get_id(), $product->post_author ). $sold_by . '</small><br />';
|
94 |
-
|
95 |
-
return $name;
|
96 |
-
}
|
97 |
-
|
98 |
-
|
99 |
-
/**
|
100 |
-
*
|
101 |
-
*
|
102 |
-
* @param unknown $available_emails
|
103 |
-
*
|
104 |
-
* @return unknown
|
105 |
-
* @deprecriated v1.9.13
|
106 |
-
*/
|
107 |
-
public function order_action( $available_emails )
|
108 |
-
{
|
109 |
-
|
110 |
-
$available_emails[ ] = 'vendor_new_order';
|
111 |
-
return $available_emails;
|
112 |
-
}
|
113 |
-
|
114 |
-
|
115 |
/**
|
116 |
*
|
117 |
*
|
@@ -119,57 +92,153 @@ class WCV_Emails
|
|
119 |
*
|
120 |
* @return unknown
|
121 |
*/
|
122 |
-
public function
|
123 |
-
|
124 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-admin.php';
|
125 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-vendor.php';
|
126 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-approve-vendor.php';
|
127 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-shipped.php';
|
128 |
|
|
|
129 |
$emails[ 'WC_Email_Notify_Vendor' ] = new WC_Email_Notify_Vendor();
|
130 |
$emails[ 'WC_Email_Approve_Vendor' ] = new WC_Email_Approve_Vendor();
|
131 |
$emails[ 'WC_Email_Notify_Admin' ] = new WC_Email_Notify_Admin();
|
132 |
$emails[ 'WC_Email_Notify_Shipped' ] = new WC_Email_Notify_Shipped();
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
return $emails;
|
135 |
-
|
|
|
136 |
|
137 |
/**
|
138 |
-
* Add the vendor email to the low stock emails.
|
139 |
*
|
140 |
*/
|
141 |
-
public function vendor_stock_email( $emails, $product ) {
|
142 |
|
143 |
-
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
$
|
|
|
|
|
149 |
}
|
150 |
|
151 |
-
return $emails;
|
152 |
|
153 |
}
|
154 |
|
155 |
/**
|
156 |
-
* Filter hook for order actions meta box
|
157 |
*
|
158 |
-
*/
|
159 |
-
public function order_actions( $order_actions ){
|
160 |
-
$order_actions[ 'send_vvendor_new_order' ] = __( 'Resend
|
161 |
-
return $order_actions;
|
162 |
}
|
163 |
|
164 |
-
/**
|
165 |
-
* Action hook : trigger the notify vendor email
|
166 |
*
|
167 |
-
*/
|
168 |
-
public function order_actions_save( $order ){
|
169 |
|
170 |
WC()->mailer()->emails[ 'WC_Email_Notify_Vendor' ]->trigger( $order->get_id(), $order );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
|
|
|
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
17 |
/**
|
18 |
*
|
19 |
*/
|
20 |
+
public function __construct() {
|
21 |
+
|
22 |
+
add_filter( 'woocommerce_email_classes', array( $this, 'email_classes' ) );
|
23 |
+
add_filter( 'woocommerce_order_actions', array( $this, 'order_actions' ) );
|
24 |
+
add_action( 'woocommerce_order_action_send_vvendor_new_order', array( $this, 'order_actions_save') );
|
25 |
+
// Deprecaited
|
26 |
+
|
27 |
add_action( 'set_user_role', array( $this, 'application_status_email' ), 10, 2 );
|
28 |
add_action( 'transition_post_status', array( $this, 'trigger_new_product' ), 10, 3 );
|
29 |
|
30 |
+
// Low stock
|
31 |
+
// These fatal error in WC3.3.3 @todo fix !
|
32 |
+
add_filter( 'woocommerce_email_recipient_low_stock', array( $this, 'vendor_stock_email'), 10, 2 );
|
33 |
+
add_filter( 'woocommerce_email_recipient_no_stock', array( $this, 'vendor_stock_email'), 10, 2 );
|
34 |
+
add_filter( 'woocommerce_email_recipient_backorder', array( $this, 'vendor_stock_email'), 10, 2 );
|
35 |
+
|
36 |
+
// New emails
|
37 |
+
// Triggers
|
38 |
+
add_action( 'wcvendors_vendor_ship', array( $this, 'vendor_shipped' ), 10, 3 );
|
39 |
+
add_action( 'wcvendors_email_order_details',array( $this, 'vendor_order_details'), 10, 8 );
|
40 |
+
add_action( 'transition_post_status', array( $this, 'new_vendor_product' ), 10, 3 );
|
41 |
+
add_action( 'set_user_role', array( $this, 'vendor_application' ), 10, 2 );
|
42 |
+
|
43 |
}
|
44 |
|
45 |
+
|
46 |
+
// Depreciated
|
47 |
public function trigger_new_product( $from, $to, $post )
|
48 |
{
|
49 |
global $woocommerce;
|
58 |
|
59 |
|
60 |
/**
|
61 |
+
* @depreciated
|
62 |
*
|
63 |
* @param unknown $user_id
|
64 |
* @param unknown $role
|
65 |
*/
|
66 |
+
public function application_status_email( $user_id, $role ) {
|
67 |
+
|
68 |
global $woocommerce;
|
69 |
|
70 |
if ( !empty( $_POST[ 'apply_for_vendor' ] ) || ( !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'approve_vendor' || $_GET[ 'action' ] == 'deny_vendor' ) ) ) {
|
71 |
|
72 |
if ( $role == 'pending_vendor' ) {
|
73 |
+
$status = __( 'pending', 'wc-vendors' );
|
74 |
} else if ( $role == 'vendor' ) {
|
75 |
+
$status = __( 'approved', 'wc-vendors' );
|
76 |
} else if ( !empty( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deny_vendor' ) {
|
77 |
+
$status = __( 'denied', 'wc-vendors' );
|
78 |
}
|
79 |
|
80 |
$mails = $woocommerce->mailer()->get_emails();
|
85 |
}
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/**
|
89 |
*
|
90 |
*
|
92 |
*
|
93 |
* @return unknown
|
94 |
*/
|
95 |
+
public function email_classes( $emails ){
|
96 |
+
|
97 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-admin.php';
|
98 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-vendor.php';
|
99 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-approve-vendor.php';
|
100 |
require_once wcv_plugin_dir . 'classes/admin/emails/class-wc-notify-shipped.php';
|
101 |
|
102 |
+
// Emails to depreciate
|
103 |
$emails[ 'WC_Email_Notify_Vendor' ] = new WC_Email_Notify_Vendor();
|
104 |
$emails[ 'WC_Email_Approve_Vendor' ] = new WC_Email_Approve_Vendor();
|
105 |
$emails[ 'WC_Email_Notify_Admin' ] = new WC_Email_Notify_Admin();
|
106 |
$emails[ 'WC_Email_Notify_Shipped' ] = new WC_Email_Notify_Shipped();
|
107 |
|
108 |
+
// New emails introduced in @since 2.0.0
|
109 |
+
$emails[ 'WCVendors_Customer_Notify_Shipped'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-customer-notify-shipped.php' );
|
110 |
+
$emails[ 'WCVendors_Admin_Notify_Shipped'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-shipped.php' );
|
111 |
+
$emails[ 'WCVendors_Admin_Notify_Product'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-product.php' );
|
112 |
+
$emails[ 'WCVendors_Admin_Notify_Application'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-admin-notify-application.php' );
|
113 |
+
$emails[ 'WCVendors_Vendor_Notify_Application'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-application.php' );
|
114 |
+
$emails[ 'WCVendors_Vendor_Notify_Approved'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-approved.php' );
|
115 |
+
$emails[ 'WCVendors_Vendor_Notify_Denied'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-denied.php' );
|
116 |
+
$emails[ 'WCVendors_Vendor_Notify_Order'] = include( wcv_plugin_dir . 'classes/admin/emails/class-wcv-vendor-notify-order.php' );
|
117 |
+
|
118 |
return $emails;
|
119 |
+
|
120 |
+
} // email_classes()
|
121 |
|
122 |
/**
|
123 |
+
* Add the vendor email to the low stock emails.
|
124 |
*
|
125 |
*/
|
126 |
+
public function vendor_stock_email( $emails, $product ) {
|
127 |
|
128 |
+
if ( ! is_a( $product, 'WC_Product' ) ) return;
|
129 |
|
130 |
+
$post = get_post( $product->get_id() );
|
131 |
+
|
132 |
+
if ( WCV_Vendors::is_vendor( $post->post_author ) ) {
|
133 |
+
$vendor_data = get_userdata( $post->post_author );
|
134 |
+
$vendor_email = $vendor_data->user_email;
|
135 |
+
$emails .= ','.$vendor_email;
|
136 |
}
|
137 |
|
138 |
+
return $emails;
|
139 |
|
140 |
}
|
141 |
|
142 |
/**
|
143 |
+
* Filter hook for order actions meta box
|
144 |
*
|
145 |
+
*/
|
146 |
+
public function order_actions( $order_actions ){
|
147 |
+
$order_actions[ 'send_vvendor_new_order' ] = sprintf( __( 'Resend %s new order notification', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) );
|
148 |
+
return $order_actions;
|
149 |
}
|
150 |
|
151 |
+
/**
|
152 |
+
* Action hook : trigger the notify vendor email
|
153 |
*
|
154 |
+
*/
|
155 |
+
public function order_actions_save( $order ){
|
156 |
|
157 |
WC()->mailer()->emails[ 'WC_Email_Notify_Vendor' ]->trigger( $order->get_id(), $order );
|
158 |
+
WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Order' ]->trigger( $order->get_id(), $order );
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Trigger the notify vendor shipped emails
|
163 |
+
*
|
164 |
+
* @since 2.0.0
|
165 |
+
*/
|
166 |
+
public function vendor_shipped( $order_id, $user_id, $order ){
|
167 |
+
// Notify the admin
|
168 |
+
WC()->mailer()->emails[ 'WCVendors_Admin_Notify_Shipped' ]->trigger( $order->get_id(), $user_id, $order );
|
169 |
+
// Notify the customer
|
170 |
+
WC()->mailer()->emails[ 'WCVendors_Customer_Notify_Shipped' ]->trigger( $order->get_id(), $user_id, $order );
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Trigger the notify admin new vendor product
|
176 |
+
*
|
177 |
+
* @since 2.0.0
|
178 |
+
*/
|
179 |
+
public function new_vendor_product( $from, $to, $post ){
|
180 |
+
|
181 |
+
if ( $from != $to && $post->post_status == 'pending' && WCV_Vendors::is_vendor( $post->post_author ) && $post->post_type == 'product' ) {
|
182 |
|
183 |
+
WC()->mailer()->emails[ 'WCVendors_Admin_Notify_Product' ]->trigger( $post->post_id, $post );
|
184 |
+
}
|
185 |
}
|
186 |
|
187 |
+
/**
|
188 |
+
* Trigger the vendor application emails
|
189 |
+
*
|
190 |
+
* @since 2.0.0
|
191 |
+
*/
|
192 |
+
public function vendor_application( $user_id, $role ){
|
193 |
+
|
194 |
+
if ( !empty( $_POST[ 'apply_for_vendor' ] ) || ( !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'approve_vendor' || $_GET[ 'action' ] == 'deny_vendor' ) ) ) {
|
195 |
|
196 |
+
if ( $role == 'pending_vendor' ) {
|
197 |
+
WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Application' ]->trigger( $user_id, __( 'pending', 'wc-vendors' ) );
|
198 |
+
} else if ( $role == 'vendor' ) {
|
199 |
+
WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Approved' ]->trigger( $user_id );
|
200 |
+
} else if ( !empty( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deny_vendor' ) {
|
201 |
+
$reason = isset( $_GET[ 'reason' ] ) ? $_GET[ 'reason' ] : '';
|
202 |
+
WC()->mailer()->emails[ 'WCVendors_Vendor_Notify_Denied' ]->trigger( $user_id, $reason );
|
203 |
+
}
|
204 |
+
|
205 |
+
WC()->mailer()->emails[ 'WCVendors_Admin_Notify_Application' ]->trigger( $user_id, $role );
|
206 |
+
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/*
|
212 |
+
* Show the order details table filtered for each vendor
|
213 |
+
*/
|
214 |
+
public function vendor_order_details( $order, $vendor_items, $totals_display, $vendor_id, $sent_to_vendor = false, $sent_to_admin = false, $plain_text = false, $email = '' ) {
|
215 |
+
|
216 |
+
|
217 |
+
if ( $plain_text ) {
|
218 |
+
|
219 |
+
wc_get_template( 'emails/plain/vendor-order-details.php', array(
|
220 |
+
'order' => $order,
|
221 |
+
'vendor_id' => $vendor_id,
|
222 |
+
'vendor_items' => $vendor_items,
|
223 |
+
'sent_to_admin' => $sent_to_admin,
|
224 |
+
'sent_to_vendor' => $sent_to_vendor,
|
225 |
+
'totals_display' => $totals_display,
|
226 |
+
'plain_text' => $plain_text,
|
227 |
+
'email' => $email ),
|
228 |
+
'woocommerce', WCV_TEMPLATE_BASE );
|
229 |
+
|
230 |
+
} else {
|
231 |
+
|
232 |
+
wc_get_template( 'emails/vendor-order-details.php', array(
|
233 |
+
'order' => $order,
|
234 |
+
'vendor_id' => $vendor_id,
|
235 |
+
'vendor_items' => $vendor_items,
|
236 |
+
'sent_to_admin' => $sent_to_admin,
|
237 |
+
'sent_to_vendor' => $sent_to_vendor,
|
238 |
+
'totals_display' => $totals_display,
|
239 |
+
'plain_text' => $plain_text,
|
240 |
+
'email' => $email ),
|
241 |
+
'woocommerce', WCV_TEMPLATE_BASE );
|
242 |
+
}
|
243 |
+
}
|
244 |
}
|
classes/admin/emails/class-wc-approve-vendor.php
CHANGED
@@ -25,11 +25,11 @@ class WC_Email_Approve_Vendor extends WC_Email
|
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'vendor_application';
|
28 |
-
$this->title = __( 'Vendor Application', '
|
29 |
-
$this->description = __( 'Vendor application will either be approved, denied, or pending.', '
|
30 |
|
31 |
-
$this->heading = __( 'Application {status}', '
|
32 |
-
$this->subject = __( '[{blogname}] Your vendor application has been {status}', '
|
33 |
|
34 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
35 |
$this->template_html = 'application-status.php';
|
@@ -67,7 +67,7 @@ class WC_Email_Approve_Vendor extends WC_Email
|
|
67 |
|
68 |
$this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
69 |
|
70 |
-
if ( $status == __( 'pending', '
|
71 |
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
72 |
}
|
73 |
}
|
@@ -120,42 +120,42 @@ class WC_Email_Approve_Vendor extends WC_Email
|
|
120 |
{
|
121 |
$this->form_fields = array(
|
122 |
'enabled' => array(
|
123 |
-
'title' => __( 'Enable/Disable', '
|
124 |
'type' => 'checkbox',
|
125 |
-
'label' => __( 'Enable this email notification', '
|
126 |
-
'default' => '
|
127 |
),
|
128 |
'recipient' => array(
|
129 |
'title' => __( 'Recipient(s)', 'woocommerce' ),
|
130 |
'type' => 'text',
|
131 |
-
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to <code>%s</code>.', '
|
132 |
'placeholder' => '',
|
133 |
'default' => ''
|
134 |
),
|
135 |
'subject' => array(
|
136 |
-
'title' => __( 'Subject', '
|
137 |
'type' => 'text',
|
138 |
-
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', '
|
139 |
'placeholder' => '',
|
140 |
'default' => ''
|
141 |
),
|
142 |
'heading' => array(
|
143 |
-
'title' => __( 'Email Heading', '
|
144 |
'type' => 'text',
|
145 |
-
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', '
|
146 |
'placeholder' => '',
|
147 |
'default' => ''
|
148 |
),
|
149 |
'email_type' => array(
|
150 |
-
'title' => __( 'Email type', '
|
151 |
'type' => 'select',
|
152 |
-
'description' => __( 'Choose which format of email to send.', '
|
153 |
'default' => 'html',
|
154 |
'class' => 'email_type',
|
155 |
'options' => array(
|
156 |
-
'plain' => __( 'Plain text', '
|
157 |
-
'html' => __( 'HTML', '
|
158 |
-
'multipart' => __( 'Multipart', '
|
159 |
)
|
160 |
)
|
161 |
);
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'vendor_application';
|
28 |
+
$this->title = __( 'Vendor Application', 'wc-vendors' );
|
29 |
+
$this->description = __( 'Vendor application will either be approved, denied, or pending. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
|
30 |
|
31 |
+
$this->heading = __( 'Application {status}', 'wc-vendors' );
|
32 |
+
$this->subject = __( '[{blogname}] Your vendor application has been {status}', 'wc-vendors' );
|
33 |
|
34 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
35 |
$this->template_html = 'application-status.php';
|
67 |
|
68 |
$this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
69 |
|
70 |
+
if ( $status == __( 'pending', 'wc-vendors' ) ) {
|
71 |
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
72 |
}
|
73 |
}
|
120 |
{
|
121 |
$this->form_fields = array(
|
122 |
'enabled' => array(
|
123 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
124 |
'type' => 'checkbox',
|
125 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
126 |
+
'default' => 'no'
|
127 |
),
|
128 |
'recipient' => array(
|
129 |
'title' => __( 'Recipient(s)', 'woocommerce' ),
|
130 |
'type' => 'text',
|
131 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to <code>%s</code>.', 'wc-vendors' ), esc_attr( get_option( 'admin_email' ) ) ),
|
132 |
'placeholder' => '',
|
133 |
'default' => ''
|
134 |
),
|
135 |
'subject' => array(
|
136 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
137 |
'type' => 'text',
|
138 |
+
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', 'wc-vendors' ), $this->subject ),
|
139 |
'placeholder' => '',
|
140 |
'default' => ''
|
141 |
),
|
142 |
'heading' => array(
|
143 |
+
'title' => __( 'Email Heading', 'wc-vendors' ),
|
144 |
'type' => 'text',
|
145 |
+
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', 'wc-vendors' ), $this->heading ),
|
146 |
'placeholder' => '',
|
147 |
'default' => ''
|
148 |
),
|
149 |
'email_type' => array(
|
150 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
151 |
'type' => 'select',
|
152 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
153 |
'default' => 'html',
|
154 |
'class' => 'email_type',
|
155 |
'options' => array(
|
156 |
+
'plain' => __( 'Plain text', 'wc-vendors' ),
|
157 |
+
'html' => __( 'HTML', 'wc-vendors' ),
|
158 |
+
'multipart' => __( 'Multipart', 'wc-vendors' ),
|
159 |
)
|
160 |
)
|
161 |
);
|
classes/admin/emails/class-wc-notify-admin.php
CHANGED
@@ -25,11 +25,11 @@ class WC_Email_Notify_Admin extends WC_Email
|
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'admin_new_vendor_product';
|
28 |
-
$this->title = __( 'New Vendor Product', '
|
29 |
-
$this->description = __( 'New order emails are sent when a new product is submitted by a vendor', '
|
30 |
|
31 |
-
$this->heading = __( 'New product submitted: {product_name}', '
|
32 |
-
$this->subject = __( '[{blogname}] New product submitted by {vendor_name} - {product_name}', '
|
33 |
|
34 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
35 |
$this->template_html = 'new-product.php';
|
@@ -61,7 +61,7 @@ class WC_Email_Notify_Admin extends WC_Email
|
|
61 |
function trigger( $id, $post )
|
62 |
{
|
63 |
|
64 |
-
// Ensure that the post author is a vendor
|
65 |
if ( !WCV_Vendors::is_vendor( $post->post_author ) ) {
|
66 |
return;
|
67 |
}
|
@@ -131,10 +131,10 @@ class WC_Email_Notify_Admin extends WC_Email
|
|
131 |
{
|
132 |
$this->form_fields = array(
|
133 |
'enabled' => array(
|
134 |
-
'title' => __( 'Enable/Disable', '
|
135 |
'type' => 'checkbox',
|
136 |
-
'label' => __( 'Enable this email notification', '
|
137 |
-
'default' => '
|
138 |
),
|
139 |
'recipient' => array(
|
140 |
'title' => __( 'Recipient(s)', 'woocommerce' ),
|
@@ -144,29 +144,29 @@ class WC_Email_Notify_Admin extends WC_Email
|
|
144 |
'default' => ''
|
145 |
),
|
146 |
'subject' => array(
|
147 |
-
'title' => __( 'Subject', '
|
148 |
'type' => 'text',
|
149 |
-
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', '
|
150 |
'placeholder' => '',
|
151 |
'default' => ''
|
152 |
),
|
153 |
'heading' => array(
|
154 |
-
'title' => __( 'Email Heading', '
|
155 |
'type' => 'text',
|
156 |
-
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', '
|
157 |
'placeholder' => '',
|
158 |
'default' => ''
|
159 |
),
|
160 |
'email_type' => array(
|
161 |
-
'title' => __( 'Email type', '
|
162 |
'type' => 'select',
|
163 |
-
'description' => __( 'Choose which format of email to send.', '
|
164 |
'default' => 'html',
|
165 |
'class' => 'email_type',
|
166 |
'options' => array(
|
167 |
-
'plain' => __( 'Plain text', '
|
168 |
-
'html' => __( 'HTML', '
|
169 |
-
'multipart' => __( 'Multipart', '
|
170 |
)
|
171 |
)
|
172 |
);
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'admin_new_vendor_product';
|
28 |
+
$this->title = __( 'New Vendor Product', 'wc-vendors' );
|
29 |
+
$this->description = __( 'New order emails are sent when a new product is submitted by a vendor. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
|
30 |
|
31 |
+
$this->heading = __( 'New product submitted: {product_name}', 'wc-vendors' );
|
32 |
+
$this->subject = __( '[{blogname}] New product submitted by {vendor_name} - {product_name}', 'wc-vendors' );
|
33 |
|
34 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
35 |
$this->template_html = 'new-product.php';
|
61 |
function trigger( $id, $post )
|
62 |
{
|
63 |
|
64 |
+
// Ensure that the post author is a vendor
|
65 |
if ( !WCV_Vendors::is_vendor( $post->post_author ) ) {
|
66 |
return;
|
67 |
}
|
131 |
{
|
132 |
$this->form_fields = array(
|
133 |
'enabled' => array(
|
134 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
135 |
'type' => 'checkbox',
|
136 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
137 |
+
'default' => 'no'
|
138 |
),
|
139 |
'recipient' => array(
|
140 |
'title' => __( 'Recipient(s)', 'woocommerce' ),
|
144 |
'default' => ''
|
145 |
),
|
146 |
'subject' => array(
|
147 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
148 |
'type' => 'text',
|
149 |
+
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', 'wc-vendors' ), $this->subject ),
|
150 |
'placeholder' => '',
|
151 |
'default' => ''
|
152 |
),
|
153 |
'heading' => array(
|
154 |
+
'title' => __( 'Email Heading', 'wc-vendors' ),
|
155 |
'type' => 'text',
|
156 |
+
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', 'wc-vendors' ), $this->heading ),
|
157 |
'placeholder' => '',
|
158 |
'default' => ''
|
159 |
),
|
160 |
'email_type' => array(
|
161 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
162 |
'type' => 'select',
|
163 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
164 |
'default' => 'html',
|
165 |
'class' => 'email_type',
|
166 |
'options' => array(
|
167 |
+
'plain' => __( 'Plain text', 'wc-vendors' ),
|
168 |
+
'html' => __( 'HTML', 'wc-vendors' ),
|
169 |
+
'multipart' => __( 'Multipart', 'wc-vendors' ),
|
170 |
)
|
171 |
)
|
172 |
);
|
classes/admin/emails/class-wc-notify-shipped.php
CHANGED
@@ -25,11 +25,11 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'vendor_notify_shipped';
|
28 |
-
$this->title = __( 'Vendor has shipped', '
|
29 |
-
$this->description = __( 'An email is sent when a vendor has marked one of their orders as shipped.', '
|
30 |
|
31 |
-
$this->heading = __( 'Your order has been shipped', '
|
32 |
-
$this->subject = __( '[{blogname}] Your order has been shipped ({order_number}) - {order_date}', '
|
33 |
|
34 |
$this->template_html = 'notify-vendor-shipped.php';
|
35 |
$this->template_plain = 'notify-vendor-shipped.php';
|
@@ -52,7 +52,7 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
52 |
{
|
53 |
$this->object = wc_get_order( $order_id );
|
54 |
$this->current_vendor = $vendor_id;
|
55 |
-
$order_date =
|
56 |
|
57 |
$this->find[ ] = '{order_date}';
|
58 |
$this->replace[ ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
@@ -60,7 +60,7 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
60 |
$this->find[ ] = '{order_number}';
|
61 |
$this->replace[ ] = $this->object->get_order_number();
|
62 |
|
63 |
-
$billing_email =
|
64 |
|
65 |
if ( !$this->is_enabled() ) return;
|
66 |
|
@@ -112,7 +112,7 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
112 |
public function check_order_totals( $total_rows, $order )
|
113 |
{
|
114 |
$return[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
115 |
-
$return[ 'cart_subtotal' ][ 'label' ] = __( 'Subtotal:', '
|
116 |
|
117 |
return $return;
|
118 |
}
|
@@ -129,7 +129,7 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
129 |
wc_get_template( $this->template_html, array(
|
130 |
'order' => $this->object,
|
131 |
'email_heading' => $this->get_heading()
|
132 |
-
), 'woocommerce', $this->template_base );
|
133 |
|
134 |
return ob_get_clean();
|
135 |
}
|
@@ -147,7 +147,7 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
147 |
wc_get_template( $this->template_plain, array(
|
148 |
'order' => $this->object,
|
149 |
'email_heading' => $this->get_heading()
|
150 |
-
), 'woocommerce', $this->template_base );
|
151 |
|
152 |
return ob_get_clean();
|
153 |
}
|
@@ -163,35 +163,35 @@ class WC_Email_Notify_Shipped extends WC_Email
|
|
163 |
{
|
164 |
$this->form_fields = array(
|
165 |
'enabled' => array(
|
166 |
-
'title' => __( 'Enable/Disable', '
|
167 |
'type' => 'checkbox',
|
168 |
-
'label' => __( 'Enable this email notification', '
|
169 |
-
'default' => '
|
170 |
),
|
171 |
'subject' => array(
|
172 |
-
'title' => __( 'Subject', '
|
173 |
'type' => 'text',
|
174 |
-
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', '
|
175 |
'placeholder' => '',
|
176 |
'default' => ''
|
177 |
),
|
178 |
'heading' => array(
|
179 |
-
'title' => __( 'Email Heading', '
|
180 |
'type' => 'text',
|
181 |
-
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', '
|
182 |
'placeholder' => '',
|
183 |
'default' => ''
|
184 |
),
|
185 |
'email_type' => array(
|
186 |
-
'title' => __( 'Email type', '
|
187 |
'type' => 'select',
|
188 |
-
'description' => __( 'Choose which format of email to send.', '
|
189 |
'default' => 'html',
|
190 |
'class' => 'email_type',
|
191 |
'options' => array(
|
192 |
-
'plain' => __( 'Plain text', '
|
193 |
-
'html' => __( 'HTML', '
|
194 |
-
'multipart' => __( 'Multipart', '
|
195 |
)
|
196 |
)
|
197 |
);
|
25 |
function __construct()
|
26 |
{
|
27 |
$this->id = 'vendor_notify_shipped';
|
28 |
+
$this->title = __( 'Vendor has shipped', 'wc-vendors' );
|
29 |
+
$this->description = __( 'An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
|
30 |
|
31 |
+
$this->heading = __( 'Your order has been shipped', 'wc-vendors' );
|
32 |
+
$this->subject = __( '[{blogname}] Your order has been shipped ({order_number}) - {order_date}', 'wc-vendors' );
|
33 |
|
34 |
$this->template_html = 'notify-vendor-shipped.php';
|
35 |
$this->template_plain = 'notify-vendor-shipped.php';
|
52 |
{
|
53 |
$this->object = wc_get_order( $order_id );
|
54 |
$this->current_vendor = $vendor_id;
|
55 |
+
$order_date = $this->object->get_date_created();
|
56 |
|
57 |
$this->find[ ] = '{order_date}';
|
58 |
$this->replace[ ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
60 |
$this->find[ ] = '{order_number}';
|
61 |
$this->replace[ ] = $this->object->get_order_number();
|
62 |
|
63 |
+
$billing_email = $this->object->get_billing_email();
|
64 |
|
65 |
if ( !$this->is_enabled() ) return;
|
66 |
|
112 |
public function check_order_totals( $total_rows, $order )
|
113 |
{
|
114 |
$return[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
115 |
+
$return[ 'cart_subtotal' ][ 'label' ] = __( 'Subtotal:', 'wc-vendors' );
|
116 |
|
117 |
return $return;
|
118 |
}
|
129 |
wc_get_template( $this->template_html, array(
|
130 |
'order' => $this->object,
|
131 |
'email_heading' => $this->get_heading()
|
132 |
+
), 'woocommerce/emails', $this->template_base );
|
133 |
|
134 |
return ob_get_clean();
|
135 |
}
|
147 |
wc_get_template( $this->template_plain, array(
|
148 |
'order' => $this->object,
|
149 |
'email_heading' => $this->get_heading()
|
150 |
+
), 'woocommerce/emails', $this->template_base );
|
151 |
|
152 |
return ob_get_clean();
|
153 |
}
|
163 |
{
|
164 |
$this->form_fields = array(
|
165 |
'enabled' => array(
|
166 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
167 |
'type' => 'checkbox',
|
168 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
169 |
+
'default' => 'no'
|
170 |
),
|
171 |
'subject' => array(
|
172 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
173 |
'type' => 'text',
|
174 |
+
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', 'wc-vendors' ), $this->subject ),
|
175 |
'placeholder' => '',
|
176 |
'default' => ''
|
177 |
),
|
178 |
'heading' => array(
|
179 |
+
'title' => __( 'Email Heading', 'wc-vendors' ),
|
180 |
'type' => 'text',
|
181 |
+
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', 'wc-vendors' ), $this->heading ),
|
182 |
'placeholder' => '',
|
183 |
'default' => ''
|
184 |
),
|
185 |
'email_type' => array(
|
186 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
187 |
'type' => 'select',
|
188 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
189 |
'default' => 'html',
|
190 |
'class' => 'email_type',
|
191 |
'options' => array(
|
192 |
+
'plain' => __( 'Plain text', 'wc-vendors' ),
|
193 |
+
'html' => __( 'HTML', 'wc-vendors' ),
|
194 |
+
'multipart' => __( 'Multipart', 'wc-vendors' ),
|
195 |
)
|
196 |
)
|
197 |
);
|
classes/admin/emails/class-wc-notify-vendor.php
CHANGED
@@ -24,16 +24,16 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
24 |
function __construct()
|
25 |
{
|
26 |
$this->id = 'vendor_new_order';
|
27 |
-
$this->title = __( 'Notify vendors', '
|
28 |
-
$this->description = __( 'New order emails are sent when an order is received/paid by a customer.', '
|
29 |
|
30 |
-
$this->heading = __( 'New customer order', '
|
31 |
-
$this->subject = __( '[{blogname}] New customer order ({order_number}) - {order_date}', '
|
32 |
|
33 |
$this->template_html = 'vendor-new-order.php';
|
34 |
$this->template_plain = 'vendor-new-order.php';
|
35 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
36 |
-
|
37 |
// Triggers for this email
|
38 |
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
|
39 |
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ) );
|
@@ -62,7 +62,7 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
62 |
if ( $order_id ) {
|
63 |
$this->object = wc_get_order( $order_id );
|
64 |
|
65 |
-
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $this->object->order_date : $this->object->get_date_created();
|
66 |
|
67 |
$this->find[ ] = '{order_date}';
|
68 |
$this->replace[ ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
@@ -80,16 +80,16 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
80 |
|
81 |
add_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
|
82 |
add_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
|
83 |
-
add_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
|
84 |
-
add_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
|
85 |
foreach ( $vendors as $user_id => $user_email ) {
|
86 |
$this->current_vendor = $user_id;
|
87 |
$this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
88 |
}
|
89 |
remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
|
90 |
remove_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
|
91 |
-
remove_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
|
92 |
-
remove_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
|
93 |
}
|
94 |
|
95 |
|
@@ -104,32 +104,32 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
104 |
function check_order_totals( $total_rows, $order )
|
105 |
{
|
106 |
|
107 |
-
$commission_label = apply_filters('wcv_notify_vendor_commission_label', __( 'Commission Subtotal:', '
|
108 |
$return[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
109 |
-
$return[ 'cart_subtotal' ][ 'label' ] = $commission_label;
|
110 |
|
111 |
-
if (
|
112 |
-
$return[ 'tax_subtotal'] = array( 'label' => '', 'value' => '');
|
113 |
-
$return[ 'tax_subtotal']['label'] = apply_filters('wcv_notify_vendor_tax_label', __( 'Tax Subtotal:', '
|
114 |
-
}
|
115 |
|
116 |
$dues = WCV_Vendors::get_vendor_dues_from_order( $order );
|
117 |
|
118 |
foreach ( $dues as $due ) {
|
119 |
if ( $this->current_vendor == $due['vendor_id'] ) {
|
120 |
if (!empty($return[ 'shipping' ])) $return[ 'shipping' ] = $total_rows[ 'shipping' ];
|
121 |
-
$return[ 'shipping' ]['label'] = __( 'Shipping Subtotal:', '
|
122 |
$return[ 'shipping' ][ 'value' ] = wc_price( $due['shipping'] );
|
123 |
-
if (
|
124 |
-
$return[ 'tax_subtotal']['value'] += $due['tax'];
|
125 |
}
|
126 |
break;
|
127 |
}
|
128 |
}
|
129 |
-
// Format tax price
|
130 |
-
if (
|
131 |
-
$return[ 'tax_subtotal']['value'] = wc_price( $return[ 'tax_subtotal'] ['value'] );
|
132 |
-
}
|
133 |
|
134 |
return $return;
|
135 |
}
|
@@ -145,7 +145,7 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
145 |
public function get_vendors( $order )
|
146 |
{
|
147 |
$items = $order->get_items();
|
148 |
-
$vendors = array();
|
149 |
|
150 |
foreach ( $items as $key => $product ) {
|
151 |
|
@@ -173,17 +173,17 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
173 |
* @return unknown
|
174 |
*/
|
175 |
function check_items( $items, $order )
|
176 |
-
{
|
177 |
|
178 |
-
$settings = get_option( 'woocommerce_vendor_new_order_settings' );
|
179 |
|
180 |
-
if ( empty( $settings ) ) $settings = $this->get_default_settings();
|
181 |
|
182 |
foreach ( $items as $key => $product ) {
|
183 |
|
184 |
-
// If this is a line item
|
185 |
-
if ( $product['type'] == 'line_item' ) {
|
186 |
-
|
187 |
$author = WCV_Vendors::get_vendor_from_product( $product[ 'product_id' ] );
|
188 |
|
189 |
if ( $this->current_vendor != $author) {
|
@@ -191,10 +191,10 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
191 |
continue;
|
192 |
} else {
|
193 |
|
194 |
-
// If display commission is ticked show this otherwise show the full price.
|
195 |
-
if ( 'yes' == $settings[ 'commission_display' ] ){
|
196 |
|
197 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
198 |
|
199 |
// Get correct product_id depending on which product type
|
200 |
$product_id = !empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
|
@@ -204,11 +204,11 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
204 |
$items[ $key ][ 'line_subtotal' ] = $commission_due;
|
205 |
$items[ $key ][ 'line_total' ] = $commission_due;
|
206 |
|
207 |
-
// Don't display tax if give tax is not enabled.
|
208 |
-
if ( !
|
209 |
-
unset($items[ $key ][ 'line_tax' ]) ;
|
210 |
}
|
211 |
-
}
|
212 |
}
|
213 |
}
|
214 |
|
@@ -216,7 +216,7 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
216 |
|
217 |
return $items;
|
218 |
|
219 |
-
} // check_items()
|
220 |
|
221 |
|
222 |
/**
|
@@ -265,41 +265,41 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
265 |
{
|
266 |
$this->form_fields = array(
|
267 |
'enabled' => array(
|
268 |
-
'title' => __( 'Enable/Disable', '
|
269 |
'type' => 'checkbox',
|
270 |
-
'label' => __( 'Enable this email notification', '
|
271 |
-
'default' => '
|
272 |
),
|
273 |
'subject' => array(
|
274 |
-
'title' => __( 'Subject', '
|
275 |
'type' => 'text',
|
276 |
-
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', '
|
277 |
'placeholder' => '',
|
278 |
'default' => ''
|
279 |
),
|
280 |
'heading' => array(
|
281 |
-
'title' => __( 'Email Heading', '
|
282 |
'type' => 'text',
|
283 |
-
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', '
|
284 |
'placeholder' => '',
|
285 |
'default' => ''
|
286 |
),
|
287 |
'commission_display' => array(
|
288 |
-
'title' => __( 'Product Totals', '
|
289 |
'type' => 'checkbox',
|
290 |
-
'label' => __( 'Show the commission due/paid as the product totals instead of the product prices.', '
|
291 |
'default' => 'yes'
|
292 |
),
|
293 |
'email_type' => array(
|
294 |
-
'title' => __( 'Email type', '
|
295 |
'type' => 'select',
|
296 |
-
'description' => __( 'Choose which format of email to send.', '
|
297 |
'default' => 'html',
|
298 |
'class' => 'email_type',
|
299 |
'options' => array(
|
300 |
-
'plain' => __( 'Plain text', '
|
301 |
-
'html' => __( 'HTML', '
|
302 |
-
'multipart' => __( 'Multipart', '
|
303 |
)
|
304 |
)
|
305 |
);
|
@@ -307,49 +307,49 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
307 |
|
308 |
|
309 |
/**
|
310 |
-
* check the order line item sub total to ensure that the tax is shown correctly on the vendor emails
|
311 |
*/
|
312 |
-
function check_order_formatted_line_subtotal( $subtotal, $item, $order ){
|
313 |
|
314 |
-
$order_currency = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->get_order_currency() : $order->get_currency();
|
315 |
|
316 |
$subtotal = wc_price( $order->get_line_subtotal( $item ), array( 'currency' => $order_currency ) );
|
317 |
|
318 |
-
return $subtotal;
|
319 |
|
320 |
-
} // check_order_formatted_line_subtotal()
|
321 |
|
322 |
|
323 |
-
function check_order_subtotal_to_display( $subtotal, $compound, $order ){
|
324 |
|
325 |
-
$new_subtotal = 0;
|
326 |
|
327 |
foreach ( $order->get_items() as $key => $product ) {
|
328 |
$new_subtotal += $product[ 'line_subtotal' ];
|
329 |
}
|
330 |
|
331 |
-
return wc_price( $new_subtotal );
|
332 |
|
333 |
|
334 |
-
} // check_order_subtotal_to_display()
|
335 |
|
336 |
/**
|
337 |
-
* Get the default settings for this email if not already set.
|
338 |
-
*
|
339 |
-
* @since 1.9.9
|
340 |
-
*
|
341 |
*/
|
342 |
-
public function get_default_settings(){
|
343 |
|
344 |
-
$settings = array();
|
345 |
|
346 |
foreach ( $this->form_fields as $key => $field ) {
|
347 |
-
$settings[ $key ] = $field[ 'default' ];
|
348 |
}
|
349 |
|
350 |
-
return $settings;
|
351 |
|
352 |
} // get_default_settings()
|
353 |
-
|
354 |
|
355 |
}
|
24 |
function __construct()
|
25 |
{
|
26 |
$this->id = 'vendor_new_order';
|
27 |
+
$this->title = __( 'Notify vendors', 'wc-vendors' );
|
28 |
+
$this->description = __( 'New order emails are sent when an order is received/paid by a customer. <strong>This email has been depreciated.</strong>', 'wc-vendors' );
|
29 |
|
30 |
+
$this->heading = __( 'New customer order', 'wc-vendors' );
|
31 |
+
$this->subject = __( '[{blogname}] New customer order ({order_number}) - {order_date}', 'wc-vendors' );
|
32 |
|
33 |
$this->template_html = 'vendor-new-order.php';
|
34 |
$this->template_plain = 'vendor-new-order.php';
|
35 |
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/emails/';
|
36 |
+
|
37 |
// Triggers for this email
|
38 |
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ) );
|
39 |
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ) );
|
62 |
if ( $order_id ) {
|
63 |
$this->object = wc_get_order( $order_id );
|
64 |
|
65 |
+
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $this->object->order_date : $this->object->get_date_created();
|
66 |
|
67 |
$this->find[ ] = '{order_date}';
|
68 |
$this->replace[ ] = date_i18n( wc_date_format(), strtotime( $order_date ) );
|
80 |
|
81 |
add_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
|
82 |
add_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
|
83 |
+
add_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
|
84 |
+
add_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
|
85 |
foreach ( $vendors as $user_id => $user_email ) {
|
86 |
$this->current_vendor = $user_id;
|
87 |
$this->send( $user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
88 |
}
|
89 |
remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'check_order_totals' ), 10, 2 );
|
90 |
remove_filter( 'woocommerce_order_get_items', array( $this, 'check_items' ), 10, 2 );
|
91 |
+
remove_filter( 'woocommerce_order_formatted_line_subtotal', array( $this, 'check_order_formatted_line_subtotal' ), 10, 3 );
|
92 |
+
remove_filter( 'woocommerce_order_subtotal_to_display', array( $this, 'check_order_subtotal_to_display'), 10, 3 );
|
93 |
}
|
94 |
|
95 |
|
104 |
function check_order_totals( $total_rows, $order )
|
105 |
{
|
106 |
|
107 |
+
$commission_label = apply_filters('wcv_notify_vendor_commission_label', __( 'Commission Subtotal:', 'wc-vendors' ) ) ;
|
108 |
$return[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
109 |
+
$return[ 'cart_subtotal' ][ 'label' ] = $commission_label;
|
110 |
|
111 |
+
if ( get_option( 'wcvendors_vendor_give_taxes' ) ) {
|
112 |
+
$return[ 'tax_subtotal'] = array( 'label' => '', 'value' => '');
|
113 |
+
$return[ 'tax_subtotal']['label'] = apply_filters('wcv_notify_vendor_tax_label', __( 'Tax Subtotal:', 'wc-vendors' ) ) ;
|
114 |
+
}
|
115 |
|
116 |
$dues = WCV_Vendors::get_vendor_dues_from_order( $order );
|
117 |
|
118 |
foreach ( $dues as $due ) {
|
119 |
if ( $this->current_vendor == $due['vendor_id'] ) {
|
120 |
if (!empty($return[ 'shipping' ])) $return[ 'shipping' ] = $total_rows[ 'shipping' ];
|
121 |
+
$return[ 'shipping' ]['label'] = __( 'Shipping Subtotal:', 'wc-vendors' );
|
122 |
$return[ 'shipping' ][ 'value' ] = wc_price( $due['shipping'] );
|
123 |
+
if ( get_option( 'wcvendors_vendor_give_taxes' ) ) {
|
124 |
+
$return[ 'tax_subtotal']['value'] += (float) $due['tax'];
|
125 |
}
|
126 |
break;
|
127 |
}
|
128 |
}
|
129 |
+
// Format tax price
|
130 |
+
if ( get_option( 'wcvendors_vendor_give_taxes' ) ) {
|
131 |
+
$return[ 'tax_subtotal']['value'] = wc_price( $return[ 'tax_subtotal'] ['value'] );
|
132 |
+
}
|
133 |
|
134 |
return $return;
|
135 |
}
|
145 |
public function get_vendors( $order )
|
146 |
{
|
147 |
$items = $order->get_items();
|
148 |
+
$vendors = array();
|
149 |
|
150 |
foreach ( $items as $key => $product ) {
|
151 |
|
173 |
* @return unknown
|
174 |
*/
|
175 |
function check_items( $items, $order )
|
176 |
+
{
|
177 |
|
178 |
+
$settings = get_option( 'woocommerce_vendor_new_order_settings' );
|
179 |
|
180 |
+
if ( empty( $settings ) ) $settings = $this->get_default_settings();
|
181 |
|
182 |
foreach ( $items as $key => $product ) {
|
183 |
|
184 |
+
// If this is a line item
|
185 |
+
if ( $product['type'] == 'line_item' ) {
|
186 |
+
|
187 |
$author = WCV_Vendors::get_vendor_from_product( $product[ 'product_id' ] );
|
188 |
|
189 |
if ( $this->current_vendor != $author) {
|
191 |
continue;
|
192 |
} else {
|
193 |
|
194 |
+
// If display commission is ticked show this otherwise show the full price.
|
195 |
+
if ( 'yes' == $settings[ 'commission_display' ] ){
|
196 |
|
197 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
198 |
|
199 |
// Get correct product_id depending on which product type
|
200 |
$product_id = !empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
|
204 |
$items[ $key ][ 'line_subtotal' ] = $commission_due;
|
205 |
$items[ $key ][ 'line_total' ] = $commission_due;
|
206 |
|
207 |
+
// Don't display tax if give tax is not enabled.
|
208 |
+
if ( !get_option( 'wcvendors_vendor_give_taxes' ) ) {
|
209 |
+
unset($items[ $key ][ 'line_tax' ]) ;
|
210 |
}
|
211 |
+
}
|
212 |
}
|
213 |
}
|
214 |
|
216 |
|
217 |
return $items;
|
218 |
|
219 |
+
} // check_items()
|
220 |
|
221 |
|
222 |
/**
|
265 |
{
|
266 |
$this->form_fields = array(
|
267 |
'enabled' => array(
|
268 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
269 |
'type' => 'checkbox',
|
270 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
271 |
+
'default' => 'no'
|
272 |
),
|
273 |
'subject' => array(
|
274 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
275 |
'type' => 'text',
|
276 |
+
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: <code>%s</code>.', 'wc-vendors' ), $this->subject ),
|
277 |
'placeholder' => '',
|
278 |
'default' => ''
|
279 |
),
|
280 |
'heading' => array(
|
281 |
+
'title' => __( 'Email Heading', 'wc-vendors' ),
|
282 |
'type' => 'text',
|
283 |
+
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>.', 'wc-vendors' ), $this->heading ),
|
284 |
'placeholder' => '',
|
285 |
'default' => ''
|
286 |
),
|
287 |
'commission_display' => array(
|
288 |
+
'title' => __( 'Product Totals', 'wc-vendors' ),
|
289 |
'type' => 'checkbox',
|
290 |
+
'label' => __( 'Show the commission due/paid as the product totals instead of the product prices.', 'wc-vendors' ),
|
291 |
'default' => 'yes'
|
292 |
),
|
293 |
'email_type' => array(
|
294 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
295 |
'type' => 'select',
|
296 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
297 |
'default' => 'html',
|
298 |
'class' => 'email_type',
|
299 |
'options' => array(
|
300 |
+
'plain' => __( 'Plain text', 'wc-vendors' ),
|
301 |
+
'html' => __( 'HTML', 'wc-vendors' ),
|
302 |
+
'multipart' => __( 'Multipart', 'wc-vendors' ),
|
303 |
)
|
304 |
)
|
305 |
);
|
307 |
|
308 |
|
309 |
/**
|
310 |
+
* check the order line item sub total to ensure that the tax is shown correctly on the vendor emails
|
311 |
*/
|
312 |
+
function check_order_formatted_line_subtotal( $subtotal, $item, $order ){
|
313 |
|
314 |
+
$order_currency = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->get_order_currency() : $order->get_currency();
|
315 |
|
316 |
$subtotal = wc_price( $order->get_line_subtotal( $item ), array( 'currency' => $order_currency ) );
|
317 |
|
318 |
+
return $subtotal;
|
319 |
|
320 |
+
} // check_order_formatted_line_subtotal()
|
321 |
|
322 |
|
323 |
+
function check_order_subtotal_to_display( $subtotal, $compound, $order ){
|
324 |
|
325 |
+
$new_subtotal = 0;
|
326 |
|
327 |
foreach ( $order->get_items() as $key => $product ) {
|
328 |
$new_subtotal += $product[ 'line_subtotal' ];
|
329 |
}
|
330 |
|
331 |
+
return wc_price( $new_subtotal );
|
332 |
|
333 |
|
334 |
+
} // check_order_subtotal_to_display()
|
335 |
|
336 |
/**
|
337 |
+
* Get the default settings for this email if not already set.
|
338 |
+
*
|
339 |
+
* @since 1.9.9
|
340 |
+
*
|
341 |
*/
|
342 |
+
public function get_default_settings(){
|
343 |
|
344 |
+
$settings = array();
|
345 |
|
346 |
foreach ( $this->form_fields as $key => $field ) {
|
347 |
+
$settings[ $key ] = $field[ 'default' ];
|
348 |
}
|
349 |
|
350 |
+
return $settings;
|
351 |
|
352 |
} // get_default_settings()
|
353 |
+
|
354 |
|
355 |
}
|
classes/admin/emails/class-wcv-admin-notify-application.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Admin_Notify_Application' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify Admin Shipped
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCVendors_Admin_Notify_Shipped
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Admin_Notify_Application extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'admin_notify_application';
|
27 |
+
$this->title = sprintf( __( 'Admin notify vendor application', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to chosen recipient(s) when a user applies to be a %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->template_html = 'emails/admin-notify-application.php';
|
30 |
+
$this->template_plain = 'emails/plain/admin-notify-application.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
'{user_name}' => '',
|
35 |
+
);
|
36 |
+
|
37 |
+
// Call parent constructor
|
38 |
+
parent::__construct();
|
39 |
+
|
40 |
+
// Other settings
|
41 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get email subject.
|
46 |
+
*
|
47 |
+
* @since 2.0.0
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function get_default_subject() {
|
51 |
+
return sprintf( __( '[{site_title}] {user_name} has applied to be a %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get email heading.
|
56 |
+
*
|
57 |
+
* @since 2.0.0
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function get_default_heading() {
|
61 |
+
return sprintf( __( '%s application received', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Trigger the sending of this email.
|
66 |
+
*
|
67 |
+
* @param int $order_id The order ID.
|
68 |
+
* @param WC_Order $order Order object.
|
69 |
+
*/
|
70 |
+
public function trigger( $vendor_id, $status ) {
|
71 |
+
|
72 |
+
$this->setup_locale();
|
73 |
+
|
74 |
+
$this->user = get_userdata( $vendor_id );
|
75 |
+
$this->status = $status;
|
76 |
+
|
77 |
+
if ( $this->is_enabled() && $this->get_recipient() && $status === $this->get_option( 'notification' ) ) {
|
78 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
79 |
+
}
|
80 |
+
|
81 |
+
$this->restore_locale();
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get content html.
|
86 |
+
*
|
87 |
+
* @access public
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public function get_content_html() {
|
91 |
+
|
92 |
+
return wc_get_template_html( $this->template_html, array(
|
93 |
+
'order' => $this->object,
|
94 |
+
'email_heading' => $this->get_heading(),
|
95 |
+
'sent_to_admin' => true,
|
96 |
+
'plain_text' => false,
|
97 |
+
'email' => $this,
|
98 |
+
'user' => $this->user,
|
99 |
+
'status' => $this->status,
|
100 |
+
), 'woocommerce', $this->template_base );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get content plain.
|
105 |
+
*
|
106 |
+
* @access public
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function get_content_plain() {
|
110 |
+
return wc_get_template_html( $this->template_plain, array(
|
111 |
+
'order' => $this->object,
|
112 |
+
'email_heading' => $this->get_heading(),
|
113 |
+
'sent_to_admin' => true,
|
114 |
+
'plain_text' => true,
|
115 |
+
'email' => $this,
|
116 |
+
'user' => $this->user,
|
117 |
+
'status' => $this->status,
|
118 |
+
), 'woocommerce', $this->template_base );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Initialise settings form fields.
|
123 |
+
*/
|
124 |
+
public function init_form_fields() {
|
125 |
+
$this->form_fields = array(
|
126 |
+
'enabled' => array(
|
127 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
128 |
+
'type' => 'checkbox',
|
129 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
130 |
+
'default' => 'no',
|
131 |
+
),
|
132 |
+
'recipient' => array(
|
133 |
+
'title' => __( 'Recipient(s)', 'wc-vendors' ),
|
134 |
+
'type' => 'text',
|
135 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'wc-vendors' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
136 |
+
'placeholder' => '',
|
137 |
+
'default' => '',
|
138 |
+
'desc_tip' => true,
|
139 |
+
),
|
140 |
+
'subject' => array(
|
141 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
142 |
+
'type' => 'text',
|
143 |
+
'desc_tip' => true,
|
144 |
+
/* translators: %s: list of placeholders */
|
145 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{user_name}</code>' ),
|
146 |
+
'placeholder' => $this->get_default_subject(),
|
147 |
+
'default' => '',
|
148 |
+
),
|
149 |
+
'heading' => array(
|
150 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
151 |
+
'type' => 'text',
|
152 |
+
'desc_tip' => true,
|
153 |
+
/* translators: %s: list of placeholders */
|
154 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{user_name}</code>' ),
|
155 |
+
'placeholder' => $this->get_default_heading(),
|
156 |
+
'default' => '',
|
157 |
+
),
|
158 |
+
'notification' => array(
|
159 |
+
'title' => __( 'Notification', 'wc-vendors' ),
|
160 |
+
'type' => 'select',
|
161 |
+
'description' => __( 'Choose when to be notified of an application.', 'wc-vendors' ),
|
162 |
+
'default' => 'pending',
|
163 |
+
'class' => 'wc-enhanced-select',
|
164 |
+
'options' => array(
|
165 |
+
'vendor' => __( 'All Applications', 'wc-vendors'),
|
166 |
+
'pending_vendor' => __( 'Pending Applications', 'wc-vendors' ),
|
167 |
+
),
|
168 |
+
'desc_tip' => true,
|
169 |
+
),
|
170 |
+
'email_type' => array(
|
171 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
172 |
+
'type' => 'select',
|
173 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
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 WCVendors_Admin_Notify_Application();
|
classes/admin/emails/class-wcv-admin-notify-product.php
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Admin_Notify_Product' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify Admin of new vendor product
|
11 |
+
*
|
12 |
+
* An email sent to the admin when a vendor adds a new product for approval
|
13 |
+
*
|
14 |
+
* @class WCVendors_Admin_Notify_Product
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Admin_Notify_Product extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'admin_notify_product';
|
27 |
+
$this->title = sprintf( __( 'Admin new %s product', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to chosen recipient(s) when a %s submits a product for approval.', 'wc-vendors' ), wcv_get_vendor_name() );
|
29 |
+
$this->template_html = 'emails/admin-notify-product.php';
|
30 |
+
$this->template_plain = 'emails/plain/admin-notify-product.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
'{product_name}' => '',
|
35 |
+
'{vendor_name}' => '',
|
36 |
+
);
|
37 |
+
|
38 |
+
|
39 |
+
// Triggers for this email
|
40 |
+
add_action( 'pending_product', array( $this, 'trigger' ), 10, 2 );
|
41 |
+
add_action( 'pending_product_variation', array( $this, 'trigger' ), 10, 2 );
|
42 |
+
|
43 |
+
// Call parent constructor
|
44 |
+
parent::__construct();
|
45 |
+
|
46 |
+
// Other settings
|
47 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get email subject.
|
52 |
+
*
|
53 |
+
* @since 2.0.0
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function get_default_subject() {
|
57 |
+
return sprintf( __( '[{site_title}] New %s product submitted by {vendor_name} - {product_name}', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get email heading.
|
62 |
+
*
|
63 |
+
* @since 2.0.0
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function get_default_heading() {
|
67 |
+
return sprintf( __( 'New %s product submitted: {product_name}', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Trigger the sending of this email.
|
72 |
+
*
|
73 |
+
* @param int $order_id The order ID.
|
74 |
+
* @param WC_Order $order Order object.
|
75 |
+
*/
|
76 |
+
public function trigger( $post_id, $post ) {
|
77 |
+
|
78 |
+
$this->setup_locale();
|
79 |
+
|
80 |
+
if ( ! WCV_Vendors::is_vendor( $post->post_author ) ) return;
|
81 |
+
|
82 |
+
$this->post_id = $post_id;
|
83 |
+
$this->vendor_id = $post->post_author;
|
84 |
+
$this->product = wc_get_product( $post_id );
|
85 |
+
$this->vendor_name = WCV_Vendors::get_vendor_shop_name( $post->post_author );
|
86 |
+
|
87 |
+
if ( is_a( 'WC_Product', $this->product ) ){
|
88 |
+
$this->placeholders['{product_name}'] = $this->product->get_title();
|
89 |
+
$this->placeholders['{vendor_name}'] = $this->vendor_name;
|
90 |
+
|
91 |
+
if ( $this->is_enabled() && $this->get_recipient() ) {
|
92 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
93 |
+
}
|
94 |
+
|
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 |
+
|
107 |
+
return wc_get_template_html( $this->template_html, array(
|
108 |
+
'order' => $this->object,
|
109 |
+
'email_heading' => $this->get_heading(),
|
110 |
+
'sent_to_admin' => true,
|
111 |
+
'plain_text' => false,
|
112 |
+
'email' => $this,
|
113 |
+
'post_id' => $this->post_id,
|
114 |
+
'vendor_id' => $this->vendor_id,
|
115 |
+
'vendor_name' => $this->vendor_name,
|
116 |
+
'product' => $this->product,
|
117 |
+
), 'woocommerce', $this->template_base );
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Get content plain.
|
122 |
+
*
|
123 |
+
* @access public
|
124 |
+
* @return string
|
125 |
+
*/
|
126 |
+
public function get_content_plain() {
|
127 |
+
return wc_get_template_html( $this->template_plain, array(
|
128 |
+
'order' => $this->object,
|
129 |
+
'email_heading' => $this->get_heading(),
|
130 |
+
'sent_to_admin' => true,
|
131 |
+
'plain_text' => true,
|
132 |
+
'email' => $this,
|
133 |
+
'post_id' => $this->post_id,
|
134 |
+
'vendor_id' => $this->vendor_id,
|
135 |
+
'vendor_name' => $this->vendor_name,
|
136 |
+
'product' => $this->product,
|
137 |
+
), 'woocommerce', $this->template_base );
|
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', 'wc-vendors' ),
|
147 |
+
'type' => 'checkbox',
|
148 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
149 |
+
'default' => 'yes',
|
150 |
+
),
|
151 |
+
'recipient' => array(
|
152 |
+
'title' => __( 'Recipient(s)', 'wc-vendors' ),
|
153 |
+
'type' => 'text',
|
154 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'wc-vendors' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
155 |
+
'placeholder' => '',
|
156 |
+
'default' => '',
|
157 |
+
'desc_tip' => true,
|
158 |
+
),
|
159 |
+
'subject' => array(
|
160 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
161 |
+
'type' => 'text',
|
162 |
+
'desc_tip' => true,
|
163 |
+
/* translators: %s: list of placeholders */
|
164 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
165 |
+
'placeholder' => $this->get_default_subject(),
|
166 |
+
'default' => '',
|
167 |
+
),
|
168 |
+
'heading' => array(
|
169 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
170 |
+
'type' => 'text',
|
171 |
+
'desc_tip' => true,
|
172 |
+
/* translators: %s: list of placeholders */
|
173 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
174 |
+
'placeholder' => $this->get_default_heading(),
|
175 |
+
'default' => '',
|
176 |
+
),
|
177 |
+
'email_type' => array(
|
178 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
179 |
+
'type' => 'select',
|
180 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
181 |
+
'default' => 'html',
|
182 |
+
'class' => 'email_type wc-enhanced-select',
|
183 |
+
'options' => $this->get_email_type_options(),
|
184 |
+
'desc_tip' => true,
|
185 |
+
),
|
186 |
+
);
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
endif;
|
191 |
+
|
192 |
+
return new WCVendors_Admin_Notify_Product();
|
classes/admin/emails/class-wcv-admin-notify-shipped.php
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Admin_Notify_Shipped' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify Admin Shipped
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCVendors_Admin_Notify_Shipped
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Admin_Notify_Shipped extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'admin_notify_shipped';
|
27 |
+
$this->title = sprintf( __( 'Admin notify %s shipped', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to chosen recipient(s) when a %s marks an order shipped.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->template_html = 'emails/admin-notify-shipped.php';
|
30 |
+
$this->template_plain = 'emails/plain/admin-notify-shipped.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
'{order_date}' => '',
|
35 |
+
'{order_number}' => '',
|
36 |
+
);
|
37 |
+
|
38 |
+
// Call parent constructor
|
39 |
+
parent::__construct();
|
40 |
+
|
41 |
+
// Other settings
|
42 |
+
$this->recipient = $this->get_option( 'recipient', get_option( 'admin_email' ) );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get email subject.
|
47 |
+
*
|
48 |
+
* @since 2.0.0
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public function get_default_subject() {
|
52 |
+
return sprintf( __( '[{site_title}] %s has marked shipped ({order_number}) - {order_date}', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get email heading.
|
57 |
+
*
|
58 |
+
* @since 2.0.0
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
public function get_default_heading() {
|
62 |
+
return sprintf( __( '%s has shipped', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Trigger the sending of this email.
|
67 |
+
*
|
68 |
+
* @param int $order_id The order ID.
|
69 |
+
* @param WC_Order $order Order object.
|
70 |
+
*/
|
71 |
+
public function trigger( $order_id, $user_id, $order = false ) {
|
72 |
+
|
73 |
+
$this->setup_locale();
|
74 |
+
|
75 |
+
$this->vendor_id = $user_id;
|
76 |
+
|
77 |
+
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
78 |
+
$order = wc_get_order( $order_id );
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( is_a( $order, 'WC_Order' ) ) {
|
82 |
+
$this->object = $order;
|
83 |
+
$this->placeholders['{order_date}'] = wc_format_datetime( $this->object->get_date_created() );
|
84 |
+
$this->placeholders['{order_number}'] = $this->object->get_order_number();
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( $this->is_enabled() && $this->get_recipient() ) {
|
88 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
89 |
+
}
|
90 |
+
|
91 |
+
$this->restore_locale();
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Get content html.
|
96 |
+
*
|
97 |
+
* @access public
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function get_content_html() {
|
101 |
+
|
102 |
+
return wc_get_template_html( $this->template_html, array(
|
103 |
+
'order' => $this->object,
|
104 |
+
'email_heading' => $this->get_heading(),
|
105 |
+
'sent_to_admin' => true,
|
106 |
+
'plain_text' => false,
|
107 |
+
'email' => $this,
|
108 |
+
'vendor_id' => $this->vendor_id,
|
109 |
+
), 'woocommerce', $this->template_base );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Get content plain.
|
114 |
+
*
|
115 |
+
* @access public
|
116 |
+
* @return string
|
117 |
+
*/
|
118 |
+
public function get_content_plain() {
|
119 |
+
return wc_get_template_html( $this->template_plain, array(
|
120 |
+
'order' => $this->object,
|
121 |
+
'email_heading' => $this->get_heading(),
|
122 |
+
'sent_to_admin' => true,
|
123 |
+
'plain_text' => true,
|
124 |
+
'email' => $this,
|
125 |
+
'vendor_id' => $this->vendor_id,
|
126 |
+
), 'woocommerce', $this->template_base );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Initialise settings form fields.
|
131 |
+
*/
|
132 |
+
public function init_form_fields() {
|
133 |
+
$this->form_fields = array(
|
134 |
+
'enabled' => array(
|
135 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
136 |
+
'type' => 'checkbox',
|
137 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
138 |
+
'default' => 'yes',
|
139 |
+
),
|
140 |
+
'recipient' => array(
|
141 |
+
'title' => __( 'Recipient(s)', 'wc-vendors' ),
|
142 |
+
'type' => 'text',
|
143 |
+
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.', 'wc-vendors' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ),
|
144 |
+
'placeholder' => '',
|
145 |
+
'default' => '',
|
146 |
+
'desc_tip' => true,
|
147 |
+
),
|
148 |
+
'subject' => array(
|
149 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
150 |
+
'type' => 'text',
|
151 |
+
'desc_tip' => true,
|
152 |
+
/* translators: %s: list of placeholders */
|
153 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
154 |
+
'placeholder' => $this->get_default_subject(),
|
155 |
+
'default' => '',
|
156 |
+
),
|
157 |
+
'heading' => array(
|
158 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
159 |
+
'type' => 'text',
|
160 |
+
'desc_tip' => true,
|
161 |
+
/* translators: %s: list of placeholders */
|
162 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
163 |
+
'placeholder' => $this->get_default_heading(),
|
164 |
+
'default' => '',
|
165 |
+
),
|
166 |
+
'email_type' => array(
|
167 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
168 |
+
'type' => 'select',
|
169 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
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 WCVendors_Admin_Notify_Shipped();
|
classes/admin/emails/class-wcv-customer-notify-shipped.php
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Customer_Notify_Shipped' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify Admin Shipped
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCVendors_Customer_Notify_Shipped
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Customer_Notify_Shipped extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'customer_notify_shipped';
|
27 |
+
$this->customer_email = true;
|
28 |
+
$this->title = sprintf( __( 'Customer %s shipped', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->description = sprintf( __( 'Email is sent to the customer when a %s marks an order received/paid by a customer.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
30 |
+
$this->template_html = 'emails/customer-notify-shipped.php';
|
31 |
+
$this->template_plain = 'emails/plain/customer-notify-shipped.php';
|
32 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
33 |
+
$this->placeholders = array(
|
34 |
+
'{site_title}' => $this->get_blogname(),
|
35 |
+
'{order_date}' => '',
|
36 |
+
'{order_number}' => '',
|
37 |
+
);
|
38 |
+
|
39 |
+
// Call parent constructor
|
40 |
+
parent::__construct();
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get email subject.
|
46 |
+
*
|
47 |
+
* @since 2.0.0
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function get_default_subject() {
|
51 |
+
return sprintf( __( '[{site_title}] %s has marked shipped ({order_number}) - {order_date}', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get email heading.
|
56 |
+
*
|
57 |
+
* @since 2.0.0
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function get_default_heading() {
|
61 |
+
return sprintf( __( '%s has shipped', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Trigger the sending of this email.
|
66 |
+
*
|
67 |
+
* @param int $order_id The order ID.
|
68 |
+
* @param WC_Order $order Order object.
|
69 |
+
*/
|
70 |
+
public function trigger( $order_id, $user_id, $order = false ) {
|
71 |
+
|
72 |
+
$this->setup_locale();
|
73 |
+
$this->vendor_id = $user_id;
|
74 |
+
|
75 |
+
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
76 |
+
$order = wc_get_order( $order_id );
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( is_a( $order, 'WC_Order' ) ) {
|
80 |
+
$this->object = $order;
|
81 |
+
$this->recipient = $this->object->get_billing_email();
|
82 |
+
$this->placeholders['{order_date}'] = wc_format_datetime( $this->object->get_date_created() );
|
83 |
+
$this->placeholders['{order_number}'] = $this->object->get_order_number();
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( $this->is_enabled() && $this->get_recipient() ) {
|
87 |
+
// Filter the order items to only show the products owned by the vendor that marked shipped.
|
88 |
+
add_filter( 'woocommerce_order_get_items', array( $this, 'filter_vendor_items' ), 10, 3 );
|
89 |
+
add_filter( 'woocommerce_get_order_item_totals', array( $this, 'udpate_order_totals' ), 10, 3 );
|
90 |
+
|
91 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
92 |
+
|
93 |
+
// Remove filters
|
94 |
+
remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'udpate_order_totals' ), 10, 3 );
|
95 |
+
remove_filter( 'woocommerce_order_get_items', array( $this, 'filter_vendor_items' ), 10, 3 );
|
96 |
+
}
|
97 |
+
|
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 |
+
|
109 |
+
return wc_get_template_html( $this->template_html, array(
|
110 |
+
'order' => $this->object,
|
111 |
+
'email_heading' => $this->get_heading(),
|
112 |
+
'sent_to_admin' => true,
|
113 |
+
'plain_text' => false,
|
114 |
+
'email' => $this,
|
115 |
+
'vendor_id' => $this->vendor_id,
|
116 |
+
), 'woocommerce', $this->template_base );
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Get content plain.
|
121 |
+
*
|
122 |
+
* @access public
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function get_content_plain() {
|
126 |
+
return wc_get_template_html( $this->template_plain, array(
|
127 |
+
'order' => $this->object,
|
128 |
+
'email_heading' => $this->get_heading(),
|
129 |
+
'sent_to_admin' => true,
|
130 |
+
'plain_text' => true,
|
131 |
+
'email' => $this,
|
132 |
+
'vendor_id' => $this->vendor_id,
|
133 |
+
), 'woocommerce', $this->template_base );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Initialise settings form fields.
|
138 |
+
*/
|
139 |
+
public function init_form_fields() {
|
140 |
+
$this->form_fields = array(
|
141 |
+
'enabled' => array(
|
142 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
143 |
+
'type' => 'checkbox',
|
144 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
145 |
+
'default' => 'yes',
|
146 |
+
),
|
147 |
+
'subject' => array(
|
148 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
149 |
+
'type' => 'text',
|
150 |
+
'desc_tip' => true,
|
151 |
+
/* translators: %s: list of placeholders */
|
152 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
153 |
+
'placeholder' => $this->get_default_subject(),
|
154 |
+
'default' => '',
|
155 |
+
),
|
156 |
+
'heading' => array(
|
157 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
158 |
+
'type' => 'text',
|
159 |
+
'desc_tip' => true,
|
160 |
+
/* translators: %s: list of placeholders */
|
161 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
162 |
+
'placeholder' => $this->get_default_heading(),
|
163 |
+
'default' => '',
|
164 |
+
),
|
165 |
+
'email_type' => array(
|
166 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
167 |
+
'type' => 'select',
|
168 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
169 |
+
'default' => 'html',
|
170 |
+
'class' => 'email_type wc-enhanced-select',
|
171 |
+
'options' => $this->get_email_type_options(),
|
172 |
+
'desc_tip' => true,
|
173 |
+
),
|
174 |
+
);
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Filter the order to only show vendor products
|
180 |
+
*
|
181 |
+
* @param array $items
|
182 |
+
* @param WC_Order $order
|
183 |
+
* @param array $types
|
184 |
+
*
|
185 |
+
* @return array
|
186 |
+
*/
|
187 |
+
public function filter_vendor_items( $items, $order, $types ) {
|
188 |
+
|
189 |
+
foreach ( $items as $item_id => $order_item ) {
|
190 |
+
|
191 |
+
if ( 'line_item' === $order_item->get_type() ){
|
192 |
+
|
193 |
+
$product_id = ( $order_item->get_variation_id() ) ? $order_item->get_variation_id() : $order_item->get_product_id();
|
194 |
+
|
195 |
+
if ( empty( $product_id ) ) {
|
196 |
+
unset( $items[ $item_id ] );
|
197 |
+
continue;
|
198 |
+
}
|
199 |
+
|
200 |
+
$product_vendor = WCV_Vendors::get_vendor_from_product( $product_id );
|
201 |
+
|
202 |
+
if ( $this->vendor_id != $product_vendor ) {
|
203 |
+
unset( $items[ $item_id ] );
|
204 |
+
continue;
|
205 |
+
}
|
206 |
+
|
207 |
+
}
|
208 |
+
|
209 |
+
}
|
210 |
+
|
211 |
+
return $items;
|
212 |
+
|
213 |
+
} // filter_vendor_items
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Update the order totals to only show the items for the product(s)
|
217 |
+
*
|
218 |
+
* @param array $total_rows
|
219 |
+
* @param WC_Order $order
|
220 |
+
* @param string $tax_display
|
221 |
+
*
|
222 |
+
* @return array
|
223 |
+
*/
|
224 |
+
public function udpate_order_totals( $total_rows, $order, $tax_display ) {
|
225 |
+
|
226 |
+
$new_total_rows = array();
|
227 |
+
$new_total_rows[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
228 |
+
|
229 |
+
return $new_total_rows;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
endif;
|
234 |
+
|
235 |
+
return new WCVendors_Customer_Notify_Shipped();
|
classes/admin/emails/class-wcv-vendor-notify-application.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Vendor_Notify_Application' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify vendor application has started
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCVendors_Vendor_Notify_Application
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Vendor_Notify_Application extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'vendor_notify_application';
|
27 |
+
$this->title = sprintf( __( 'Vendor notify application', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to the vendor that their application has been received', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->template_html = 'emails/vendor-notify-application.php';
|
30 |
+
$this->template_plain = 'emails/plain/vendor-notify-application.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname()
|
34 |
+
);
|
35 |
+
|
36 |
+
// Call parent constructor
|
37 |
+
parent::__construct();
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get email subject.
|
43 |
+
*
|
44 |
+
* @since 2.0.0
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_default_subject() {
|
48 |
+
return __( '[{site_title}] Your vendor application has been received', 'wc-vendors' );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get email heading.
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function get_default_heading() {
|
58 |
+
return __( 'Vendor application received', 'wc-vendors' );
|
59 |
+
}
|
60 |
+
|
61 |
+
public function get_default_content() {
|
62 |
+
return sprintf( __( 'Hi there. This is a notification about a %s application on %s.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ), get_option( 'blogname' ) );
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Trigger the sending of this email.
|
67 |
+
*
|
68 |
+
* @param int $order_id The order ID.
|
69 |
+
* @param WC_Order $order Order object.
|
70 |
+
*/
|
71 |
+
public function trigger( $vendor_id, $status = '' ) {
|
72 |
+
|
73 |
+
$this->setup_locale();
|
74 |
+
|
75 |
+
$this->user = get_userdata( $vendor_id );
|
76 |
+
$this->user_email = $this->user->user_email;
|
77 |
+
$this->status = $status;
|
78 |
+
|
79 |
+
if ( $this->is_enabled() ) {
|
80 |
+
$this->send( $this->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
81 |
+
}
|
82 |
+
|
83 |
+
$this->restore_locale();
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get content html.
|
88 |
+
*
|
89 |
+
* @access public
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function get_content_html() {
|
93 |
+
|
94 |
+
return wc_get_template_html( $this->template_html, array(
|
95 |
+
'order' => $this->object,
|
96 |
+
'email_heading' => $this->get_heading(),
|
97 |
+
'sent_to_admin' => true,
|
98 |
+
'plain_text' => false,
|
99 |
+
'email' => $this,
|
100 |
+
'user' => $this->user,
|
101 |
+
'status' => $this->status,
|
102 |
+
), 'woocommerce', $this->template_base );
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get content plain.
|
107 |
+
*
|
108 |
+
* @access public
|
109 |
+
* @return string
|
110 |
+
*/
|
111 |
+
public function get_content_plain() {
|
112 |
+
return wc_get_template_html( $this->template_plain, array(
|
113 |
+
'order' => $this->object,
|
114 |
+
'email_heading' => $this->get_heading(),
|
115 |
+
'sent_to_admin' => true,
|
116 |
+
'plain_text' => true,
|
117 |
+
'email' => $this,
|
118 |
+
'user' => $this->user,
|
119 |
+
'status' => $this->status,
|
120 |
+
), 'woocommerce', $this->template_base );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Initialise settings form fields.
|
125 |
+
*/
|
126 |
+
public function init_form_fields() {
|
127 |
+
$this->form_fields = array(
|
128 |
+
'enabled' => array(
|
129 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
130 |
+
'type' => 'checkbox',
|
131 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
132 |
+
'default' => 'yes',
|
133 |
+
),
|
134 |
+
'subject' => array(
|
135 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
136 |
+
'type' => 'text',
|
137 |
+
'desc_tip' => true,
|
138 |
+
/* translators: %s: list of placeholders */
|
139 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
140 |
+
'placeholder' => $this->get_default_subject(),
|
141 |
+
'default' => '',
|
142 |
+
),
|
143 |
+
'heading' => array(
|
144 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
145 |
+
'type' => 'text',
|
146 |
+
'desc_tip' => true,
|
147 |
+
/* translators: %s: list of placeholders */
|
148 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
149 |
+
'placeholder' => $this->get_default_heading(),
|
150 |
+
'default' => '',
|
151 |
+
),
|
152 |
+
'email_type' => array(
|
153 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
154 |
+
'type' => 'select',
|
155 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
156 |
+
'default' => 'html',
|
157 |
+
'class' => 'email_type wc-enhanced-select',
|
158 |
+
'options' => $this->get_email_type_options(),
|
159 |
+
'desc_tip' => true,
|
160 |
+
),
|
161 |
+
);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
endif;
|
166 |
+
|
167 |
+
return new WCVendors_Vendor_Notify_Application();
|
classes/admin/emails/class-wcv-vendor-notify-approved.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Notify_Vendor_Approved' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify vendor application has started
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCV_Notify_Vendor_Application
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Notify_Vendor_Approved extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'vendor_notify_approved';
|
27 |
+
$this->title = sprintf( __( '%s notify approved', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to the %s that their application has been approved', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->template_html = 'emails/vendor-notify-approved.php';
|
30 |
+
$this->template_plain = 'emails/plain/vendor-notify-approved.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
);
|
35 |
+
|
36 |
+
// Call parent constructor
|
37 |
+
parent::__construct();
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get email subject.
|
43 |
+
*
|
44 |
+
* @since 2.0.0
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_default_subject() {
|
48 |
+
return __( '[{site_title}] Your vendor application has been approved', 'wc-vendors' );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get email heading.
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function get_default_heading() {
|
58 |
+
return sprintf( __( '%s Application Approved', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get email content
|
63 |
+
*
|
64 |
+
* @since 2.0.0
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
public function get_default_content(){
|
68 |
+
return sprintf( __( 'Your application to become a %s has been approved.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Trigger the sending of this email.
|
73 |
+
*
|
74 |
+
* @param int $order_id The order ID.
|
75 |
+
* @param WC_Order $order Order object.
|
76 |
+
*/
|
77 |
+
public function trigger( $vendor_id, $status = '' ) {
|
78 |
+
|
79 |
+
$this->setup_locale();
|
80 |
+
|
81 |
+
$this->user = get_userdata( $vendor_id );
|
82 |
+
$this->user_email = $this->user->user_email;
|
83 |
+
$this->content = $this->get_option( 'content', $this->get_default_content() );
|
84 |
+
$this->status = $status;
|
85 |
+
|
86 |
+
if ( $this->is_enabled() ) {
|
87 |
+
$this->send( $this->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
88 |
+
}
|
89 |
+
|
90 |
+
$this->restore_locale();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get content html.
|
95 |
+
*
|
96 |
+
* @access public
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function get_content_html() {
|
100 |
+
|
101 |
+
return wc_get_template_html( $this->template_html, array(
|
102 |
+
'order' => $this->object,
|
103 |
+
'email_heading' => $this->get_heading(),
|
104 |
+
'sent_to_admin' => true,
|
105 |
+
'plain_text' => false,
|
106 |
+
'email' => $this,
|
107 |
+
'user' => $this->user,
|
108 |
+
'content' => $this->content,
|
109 |
+
'status' => $this->status,
|
110 |
+
), 'woocommerce', $this->template_base );
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get content plain.
|
115 |
+
*
|
116 |
+
* @access public
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
public function get_content_plain() {
|
120 |
+
return wc_get_template_html( $this->template_plain, array(
|
121 |
+
'order' => $this->object,
|
122 |
+
'email_heading' => $this->get_heading(),
|
123 |
+
'sent_to_admin' => true,
|
124 |
+
'plain_text' => true,
|
125 |
+
'email' => $this,
|
126 |
+
'user' => $this->user,
|
127 |
+
'content' => $this->content,
|
128 |
+
'status' => $this->status,
|
129 |
+
) );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Initialise settings form fields.
|
134 |
+
*/
|
135 |
+
public function init_form_fields() {
|
136 |
+
$this->form_fields = array(
|
137 |
+
'enabled' => array(
|
138 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
139 |
+
'type' => 'checkbox',
|
140 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
141 |
+
'default' => 'yes',
|
142 |
+
),
|
143 |
+
'subject' => array(
|
144 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
145 |
+
'type' => 'text',
|
146 |
+
'desc_tip' => true,
|
147 |
+
/* translators: %s: list of placeholders */
|
148 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
149 |
+
'placeholder' => $this->get_default_subject(),
|
150 |
+
'default' => '',
|
151 |
+
),
|
152 |
+
'content' => array(
|
153 |
+
'title' => __( 'Content', 'wc-vendors' ),
|
154 |
+
'type' => 'textarea',
|
155 |
+
'desc_tip' => true,
|
156 |
+
/* translators: %s: list of placeholders */
|
157 |
+
'description' => sprintf( __( 'Email body to be included when sent to the %s.', '' ), lcfirst( wcv_get_vendor_name( ) ) ),
|
158 |
+
'placeholder' => $this->get_default_content(),
|
159 |
+
'default' => '',
|
160 |
+
),
|
161 |
+
'heading' => array(
|
162 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
163 |
+
'type' => 'text',
|
164 |
+
'desc_tip' => true,
|
165 |
+
/* translators: %s: list of placeholders */
|
166 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
167 |
+
'placeholder' => $this->get_default_heading(),
|
168 |
+
'default' => '',
|
169 |
+
),
|
170 |
+
'email_type' => array(
|
171 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
172 |
+
'type' => 'select',
|
173 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
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 WCVendors_Notify_Vendor_Approved();
|
classes/admin/emails/class-wcv-vendor-notify-denied.php
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Vendor_Notify_Denied' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify vendor application has been denied
|
11 |
+
*
|
12 |
+
* An email sent to the vendor when the admin denies their application
|
13 |
+
*
|
14 |
+
* @class WCVendors_Vendor_Notify_Denied
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Vendor_Notify_Denied extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'vendor_notify_denied';
|
27 |
+
$this->title = sprintf( __( '%s notify denied', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to the %s that their application has been denied', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
29 |
+
$this->template_html = 'emails/vendor-notify-denied.php';
|
30 |
+
$this->template_plain = 'emails/plain/vendor-notify-denied.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
);
|
35 |
+
|
36 |
+
// Call parent constructor
|
37 |
+
parent::__construct();
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get email subject.
|
43 |
+
*
|
44 |
+
* @since 2.0.0
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function get_default_subject() {
|
48 |
+
return sprintf( __( '[{site_title}] Your %s application has been denied', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get email heading.
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function get_default_heading() {
|
58 |
+
return sprintf( __( '%s Application Denied', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get email content
|
63 |
+
*
|
64 |
+
* @since 2.0.0
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
public function get_default_content(){
|
68 |
+
return sprintf( __( 'Your application to become a %s has been denied.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get email reason
|
73 |
+
*
|
74 |
+
* @since 2.0.0
|
75 |
+
* @return string
|
76 |
+
*/
|
77 |
+
public function get_default_reason(){
|
78 |
+
return __( 'We are not taking any new applications at this time.', 'wc-vendors' );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Trigger the sending of this email.
|
83 |
+
*
|
84 |
+
* @param int $order_id The order ID.
|
85 |
+
* @param WC_Order $order Order object.
|
86 |
+
*/
|
87 |
+
public function trigger( $vendor_id, $reason = '' ) {
|
88 |
+
|
89 |
+
$this->setup_locale();
|
90 |
+
|
91 |
+
$this->user = get_userdata( $vendor_id );
|
92 |
+
$this->user_email = $this->user->user_email;
|
93 |
+
$this->content = $this->get_option( 'content', $this->get_default_content() );
|
94 |
+
$this->reason = ( $reason ) ? $reason : $this->get_option( 'reason', $this->get_default_reason() );
|
95 |
+
|
96 |
+
if ( $this->is_enabled() ) {
|
97 |
+
$this->send( $this->user_email, $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
98 |
+
}
|
99 |
+
|
100 |
+
$this->restore_locale();
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get content html.
|
105 |
+
*
|
106 |
+
* @access public
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
public function get_content_html() {
|
110 |
+
|
111 |
+
return wc_get_template_html( $this->template_html, array(
|
112 |
+
'order' => $this->object,
|
113 |
+
'email_heading' => $this->get_heading(),
|
114 |
+
'sent_to_admin' => true,
|
115 |
+
'plain_text' => false,
|
116 |
+
'email' => $this,
|
117 |
+
'user' => $this->user,
|
118 |
+
'reason' => $this->reason,
|
119 |
+
'content' => $this->content,
|
120 |
+
), 'woocommerce', $this->template_base );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Get content plain.
|
125 |
+
*
|
126 |
+
* @access public
|
127 |
+
* @return string
|
128 |
+
*/
|
129 |
+
public function get_content_plain() {
|
130 |
+
return wc_get_template_html( $this->template_plain, array(
|
131 |
+
'order' => $this->object,
|
132 |
+
'email_heading' => $this->get_heading(),
|
133 |
+
'sent_to_admin' => true,
|
134 |
+
'plain_text' => true,
|
135 |
+
'email' => $this,
|
136 |
+
'reason' => $this->reason,
|
137 |
+
'content' => $this->content,
|
138 |
+
'user' => $this->user,
|
139 |
+
) );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Initialise settings form fields.
|
144 |
+
*/
|
145 |
+
public function init_form_fields() {
|
146 |
+
$this->form_fields = array(
|
147 |
+
'enabled' => array(
|
148 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
149 |
+
'type' => 'checkbox',
|
150 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
151 |
+
'default' => 'yes',
|
152 |
+
),
|
153 |
+
'subject' => array(
|
154 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
155 |
+
'type' => 'text',
|
156 |
+
'desc_tip' => true,
|
157 |
+
/* translators: %s: list of placeholders */
|
158 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
159 |
+
'placeholder' => $this->get_default_subject(),
|
160 |
+
'default' => '',
|
161 |
+
),
|
162 |
+
'content' => array(
|
163 |
+
'title' => __( 'Content', 'wc-vendors' ),
|
164 |
+
'type' => 'textarea',
|
165 |
+
'desc_tip' => true,
|
166 |
+
/* translators: %s: list of placeholders */
|
167 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
168 |
+
'placeholder' => $this->get_default_content(),
|
169 |
+
'default' => $this->get_default_content(),
|
170 |
+
),
|
171 |
+
'reason' => array(
|
172 |
+
'title' => __( 'Reason', 'wc-vendors' ),
|
173 |
+
'type' => 'textarea',
|
174 |
+
'desc_tip' => true,
|
175 |
+
'description' => sprintf( __( 'Provide a reason for denying the %s application', 'wc-vendors'), lcfirst( wcv_get_vendor_name( ) ) ),
|
176 |
+
'placeholder' => $this->get_default_reason(),
|
177 |
+
'default' => $this->get_default_reason(),
|
178 |
+
),
|
179 |
+
'heading' => array(
|
180 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
181 |
+
'type' => 'text',
|
182 |
+
'desc_tip' => true,
|
183 |
+
/* translators: %s: list of placeholders */
|
184 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}</code>' ),
|
185 |
+
'placeholder' => $this->get_default_heading(),
|
186 |
+
'default' => '',
|
187 |
+
),
|
188 |
+
'email_type' => array(
|
189 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
190 |
+
'type' => 'select',
|
191 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
192 |
+
'default' => 'html',
|
193 |
+
'class' => 'email_type wc-enhanced-select',
|
194 |
+
'options' => $this->get_email_type_options(),
|
195 |
+
'desc_tip' => true,
|
196 |
+
),
|
197 |
+
);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
endif;
|
202 |
+
|
203 |
+
return new WCVendors_Vendor_Notify_Denied();
|
classes/admin/emails/class-wcv-vendor-notify-order.php
ADDED
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'WCVendors_Vendor_Notify_Order' ) ) :
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Notify Admin Shipped
|
11 |
+
*
|
12 |
+
* An email sent to the admin when the vendor marks the order shipped.
|
13 |
+
*
|
14 |
+
* @class WCVendors_Vendor_Notify_Order
|
15 |
+
* @version 2.0.0
|
16 |
+
* @package Classes/Admin/Emails
|
17 |
+
* @author WC Vendors
|
18 |
+
* @extends WC_Email
|
19 |
+
*/
|
20 |
+
class WCVendors_Vendor_Notify_Order extends WC_Email {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructor.
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->id = 'vendor_notify_order';
|
27 |
+
$this->title = sprintf( __( '%s notify order', 'wc-vendors' ), wcv_get_vendor_name( ) );
|
28 |
+
$this->description = sprintf( __( 'Notification is sent to %s when an order is paid.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) );
|
29 |
+
$this->template_html = 'emails/vendor-notify-order.php';
|
30 |
+
$this->template_plain = 'emails/plain/vendor-notify-order.php';
|
31 |
+
$this->template_base = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/templates/';
|
32 |
+
$this->placeholders = array(
|
33 |
+
'{site_title}' => $this->get_blogname(),
|
34 |
+
'{order_date}' => '',
|
35 |
+
'{order_number}' => '',
|
36 |
+
);
|
37 |
+
|
38 |
+
// Other settings
|
39 |
+
add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
|
40 |
+
add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
|
41 |
+
add_action( 'woocommerce_order_status_failed_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
|
42 |
+
add_action( 'woocommerce_order_status_failed_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
|
43 |
+
add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
|
44 |
+
add_action( 'woocommerce_order_status_on-hold_to_completed_notification', array( $this, 'trigger' ), 10, 2 );
|
45 |
+
|
46 |
+
// Call parent constructor
|
47 |
+
parent::__construct();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get email subject.
|
52 |
+
*
|
53 |
+
* @since 2.0.0
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function get_default_subject() {
|
57 |
+
return __( '[{site_title}] New Customer Order ({order_number}) - {order_date}', 'wc-vendors' );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get email heading.
|
62 |
+
*
|
63 |
+
* @since 2.0.0
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function get_default_heading() {
|
67 |
+
return __( 'New Customer Order', 'wc-vendors' );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Trigger the sending of this email.
|
72 |
+
*
|
73 |
+
* @param int $order_id The order ID.
|
74 |
+
* @param WC_Order $order Order object.
|
75 |
+
*/
|
76 |
+
public function trigger( $order_id, $order = false ) {
|
77 |
+
|
78 |
+
$this->setup_locale();
|
79 |
+
|
80 |
+
if ( $order_id && ! is_a( $order, 'WC_Order' ) ) {
|
81 |
+
$order = wc_get_order( $order_id );
|
82 |
+
}
|
83 |
+
|
84 |
+
$this->vendors = WCV_Vendors::get_vendors_from_order( $order );
|
85 |
+
|
86 |
+
if ( is_a( $order, 'WC_Order' ) ) {
|
87 |
+
$this->object = $order;
|
88 |
+
$this->placeholders['{order_date}'] = wc_format_datetime( $this->object->get_date_created() );
|
89 |
+
$this->placeholders['{order_number}'] = $this->object->get_order_number();
|
90 |
+
}
|
91 |
+
|
92 |
+
if ( $this->is_enabled() && !empty( $this->vendors )) {
|
93 |
+
|
94 |
+
foreach ( $this->vendors as $vendor_id => $vendor_details ) {
|
95 |
+
|
96 |
+
$this->recipient = $vendor_details[ 'vendor' ]->user_email;
|
97 |
+
$this->order_items = $vendor_details[ 'line_items' ];
|
98 |
+
$this->vendor_id = $vendor_id;
|
99 |
+
$this->totals_display = $this->get_option( 'totals_display' );
|
100 |
+
$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
|
101 |
+
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
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 |
+
|
116 |
+
return wc_get_template_html( $this->template_html, array(
|
117 |
+
'order' => $this->object,
|
118 |
+
'vendor_id' => $this->vendor_id,
|
119 |
+
'vendor_items' => $this->order_items,
|
120 |
+
'email_heading' => $this->get_heading(),
|
121 |
+
'totals_display' => $this->totals_display,
|
122 |
+
'sent_to_admin' => false,
|
123 |
+
'sent_to_vendor' => true,
|
124 |
+
'plain_text' => false,
|
125 |
+
'email' => $this,
|
126 |
+
), 'woocommerce', $this->template_base );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get content plain.
|
131 |
+
*
|
132 |
+
* @access public
|
133 |
+
* @return string
|
134 |
+
*/
|
135 |
+
public function get_content_plain() {
|
136 |
+
return wc_get_template_html( $this->template_plain, array(
|
137 |
+
'order' => $this->object,
|
138 |
+
'vendor_id' => $this->vendor_id,
|
139 |
+
'vendor_items' => $this->order_items,
|
140 |
+
'email_heading' => $this->get_heading(),
|
141 |
+
'sent_to_admin' => false,
|
142 |
+
'sent_to_vendor' => true,
|
143 |
+
'totals_display' => $this->totals_display,
|
144 |
+
'plain_text' => true,
|
145 |
+
'email' => $this,
|
146 |
+
), 'woocommerce', $this->template_base );
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Initialise settings form fields.
|
151 |
+
*/
|
152 |
+
public function init_form_fields() {
|
153 |
+
$this->form_fields = array(
|
154 |
+
'enabled' => array(
|
155 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
156 |
+
'type' => 'checkbox',
|
157 |
+
'label' => __( 'Enable this email notification', 'wc-vendors' ),
|
158 |
+
'default' => 'yes',
|
159 |
+
),
|
160 |
+
'subject' => array(
|
161 |
+
'title' => __( 'Subject', 'wc-vendors' ),
|
162 |
+
'type' => 'text',
|
163 |
+
'desc_tip' => true,
|
164 |
+
/* translators: %s: list of placeholders */
|
165 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
166 |
+
'placeholder' => $this->get_default_subject(),
|
167 |
+
'default' => '',
|
168 |
+
),
|
169 |
+
'heading' => array(
|
170 |
+
'title' => __( 'Email heading', 'wc-vendors' ),
|
171 |
+
'type' => 'text',
|
172 |
+
'desc_tip' => true,
|
173 |
+
/* translators: %s: list of placeholders */
|
174 |
+
'description' => sprintf( __( 'Available placeholders: %s', 'wc-vendors' ), '<code>{site_title}, {order_date}, {order_number}</code>' ),
|
175 |
+
'placeholder' => $this->get_default_heading(),
|
176 |
+
'default' => '',
|
177 |
+
),
|
178 |
+
'totals_display' => array(
|
179 |
+
'title' => __( 'Totals Display', 'wc-vendors' ),
|
180 |
+
'type' => 'select',
|
181 |
+
'description' => __( 'Choose how to display the product totals. Including commission or without or no totals at all.', 'wc-vendors' ),
|
182 |
+
'default' => 'both',
|
183 |
+
'class' => 'wc-enhanced-select',
|
184 |
+
'options' => array(
|
185 |
+
'both' => __( 'Both', 'wc-vendors'),
|
186 |
+
'comission' => __( 'Commission', 'wc-vendors' ),
|
187 |
+
'product' => __( 'Product', 'wc-vendors' ),
|
188 |
+
'none' => __( 'None', 'wc-vendors' ),
|
189 |
+
),
|
190 |
+
'desc_tip' => true,
|
191 |
+
),
|
192 |
+
'payment_method' => array(
|
193 |
+
'title' => __( 'Payment method', 'wc-vendors' ),
|
194 |
+
'type' => 'checkbox',
|
195 |
+
'label' => __( 'Include the payment method in the email', 'wc-vendors' ),
|
196 |
+
'default' => 'no',
|
197 |
+
),
|
198 |
+
'email_type' => array(
|
199 |
+
'title' => __( 'Email type', 'wc-vendors' ),
|
200 |
+
'type' => 'select',
|
201 |
+
'description' => __( 'Choose which format of email to send.', 'wc-vendors' ),
|
202 |
+
'default' => 'html',
|
203 |
+
'class' => 'email_type wc-enhanced-select',
|
204 |
+
'options' => $this->get_email_type_options(),
|
205 |
+
'desc_tip' => true,
|
206 |
+
),
|
207 |
+
);
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
endif;
|
212 |
+
|
213 |
+
return new WCVendors_Vendor_Notify_Order();
|
classes/admin/settings/class-wcv-settings-capabilities.php
ADDED
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The capabilities settings class
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Settings
|
11 |
+
* @package WCVendors/Admin/Settings
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit; // Exit if accessed directly
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WCVendors_Settings_Capabilities', false ) ) :
|
20 |
+
|
21 |
+
/**
|
22 |
+
* WC_Admin_Settings_General.
|
23 |
+
*/
|
24 |
+
class WCVendors_Settings_Capabilities extends WCVendors_Settings_Page {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor.
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->id = 'capabilities';
|
31 |
+
$this->label = __( 'Capabilities', 'wc-vendors' );
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get sections.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_sections() {
|
42 |
+
$sections = array(
|
43 |
+
'' => __( 'General', 'wc-vendors' ),
|
44 |
+
'product' => __( 'Products', 'wc-vendors' ),
|
45 |
+
'order' => __( 'Orders', 'wc-vendors' ),
|
46 |
+
);
|
47 |
+
|
48 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, $sections );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get settings array.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_settings( $current_section = '' ) {
|
57 |
+
|
58 |
+
if ( 'product' === $current_section ){
|
59 |
+
|
60 |
+
$settings = apply_filters( 'wcvendors_settings_capabilities_product', array(
|
61 |
+
|
62 |
+
array(
|
63 |
+
'title' => __( 'Add / Edit Product', 'wc-vendors' ),
|
64 |
+
'type' => 'title',
|
65 |
+
'desc' => sprintf( __( 'Configure what product information to hide from a %s when creating or editing a product', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
66 |
+
'id' => 'product_add_options',
|
67 |
+
),
|
68 |
+
|
69 |
+
array(
|
70 |
+
'title' => __( 'Product Types', 'wc-vendors' ),
|
71 |
+
'desc' => sprintf( __( 'This controls what product types a %s can create', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
72 |
+
'id' => 'wcvendors_capability_product_types',
|
73 |
+
'class' => 'wc-enhanced-select',
|
74 |
+
'css' => 'min-width:300px;',
|
75 |
+
'default' => 'simple',
|
76 |
+
'type' => 'multiselect',
|
77 |
+
'options' => wc_get_product_types(),
|
78 |
+
'desc_tip' => true,
|
79 |
+
),
|
80 |
+
|
81 |
+
array(
|
82 |
+
'title' => __( 'Product Type Options', 'wc-vendors' ),
|
83 |
+
'desc' => sprintf( __( 'This controls what product type options a %s can use', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
84 |
+
'id' => 'wcvendors_capability_product_type_options',
|
85 |
+
'class' => 'wc-enhanced-select',
|
86 |
+
'css' => 'min-width:300px;',
|
87 |
+
'default' => 'simple',
|
88 |
+
'type' => 'multiselect',
|
89 |
+
'options' => array(
|
90 |
+
'virtual' => __( 'Virtual', 'wc-vendors' ),
|
91 |
+
'downloadable' => __( 'Downloadable', 'wc-vendors' ),
|
92 |
+
),
|
93 |
+
'desc_tip' => true,
|
94 |
+
),
|
95 |
+
|
96 |
+
array(
|
97 |
+
'title' => __( 'Product Data Tabs', 'wc-vendors' ),
|
98 |
+
'desc' => sprintf( __( 'This controls what product data tabs a %s can use', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
99 |
+
'id' => 'wcvendors_capability_product_data_tabs',
|
100 |
+
'class' => 'wc-enhanced-select',
|
101 |
+
'css' => 'min-width:300px;',
|
102 |
+
'default' => 'simple',
|
103 |
+
'type' => 'multiselect',
|
104 |
+
'options' => array(
|
105 |
+
'general' => __( 'General', 'wc-vendors' ),
|
106 |
+
'inventory' => __( 'Inventory', 'wc-vendors' ),
|
107 |
+
'shipping' => __( 'Shipping', 'wc-vendors' ),
|
108 |
+
'linked_product' => __( 'Linked Products', 'wc-vendors' ),
|
109 |
+
'attribute' => __( 'Attributes', 'wc-vendors' ),
|
110 |
+
'variations' => __( 'Variations', 'wc-vendors' ),
|
111 |
+
'advanced' => __( 'Advanced', 'wc-vendors' ),
|
112 |
+
),
|
113 |
+
'desc_tip' => true,
|
114 |
+
),
|
115 |
+
|
116 |
+
|
117 |
+
array(
|
118 |
+
'title' => __( 'Featured Product', 'wc-vendors' ),
|
119 |
+
'desc' => sprintf( __( 'Allow %s to use the featured product option', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
120 |
+
'id' => 'wcvendors_capability_product_featured',
|
121 |
+
'default' => 'no',
|
122 |
+
'type' => 'checkbox',
|
123 |
+
),
|
124 |
+
|
125 |
+
array(
|
126 |
+
'title' => __( 'Duplicate Product', 'wc-vendors' ),
|
127 |
+
'desc' => sprintf( __( 'Allow %s to duplicate products', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
128 |
+
'id' => 'wcvendors_capability_product_duplicate',
|
129 |
+
'default' => 'no',
|
130 |
+
'type' => 'checkbox',
|
131 |
+
),
|
132 |
+
|
133 |
+
array(
|
134 |
+
'title' => __( 'SKU', 'wc-vendors' ),
|
135 |
+
'desc' => sprintf( __( 'Hide sku field from %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
136 |
+
'id' => 'wcvendors_capability_product_sku',
|
137 |
+
'default' => 'no',
|
138 |
+
'type' => 'checkbox',
|
139 |
+
),
|
140 |
+
|
141 |
+
array(
|
142 |
+
'title' => __( 'Taxes', 'wc-vendors' ),
|
143 |
+
'desc' => sprintf( __( 'Hide tax fields from %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
144 |
+
'id' => 'wcvendors_capability_product_taxes',
|
145 |
+
'default' => 'no',
|
146 |
+
'type' => 'checkbox',
|
147 |
+
),
|
148 |
+
|
149 |
+
array( 'type' => 'sectionend', 'id' => 'product_add_options' ),
|
150 |
+
|
151 |
+
) );
|
152 |
+
|
153 |
+
} elseif ( 'order' === $current_section ){
|
154 |
+
|
155 |
+
$settings = apply_filters( 'wcvendors_settings_capabilities_order', array(
|
156 |
+
|
157 |
+
array(
|
158 |
+
'type' => 'title',
|
159 |
+
'desc' => sprintf( __( 'Configure what order information a %s can view from an order', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) ),
|
160 |
+
'id' => 'order_view_options',
|
161 |
+
),
|
162 |
+
|
163 |
+
array(
|
164 |
+
'title' => __( 'View Order Notes', 'wc-vendors' ),
|
165 |
+
'desc' => sprintf( __( 'Allow %s to view order notes', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
166 |
+
'id' => 'wcvendors_capability_order_read_notes',
|
167 |
+
'default' => 'yes',
|
168 |
+
'type' => 'checkbox',
|
169 |
+
),
|
170 |
+
|
171 |
+
array(
|
172 |
+
'title' => __( 'Add Order notes', 'wc-vendors' ),
|
173 |
+
'desc' => sprintf( __( 'Allow %s to add order notes.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
174 |
+
'id' => 'wcvendors_capability_order_update_notes',
|
175 |
+
'default' => 'yes',
|
176 |
+
'type' => 'checkbox',
|
177 |
+
),
|
178 |
+
|
179 |
+
array(
|
180 |
+
'title' => __( 'Customer Name', 'wc-vendors' ),
|
181 |
+
'desc' => sprintf( __( 'Allow %s to view customer name fields', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
182 |
+
'id' => 'wcvendors_capability_order_customer_name',
|
183 |
+
'default' => 'yes',
|
184 |
+
'type' => 'checkbox',
|
185 |
+
),
|
186 |
+
|
187 |
+
array(
|
188 |
+
'title' => __( 'Customer Billing Address', 'wc-vendors' ),
|
189 |
+
'desc' => sprintf( __( 'Allow %s to view customer billing address fields', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
190 |
+
'id' => 'wcvendors_capability_order_customer_billling',
|
191 |
+
'default' => 'yes',
|
192 |
+
'type' => 'checkbox',
|
193 |
+
),
|
194 |
+
|
195 |
+
array(
|
196 |
+
'title' => __( 'Customer Shipping Address', 'wc-vendors' ),
|
197 |
+
'desc' => sprintf( __( 'Allow %s to view the customer shipping fields', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
198 |
+
'id' => 'wcvendors_capability_order_customer_shipping',
|
199 |
+
'default' => 'yes',
|
200 |
+
'type' => 'checkbox',
|
201 |
+
),
|
202 |
+
|
203 |
+
array(
|
204 |
+
'title' => __( 'Customer Email', 'wc-vendors' ),
|
205 |
+
'desc' => sprintf( __( 'Allow %s to view the customer email address', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
206 |
+
'id' => 'wcvendors_capability_order_customer_email',
|
207 |
+
'default' => 'yes',
|
208 |
+
'type' => 'checkbox',
|
209 |
+
),
|
210 |
+
|
211 |
+
array(
|
212 |
+
'title' => __( 'Customer Phone', 'wc-vendors' ),
|
213 |
+
'desc' => sprintf( __( 'Allow %s to view the customer phone number', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
214 |
+
'id' => 'wcvendors_capability_order_customer_phone',
|
215 |
+
'default' => 'yes',
|
216 |
+
'type' => 'checkbox',
|
217 |
+
),
|
218 |
+
|
219 |
+
array( 'type' => 'sectionend', 'id' => 'order_view_options' ),
|
220 |
+
|
221 |
+
) );
|
222 |
+
|
223 |
+
} else {
|
224 |
+
|
225 |
+
$settings = apply_filters( 'wcvendors_settings_capabilities_general', array(
|
226 |
+
|
227 |
+
array(
|
228 |
+
'title' => __( 'Permissions', 'wc-vendors' ),
|
229 |
+
'type' => 'title',
|
230 |
+
'desc' => sprintf( __( 'Enable or disable functionality for your %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
231 |
+
'id' => 'capabilities_options',
|
232 |
+
),
|
233 |
+
|
234 |
+
array( 'type' => 'sectionend', 'id' => 'capabilities_options' ),
|
235 |
+
|
236 |
+
// Products
|
237 |
+
array(
|
238 |
+
'title' => __( 'Products', 'wc-vendors' ),
|
239 |
+
'type' => 'title',
|
240 |
+
'id' => 'permissions_products_options',
|
241 |
+
),
|
242 |
+
|
243 |
+
array(
|
244 |
+
'title' => __( 'Submit Products', 'wc-vendors' ),
|
245 |
+
'desc' => sprintf( __( 'Allow %s to add/edit products', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
246 |
+
'id' => 'wcvendors_capability_products_enabled',
|
247 |
+
'default' => 'yes',
|
248 |
+
'type' => 'checkbox',
|
249 |
+
),
|
250 |
+
|
251 |
+
array(
|
252 |
+
'title' => __( 'Edit Live Products', 'wc-vendors' ),
|
253 |
+
'desc' => sprintf( __( 'Allow %s to edit published (live) products', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
254 |
+
'id' => 'wcvendors_capability_products_edit',
|
255 |
+
'default' => 'yes',
|
256 |
+
'type' => 'checkbox',
|
257 |
+
),
|
258 |
+
|
259 |
+
array(
|
260 |
+
'title' => __( 'Publish Approval', 'wc-vendors' ),
|
261 |
+
'desc' => sprintf( __( 'Allow %s to publish products directly to the marketplace without requiring approval.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
262 |
+
'id' => 'wcvendors_capability_products_live',
|
263 |
+
'default' => 'yes',
|
264 |
+
'type' => 'checkbox',
|
265 |
+
),
|
266 |
+
|
267 |
+
array( 'type' => 'sectionend', 'id' => 'permissions_products_options' ),
|
268 |
+
|
269 |
+
// Orders
|
270 |
+
array(
|
271 |
+
'title' => __( 'Orders', 'wc-vendors' ),
|
272 |
+
'type' => 'title',
|
273 |
+
'id' => 'permissions_orders_options',
|
274 |
+
),
|
275 |
+
|
276 |
+
array(
|
277 |
+
'title' => __( 'View Orders', 'wc-vendors' ),
|
278 |
+
'desc' => sprintf( __( 'Allow %s to view orders', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
279 |
+
'id' => 'wcvendors_capability_orders_enabled',
|
280 |
+
'default' => 'yes',
|
281 |
+
'type' => 'checkbox',
|
282 |
+
),
|
283 |
+
|
284 |
+
array(
|
285 |
+
'title' => __( 'Export Orders', 'wc-vendors' ),
|
286 |
+
'desc' => sprintf( __( 'Allow %s to export their orders to a CSV file', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
287 |
+
'id' => 'wcvendors_capability_orders_export',
|
288 |
+
'default' => 'yes',
|
289 |
+
'type' => 'checkbox',
|
290 |
+
),
|
291 |
+
|
292 |
+
array(
|
293 |
+
'title' => __( 'Front End Sales Reports', 'wc-vendors' ),
|
294 |
+
'desc' => sprintf( __( 'Allow %s to view sales table on the frontend on the %s dashboard page.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
295 |
+
'id' => 'wcvendors_capability_frontend_reports',
|
296 |
+
'default' => 'yes',
|
297 |
+
'type' => 'checkbox',
|
298 |
+
),
|
299 |
+
|
300 |
+
|
301 |
+
array( 'type' => 'sectionend', 'id' => 'permissions_orders_options' ),
|
302 |
+
|
303 |
+
) );
|
304 |
+
|
305 |
+
}
|
306 |
+
|
307 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, $settings, $current_section );
|
308 |
+
|
309 |
+
}
|
310 |
+
|
311 |
+
|
312 |
+
}
|
313 |
+
|
314 |
+
endif;
|
315 |
+
|
316 |
+
return new WCVendors_Settings_Capabilities();
|
classes/admin/settings/class-wcv-settings-commission.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The commission admin settings
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Settings
|
11 |
+
* @package WCVendors/Admin/Settings
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit; // Exit if accessed directly
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WCVendors_Settings_Commission', false ) ) :
|
20 |
+
|
21 |
+
/**
|
22 |
+
* WC_Admin_Settings_General.
|
23 |
+
*/
|
24 |
+
class WCVendors_Settings_Commission extends WCVendors_Settings_Page {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor.
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->id = 'commission';
|
31 |
+
$this->label = __( 'Commission', 'wc-vendors' );
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get sections.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_sections() {
|
42 |
+
$sections = array(
|
43 |
+
'' => __( 'General', 'wc-vendors' ),
|
44 |
+
);
|
45 |
+
|
46 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, $sections );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get settings array.
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function get_settings( $current_section = '' ) {
|
55 |
+
|
56 |
+
|
57 |
+
$settings = array();
|
58 |
+
|
59 |
+
if ( '' === $current_section ) {
|
60 |
+
$settings = apply_filters( 'wcvendors_settings_comission', array(
|
61 |
+
|
62 |
+
// General Options
|
63 |
+
array(
|
64 |
+
'type' => 'title',
|
65 |
+
'desc' => __( 'These are the commission settings for your marketplace', 'wc-vendors' ),
|
66 |
+
'id' => 'commission_options',
|
67 |
+
),
|
68 |
+
array(
|
69 |
+
'title' => sprintf( __( '%s Commission %%', 'wc-vendors' ), wcv_get_vendor_name() ),
|
70 |
+
'desc' => sprintf( __( 'The global commission rate for your %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
71 |
+
'id' => 'wcvendors_vendor_commission_rate',
|
72 |
+
'css' => 'width:50px;',
|
73 |
+
'default' => '50',
|
74 |
+
'type' => 'number',
|
75 |
+
),
|
76 |
+
array( 'type' => 'sectionend', 'id' => 'commission_options' ),
|
77 |
+
|
78 |
+
) );
|
79 |
+
}
|
80 |
+
|
81 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, $settings, $current_section );
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
endif;
|
87 |
+
|
88 |
+
return new WCVendors_Settings_Commission();
|
classes/admin/settings/class-wcv-settings-display.php
ADDED
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The display settings class
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Settings
|
11 |
+
* @package WCVendors/Admin/Settings
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit; // Exit if accessed directly
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WCVendors_Settings_Display', false ) ) :
|
20 |
+
|
21 |
+
/**
|
22 |
+
* WC_Admin_Settings_General.
|
23 |
+
*/
|
24 |
+
class WCVendors_Settings_Display extends WCVendors_Settings_Page {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor.
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->id = 'display';
|
31 |
+
$this->label = __( 'Display', 'wc-vendors' );
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get sections.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_sections() {
|
42 |
+
$sections = array(
|
43 |
+
'' => __( 'General', 'wc-vendors' ),
|
44 |
+
'labels' => __( 'Labels', 'wc-vendors' ),
|
45 |
+
'advanced' => __( 'Advanced', 'wc-vendors' ),
|
46 |
+
);
|
47 |
+
|
48 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, $sections );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get settings array.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_settings( $current_section = '' ) {
|
57 |
+
|
58 |
+
|
59 |
+
if ( 'advanced' === $current_section ){
|
60 |
+
|
61 |
+
$settings = apply_filters( 'wcvendors_settings_display_advanced', array(
|
62 |
+
// Shop Display Options
|
63 |
+
array(
|
64 |
+
'title' => __( '', 'wc-vendors' ),
|
65 |
+
'type' => 'title',
|
66 |
+
'desc' => sprintf( __( 'Advanced options provide extra display options', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
67 |
+
'id' => 'advanced_options',
|
68 |
+
),
|
69 |
+
array(
|
70 |
+
'title' => __( 'Product Page Stylesheet', 'wc-vendors' ),
|
71 |
+
'desc' => __( 'You can add CSS in this textarea, which will be loaded on the product add/edit page for vendors', 'wc-vendors' ),
|
72 |
+
'desc_tip' => sprintf( __( 'This enables the sold by labels used to show which %s shop the product belongs to', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
73 |
+
'id' => 'wcvendors_display_advanced_stylesheet',
|
74 |
+
'css' => 'width: 700px;min-height:100px',
|
75 |
+
'default' => '',
|
76 |
+
'type' => 'textarea',
|
77 |
+
),
|
78 |
+
|
79 |
+
|
80 |
+
array( 'type' => 'sectionend', 'id' => 'advanced_options' ),
|
81 |
+
) );
|
82 |
+
|
83 |
+
} elseif ( 'labels' === $current_section ){
|
84 |
+
|
85 |
+
$settings = apply_filters( 'wcvendors_settings_display_labels', array(
|
86 |
+
|
87 |
+
// Shop Display Options
|
88 |
+
array(
|
89 |
+
'title' => __( '', 'wc-vendors' ),
|
90 |
+
'type' => 'title',
|
91 |
+
'desc' => sprintf( __( 'Labels are shown on the front end, in orders or emails.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
92 |
+
'id' => 'label_options',
|
93 |
+
),
|
94 |
+
|
95 |
+
array(
|
96 |
+
'title' => __( 'Sold by', 'wc-vendors' ),
|
97 |
+
'desc' => __( 'Enable sold by labels', 'wc-vendors' ),
|
98 |
+
'desc_tip' => sprintf( __( 'This enables the sold by labels used to show which %s shop the product belongs to', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
99 |
+
'id' => 'wcvendors_display_label_sold_by_enable',
|
100 |
+
'default' => 'yes',
|
101 |
+
'type' => 'checkbox',
|
102 |
+
),
|
103 |
+
|
104 |
+
array(
|
105 |
+
'title' => __( 'Sold by label', 'wc-vendors' ),
|
106 |
+
'desc_tip' => __( 'The sold by label', 'wc-vendors' ),
|
107 |
+
'id' => 'wcvendors_label_sold_by',
|
108 |
+
'type' => 'text',
|
109 |
+
'default' => __( 'Sold By', 'wc-vendors' ),
|
110 |
+
),
|
111 |
+
|
112 |
+
array(
|
113 |
+
'title' => sprintf( __( '%s Store Info', 'wc-vendors' ), wcv_get_vendor_name() ),
|
114 |
+
'desc' => sprintf( __( 'Enable %s store info tab on the single product page', 'wc-vendors' ), wcv_get_vendor_name() ),
|
115 |
+
'id' => 'wcvendors_label_store_info_enable',
|
116 |
+
'default' => 'yes',
|
117 |
+
'type' => 'checkbox',
|
118 |
+
),
|
119 |
+
|
120 |
+
array(
|
121 |
+
'title' => sprintf( __( '%s store Info label', 'wc-vendors' ), wcv_get_vendor_name() ),
|
122 |
+
'desc' => sprintf( __( 'The %s store info label', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) ),
|
123 |
+
'id' => 'wcvendors_display_label_store_info',
|
124 |
+
'type' => 'text',
|
125 |
+
'default' => __( 'Store Info', 'wc-vendors' ),
|
126 |
+
),
|
127 |
+
|
128 |
+
array( 'type' => 'sectionend', 'id' => 'label_options' ),
|
129 |
+
|
130 |
+
) );
|
131 |
+
|
132 |
+
} else {
|
133 |
+
|
134 |
+
$settings = apply_filters( 'wcvendors_settings_display_general', array(
|
135 |
+
|
136 |
+
// General Options
|
137 |
+
array(
|
138 |
+
'title' => __( 'Pages', 'wc-vendors' ),
|
139 |
+
'type' => 'title',
|
140 |
+
'desc' => sprintf( __( 'These pages used on the front end by %s.', 'wc-vendors'), lcfirst( wcv_get_vendor_name( false ) ) ),
|
141 |
+
'id' => 'page_options',
|
142 |
+
),
|
143 |
+
array(
|
144 |
+
'title' => __( 'Dashboard', 'wc-vendors' ),
|
145 |
+
'id' => 'wcvendors_vendor_dashboard_page_id',
|
146 |
+
'type' => 'single_select_page',
|
147 |
+
'default' => '',
|
148 |
+
'class' => 'wc-enhanced-select-nostd',
|
149 |
+
'css' => 'min-width:300px;',
|
150 |
+
'desc' => sprintf( __( '<br />This sets the page used to display the front end %s dashboard. This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
151 |
+
),
|
152 |
+
array(
|
153 |
+
'title' => __( 'Shop Settings', 'wc-vendors' ),
|
154 |
+
'id' => 'wcvendors_shop_settings_page_id',
|
155 |
+
'type' => 'single_select_page',
|
156 |
+
'default' => '',
|
157 |
+
'class' => 'wc-enhanced-select-nostd',
|
158 |
+
'css' => 'min-width:300px;',
|
159 |
+
'desc' => sprintf( __( '<br />This sets the page used to display the %s shop settings page. This page should contain the following shortcode. <code>[wcv_shop_settings]</code>', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
160 |
+
),
|
161 |
+
array(
|
162 |
+
'title' => __( 'Orders', 'wc-vendors' ),
|
163 |
+
'id' => 'wcvendors_product_orders_page_id',
|
164 |
+
'type' => 'single_select_page',
|
165 |
+
'default' => '',
|
166 |
+
'class' => 'wc-enhanced-select-nostd',
|
167 |
+
'css' => 'min-width:300px;',
|
168 |
+
'desc' => sprintf( __( '<br />This sets the page used to display the %s orders page. This page should contain the following shortcode. <code>[wcv_orders]</code>', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
169 |
+
),
|
170 |
+
array(
|
171 |
+
'title' => sprintf( __( '%s', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( false ) ) ),
|
172 |
+
'id' => 'wcvendors_vendors_page_id',
|
173 |
+
'type' => 'single_select_page',
|
174 |
+
'default' => '',
|
175 |
+
'class' => 'wc-enhanced-select-nostd',
|
176 |
+
'css' => 'min-width:300px;',
|
177 |
+
'desc' => sprintf( __( '<br />This sets the page used to display a paginated list of all %1$s stores. Your %1$s stores will be available at <code>%2$s/page-slug/store-name/</code><br />This page should contain the following shortcode. <code>[wcv_vendorslist]</code>', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ), esc_html( home_url() ) ),
|
178 |
+
),
|
179 |
+
array(
|
180 |
+
'title' => __( 'Terms and Conditions', 'wc-vendors' ),
|
181 |
+
'id' => 'wcvendors_vendor_terms_page_id',
|
182 |
+
'type' => 'single_select_page',
|
183 |
+
'default' => '',
|
184 |
+
'class' => 'wc-enhanced-select-nostd',
|
185 |
+
'css' => 'min-width:300px;',
|
186 |
+
'desc' => sprintf( __( '<br />This sets the page used to display the terms and conditions when a %s signs up.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( ) ) ),
|
187 |
+
),
|
188 |
+
|
189 |
+
array( 'type' => 'sectionend', 'id' => 'page_options' ),
|
190 |
+
|
191 |
+
// Shop Settings
|
192 |
+
array(
|
193 |
+
'title' => __( 'Store Settings', 'wc-vendors' ),
|
194 |
+
'type' => 'title',
|
195 |
+
'desc' => __( 'These are the settings for the individual vendor stores.', 'wc-vendors' ),
|
196 |
+
'id' => 'shop_options',
|
197 |
+
),
|
198 |
+
|
199 |
+
array(
|
200 |
+
'title' => sprintf( __( '%s Store URL', 'wc-vendors' ), wcv_get_vendor_name() ),
|
201 |
+
'desc' => sprintf( __( 'If you enter "vendors" your %s store will be %s/vendors/store-name/', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( false ) ), esc_html( home_url() ) ),
|
202 |
+
'id' => 'wcvendors_vendor_shop_permalink',
|
203 |
+
'default' => 'vendors',
|
204 |
+
'type' => 'text',
|
205 |
+
),
|
206 |
+
|
207 |
+
array(
|
208 |
+
'title' => __( 'Shop Header', 'wc-vendors' ),
|
209 |
+
'desc' => sprintf( __( 'Enable %s shop headers', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
210 |
+
'desc_tip' => sprintf( __( 'This enables the %s shop header template and disables the shop description text.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
211 |
+
'id' => 'wcvendors_display_shop_headers',
|
212 |
+
'default' => 'no',
|
213 |
+
'type' => 'checkbox',
|
214 |
+
),
|
215 |
+
|
216 |
+
array(
|
217 |
+
'title' => __( 'Shop HTML', 'wc-vendors' ),
|
218 |
+
'desc' => sprintf( __( 'Allow HTML in %s shop desription', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
219 |
+
'desc_tip' => sprintf( __( 'Enable HTML for a %s shop description. You can enable or disable this per vendor by editing the vendors user account.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ),
|
220 |
+
'id' => 'wcvendors_display_shop_description_html',
|
221 |
+
'default' => 'no',
|
222 |
+
'type' => 'checkbox',
|
223 |
+
),
|
224 |
+
|
225 |
+
array(
|
226 |
+
'title' => __( 'Display Name', 'wc-vendors' ),
|
227 |
+
'id' => 'wcvendors_display_shop_display_name',
|
228 |
+
'desc_tip' => sprintf( __( 'Select what will be used to display the %s name throughout the marketplace.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
229 |
+
'default' => 'shop_name',
|
230 |
+
'type' => 'select',
|
231 |
+
'class' => 'wc-enhanced-select',
|
232 |
+
'options' => array(
|
233 |
+
'display_name' => __( 'Display name', 'wc-vendors' ),
|
234 |
+
'shop_name' => __( 'Shop name', 'wc-vendors' ),
|
235 |
+
'user_login' => sprintf( __( '%s Username', 'wc-vendors' ), wcv_get_vendor_name() ),
|
236 |
+
'user_email' => sprintf( __( '%s Email', 'wc-vendors' ), wcv_get_vendor_name() ),
|
237 |
+
),
|
238 |
+
),
|
239 |
+
|
240 |
+
array( 'type' => 'sectionend', 'id' => 'shop_options' ),
|
241 |
+
|
242 |
+
) );
|
243 |
+
|
244 |
+
}
|
245 |
+
|
246 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, $settings, $current_section );
|
247 |
+
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
endif;
|
254 |
+
|
255 |
+
return new WCVendors_Settings_Display();
|
classes/admin/settings/class-wcv-settings-general.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The general admin settings
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Settings
|
11 |
+
* @package WCVendors/Admin/Settings
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit; // Exit if accessed directly
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WCVendors_Settings_General', false ) ) :
|
20 |
+
|
21 |
+
/**
|
22 |
+
* WC_Admin_Settings_General.
|
23 |
+
*/
|
24 |
+
class WCVendors_Settings_General extends WCVendors_Settings_Page {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor.
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->id = 'general';
|
31 |
+
$this->label = __( 'General', 'wc-vendors' );
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get sections.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function get_sections() {
|
42 |
+
$sections = array(
|
43 |
+
'' => __( 'General', 'wc-vendors' ),
|
44 |
+
);
|
45 |
+
|
46 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, $sections );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get settings array.
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function get_settings( $current_section = '' ) {
|
55 |
+
|
56 |
+
$settings = array();
|
57 |
+
|
58 |
+
if ( '' === $current_section ) {
|
59 |
+
|
60 |
+
$settings = apply_filters( 'wcvendors_settings', array(
|
61 |
+
|
62 |
+
// General Options
|
63 |
+
array(
|
64 |
+
'title' => __( 'Marketplace Options', 'wc-vendors' ),
|
65 |
+
'type' => 'title',
|
66 |
+
'desc' => __( 'These are the general settings for your marketplace', 'wc-vendors' ),
|
67 |
+
'id' => 'general_options',
|
68 |
+
),
|
69 |
+
array(
|
70 |
+
'title' => sprintf( __( '%s Registration', 'wc-vendors' ), wcv_get_vendor_name() ),
|
71 |
+
'desc' => sprintf( __( 'Allow users to apply to become a %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
72 |
+
'id' => 'wcvendors_vendor_allow_registration',
|
73 |
+
'default' => 'yes',
|
74 |
+
'type' => 'checkbox',
|
75 |
+
),
|
76 |
+
array(
|
77 |
+
'title' => sprintf( __( '%s Approval', 'wc-vendors' ), wcv_get_vendor_name() ),
|
78 |
+
'desc' => sprintf( __( 'Manually approve all %s applications', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
79 |
+
'id' => 'wcvendors_vendor_approve_registration',
|
80 |
+
'default' => 'no',
|
81 |
+
'type' => 'checkbox',
|
82 |
+
),
|
83 |
+
array(
|
84 |
+
'title' => sprintf( __( '%s Taxes', 'wc-vendors' ), wcv_get_vendor_name() ),
|
85 |
+
'desc' => sprintf( __( 'Give any taxes to the %s', 'wc-vendors' ), wcv_get_vendor_name() ),
|
86 |
+
'id' => 'wcvendors_vendor_give_taxes',
|
87 |
+
'default' => 'no',
|
88 |
+
'type' => 'checkbox',
|
89 |
+
),
|
90 |
+
array(
|
91 |
+
'title' => sprintf( __( '%s Shipping', 'wc-vendors' ), wcv_get_vendor_name() ),
|
92 |
+
'desc' => sprintf( __( 'Give any shipping to the %s', 'wc-vendors' ), wcv_get_vendor_name() ),
|
93 |
+
'id' => 'wcvendors_vendor_give_shipping',
|
94 |
+
'default' => 'no',
|
95 |
+
'type' => 'checkbox',
|
96 |
+
),
|
97 |
+
array( 'type' => 'sectionend', 'id' => 'general_options' ),
|
98 |
+
|
99 |
+
) );
|
100 |
+
}
|
101 |
+
|
102 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, $settings, $current_section );
|
103 |
+
}
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
endif;
|
108 |
+
|
109 |
+
return new WCVendors_Settings_General();
|
classes/admin/settings/class-wcv-settings-page.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WC Vendors Settings Page/Tab - This is a copy of the WooCommerce Settings page
|
4 |
+
*
|
5 |
+
* @author WooThemes, Jamie Madden
|
6 |
+
* @category Admin
|
7 |
+
* @package WC Vendors/Admin
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
+
|
15 |
+
if ( ! class_exists( 'WCVendors_Settings_Page', false ) ) :
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WCVendors_Settings_Page.
|
19 |
+
*/
|
20 |
+
abstract class WCVendors_Settings_Page {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Setting page id.
|
24 |
+
*
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
protected $id = '';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Setting page label.
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
protected $label = '';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Constructor.
|
38 |
+
*/
|
39 |
+
public function __construct() {
|
40 |
+
|
41 |
+
add_filter( 'wcvendors_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
|
42 |
+
add_action( 'wcvendors_sections_' . $this->id, array( $this, 'output_sections' ) );
|
43 |
+
add_action( 'wcvendors_settings_' . $this->id, array( $this, 'output' ) );
|
44 |
+
add_action( 'wcvendors_settings_save_' . $this->id, array( $this, 'save' ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get settings page ID.
|
49 |
+
* @since 2.0.0
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
public function get_id() {
|
53 |
+
return $this->id;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Get settings page label.
|
58 |
+
* @since 2.0.0
|
59 |
+
* @return string
|
60 |
+
*/
|
61 |
+
public function get_label() {
|
62 |
+
return $this->label;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Add this page to settings.
|
67 |
+
*
|
68 |
+
* @param array $pages
|
69 |
+
*
|
70 |
+
* @return mixed
|
71 |
+
*/
|
72 |
+
public function add_settings_page( $pages ) {
|
73 |
+
$pages[ $this->id ] = $this->label;
|
74 |
+
|
75 |
+
return $pages;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get settings array.
|
80 |
+
*
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function get_settings() {
|
84 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, array() );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get sections.
|
89 |
+
*
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
public function get_sections() {
|
93 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, array() );
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Output sections.
|
98 |
+
*/
|
99 |
+
public function output_sections() {
|
100 |
+
global $current_section;
|
101 |
+
|
102 |
+
$sections = $this->get_sections();
|
103 |
+
|
104 |
+
if ( empty( $sections ) || 1 === sizeof( $sections ) ) {
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
|
108 |
+
echo '<ul class="subsubsub">';
|
109 |
+
|
110 |
+
$array_keys = array_keys( $sections );
|
111 |
+
|
112 |
+
foreach ( $sections as $id => $label ) {
|
113 |
+
echo '<li><a href="' . admin_url( 'admin.php?page=wcv-settings&tab=' . $this->id . '§ion=' . sanitize_title( $id ) ) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> ' . ( end( $array_keys ) == $id ? '' : '|' ) . ' </li>';
|
114 |
+
}
|
115 |
+
|
116 |
+
echo '</ul><br class="clear" />';
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Output the settings.
|
121 |
+
*/
|
122 |
+
public function output() {
|
123 |
+
global $current_section;
|
124 |
+
|
125 |
+
$settings = $this->get_settings( $current_section );
|
126 |
+
WCVendors_Admin_Settings::output_fields( $settings );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Save settings.
|
131 |
+
*/
|
132 |
+
public function save() {
|
133 |
+
global $current_section;
|
134 |
+
|
135 |
+
$settings = $this->get_settings( $current_section );
|
136 |
+
WCVendors_Admin_Settings::save_fields( $settings );
|
137 |
+
|
138 |
+
if ( $current_section ) {
|
139 |
+
do_action( 'wcvendors_update_options_' . $this->id . '_' . $current_section );
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
endif;
|
classes/admin/settings/class-wcv-settings-payments.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* The display settings class
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @category Settings
|
11 |
+
* @package WCVendors/Admin/Settings
|
12 |
+
* @version 2.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit; // Exit if accessed directly
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WCVendors_Settings_Payments', false ) ) :
|
20 |
+
|
21 |
+
/**
|
22 |
+
* WC_Admin_Settings_General.
|
23 |
+
*/
|
24 |
+
class WCVendors_Settings_Payments extends WCVendors_Settings_Page {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructor.
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
$this->id = 'payments';
|
31 |
+
$this->label = __( 'Payments', 'wc-vendors' );
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get sections.
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public function get_sections() {
|
43 |
+
$sections = array(
|
44 |
+
'' => __( 'General', 'wc-vendors' ),
|
45 |
+
'paypal' => __( 'PayPal Adaptive Payments', 'wc-vendors' ),
|
46 |
+
);
|
47 |
+
|
48 |
+
return apply_filters( 'wcvendors_get_sections_' . $this->id, $sections );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get settings array.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function get_settings( $current_section = '' ) {
|
57 |
+
|
58 |
+
|
59 |
+
if ( 'paypal' === $current_section ){
|
60 |
+
|
61 |
+
$settings = apply_filters( 'wcvendors_settings_payments_paypal', array(
|
62 |
+
|
63 |
+
// Shop Display Options
|
64 |
+
array(
|
65 |
+
'title' => __( '', 'wc-vendors' ),
|
66 |
+
'type' => 'title',
|
67 |
+
'desc' => sprintf( __( '<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been depreciated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
68 |
+
'id' => 'paypal_options',
|
69 |
+
),
|
70 |
+
|
71 |
+
|
72 |
+
array(
|
73 |
+
'title' => __( '', 'wc-vendors' ),
|
74 |
+
'type' => 'title',
|
75 |
+
'desc' => sprintf( __( 'Total Commission due: %s', 'wc-vendors' ), wc_price( WCV_Commission::get_totals( 'due' ) ) ),
|
76 |
+
'id' => 'paypal_options',
|
77 |
+
),
|
78 |
+
|
79 |
+
array(
|
80 |
+
'title' => __( 'Instant Pay', 'wc-vendors' ),
|
81 |
+
'desc' => __( 'Enable instantpay', 'wc-vendors' ),
|
82 |
+
'desc_tip' => sprintf( __( 'Instantly pay %s their commission when an order is made, and if a %s has a valid PayPal email added on their Shop Settings page.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ), lcfirst( wcv_get_vendor_name() ) ),
|
83 |
+
'id' => 'wcvendors_payments_paypal_instantpay_enable',
|
84 |
+
'default' => 'no',
|
85 |
+
'type' => 'checkbox',
|
86 |
+
),
|
87 |
+
|
88 |
+
array(
|
89 |
+
'title' => __( 'Payment schedule', 'wc-vendors' ),
|
90 |
+
'desc' => __( 'Note: Schedule will only work if instant pay is unchecked', 'wc-vendors' ),
|
91 |
+
'id' => 'wcvendors_payments_paypal_schedule',
|
92 |
+
'type' => 'radio',
|
93 |
+
'options' => array(
|
94 |
+
'daily' => __( 'Daily', 'wc-vendors' ),
|
95 |
+
'weekly' => __( 'Weekly', 'wc-vendors' ),
|
96 |
+
'biweekly' => __( 'Biweekly', 'wc-vendors' ),
|
97 |
+
'monthly' => __( 'Monthly', 'wc-vendors' ),
|
98 |
+
'manual' => __( 'Manual', 'wc-vendors' ),
|
99 |
+
'now' => '<span style="color:green;"><strong>' . __( 'Now', 'wc-vendors' ) . '</strong></span>',
|
100 |
+
)
|
101 |
+
),
|
102 |
+
|
103 |
+
array(
|
104 |
+
'title' => __( 'Email notification', 'wc-vendors' ),
|
105 |
+
'desc' => __( 'Enable notify the admin', 'wc-vendors' ),
|
106 |
+
'desc_tip' => __( 'Send the marketplace admin an email each time a payment has been made via the payment schedule options above', 'wc-vendors' ),
|
107 |
+
'id' => 'wcvendors_payments_paypal_email_enable',
|
108 |
+
'default' => 'no',
|
109 |
+
'type' => 'checkbox',
|
110 |
+
),
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
array( 'type' => 'sectionend', 'id' => 'paypal_options' ),
|
115 |
+
) );
|
116 |
+
|
117 |
+
} else {
|
118 |
+
|
119 |
+
$settings = apply_filters( 'wcvendors_settings_payments_general', array(
|
120 |
+
|
121 |
+
// Shop Display Options
|
122 |
+
array(
|
123 |
+
'title' => __( '', 'wc-vendors' ),
|
124 |
+
'type' => 'title',
|
125 |
+
'desc' => sprintf( __( '<strong>Payments controls how your %s commission is paid out. These settings only function if you are using a supported gateway.</strong> ', 'wc-vendors' ), lcfirst( wcv_get_vendor_name() ) ),
|
126 |
+
'id' => 'payment_general_options',
|
127 |
+
),
|
128 |
+
|
129 |
+
array( 'type' => 'sectionend', 'id' => 'payment_general_options' ),
|
130 |
+
|
131 |
+
) );
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
return apply_filters( 'wcvendors_get_settings_' . $this->id, $settings, $current_section );
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
endif;
|
142 |
+
|
143 |
+
return new WCVendors_Settings_Payments();
|
classes/admin/views/html-admin-commission-page.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Settings
|
4 |
+
*
|
5 |
+
* @author Jamie Madden, WC Vendors
|
6 |
+
* @category Admin
|
7 |
+
* @package WCVendors/Admin
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
$page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRIPPED );
|
16 |
+
$paged = filter_input( INPUT_GET, 'paged', FILTER_SANITIZE_NUMBER_INT );
|
17 |
+
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div class="wrap">
|
21 |
+
|
22 |
+
<div id="icon-woocommerce" class="icon32 icon32-woocommerce-reports"><br/></div>
|
23 |
+
<h2><?php _e( 'Commission', 'wc-vendors' ); ?></h2>
|
24 |
+
<form id="posts-filter" method="get">
|
25 |
+
|
26 |
+
<?php printf( '<input type="hidden" name="page" value="%s" />', $page ); ?>
|
27 |
+
<?php printf( '<input type="hidden" name="paged" value="%d" />', $paged ); ?>
|
28 |
+
|
29 |
+
<input type="hidden" name="page" value="wcv-commissions"/>
|
30 |
+
|
31 |
+
<?php $this->commissions_table->prepare_items(); ?>
|
32 |
+
<?php $this->commissions_table->views(); ?>
|
33 |
+
<?php $this->commissions_table->display(); ?>
|
34 |
+
|
35 |
+
</form>
|
36 |
+
<div id="ajax-response"></div>
|
37 |
+
|
38 |
+
<br class="clear"/>
|
39 |
+
</div>
|
classes/admin/views/html-admin-page-extensions.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Page - Addons
|
4 |
+
*
|
5 |
+
* @var string $view
|
6 |
+
* @var object $addons
|
7 |
+
*/
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
?>
|
13 |
+
<div class="wrap woocommerce wcv_addons_wrap">
|
14 |
+
|
15 |
+
<h1><?php _e( 'Upgrade your marketplace today!', 'wc-vendors' ); ?></h1>
|
16 |
+
<br />
|
17 |
+
|
18 |
+
<div class="addons-wcs-banner-block">
|
19 |
+
<div class="addons-wcs-banner-block-image">
|
20 |
+
<img class="addons-img" src="<?php echo wcv_assets_url; ?>images/extensions/screenshot-1.png" alt="WC Vendors Pro">
|
21 |
+
<img class="addons-img" src="<?php echo wcv_assets_url; ?>images/extensions/screenshot-2.png" alt="WC Vendors Pro">
|
22 |
+
<img class="addons-img" src="<?php echo wcv_assets_url; ?>images/extensions/screenshot-3.png" alt="WC Vendors Pro">
|
23 |
+
</div>
|
24 |
+
<div class="addons-wcs-banner-block-content">
|
25 |
+
<h1><?php _e( 'WC Vendors Pro', 'wc-vendors'); ?></h1>
|
26 |
+
|
27 |
+
<p><?php _e( 'Enhanced your marketplace with pro features and capabilities. Move all your vendors tasks to the frontend. They no longer need or see the WordPress admin. Shipping system included.', 'wc-vendors' ); ?></p>
|
28 |
+
|
29 |
+
<h4>Features</h4>
|
30 |
+
|
31 |
+
<ul class="feature-list">
|
32 |
+
<li><?php _e( 'Vendors have a main dashboard showing sales reports and recent orders and products.', 'wc-vendors' ); ?></li>
|
33 |
+
<li><?php _e( 'Vendors have complete front end product management', 'wc-vendors' ); ?></li>
|
34 |
+
<li><?php _e( 'Vendors can add their own coupons that only apply to their products', 'wc-vendors' ); ?></li>
|
35 |
+
<li><?php _e( 'Vendors have advanced shipment tracking including shipping providers', 'wc-vendors' ); ?></li>
|
36 |
+
<li><?php _e( 'Vendors have the ability to print a shipping label with a picking list', 'wc-vendors' ); ?></li>
|
37 |
+
<li><?php _e( 'Vendors can add all their own social media profile links', 'wc-vendors' ); ?></li>
|
38 |
+
<li><?php _e( 'Vendors can add SEO to their store and products', 'wc-vendors' ); ?></li>
|
39 |
+
<li><?php _e( 'Vendors can add their own banner and store icon', 'wc-vendors' ); ?></li>
|
40 |
+
<li><?php _e( 'Vendors have a comprehensive shipping system available. Either flat rate or table rate based.', 'wc-vendors' ); ?></li>
|
41 |
+
<li><?php _e( 'Vendor stores templates are more advanced', 'wc-vendors' ); ?></li>
|
42 |
+
<li><?php _e( 'Vendors have more control over their order notes', 'wc-vendors' ); ?></li>
|
43 |
+
<li><?php _e( 'Vendors vacation module is included as part of pro not an extra addon', 'wc-vendors' ); ?></li>
|
44 |
+
<li><?php _e( 'Admins have multiple commission rate options including percentage, percentage + fee, fixed, fixed + fee.', 'wc-vendors' ); ?></li>
|
45 |
+
<li><?php _e( 'Admins can set global shipping rates as well as allow different shipping modules per vendor. Setting one as flat rate, while another can be table rate', 'wc-vendors' ); ?></li>
|
46 |
+
<li><?php _e( 'Ebay style feedback allows customers to rate the products from the vendors', 'wc-vendors' ); ?></li>
|
47 |
+
<li><?php _e( 'Premium ticket based support for all pro users. Annual and lifetime support licenses available.', 'wc-vendors' ); ?></li>
|
48 |
+
</ul>
|
49 |
+
|
50 |
+
|
51 |
+
<a class="product-addons-button product-addons-button-solid" href="https://www.wcvendors.com/product/wc-vendors-pro/">From $199</a>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<ul class="products">
|
56 |
+
<li class="product">
|
57 |
+
<a href="https://www.wcvendors.com/product/stripe-commissions-gateway/?utm_source=plugin&utm_medium=addons&utm_campaign=extensions">
|
58 |
+
<h2><?php _e( 'WC Vendors Stripe Commissions & Gateway', 'wc-vendors'); ?></h2>
|
59 |
+
<p><?php _e( 'Pay your vendors their commissions instantly when the customer purchases. No need to manually pay your vendors.', 'wc-vendors'); ?></p>
|
60 |
+
<span class="product-addons-button product-addons-button-solid"><?php _e( 'From $69', 'wc-vendors'); ?></span>
|
61 |
+
</a>
|
62 |
+
</li>
|
63 |
+
<li class="product">
|
64 |
+
<a href="https://www.wcvendors.com/product/woocommerce-bookings-integration/?utm_source=plugin&utm_medium=addons&utm_campaign=extensions">
|
65 |
+
<h2><?php _e( 'WooCommerce Bookings Integration<', 'wc-vendors'); ?>/h2>
|
66 |
+
<span class="price"><?php _e( 'From $69.00', 'wc-vendors'); ?></span>
|
67 |
+
<p><?php _e( 'Allow vendors to create bookings. Integrate WooCommerce bookings into the WC Vendors Pro Dashboard.', 'wc-vendors'); ?></p>
|
68 |
+
<span class="product-addons-button product-addons-button-solid"><?php _e( 'From $69', 'wc-vendors'); ?></span>
|
69 |
+
</a>
|
70 |
+
</li>
|
71 |
+
<li class="product">
|
72 |
+
<a href="https://www.wcvendors.com/product/woocommerce-simple-auctions-integration/?utm_source=plugin&utm_medium=addons&utm_campaign=extensions">
|
73 |
+
<h2><?php _e( 'WooCommerce Simple Auctions', 'wc-vendors'); ?></h2>
|
74 |
+
<p><?php _e( 'Integreate WooCommerce Simple Auctions into the WC Vendors Pro dashboard.', 'wc-vendors'); ?> </p>
|
75 |
+
<span class="product-addons-button product-addons-button-solid"><?php _e( 'From $69', 'wc-vendors'); ?></span>
|
76 |
+
</a>
|
77 |
+
</li>
|
78 |
+
<li class="product">
|
79 |
+
<a href="https://www.wcvendors.com/home/3rd-party-extensions/y/?utm_source=plugin&utm_medium=addons&utm_campaign=extensions">
|
80 |
+
<h2><?php _e( '3rd Party Extensions', 'wc-vendors'); ?></h2>
|
81 |
+
<p><?php _e( 'We have a list of 3rd party developer extensions that inetegrate with WC Vendors and WC Vendors Pro on our website.', 'wc-vendors'); ?></p>
|
82 |
+
<span class="product-addons-button product-addons-button-solid"><?php _e( 'View extensions', 'wc-vendors'); ?></span>
|
83 |
+
</a>
|
84 |
+
</li>
|
85 |
+
|
86 |
+
</ul>
|
87 |
+
|
88 |
+
|
89 |
+
<p><?php printf( __( 'Our list of extensions for WC Vendors can be found on our website. <a href="%s">Click here to view our extensions list.</a>', 'wc-vendors' ), 'https://www.wcvendors.com/extensions/' ); ?></p>
|
90 |
+
|
91 |
+
|
92 |
+
</div>
|
classes/admin/views/html-admin-settings.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Settings
|
4 |
+
*
|
5 |
+
* @package WC Vendors
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
$tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'wcvendors_sections_' . $current_tab ) || has_action( 'wcvendors_settings_' . $current_tab ) || has_action( 'wcvendors_settings_tabs_' . $current_tab );
|
13 |
+
$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : '';
|
14 |
+
|
15 |
+
if ( ! $tab_exists ) {
|
16 |
+
wp_safe_redirect( admin_url( 'admin.php?page=wcv-settings' ) );
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
?>
|
20 |
+
<div class="wrap wcvendors">
|
21 |
+
<form method="<?php echo esc_attr( apply_filters( 'wcvendors_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data">
|
22 |
+
<nav class="nav-tab-wrapper wcv-nav-tab-wrapper">
|
23 |
+
<?php
|
24 |
+
|
25 |
+
foreach ( $tabs as $slug => $label ) {
|
26 |
+
echo '<a href="' . esc_html( admin_url( 'admin.php?page=wcv-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
|
27 |
+
}
|
28 |
+
|
29 |
+
do_action( 'wcvendors_settings_tabs' );
|
30 |
+
|
31 |
+
?>
|
32 |
+
</nav>
|
33 |
+
<h1 class="screen-reader-text"><?php echo esc_html( $current_tab_label ); ?></h1>
|
34 |
+
<?php
|
35 |
+
do_action( 'wcvendors_sections_' . $current_tab );
|
36 |
+
self::show_messages();
|
37 |
+
do_action( 'wcvendors_settings_' . $current_tab );
|
38 |
+
?>
|
39 |
+
<p class="submit">
|
40 |
+
<?php if ( empty( $GLOBALS['hide_save_button'] ) ) : ?>
|
41 |
+
<button name="save" class="button-primary wcvendors-save-button" type="submit" value="<?php esc_attr_e( 'Save changes', 'wcvendors' ); ?>"><?php esc_html_e( 'Save changes', 'wcvendors' ); ?></button>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php wp_nonce_field( 'wcvendors-settings' ); ?>
|
44 |
+
</p>
|
45 |
+
</form>
|
46 |
+
</div>
|
classes/admin/views/html-vendor-meta.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h3><?php _e( 'WC Vendors', 'wc-vendors' ); ?></h3>
|
2 |
+
|
3 |
+
<table class="form-table">
|
4 |
+
<tbody>
|
5 |
+
|
6 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_shop_html_enable', true ) ) : ?>
|
7 |
+
|
8 |
+
<?php do_action( 'wcvendors_admin_before_shop_html', $user ); ?>
|
9 |
+
<tr>
|
10 |
+
<th scope="row">Shop HTML</th>
|
11 |
+
<td>
|
12 |
+
<label for="pv_shop_html_enabled">
|
13 |
+
<input name="pv_shop_html_enabled" type="checkbox" id="pv_shop_html_enabled" <?php checked( true, get_user_meta( $user->ID, 'pv_shop_html_enabled', true ), $echo = true ) ?>/>
|
14 |
+
<?php _e( 'Enable HTML for the shop description', 'wc-vendors' ); ?>
|
15 |
+
</label>
|
16 |
+
</td>
|
17 |
+
</tr>
|
18 |
+
<?php do_action( 'wcvendors_admin_after_shop_html', $user ); ?>
|
19 |
+
|
20 |
+
<?php endif; ?>
|
21 |
+
|
22 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_shop_name_enable', true ) ) : ?>
|
23 |
+
|
24 |
+
<?php do_action( 'wcvendors_admin_before_shop_name', $user ); ?>
|
25 |
+
<tr>
|
26 |
+
<th><label for="pv_shop_name"><?php _e( 'Shop name', 'wc-vendors' ); ?></label></th>
|
27 |
+
<td><input type="text" name="pv_shop_name" id="pv_shop_name" value="<?php echo get_user_meta( $user->ID, 'pv_shop_name', true ); ?>" class="regular-text">
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<?php do_action( 'wcvendors_admin_after_shop_name', $user ); ?>
|
31 |
+
|
32 |
+
<?php endif; ?>
|
33 |
+
|
34 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_paypal_enable', true ) ) : ?>
|
35 |
+
|
36 |
+
<?php do_action( 'wcvendors_admin_before_paypal', $user ); ?>
|
37 |
+
<tr>
|
38 |
+
<th><label for="pv_paypal"><?php _e( 'PayPal E-mail', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
39 |
+
<td><input type="email" name="pv_paypal" id="pv_paypal" value="<?php echo get_user_meta( $user->ID, 'pv_paypal', true ); ?>" class="regular-text">
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
<?php do_action( 'wcvendors_admin_after_paypal', $user ); ?>
|
43 |
+
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_bank_details_enable', true ) ) : ?>
|
47 |
+
|
48 |
+
<?php do_action( 'wcvendors_admin_before_bank_details', $user ); ?>
|
49 |
+
<tr>
|
50 |
+
<th><label for="wcv_bank_account_name"><?php _e( 'Bank Account Name', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
51 |
+
<td><input type="text" name="wcv_bank_account_name" id="wcv_bank_account_name" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_account_name', true ); ?>" class="regular-text">
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<tr>
|
55 |
+
<th><label for="wcv_bank_account_number"><?php _e( 'Bank Account Number', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
56 |
+
<td><input type="text" name="wcv_bank_account_number" id="wcv_bank_account_number" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_account_number', true ); ?>" class="regular-text">
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<tr>
|
60 |
+
<th><label for="wcv_bank_name"><?php _e( 'Bank Name', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
61 |
+
<td><input type="text" name="wcv_bank_name" id="wcv_bank_name" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_name', true ); ?>" class="regular-text">
|
62 |
+
</td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<th><label for="wcv_bank_routing_number"><?php _e( 'Routing Number', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
66 |
+
<td><input type="text" name="wcv_bank_routing_number" id="wcv_bank_routing_number" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_routing_number', true ); ?>" class="regular-text">
|
67 |
+
</td>
|
68 |
+
</tr>
|
69 |
+
<tr>
|
70 |
+
<th><label for="wcv_bank_iban"><?php _e( 'IBAN', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
71 |
+
<td><input type="text" name="wcv_bank_iban" id="wcv_bank_iban" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_iban', true ); ?>" class="regular-text">
|
72 |
+
</td>
|
73 |
+
</tr>
|
74 |
+
<tr>
|
75 |
+
<th><label for="wcv_bank_bic_swift"><?php _e( 'BIC/SWIFT', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
76 |
+
<td><input type="text" name="wcv_bank_bic_swift" id="wcv_bank_bic_swift" value="<?php echo get_user_meta( $user->ID, 'wcv_bank_bic_swift', true ); ?>" class="regular-text">
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
<?php do_action( 'wcvendors_admin_after_bank_details', $user ); ?>
|
80 |
+
|
81 |
+
<?php endif; ?>
|
82 |
+
|
83 |
+
|
84 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_commission_rate_enable', true ) ) : ?>
|
85 |
+
|
86 |
+
<?php do_action( 'wcvendors_admin_before_commission_due', $user ); ?>
|
87 |
+
<tr>
|
88 |
+
<th><label for="pv_custom_commission_rate"><?php _e( 'Commission rate', 'wc-vendors' ); ?> (%)</label></th>
|
89 |
+
<td><input type="number" step="0.01" max="100" min="0" name="pv_custom_commission_rate" placeholder="<?php _e( 'Leave blank for default', 'wc-vendors' ); ?>" id="pv_custom_commission_rate"
|
90 |
+
value="<?php echo get_user_meta( $user->ID, 'pv_custom_commission_rate', true ); ?>" class="regular-text">
|
91 |
+
</td>
|
92 |
+
</tr>
|
93 |
+
<?php do_action( 'wcvendors_admin_after_commission_due', $user ); ?>
|
94 |
+
|
95 |
+
<?php endif; ?>
|
96 |
+
|
97 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_give_tax_enable', true ) ) : ?>
|
98 |
+
|
99 |
+
<?php do_action( 'wcvendors_admin_before_give_tax', $user ); ?>
|
100 |
+
<tr>
|
101 |
+
<th><label for="wcv_give_vendor_tax"><?php _e( 'Give Tax', 'wc-vendors' ); ?> (%)</label></th>
|
102 |
+
<td>
|
103 |
+
<label for="wcv_give_vendor_tax">
|
104 |
+
<input name="wcv_give_vendor_tax" type="checkbox" id="wcv_give_vendor_tax" <?php checked( true, get_user_meta( $user->ID, 'wcv_give_vendor_tax', true ), $echo = true ) ?>/>
|
105 |
+
<?php _e( 'Tax override for vendor', 'wc-vendors' ); ?>
|
106 |
+
</label>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
<?php do_action( 'wcvendors_admin_after_give_tax', $user ); ?>
|
110 |
+
|
111 |
+
<?php endif; ?>
|
112 |
+
|
113 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_give_shipping_enable', true ) ) : ?>
|
114 |
+
|
115 |
+
<?php do_action( 'wcvendors_admin_before_give_shipping', $user ); ?>
|
116 |
+
<tr>
|
117 |
+
<th><label for="wcv_give_vendor_shipping"><?php _e( 'Give Shipping', 'wc-vendors' ); ?> (%)</label></th>
|
118 |
+
<td>
|
119 |
+
<label for="wcv_give_vendor_shipping">
|
120 |
+
<input name="wcv_give_vendor_shipping" type="checkbox" id="wcv_give_vendor_shipping" <?php checked( true, get_user_meta( $user->ID, 'wcv_give_vendor_shipping', true ), $echo = true ) ?>/>
|
121 |
+
<?php _e( 'Shipping override for vendor', 'wc-vendors' ); ?>
|
122 |
+
</label>
|
123 |
+
</td>
|
124 |
+
</tr>
|
125 |
+
<?php do_action( 'wcvendors_admin_after_give_shipping', $user ); ?>
|
126 |
+
|
127 |
+
<?php endif; ?>
|
128 |
+
|
129 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_seller_info_enable', true ) ) : ?>
|
130 |
+
|
131 |
+
<?php do_action( 'wcvendors_admin_before_seller_info', $user ); ?>
|
132 |
+
<tr>
|
133 |
+
<th><label for="pv_seller_info"><?php _e( 'Seller info', 'wc-vendors' ); ?></label></th>
|
134 |
+
<td><?php wp_editor( get_user_meta( $user->ID, 'pv_seller_info', true ), 'pv_seller_info' ); ?></td>
|
135 |
+
</tr>
|
136 |
+
<?php do_action( 'wcvendors_admin_after_seller_info', $user ); ?>
|
137 |
+
|
138 |
+
<?php endif; ?>
|
139 |
+
|
140 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_shop_description_enable', true ) ) : ?>
|
141 |
+
|
142 |
+
<?php do_action( 'wcvendors_admin_before_shop_description', $user ); ?>
|
143 |
+
<tr>
|
144 |
+
<th><label for="pv_shop_description"><?php _e( 'Shop description', 'wc-vendors' ); ?></label>
|
145 |
+
</th>
|
146 |
+
<td><?php wp_editor( get_user_meta( $user->ID, 'pv_shop_description', true ), 'pv_shop_description' ); ?></td>
|
147 |
+
</tr>
|
148 |
+
<?php do_action( 'wcvendors_admin_after_shop_description', $user ); ?>
|
149 |
+
|
150 |
+
<?php endif; ?>
|
151 |
+
|
152 |
+
</tbody>
|
153 |
+
</table>
|
classes/admin/views/html-vendor-settings-page.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<div class="wrap">
|
2 |
<h2>Shop Settings</h2>
|
3 |
<table class="form-table">
|
4 |
|
@@ -8,26 +8,65 @@
|
|
8 |
if ( $paypal_address !== 'false' ) { ?>
|
9 |
|
10 |
<tr>
|
11 |
-
<th><?php _e( 'PayPal Address', '
|
12 |
-
<td><input type="email" name="pv_paypal" id="pv_paypal" placeholder="some@email.com"
|
13 |
-
value="<?php echo get_user_meta( $user_id, 'pv_paypal', true ); ?>"/>
|
14 |
<p class="description">
|
15 |
-
<?php _e( 'Your PayPal address
|
16 |
</p>
|
17 |
</td>
|
18 |
</tr>
|
19 |
<?php } ?>
|
20 |
<?php do_action( 'wcvendors_settings_after_paypal' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<tr>
|
22 |
-
<th><?php _e( 'Shop Name', '
|
23 |
<td><input type="text" name="pv_shop_name" id="pv_shop_name" placeholder="Your shop name" value="<?php echo get_user_meta( $user_id, 'pv_shop_name', true ); ?>"/>
|
24 |
-
<p class="description"><?php _e( 'Your shop name is public and must be unique.', '
|
25 |
</td>
|
26 |
</tr>
|
27 |
<?php do_action( 'wcvendors_settings_after_shop_name' ); ?>
|
28 |
|
29 |
<tr>
|
30 |
-
<th><?php echo apply_filters( 'wcvendors_seller_info_label', __( 'Seller info', '
|
31 |
<td><?php
|
32 |
|
33 |
if ( $global_html || $has_html ) {
|
@@ -40,13 +79,13 @@
|
|
40 |
name="pv_seller_info"><?php echo $seller_info; ?></textarea><?php
|
41 |
}
|
42 |
?>
|
43 |
-
<p class="description"><?php _e( 'This is displayed on each of your products.', '
|
44 |
</td>
|
45 |
</tr>
|
46 |
<?php do_action( 'wcvendors_settings_after_seller_info' ); ?>
|
47 |
<?php if ( $shop_description !== 'false' ) { ?>
|
48 |
<tr>
|
49 |
-
<th><?php _e( 'Shop Description', '
|
50 |
<td><?php
|
51 |
|
52 |
if ( $global_html || $has_html ) {
|
@@ -58,7 +97,7 @@
|
|
58 |
?><textarea class="large-text" rows="10" id="pv_shop_description_unhtml" style="width:95%" name="pv_shop_description"><?php echo $description; ?></textarea><?php
|
59 |
}
|
60 |
?>
|
61 |
-
<p class="description"><?php printf( __( 'This is displayed on your <a href="%s">shop page</a>.', '
|
62 |
</td>
|
63 |
</tr>
|
64 |
|
@@ -67,10 +106,9 @@
|
|
67 |
<?php wp_nonce_field( 'save-shop-settings-admin', 'wc-vendors-nonce' ); ?>
|
68 |
<tr>
|
69 |
<td colspa="2">
|
70 |
-
<input type="submit" class="button button-primary" name="vendor_application_submit" value="<?php _e( 'Save Shop Settings', '
|
71 |
</td>
|
72 |
</tr>
|
73 |
</form>
|
74 |
</table>
|
75 |
</div>
|
76 |
-
|
1 |
+
<div class="wrap">
|
2 |
<h2>Shop Settings</h2>
|
3 |
<table class="form-table">
|
4 |
|
8 |
if ( $paypal_address !== 'false' ) { ?>
|
9 |
|
10 |
<tr>
|
11 |
+
<th><?php _e( 'PayPal Address', 'wc-vendors' ); ?></th>
|
12 |
+
<td><input type="email" name="pv_paypal" class="regular-text" id="pv_paypal" placeholder="some@email.com" value="<?php echo get_user_meta( $user_id, 'pv_paypal', true ); ?>"/>
|
|
|
13 |
<p class="description">
|
14 |
+
<?php _e( 'Your PayPal address can be used to send you your commission.', 'wc-vendors' ); ?><br/>
|
15 |
</p>
|
16 |
</td>
|
17 |
</tr>
|
18 |
<?php } ?>
|
19 |
<?php do_action( 'wcvendors_settings_after_paypal' ); ?>
|
20 |
+
|
21 |
+
|
22 |
+
<?php if ( apply_filters( 'wcvendors_admin_user_meta_bank_details_enable', true ) ) : ?>
|
23 |
+
|
24 |
+
<?php do_action( 'wcvendors_settings_before_bank_details', $user_id ); ?>
|
25 |
+
<tr>
|
26 |
+
<th><label for="wcv_bank_account_name"><?php _e( 'Bank Account Name', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
27 |
+
<td><input type="text" name="wcv_bank_account_name" id="wcv_bank_account_name" value="<?php echo get_user_meta( $user_id, 'wcv_bank_account_name', true ); ?>" class="regular-text">
|
28 |
+
</td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<th><label for="wcv_bank_account_number"><?php _e( 'Bank Account Number', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
32 |
+
<td><input type="text" name="wcv_bank_account_number" id="wcv_bank_account_number" value="<?php echo get_user_meta( $user_id, 'wcv_bank_account_number', true ); ?>" class="regular-text">
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
<tr>
|
36 |
+
<th><label for="wcv_bank_name"><?php _e( 'Bank Name', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
37 |
+
<td><input type="text" name="wcv_bank_name" id="wcv_bank_name" value="<?php echo get_user_meta( $user_id, 'wcv_bank_name', true ); ?>" class="regular-text">
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<th><label for="wcv_bank_routing_number"><?php _e( 'Routing Number', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
42 |
+
<td><input type="text" name="wcv_bank_routing_number" id="wcv_bank_routing_number" value="<?php echo get_user_meta( $user_id, 'wcv_bank_routing_number', true ); ?>" class="regular-text">
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<th><label for="wcv_bank_iban"><?php _e( 'IBAN', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
47 |
+
<td><input type="text" name="wcv_bank_iban" id="wcv_bank_iban" value="<?php echo get_user_meta( $user_id, 'wcv_bank_iban', true ); ?>" class="regular-text">
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<th><label for="wcv_bank_bic_swift"><?php _e( 'BIC/SWIFT', 'wc-vendors' ); ?> <span class="description"></span></label></th>
|
52 |
+
<td><input type="text" name="wcv_bank_bic_swift" id="wcv_bank_bic_swift" value="<?php echo get_user_meta( $user_id, 'wcv_bank_bic_swift', true ); ?>" class="regular-text">
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<?php do_action( 'wcvendors_settings_after_bank_details', $user_id ); ?>
|
56 |
+
|
57 |
+
<?php endif; ?>
|
58 |
+
|
59 |
+
|
60 |
<tr>
|
61 |
+
<th><?php _e( 'Shop Name', 'wc-vendors' ); ?></th>
|
62 |
<td><input type="text" name="pv_shop_name" id="pv_shop_name" placeholder="Your shop name" value="<?php echo get_user_meta( $user_id, 'pv_shop_name', true ); ?>"/>
|
63 |
+
<p class="description"><?php _e( 'Your shop name is public and must be unique.', 'wc-vendors' ); ?></p>
|
64 |
</td>
|
65 |
</tr>
|
66 |
<?php do_action( 'wcvendors_settings_after_shop_name' ); ?>
|
67 |
|
68 |
<tr>
|
69 |
+
<th><?php echo apply_filters( 'wcvendors_seller_info_label', __( 'Seller info', 'wc-vendors' ) ); ?></th>
|
70 |
<td><?php
|
71 |
|
72 |
if ( $global_html || $has_html ) {
|
79 |
name="pv_seller_info"><?php echo $seller_info; ?></textarea><?php
|
80 |
}
|
81 |
?>
|
82 |
+
<p class="description"><?php _e( 'This is displayed on each of your products.', 'wc-vendors' ); ?></p>
|
83 |
</td>
|
84 |
</tr>
|
85 |
<?php do_action( 'wcvendors_settings_after_seller_info' ); ?>
|
86 |
<?php if ( $shop_description !== 'false' ) { ?>
|
87 |
<tr>
|
88 |
+
<th><?php _e( 'Shop Description', 'wc-vendors' ); ?></th>
|
89 |
<td><?php
|
90 |
|
91 |
if ( $global_html || $has_html ) {
|
97 |
?><textarea class="large-text" rows="10" id="pv_shop_description_unhtml" style="width:95%" name="pv_shop_description"><?php echo $description; ?></textarea><?php
|
98 |
}
|
99 |
?>
|
100 |
+
<p class="description"><?php printf( __( 'This is displayed on your <a href="%s">shop page</a>.', 'wc-vendors' ), $shop_page ); ?></p>
|
101 |
</td>
|
102 |
</tr>
|
103 |
|
106 |
<?php wp_nonce_field( 'save-shop-settings-admin', 'wc-vendors-nonce' ); ?>
|
107 |
<tr>
|
108 |
<td colspa="2">
|
109 |
+
<input type="submit" class="button button-primary" name="vendor_application_submit" value="<?php _e( 'Save Shop Settings', 'wc-vendors' ); ?>"/>
|
110 |
</td>
|
111 |
</tr>
|
112 |
</form>
|
113 |
</table>
|
114 |
</div>
|
|
classes/admin/views/notices/html-notice-custom.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Custom Notices
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div id="message" class="updated wcvendors-message">
|
12 |
+
<a class="wcvendors-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcv-hide-notice', $notice ), 'wcvendors_hide_notices_nonce', '_wcv_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'wc-vendors' ); ?></a>
|
13 |
+
<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
|
14 |
+
</div>
|
classes/admin/views/notices/html-notice-install.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Notice - Install
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div id="message" class="updated wcvendors-message wc-connect">
|
12 |
+
<p><?php _e( '<strong>Welcome to WC Vendors</strong> – You‘re almost ready to start your marketplace', 'wc-vendors' ); ?></p>
|
13 |
+
<p class="submit"><a href="<?php echo esc_url( admin_url( 'admin.php?page=wcv-setup' ) ); ?>" class="button-primary"><?php _e( 'Run the Setup Wizard', 'wc-vendors' ); ?></a> <a class="button-secondary skip" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcv-hide-notice', 'install' ), 'wcvendors_hide_notices_nonce', '_wcv_notice_nonce' ) ); ?>"><?php _e( 'Skip setup', 'wc-vendors' ); ?></a></p>
|
14 |
+
</div>
|
classes/admin/views/notices/html-notice-template-check.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Notice - Template Check
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
$theme = wp_get_theme();
|
11 |
+
?>
|
12 |
+
<div id="message" class="updated wcvendors-message">
|
13 |
+
<a class="wcvendors-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcv-hide-notice', 'template_files' ), 'wcvendors_hide_notices_nonce', '_wcv_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'wc-vendors' ); ?></a>
|
14 |
+
|
15 |
+
<p><?php printf( __( '<strong>Your theme (%1$s) contains outdated copies of some WC Vendors template files.</strong> These files may need updating to ensure they are compatible with the current version of WC Vendors. You can see which files are affected from the <a href="%2$s">system status page</a>. If in doubt, check with the author of the theme.', 'wc-vendors' ), esc_html( $theme[ 'Name' ] ), esc_url( admin_url( 'admin.php?page=wc-status' ) ) ); ?></p>
|
16 |
+
<p class="submit"><a class="button-primary" href="https://docs.wcvendors.com/article/templates" target="_blank"><?php _e( 'Learn more about templates', 'wc-vendors' ); ?></a></p>
|
17 |
+
</div>
|
classes/admin/views/notices/html-notice-theme-support.php
ADDED
File without changes
|
classes/admin/views/notices/html-notice-update.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Notice - Install
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div id="message" class="updated wcvendors-message wc-connect">
|
12 |
+
<p><?php _e( '<strong>WC Vendors Update Required.</strong> – We need to upgrade your configuration to the latest version.', 'wc-vendors' ); ?></p>
|
13 |
+
<p class="submit"><a class="wcv-update-now button-primary" href="<?php echo esc_url( add_query_arg( 'do_update_wcvendors', 'true', admin_url( 'admin.php?page=wcv-settings' ) ) ); ?>" class="button-primary"><?php _e( 'Run the update', 'wc-vendors' ); ?></a></p>
|
14 |
+
</div>
|
15 |
+
<script type="text/javascript">
|
16 |
+
jQuery( '.wcv-update-now' ).click( 'click', function() {
|
17 |
+
return window.confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'wc-vendors' ) ); ?>' ); // jshint ignore:line
|
18 |
+
});
|
19 |
+
</script>
|
classes/admin/views/notices/html-notice-updated.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Notice - Updated
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div id="message" class="updated wcvendors-message wc-connect wcvendors-message-success">
|
12 |
+
<a class="wcvendors-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wcv-hide-notice', 'update', remove_query_arg( 'do_update_wcvendors' ) ), 'wcvendors_hide_notices_nonce', '_wcv_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'wc-vendors' ); ?></a>
|
13 |
+
<p><?php _e( 'WC Vendors data update complete. Thank you for updating to the latest version!', 'wc-vendors' ); ?></p>
|
14 |
+
</div>
|
classes/admin/views/notices/html-notice-updating.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Notice - Update
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<div id="message" class="updated wcvendors-message wc-connect">
|
12 |
+
<p><strong><?php _e( 'WC Vendors data update', 'wc-vendors' ); ?></strong> – <?php _e( 'Your database is being updated in the background.', 'wc-vendors' ); ?> <a href="<?php echo esc_url( add_query_arg( 'force_update_wcvendors', 'true', admin_url( 'admin.php?page=wcv-settings' ) ) ); ?>"><?php _e( 'Taking a while? Click here to run it now.', 'wc-vendors' ); ?></a></p>
|
13 |
+
</div>
|
classes/admin/views/setup/capabilities.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Step Two
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form method="post">
|
13 |
+
<?php wp_nonce_field( 'wcv-setup' ); ?>
|
14 |
+
<p class="store-setup"><?php printf( __( 'Enable and disable capabilites of the %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></p>
|
15 |
+
|
16 |
+
<table class="wcv-setup-table">
|
17 |
+
<thead>
|
18 |
+
<tr>
|
19 |
+
<td class="table-desc"><strong><?php _e( 'Products', 'wc-vendors' ); ?></strong></td>
|
20 |
+
<td class="table-check"></td>
|
21 |
+
</tr>
|
22 |
+
</thead>
|
23 |
+
<tbody>
|
24 |
+
<tr>
|
25 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to add/edit products', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
26 |
+
<td class="table-check">
|
27 |
+
<input
|
28 |
+
type="checkbox"
|
29 |
+
style="float: right; font-size: 4em;"
|
30 |
+
id="wcv_capability_products_enabled"
|
31 |
+
name="wcv_capability_products_enabled"
|
32 |
+
value="yes"
|
33 |
+
<?php checked( $products_enabled, 'yes' ); ?>
|
34 |
+
/>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to edit published (live) products', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
39 |
+
<td class="table-check">
|
40 |
+
<input
|
41 |
+
type="checkbox"
|
42 |
+
style="float: right; font-size: 4em;"
|
43 |
+
id="wcv_capability_products_edit"
|
44 |
+
name="wcv_capability_products_edit"
|
45 |
+
value="yes"
|
46 |
+
<?php checked( $live_products, 'yes' ); ?>
|
47 |
+
/>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to publish products without requiring approval.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) )?></td>
|
52 |
+
<td class="table-check">
|
53 |
+
<input
|
54 |
+
type="checkbox"
|
55 |
+
style="float: right; font-size: 4em;"
|
56 |
+
id="wcv_capability_products_live"
|
57 |
+
name="wcv_capability_products_live"
|
58 |
+
value="yes"
|
59 |
+
<?php checked( $products_approval, 'yes' ); ?>
|
60 |
+
/>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
|
64 |
+
</tbody>
|
65 |
+
</table>
|
66 |
+
|
67 |
+
<table class="wcv-setup-table">
|
68 |
+
<thead>
|
69 |
+
<tr>
|
70 |
+
<td class="table-desc"><strong><?php _e( 'Orders', 'wc-vendors' ); ?></strong></td>
|
71 |
+
<td class="table-check"></td>
|
72 |
+
</tr>
|
73 |
+
</thead>
|
74 |
+
<tbody>
|
75 |
+
<tr>
|
76 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to view orders', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
77 |
+
<td class="table-check">
|
78 |
+
<input
|
79 |
+
type="checkbox"
|
80 |
+
style="float: right; font-size: 4em;"
|
81 |
+
id="wcv_capability_orders_enabled"
|
82 |
+
name="wcv_capability_orders_enabled"
|
83 |
+
value="yes"
|
84 |
+
<?php checked( $orders_enabled, 'yes' ); ?>
|
85 |
+
/>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
<tr>
|
89 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to export their orders to a CSV file', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
90 |
+
<td class="table-check">
|
91 |
+
<input
|
92 |
+
type="checkbox"
|
93 |
+
style="float: right; font-size: 4em;"
|
94 |
+
id="wcv_capability_orders_export"
|
95 |
+
name="wcv_capability_orders_export"
|
96 |
+
value="yes"
|
97 |
+
<?php checked( $export_orders, 'yes' ); ?>
|
98 |
+
/>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
<tr>
|
102 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to view order notes', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
103 |
+
<td class="table-check">
|
104 |
+
<input
|
105 |
+
type="checkbox"
|
106 |
+
style="float: right; font-size: 4em;"
|
107 |
+
id="wcv_capability_order_read_notes"
|
108 |
+
name="wcv_capability_order_read_notes"
|
109 |
+
value="yes"
|
110 |
+
<?php checked( $view_order_notes, 'yes' ); ?>
|
111 |
+
/>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td class="table-desc"><?php printf( __( 'Allow %s to add order notes.', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
116 |
+
<td class="table-check">
|
117 |
+
<input
|
118 |
+
type="checkbox"
|
119 |
+
style="float: right; font-size: 4em;"
|
120 |
+
id="wcv_capability_order_update_notes"
|
121 |
+
name="wcv_capability_order_update_notes"
|
122 |
+
value="yes"
|
123 |
+
<?php checked( $view_order_notes, 'yes' ); ?>
|
124 |
+
/>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
</tbody>
|
128 |
+
</table>
|
129 |
+
|
130 |
+
|
131 |
+
<p class="wcv-setup-actions step">
|
132 |
+
<button type="submit" class="button button-next" value="<?php esc_attr_e( "Next", 'wc-vendors' ); ?>" name="save_step"><?php esc_html_e( "Next", 'wc-vendors' ); ?></button>
|
133 |
+
</p>
|
134 |
+
</form>
|
classes/admin/views/setup/footer.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Setup Footer
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<?php if ( 'store_setup' === $this->step ) : ?>
|
13 |
+
<a class="wcv-return-to-dashboard" href="<?php echo esc_url( admin_url() ); ?>"><?php esc_html_e( 'Exit Wizard', 'wc-vendors' ); ?></a>
|
14 |
+
<?php elseif ( 'ready' === $this->step ) : ?>
|
15 |
+
<a class="wcv-return-to-dashboard" href="<?php echo esc_url( admin_url() .'admin.php?page=wcv-settings' ); ?>"><?php esc_html_e( 'Return to your dashboard', 'wc-vendors' ); ?></a>
|
16 |
+
<?php elseif ( 'activate' === $this->step ) : ?>
|
17 |
+
<a class="wcv-return-to-dashboard" href="<?php echo esc_url( $this->get_next_step_link() ); ?>"><?php esc_html_e( 'Skip this step', 'wc-vendors' ); ?></a>
|
18 |
+
<?php endif; ?>
|
19 |
+
</body>
|
20 |
+
</html>
|
classes/admin/views/setup/general.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Step One
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form method="post">
|
13 |
+
<?php wp_nonce_field( 'wcv-setup' ); ?>
|
14 |
+
<p class="store-setup"><?php esc_html_e( 'The following wizard will help you configure your marketplace and get your vendors onboard quickly.', 'wc-vendors' ); ?></p>
|
15 |
+
|
16 |
+
<table class="wcv-setup-table">
|
17 |
+
<thead>
|
18 |
+
<tr>
|
19 |
+
<td class="table-desc"><strong><?php _e( 'General', 'wc-vendors' ); ?></strong></td>
|
20 |
+
<td class="table-check"></td>
|
21 |
+
</tr>
|
22 |
+
</thead>
|
23 |
+
<tbody>
|
24 |
+
<tr>
|
25 |
+
<td class="table-desc"><?php printf( __( 'Allow users to apply to become a %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
26 |
+
<td class="table-check">
|
27 |
+
<input
|
28 |
+
type="checkbox"
|
29 |
+
class="option_checkbox"
|
30 |
+
id="wcv_vendor_allow_registration"
|
31 |
+
name="wcv_vendor_allow_registration"
|
32 |
+
value="yes"
|
33 |
+
<?php checked( $allow_registration, 'yes' ); ?>
|
34 |
+
/>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<td class="table-desc"><?php printf( __( 'Manually approve %s applications', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
39 |
+
<td class="table-check">
|
40 |
+
<input
|
41 |
+
type="checkbox"
|
42 |
+
class="option_checkbox"
|
43 |
+
id="wcv_vendor_approve_registration"
|
44 |
+
name="wcv_vendor_approve_registration"
|
45 |
+
value="yes"
|
46 |
+
<?php checked( $manual_approval, 'yes' ); ?>
|
47 |
+
/>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td class="table-desc"><?php printf( __( 'Give any taxes to %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td></td>
|
52 |
+
<td class="table-check">
|
53 |
+
<input
|
54 |
+
type="checkbox"
|
55 |
+
class="option_checkbox"
|
56 |
+
id="wcv_vendor_give_taxes"
|
57 |
+
name="wcv_vendor_give_taxes"
|
58 |
+
value="yes"
|
59 |
+
<?php checked( $vendor_taxes, 'yes' ); ?>
|
60 |
+
/>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<td class="table-desc"><?php printf( __( 'Give any shipping to %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></td></td>
|
65 |
+
<td class="table-check">
|
66 |
+
<input
|
67 |
+
type="checkbox"
|
68 |
+
class="option_checkbox"
|
69 |
+
id="wcv_vendor_give_shipping"
|
70 |
+
name="wcv_vendor_give_shipping"
|
71 |
+
value="yes"
|
72 |
+
<?php checked( $vendor_shipping, 'yes' ); ?>
|
73 |
+
/>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
</tbody>
|
77 |
+
</table>
|
78 |
+
|
79 |
+
<strong><?php _e( 'Commission', 'wc-vendors' ); ?></strong>
|
80 |
+
|
81 |
+
<p class="store-setup"><?php _e( 'Commissions are calculated per product. The commission rate can be set globally, at a vendor level or at a product level.', 'wc-vendors' ); ?></p>
|
82 |
+
|
83 |
+
<!-- Vendor commission rate -->
|
84 |
+
<p class="store-setup wcv-setup-input">
|
85 |
+
<label class="" for="">
|
86 |
+
<?php esc_html_e( 'Global Commission Rate %', 'wc-vendors' ); ?>
|
87 |
+
</label>
|
88 |
+
<input
|
89 |
+
type="text"
|
90 |
+
id="wcv_vendor_commission_rate"
|
91 |
+
name="wcv_vendor_commission_rate"
|
92 |
+
placeholder="%"
|
93 |
+
value="<?php echo $commission_rate; ?>"
|
94 |
+
/>
|
95 |
+
</p>
|
96 |
+
<p class="wcv-setup-actions step">
|
97 |
+
<button type="submit" class="button button-next" value="<?php esc_attr_e( "Next", 'wc-vendors' ); ?>" name="save_step"><?php esc_html_e( "Next", 'wc-vendors' ); ?></button>
|
98 |
+
</p>
|
99 |
+
</form>
|
classes/admin/views/setup/header.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Setup Header
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
<!DOCTYPE html>
|
12 |
+
<html <?php language_attributes(); ?>>
|
13 |
+
<head>
|
14 |
+
<meta name="viewport" content="width=device-width" />
|
15 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
16 |
+
<title><?php esc_html_e( 'WC Vendors › Setup Wizard', 'wc-vendors' ); ?></title>
|
17 |
+
<?php wp_print_scripts( 'wcv-setup' ); ?>
|
18 |
+
<?php do_action( 'admin_print_styles' ); ?>
|
19 |
+
<?php do_action( 'admin_head' ); ?>
|
20 |
+
</head>
|
21 |
+
<body class="wcv-setup wp-core-ui">
|
22 |
+
<h1 id="wcv-logo"><a href="https://www.wcvendors.com/"><img src="<?php echo esc_url( wcv_assets_url ); ?>images/wcvendors_logo.png" alt="WC Vendors" /></a></h1>
|
classes/admin/views/setup/pages.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Step One
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form method="post">
|
13 |
+
<?php wp_nonce_field( 'wcv-setup' ); ?>
|
14 |
+
<p class="store-setup"><?php printf( __( 'Select the pages for relevant frontend features for %s', 'wc-vendors' ), lcfirst( wcv_get_vendor_name( false ) ) ); ?></p>
|
15 |
+
|
16 |
+
<table class="wcv-setup-table-pages">
|
17 |
+
<thead>
|
18 |
+
<tr>
|
19 |
+
<td class="table-desc"><strong><?php _e( 'Pages', 'wc-vendors' ); ?></strong></td>
|
20 |
+
<td class="table-check"></td>
|
21 |
+
</tr>
|
22 |
+
</thead>
|
23 |
+
<tbody>
|
24 |
+
<tr>
|
25 |
+
<td class="table-desc"><?php _e( 'Vendor Dashboard', 'wc-vendors' ); ?>
|
26 |
+
|
27 |
+
</td>
|
28 |
+
<td class="table-check">
|
29 |
+
<?php wcv_single_select_page( 'wcvendors_vendor_dashboard_page_id', $vendor_dashboard_page_id, 'wc-enhanced-select' ); ?>
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td colspan="3" class="tool-tip">
|
34 |
+
<?php _e( 'This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>', 'wc-vendors' ); ?>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<td class="table-desc"><?php printf( __( '%s Shop Settings', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( false ) ) ); ?></td>
|
39 |
+
<td class="table-check">
|
40 |
+
<?php wcv_single_select_page( 'wcvendors_shop_settings_page_id', $shop_settings_page_id, 'wc-enhanced-select' ); ?>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td colspan="3" class="tool-tip">
|
45 |
+
<?php _e( 'This page should contain the following shortcode. <code>[wcv_shop_settings]</code>', 'wc-vendors' ); ?>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
<tr>
|
49 |
+
<td class="table-desc"><?php _e( 'Orders Page', 'wc-vendors' ); ?></td></td>
|
50 |
+
<td class="table-check">
|
51 |
+
<?php wcv_single_select_page( 'wcvendors_product_orders_page_id', $product_orders_page_id, 'wc-enhanced-select' ); ?>
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<tr>
|
55 |
+
<td colspan="3" class="tool-tip">
|
56 |
+
<?php _e( 'This page should contain the following shortcode. <code>[wcv_orders]</code>', 'wc-vendors' ); ?>
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<tr>
|
60 |
+
<td class="table-desc"><?php printf( __( '%s List Page', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( false ) ) ); ?></td></td>
|
61 |
+
<td class="table-check">
|
62 |
+
<?php wcv_single_select_page( 'wcvendors_vendors_page_id', $vendors_page_id, 'wc-enhanced-select' ); ?>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td colspan="3" class="tool-tip">
|
67 |
+
<?php _e( 'This page should contain the following shortcode. <code>[wcv_vendorslist]</code>', 'wc-vendors' ); ?>
|
68 |
+
</td>
|
69 |
+
</tr>
|
70 |
+
<tr>
|
71 |
+
<td class="table-desc"><?php printf( __( '%s Terms Page', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( true ) ) ); ?></td></td>
|
72 |
+
<td class="table-check">
|
73 |
+
<?php wcv_single_select_page( 'wcvendors_vendor_terms_page_id', $terms_page_id, 'wc-enhanced-select' ); ?>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<td colspan="3" class="tool-tip">
|
78 |
+
<?php printf( __( 'This optional page allows you to define terms and conidtions %s need to agree to before applying to your marketplace. ', 'wc-vendors' ), ucfirst( wcv_get_vendor_name( false ) ) ); ?>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
</tbody>
|
83 |
+
</table>
|
84 |
+
<p class="wcv-setup-actions step">
|
85 |
+
<button type="submit" class="button button-next" value="<?php esc_attr_e( "Next", 'wc-vendors' ); ?>" name="save_step"><?php esc_html_e( "Next", 'wc-vendors' ); ?></button>
|
86 |
+
</p>
|
87 |
+
</form>
|
classes/admin/views/setup/ready.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Step One
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<h1><?php esc_html_e( "Your marketplace is ready!", 'wc-vendors' ); ?></h1>
|
13 |
+
|
14 |
+
<!-- <div class="wcvendors-message wcvendors-newsletter">
|
15 |
+
<p><?php esc_html_e( "Subscribe to our newsletter! Get product updates, marketplace tips, information and more.", 'wc-vendors' ); ?></p>
|
16 |
+
<form action="//wcvendors.us8.list-manage.com/subscribe/post?u=2c1434dc56f9506bf3c3ecd21&id=13860df971" method="post" target="_blank" novalidate>
|
17 |
+
<div class="newsletter-form-container">
|
18 |
+
<input
|
19 |
+
class="newsletter-form-email"
|
20 |
+
type="email"
|
21 |
+
value="<?php echo esc_attr( $user_email ); ?>"
|
22 |
+
name="EMAIL"
|
23 |
+
placeholder="<?php esc_attr_e( 'Email address', 'wc-vendors' ); ?>"
|
24 |
+
required
|
25 |
+
>
|
26 |
+
<p class="wcv-setup-actions step newsletter-form-button-container">
|
27 |
+
<button
|
28 |
+
type="submit"
|
29 |
+
value="<?php esc_html_e( 'Subscribe me', 'wc-vendors' ); ?>"
|
30 |
+
name="subscribe"
|
31 |
+
id="mc-embedded-subscribe"
|
32 |
+
class="button-primary button newsletter-form-button"
|
33 |
+
><?php esc_html_e( 'Subscribe me', 'wc-vendors' ); ?></button>
|
34 |
+
</p>
|
35 |
+
</div>
|
36 |
+
</form>
|
37 |
+
</div>
|
38 |
+
-->
|
39 |
+
<ul class="wcv-wizard-next-steps">
|
40 |
+
<li class="wcv-wizard-next-step-item">
|
41 |
+
<div class="wcv-wizard-next-step-description">
|
42 |
+
<p class="next-step-heading"><?php esc_html_e( 'Next step', 'wc-vendors' ); ?></p>
|
43 |
+
<h3 class="next-step-description"><?php esc_html_e( 'Upgrade to Pro!', 'wc-vendors' ); ?></h3>
|
44 |
+
<p class="next-step-extra-info"><?php esc_html_e( "Upgrade today to extend the features of your marketplace.", 'wc-vendors' ); ?></p>
|
45 |
+
<p class="next-step-heading"><?php esc_html_e( 'Features', 'wc-vendors' ); ?></p>
|
46 |
+
<ul>
|
47 |
+
<li><?php _e( 'Complete frontend dashboard for vendors', 'wc-vendors' ); ?></li>
|
48 |
+
<li><?php _e( 'Flat rate & table rate shipping module', 'wc-vendors' ); ?></li>
|
49 |
+
<li><?php _e( 'Coupons, ratings, reports, orders and more.', 'wc-vendors' ); ?></li>
|
50 |
+
<li><?php _e( 'Advanced commissions', 'wc-vendors' ); ?></li>
|
51 |
+
<li><?php _e( 'Premium support & updates', 'wc-vendors' ); ?></li>
|
52 |
+
</ul>
|
53 |
+
</div>
|
54 |
+
<div class="wcv-wizard-next-step-action">
|
55 |
+
<p class="wcv-setup-actions step">
|
56 |
+
<a class="button button-primary button-large" href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=setup_wizard&utm_medium=plugin&utm_campaign=setup_complete" target="_blank">
|
57 |
+
<?php _e( 'Upgrade Now', 'wc-vendors' ); ?>
|
58 |
+
</a>
|
59 |
+
</p>
|
60 |
+
</div>
|
61 |
+
</li>
|
62 |
+
<li class="wcv-wizard-next-step-item">
|
63 |
+
<div class="wcv-wizard-next-step-description">
|
64 |
+
<p class="next-step-heading"><?php _e( 'Extend your marketplace', 'wc-vendors' ); ?></p>
|
65 |
+
<h3 class="next-step-description"><?php _e( 'Extensions', 'wc-vendors' ); ?></h3>
|
66 |
+
<p class="next-step-extra-info"><?php _e( 'Extend your marketplace today with a variety of extensions from us and 3rd party developers.', 'wc-vendors' ); ?></p>
|
67 |
+
</div>
|
68 |
+
<div class="wcv-wizard-next-step-action">
|
69 |
+
<p class="wcv-setup-actions step">
|
70 |
+
<a class="button button-large" href="https://www.wcvendors.com/extensions/?utm_source=setup_wizard&utm_medium=plugin&utm_campaign=setup_complete" target="_blank">
|
71 |
+
<?php _e( 'View Extensions', 'wc-vendors' ); ?>
|
72 |
+
</a>
|
73 |
+
</p>
|
74 |
+
</div>
|
75 |
+
</li>
|
76 |
+
</ul>
|
77 |
+
<h4 class="help-title"><?php _e( 'Need Help?', 'wc-vendors' ); ?></h4>
|
78 |
+
<p class="next-steps-help-text"><?php echo wp_kses_post( $help_text ); ?></p>
|
classes/admin/views/setup/steps.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin View: Setup Steps
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<ol class="wcv-setup-steps">
|
13 |
+
<?php foreach ( $output_steps as $step_key => $step ) : ?>
|
14 |
+
<li class="
|
15 |
+
<?php
|
16 |
+
if ( $step_key === $this->step ) {
|
17 |
+
echo 'active';
|
18 |
+
} elseif ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
|
19 |
+
echo 'done';
|
20 |
+
}
|
21 |
+
?>
|
22 |
+
"><?php echo esc_html( $step['name'] ); ?></li>
|
23 |
+
<?php endforeach; ?>
|
24 |
+
</ol>
|
classes/class-commission.php
CHANGED
@@ -52,9 +52,9 @@ class WCV_Commission
|
|
52 |
public static function commission_status(){
|
53 |
|
54 |
return apply_filters( 'wcvendors_commission_status', array(
|
55 |
-
'due' => __( 'Due', '
|
56 |
-
'paid' => __( 'Paid', '
|
57 |
-
'reversed' => __( 'Reversed', '
|
58 |
)
|
59 |
);
|
60 |
}
|
@@ -146,7 +146,7 @@ class WCV_Commission
|
|
146 |
foreach ( $details as $key => $detail ) {
|
147 |
|
148 |
$product_id = $detail['product_id'];
|
149 |
-
$order_date =
|
150 |
|
151 |
$insert_due[ $product_id ] = array(
|
152 |
'order_id' => $order_id,
|
@@ -300,7 +300,7 @@ class WCV_Commission
|
|
300 |
|
301 |
$product_commission = get_post_meta( $product_id, 'pv_commission_rate', true );
|
302 |
$vendor_commission = WCV_Vendors::get_default_commission( $vendor_id );
|
303 |
-
$default_commission =
|
304 |
|
305 |
if ( $product_commission != '' && $product_commission !== false ) {
|
306 |
$commission = $product_commission;
|
@@ -545,4 +545,29 @@ class WCV_Commission
|
|
545 |
|
546 |
} // get_commission_due()
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
}
|
52 |
public static function commission_status(){
|
53 |
|
54 |
return apply_filters( 'wcvendors_commission_status', array(
|
55 |
+
'due' => __( 'Due', 'wc-vendors' ),
|
56 |
+
'paid' => __( 'Paid', 'wc-vendors' ),
|
57 |
+
'reversed' => __( 'Reversed', 'wc-vendors' )
|
58 |
)
|
59 |
);
|
60 |
}
|
146 |
foreach ( $details as $key => $detail ) {
|
147 |
|
148 |
$product_id = $detail['product_id'];
|
149 |
+
$order_date = $order->get_date_created();
|
150 |
|
151 |
$insert_due[ $product_id ] = array(
|
152 |
'order_id' => $order_id,
|
300 |
|
301 |
$product_commission = get_post_meta( $product_id, 'pv_commission_rate', true );
|
302 |
$vendor_commission = WCV_Vendors::get_default_commission( $vendor_id );
|
303 |
+
$default_commission = get_option( 'wcvendors_commission_percent' );
|
304 |
|
305 |
if ( $product_commission != '' && $product_commission !== false ) {
|
306 |
$commission = $product_commission;
|
545 |
|
546 |
} // get_commission_due()
|
547 |
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Get the total due for all commissions
|
551 |
+
*
|
552 |
+
* @since 2.0.0
|
553 |
+
* @access public
|
554 |
+
*/
|
555 |
+
public static function get_totals( $status = 'due' ){
|
556 |
+
|
557 |
+
$total_due = 0;
|
558 |
+
|
559 |
+
global $wpdb;
|
560 |
+
|
561 |
+
$table_name = $wpdb->prefix . "pv_commission";
|
562 |
+
$query = "SELECT sum(total_due + total_shipping + tax) as total
|
563 |
+
FROM `{$table_name}`
|
564 |
+
WHERE status = %s";
|
565 |
+
$results = $wpdb->get_results( $wpdb->prepare( $query, $status ) );
|
566 |
+
|
567 |
+
$totals = array_shift( $results )->total;
|
568 |
+
|
569 |
+
return $totals;
|
570 |
+
|
571 |
+
}
|
572 |
+
|
573 |
}
|
classes/class-cron.php
CHANGED
@@ -59,7 +59,7 @@ class WCV_Cron
|
|
59 |
*/
|
60 |
public static function check_schedule_now( $options )
|
61 |
{
|
62 |
-
$old_schedule =
|
63 |
$new_schedule = $options[ 'schedule' ];
|
64 |
|
65 |
if ( $new_schedule == 'now' ) {
|
@@ -84,7 +84,7 @@ class WCV_Cron
|
|
84 |
$mass_pay = $mass_pay->do_payments();
|
85 |
|
86 |
$message = !empty( $mass_pay[ 'total' ] )
|
87 |
-
? $mass_pay[ 'msg' ] . '<br/>' . sprintf( __( 'Payment total: %s', '
|
88 |
: $mass_pay[ 'msg' ];
|
89 |
|
90 |
return array(
|
@@ -143,7 +143,7 @@ class WCV_Cron
|
|
143 |
*/
|
144 |
public static function custom_cron_intervals( $schedules )
|
145 |
{
|
146 |
-
|
147 |
$schedules[ 'daily' ] = array(
|
148 |
'interval' => 86400,
|
149 |
'display' => __( 'Once Daily' )
|
59 |
*/
|
60 |
public static function check_schedule_now( $options )
|
61 |
{
|
62 |
+
$old_schedule = get_option( 'wcvendors_payments_paypal_schedule' );
|
63 |
$new_schedule = $options[ 'schedule' ];
|
64 |
|
65 |
if ( $new_schedule == 'now' ) {
|
84 |
$mass_pay = $mass_pay->do_payments();
|
85 |
|
86 |
$message = !empty( $mass_pay[ 'total' ] )
|
87 |
+
? $mass_pay[ 'msg' ] . '<br/>' . sprintf( __( 'Payment total: %s', 'wc-vendors' ), wc_price( $mass_pay[ 'total' ] ) )
|
88 |
: $mass_pay[ 'msg' ];
|
89 |
|
90 |
return array(
|
143 |
*/
|
144 |
public static function custom_cron_intervals( $schedules )
|
145 |
{
|
146 |
+
|
147 |
$schedules[ 'daily' ] = array(
|
148 |
'interval' => 86400,
|
149 |
'display' => __( 'Once Daily' )
|
classes/class-install.php
CHANGED
@@ -2,114 +2,155 @@
|
|
2 |
/**
|
3 |
* Install class on activation.
|
4 |
*
|
5 |
-
* @author
|
6 |
-
* @package
|
7 |
*/
|
8 |
|
9 |
|
10 |
-
class
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Checks if install is requierd
|
15 |
*
|
16 |
* @return unknown
|
17 |
*/
|
18 |
-
public function init()
|
19 |
-
{
|
20 |
-
$db_version = WC_Vendors::$pv_options->get_option( 'db_version' );
|
21 |
-
|
22 |
-
// Initial Install
|
23 |
-
if ( version_compare( $db_version, '1.0', '<' ) ) {
|
24 |
-
|
25 |
-
$this->install_wcvendor();
|
26 |
-
WC_Vendors::$pv_options->update_option( 'db_version', '1.5.0' );
|
27 |
-
|
28 |
-
} else if ( version_compare( $db_version, '1.9.0', '<' ) ) {
|
29 |
-
|
30 |
-
$orders_page = get_post( WC_Vendors::$pv_options->get_option( 'orders_page' ) );
|
31 |
-
|
32 |
-
// Only update the page slug for orders if it is called orders
|
33 |
-
// This is due to WC 2.6 api changes
|
34 |
-
if ( is_object( $orders_page ) ) {
|
35 |
-
|
36 |
-
if ( $orders_page && $orders_page->post_name === 'orders' ){
|
37 |
-
|
38 |
-
wp_update_post(
|
39 |
-
array (
|
40 |
-
'ID' => $orders_page->ID,
|
41 |
-
'post_name' => 'product_orders'
|
42 |
-
)
|
43 |
-
);
|
44 |
-
|
45 |
-
WC_Vendors::$pv_options->update_option( 'db_version', '1.9.0' );
|
46 |
-
}
|
47 |
-
}
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
'manage_product' => true,
|
57 |
-
'publish_products' => false,
|
58 |
-
'delete_posts' => true,
|
59 |
-
'read' => true,
|
60 |
-
'upload_files' => true,
|
61 |
-
'view_woocommerce_reports' => false,
|
62 |
-
) );
|
63 |
-
|
64 |
-
WC_Vendors::$pv_options->update_option( 'db_version', '1.9.1' );
|
65 |
-
}
|
66 |
|
67 |
} // init()
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
/**
|
71 |
* Grouped functions for installing the WC Vendor plugin
|
72 |
*/
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
// Clear the cron
|
76 |
wp_clear_scheduled_hook( 'pv_schedule_mass_payments' );
|
77 |
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
-
|
82 |
-
$this->create_new_tables();
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
if ( empty( $orders_page ) ) $this->create_new_pages();
|
87 |
-
}
|
88 |
|
|
|
89 |
|
90 |
/**
|
91 |
* Add the new Vendor role
|
92 |
*
|
93 |
* @return bool
|
94 |
*/
|
95 |
-
|
96 |
-
|
97 |
remove_role( 'pending_vendor' );
|
98 |
-
add_role( 'pending_vendor', __( 'Pending Vendor', '
|
99 |
'read' => true,
|
100 |
'edit_posts' => false,
|
101 |
'delete_posts' => false
|
102 |
) );
|
103 |
|
104 |
remove_role( 'vendor' );
|
105 |
-
add_role( 'vendor', __('Vendor', '
|
106 |
'assign_product_terms' => true,
|
107 |
'edit_products' => true,
|
108 |
'edit_product' => true,
|
109 |
'edit_published_products' => false,
|
110 |
'manage_product' => true,
|
111 |
'publish_products' => false,
|
112 |
-
'delete_posts' => true,
|
113 |
'read' => true,
|
114 |
'upload_files' => true,
|
115 |
'view_woocommerce_reports' => false,
|
@@ -120,8 +161,7 @@ class WCV_Install
|
|
120 |
/**
|
121 |
* Create the pv_commission table
|
122 |
*/
|
123 |
-
|
124 |
-
{
|
125 |
global $wpdb;
|
126 |
|
127 |
$table_name = $wpdb->prefix . "pv_commission";
|
@@ -140,147 +180,264 @@ class WCV_Install
|
|
140 |
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
141 |
UNIQUE KEY id (id)
|
142 |
);";
|
|
|
143 |
dbDelta( $sql );
|
144 |
}
|
145 |
|
146 |
-
|
147 |
/**
|
148 |
-
* Create
|
149 |
-
*
|
150 |
-
* @access public
|
151 |
-
* @return void
|
152 |
-
*
|
153 |
-
* @param mixed $slug Slug for the new page
|
154 |
-
* @param mixed $option Option name to store the page's ID
|
155 |
-
* @param string $page_title (optional) (default: '') Title for the new page
|
156 |
-
* @param string $page_content (optional) (default: '') Content for the new page
|
157 |
-
* @param int $post_parent (optional) (default: 0) Parent for the new page
|
158 |
*/
|
159 |
-
function
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
-
|
166 |
-
|
167 |
}
|
|
|
168 |
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
173 |
|
174 |
-
return $page_found;
|
175 |
-
}
|
176 |
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
'
|
188 |
-
|
189 |
-
|
190 |
|
191 |
-
$page_id = wp_insert_post( $page_data );
|
192 |
-
WC_Vendors::$pv_options->update_option( $slug . '_page', $page_id );
|
193 |
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
}
|
196 |
|
197 |
-
|
198 |
/**
|
199 |
-
*
|
|
|
|
|
|
|
200 |
*/
|
201 |
-
private function
|
202 |
-
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
-
$vendor_page_id = $this->create_page( 'vendor_dashboard', __( 'Vendor Dashboard', 'wcvendors' ), '[wcv_vendor_dashboard]' );
|
206 |
-
$this->create_page( 'product_orders', __( 'Orders', 'wcvendors' ), '[wcv_orders]', $vendor_page_id );
|
207 |
-
$this->create_page( 'shop_settings', __( 'Shop Settings', 'wcvendors' ), '[wcv_shop_settings]', $vendor_page_id );
|
208 |
}
|
209 |
|
210 |
-
|
211 |
/**
|
212 |
-
*
|
213 |
-
*
|
214 |
-
* @param unknown $version
|
215 |
*/
|
216 |
-
public function
|
217 |
-
|
218 |
-
|
219 |
|
220 |
-
$table_name = $wpdb->prefix . "pv_commission";
|
221 |
|
222 |
-
switch ( $version ) {
|
223 |
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
|
|
228 |
|
229 |
-
|
230 |
-
$results = $wpdb->get_results( $sql );
|
231 |
-
foreach ( $results as $key => $value ) {
|
232 |
|
233 |
-
|
234 |
|
235 |
-
|
|
|
|
|
|
|
|
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
array( '%d' ),
|
243 |
-
array( '%d' )
|
244 |
-
);
|
245 |
-
}
|
246 |
}
|
247 |
-
|
248 |
}
|
|
|
|
|
|
|
249 |
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
-
case '1.4.0':
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
259 |
|
260 |
-
$this->create_new_pages();
|
261 |
|
262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
-
|
|
|
|
|
|
|
265 |
|
266 |
-
$sql = "ALTER TABLE `{$table_name}` ADD `total_shipping` decimal(20,2) NOT NULL AFTER `total_due`";
|
267 |
-
$wpdb->query( $sql );
|
268 |
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
-
|
272 |
-
|
273 |
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
278 |
|
279 |
-
|
280 |
-
// code...
|
281 |
-
break;
|
282 |
}
|
|
|
|
|
283 |
}
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
286 |
}
|
|
|
|
2 |
/**
|
3 |
* Install class on activation.
|
4 |
*
|
5 |
+
* @author Jamie Madden
|
6 |
+
* @package WCVendors
|
7 |
*/
|
8 |
|
9 |
|
10 |
+
class WCVendors_Install {
|
11 |
+
|
12 |
+
/** Updates to be run **/
|
13 |
+
private static $db_updates = array(
|
14 |
+
'2.0.0' => array(
|
15 |
+
'wcv_migrate_settings',
|
16 |
+
'wcv_update_200_db_version',
|
17 |
+
'wcv_enable_legacy_emails'
|
18 |
+
)
|
19 |
+
);
|
20 |
+
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Background update class.
|
24 |
+
*
|
25 |
+
* @var object
|
26 |
+
*/
|
27 |
+
private static $background_updater;
|
28 |
|
29 |
/**
|
30 |
* Checks if install is requierd
|
31 |
*
|
32 |
* @return unknown
|
33 |
*/
|
34 |
+
public static function init() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
add_action( 'init', array( __CLASS__, 'check_version' ) );
|
37 |
+
add_action( 'admin_init', array( __CLASS__, 'check_pro_version' ) );
|
38 |
+
add_action( 'init', array( __CLASS__, 'init_background_updater' ), 5 );
|
39 |
+
add_action( 'admin_init', array( __CLASS__, 'install_actions' ) );
|
40 |
+
add_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 );
|
41 |
+
add_filter( 'plugin_action_links_' . wcv_plugin_base, array( __CLASS__, 'plugin_action_links' ) );
|
42 |
+
add_action( 'wcvendors_update_options_display', array( __CLASS__, 'maybe_flush_rewrite_rules' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
} // init()
|
45 |
|
46 |
+
/**
|
47 |
+
* Check WC Vendors version and run the updater is required.
|
48 |
+
*
|
49 |
+
* This check is done on all requests and runs if the versions do not match.
|
50 |
+
*/
|
51 |
+
public static function check_version() {
|
52 |
+
if ( ! defined( 'IFRAME_REQUEST' ) && get_option( 'wcvendors_version' ) !== WCV_VERSION ) {
|
53 |
+
self::install();
|
54 |
+
do_action( 'wcvendors_updated' );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Check WC Vendors version and run the updater is required.
|
60 |
+
*
|
61 |
+
* This check is done on all requests and runs if the versions do not match.
|
62 |
+
*/
|
63 |
+
public static function check_pro_version() {
|
64 |
+
|
65 |
+
if ( class_exists( 'WCVendors_Pro' ) ){
|
66 |
+
|
67 |
+
if ( version_compare( WCV_PRO_VERSION, '1.5.0', '<' ) ){
|
68 |
+
|
69 |
+
if ( is_plugin_active( 'wc-vendors-pro/wcvendors-pro.php' ) ){
|
70 |
+
$notice = sprintf( __( 'WC Vendors Pro %s or below detected. WC Vendors Pro 1.5.0 is required for WC Vendors 2.0.0 and above. WC Vendors Pro has been deactivated.' ), WCV_PRO_VERSION );
|
71 |
+
WCVendors_Admin_Notices::add_custom_notice( 'pro_update', $notice );
|
72 |
+
deactivate_plugins( 'wc-vendors-pro/wcvendors-pro.php' );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Install actions when a update button is clicked within the admin area.
|
80 |
+
*
|
81 |
+
* This function is hooked into admin_init to affect admin only.
|
82 |
+
*/
|
83 |
+
public static function install_actions() {
|
84 |
+
if ( ! empty( $_GET['do_update_wcvendors'] ) ) {
|
85 |
+
self::update();
|
86 |
+
WCVendors_Admin_Notices::add_notice( 'update' );
|
87 |
+
}
|
88 |
+
if ( ! empty( $_GET['force_update_wcvendors'] ) ) {
|
89 |
+
self::update();
|
90 |
+
wp_safe_redirect( admin_url( 'admin.php?page=wcv-settings' ) );
|
91 |
+
exit;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
|
96 |
/**
|
97 |
* Grouped functions for installing the WC Vendor plugin
|
98 |
*/
|
99 |
+
public static function install() {
|
100 |
+
|
101 |
+
// Check if we are not already running this routine.
|
102 |
+
if ( 'yes' === get_transient( 'wcvendors_installing' ) ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
// Ensure needed classes are loaded
|
107 |
+
include_once( dirname( __FILE__ ) . '/admin/class-wcv-admin-notices.php' );
|
108 |
+
|
109 |
+
// If we made it till here nothing is running yet, lets set the transient now.
|
110 |
+
set_transient( 'wcvendors_installing', 'yes', MINUTE_IN_SECONDS * 10 );
|
111 |
+
wc_maybe_define_constant( 'WCV_INSTALLING', true );
|
112 |
+
|
113 |
// Clear the cron
|
114 |
wp_clear_scheduled_hook( 'pv_schedule_mass_payments' );
|
115 |
|
116 |
+
self::remove_admin_notices();
|
117 |
+
self::create_roles();
|
118 |
+
self::create_tables();
|
119 |
+
self::create_options();
|
120 |
+
self::maybe_run_setup_wizard();
|
121 |
+
self::update_wcv_version();
|
122 |
+
self::maybe_update_db_version();
|
123 |
|
124 |
+
delete_transient( 'wcvendors_installing' );
|
|
|
125 |
|
126 |
+
do_action( 'wcvendors_flush_rewrite_rules' );
|
127 |
+
do_action( 'wcvendors_installed' );
|
|
|
|
|
128 |
|
129 |
+
}
|
130 |
|
131 |
/**
|
132 |
* Add the new Vendor role
|
133 |
*
|
134 |
* @return bool
|
135 |
*/
|
136 |
+
public static function create_roles() {
|
137 |
+
|
138 |
remove_role( 'pending_vendor' );
|
139 |
+
add_role( 'pending_vendor', __( 'Pending Vendor', 'wc-vendors' ), array(
|
140 |
'read' => true,
|
141 |
'edit_posts' => false,
|
142 |
'delete_posts' => false
|
143 |
) );
|
144 |
|
145 |
remove_role( 'vendor' );
|
146 |
+
add_role( 'vendor', __( 'Vendor', 'wc-vendors') , array(
|
147 |
'assign_product_terms' => true,
|
148 |
'edit_products' => true,
|
149 |
'edit_product' => true,
|
150 |
'edit_published_products' => false,
|
151 |
'manage_product' => true,
|
152 |
'publish_products' => false,
|
153 |
+
'delete_posts' => true,
|
154 |
'read' => true,
|
155 |
'upload_files' => true,
|
156 |
'view_woocommerce_reports' => false,
|
161 |
/**
|
162 |
* Create the pv_commission table
|
163 |
*/
|
164 |
+
public static function create_tables() {
|
|
|
165 |
global $wpdb;
|
166 |
|
167 |
$table_name = $wpdb->prefix . "pv_commission";
|
180 |
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
181 |
UNIQUE KEY id (id)
|
182 |
);";
|
183 |
+
|
184 |
dbDelta( $sql );
|
185 |
}
|
186 |
|
|
|
187 |
/**
|
188 |
+
* Create pages that the plugin relies on, storing page IDs in variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
*/
|
190 |
+
public static function create_pages() {
|
191 |
+
|
192 |
+
$vendor_dashboard_page_id = wc_create_page(
|
193 |
+
esc_sql( _x( 'vendor_dashboard', 'Page slug', 'wc-vendors' ) ),
|
194 |
+
'wcvendors_vendor_dashboard_page_id',
|
195 |
+
sprintf( _x( '%s Dashboard', 'Page title', 'wc-vendors' ), wcv_get_vendor_name( true ) ),
|
196 |
+
'[wcv_vendor_dashboard]',
|
197 |
+
''
|
198 |
+
);
|
199 |
+
|
200 |
+
$vendor_page_id = wc_create_page(
|
201 |
+
esc_sql( _x( 'vendors', 'Page slug', 'wc-vendors' ) ),
|
202 |
+
'wcvendors_vendors_page_id',
|
203 |
+
sprintf( _x( '%s', 'Page title', 'wc-vendors' ), wcv_get_vendor_name( false ) ),
|
204 |
+
'[wcv_vendorslist]',
|
205 |
+
''
|
206 |
+
);
|
207 |
|
208 |
+
$pages = apply_filters(
|
209 |
+
'wcvendors_create_pages', array(
|
210 |
+
'shop_settings' => array(
|
211 |
+
'name' => _x( 'shop_settings', 'Page slug', 'wc-vendors' ),
|
212 |
+
'title' => _x( 'Shop Settings', 'Page title', 'wc-vendors' ),
|
213 |
+
'parent' => $vendor_dashboard_page_id,
|
214 |
+
'content' => '[wcv_shop_settings]',
|
215 |
+
),
|
216 |
+
'product_orders' => array(
|
217 |
+
'name' => _x( 'product_orders', 'Page slug', 'wc-vendors' ),
|
218 |
+
'title' => _x( 'Orders', 'Page title', 'wc-vendors' ),
|
219 |
+
'parent' => $vendor_dashboard_page_id,
|
220 |
+
'content' => '[wcv_orders]',
|
221 |
+
),
|
222 |
+
)
|
223 |
+
);
|
224 |
|
225 |
+
foreach ( $pages as $key => $page ) {
|
226 |
+
wc_create_page( esc_sql( $page['name'] ), 'wcvendors_' . $key . '_page_id', $page['title'], $page['content'], ! empty( $page['parent'] ) ? $page['parent'] : '' );
|
227 |
}
|
228 |
+
}
|
229 |
|
230 |
+
/**
|
231 |
+
* Reset any notices added to admin.
|
232 |
+
*
|
233 |
+
* @since 2.0.0
|
234 |
+
*/
|
235 |
+
private static function remove_admin_notices() {
|
236 |
+
WCVendors_Admin_Notices::remove_all_notices();
|
237 |
+
}
|
238 |
|
|
|
|
|
239 |
|
240 |
+
/**
|
241 |
+
* Is this a brand new WC install?
|
242 |
+
*
|
243 |
+
* @since 2.0.0
|
244 |
+
* @return boolean
|
245 |
+
*/
|
246 |
+
public static function is_new_install() {
|
247 |
+
return is_null( get_option( 'wcvendors_version', null ) ) && is_null( get_option( 'wcvendors_db_version', null ) ) && is_null( get_option( 'wc_prd_vendor_options', null ) );
|
248 |
+
}
|
249 |
|
250 |
+
/**
|
251 |
+
* See if we need the wizard or not.
|
252 |
+
*
|
253 |
+
* @since 2.0.0
|
254 |
+
*/
|
255 |
+
public static function maybe_run_setup_wizard() {
|
256 |
+
if ( apply_filters( 'wcvendors_enable_setup_wizard', self::is_new_install() ) ) {
|
257 |
+
WCVendors_Admin_Notices::add_notice( 'install' );
|
258 |
+
}
|
259 |
+
}
|
260 |
|
|
|
|
|
261 |
|
262 |
+
/**
|
263 |
+
* Get list of DB update callbacks.
|
264 |
+
*
|
265 |
+
* @since 2.0.0
|
266 |
+
* @return array
|
267 |
+
*/
|
268 |
+
public static function get_db_update_callbacks() {
|
269 |
+
return self::$db_updates;
|
270 |
}
|
271 |
|
|
|
272 |
/**
|
273 |
+
* Is a DB update needed?
|
274 |
+
*
|
275 |
+
* @since 2.0.0
|
276 |
+
* @return boolean
|
277 |
*/
|
278 |
+
private static function needs_db_update() {
|
279 |
+
$current_db_version = get_option( 'wcvendors_db_version', null );
|
280 |
+
$version_one = get_option( 'wc_prd_vendor_options', null );
|
281 |
+
$updates = self::get_db_update_callbacks();
|
282 |
+
|
283 |
+
if ( ! is_null( $version_one ) && is_null( $current_db_version ) ){
|
284 |
+
return true;
|
285 |
+
} else {
|
286 |
+
return ! is_null( $current_db_version ) && version_compare( $current_db_version, max( array_keys( $updates ) ), '<' );
|
287 |
+
}
|
288 |
|
|
|
|
|
|
|
289 |
}
|
290 |
|
|
|
291 |
/**
|
292 |
+
* Init background updates
|
|
|
|
|
293 |
*/
|
294 |
+
public static function init_background_updater() {
|
295 |
+
self::$background_updater = new WC_Background_Updater();
|
296 |
+
}
|
297 |
|
|
|
298 |
|
|
|
299 |
|
300 |
+
/**
|
301 |
+
* See if we need to show or run database updates during install.
|
302 |
+
*
|
303 |
+
* @since 2.0.0
|
304 |
+
*/
|
305 |
+
private static function maybe_update_db_version() {
|
306 |
+
if ( self::needs_db_update() ) {
|
307 |
+
if ( apply_filters( 'wcvendors_enable_auto_update_db', false ) ) {
|
308 |
+
self::init_background_updater();
|
309 |
+
self::update();
|
310 |
+
} else {
|
311 |
+
WCVendors_Admin_Notices::add_notice( 'update' );
|
312 |
+
}
|
313 |
+
} else {
|
314 |
+
self::update_db_version();
|
315 |
+
}
|
316 |
+
}
|
317 |
|
318 |
+
/**
|
319 |
+
* Default options.
|
320 |
+
*
|
321 |
+
* Sets up the default options used on the settings page.
|
322 |
+
*/
|
323 |
+
private static function create_options() {
|
324 |
|
325 |
+
include_once( dirname( __FILE__ ) . '/admin/class-wcv-admin-settings.php' );
|
|
|
|
|
326 |
|
327 |
+
$settings = WCVendors_Admin_Settings::get_settings_pages();
|
328 |
|
329 |
+
foreach ( $settings as $section ) {
|
330 |
+
if ( ! method_exists( $section, 'get_settings' ) ) {
|
331 |
+
continue;
|
332 |
+
}
|
333 |
+
$subsections = array_unique( array_merge( array( '' ), array_keys( $section->get_sections() ) ) );
|
334 |
|
335 |
+
foreach ( $subsections as $subsection ) {
|
336 |
+
foreach ( $section->get_settings( $subsection ) as $value ) {
|
337 |
+
if ( isset( $value['default'] ) && isset( $value['id'] ) ) {
|
338 |
+
$autoload = isset( $value['autoload'] ) ? (bool) $value['autoload'] : true;
|
339 |
+
add_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );
|
|
|
|
|
|
|
|
|
340 |
}
|
|
|
341 |
}
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
|
346 |
+
/**
|
347 |
+
* Update DB version to current.
|
348 |
+
* @param string $version
|
349 |
+
*/
|
350 |
+
public static function update_db_version( $version = null ) {
|
351 |
+
delete_option( 'wcvendors_db_version' );
|
352 |
+
add_option( 'wcvendors_db_version', is_null( $version ) ? WCV_VERSION : $version );
|
353 |
+
}
|
354 |
|
|
|
355 |
|
356 |
+
/**
|
357 |
+
* Update WC version to current.
|
358 |
+
*/
|
359 |
+
private static function update_wcv_version() {
|
360 |
+
delete_option( 'wcvendors_version' );
|
361 |
+
add_option( 'wcvendors_version', WCV_VERSION );
|
362 |
+
}
|
363 |
|
|
|
364 |
|
365 |
+
/**
|
366 |
+
* Push all needed DB updates to the queue for processing.
|
367 |
+
*/
|
368 |
+
private static function update() {
|
369 |
+
$current_db_version = get_option( 'wcvendors_db_version' );
|
370 |
+
$logger = wc_get_logger();
|
371 |
+
$update_queued = false;
|
372 |
+
|
373 |
+
foreach ( self::get_db_update_callbacks() as $version => $update_callbacks ) {
|
374 |
+
if ( version_compare( $current_db_version, $version, '<' ) ) {
|
375 |
+
foreach ( $update_callbacks as $update_callback ) {
|
376 |
+
$logger->info(
|
377 |
+
sprintf( 'Queuing %s - %s', $version, $update_callback ),
|
378 |
+
array( 'source' => 'wcvendors_db_updates' )
|
379 |
+
);
|
380 |
+
self::$background_updater->push_to_queue( $update_callback );
|
381 |
+
$update_queued = true;
|
382 |
+
}
|
383 |
+
}
|
384 |
+
}
|
385 |
|
386 |
+
if ( $update_queued ) {
|
387 |
+
self::$background_updater->save()->dispatch();
|
388 |
+
}
|
389 |
+
}
|
390 |
|
|
|
|
|
391 |
|
392 |
+
/**
|
393 |
+
* Show action links on the plugin screen.
|
394 |
+
*
|
395 |
+
* @param mixed $links Plugin Action links
|
396 |
+
* @return array
|
397 |
+
* @since 2.0.0
|
398 |
+
*/
|
399 |
+
public static function plugin_action_links( $links ) {
|
400 |
+
$action_links = array(
|
401 |
+
'settings' => '<a href="' . admin_url( 'admin.php?page=wcv-settings' ) . '" aria-label="' . esc_attr__( 'View WC Vendors settings', 'wc-vendors' ) . '">' . esc_html__( 'Settings', 'wc-vendors' ) . '</a>',
|
402 |
+
);
|
403 |
|
404 |
+
return array_merge( $action_links, $links );
|
405 |
+
}
|
406 |
|
407 |
+
/**
|
408 |
+
* Show row meta on the plugin screen.
|
409 |
+
*
|
410 |
+
* @param mixed $links Plugin Row Meta
|
411 |
+
* @param mixed $file Plugin Base file
|
412 |
+
* @return array
|
413 |
+
*/
|
414 |
+
public static function plugin_row_meta( $links, $file ) {
|
415 |
|
416 |
+
if ( wcv_plugin_base == $file ) {
|
417 |
+
$row_meta = array(
|
418 |
+
'docs' => '<a href="' . esc_url( apply_filters( 'wcvendors_docs_url', 'https://docs.wc-vendors.com/' ) ) . '" aria-label="' . esc_attr__( 'View WC Vendors documentation', 'wc-vendors' ) . '">' . esc_html__( 'Docs', 'wc-vendors' ) . '</a>',
|
419 |
+
'free-support' => '<a href="' . esc_url( apply_filters( 'wcvendors_free_support_url', 'https://wordpress.org/plugins/wc-vendors' ) ) . '" aria-label="' . esc_attr__( 'Visit community forums', 'wc-vendors' ) . '">' . esc_html__( 'Free support', 'wc-vendors' ) . '</a>',
|
420 |
+
'support' => '<a href="' . esc_url( apply_filters( 'wcvendors_support_url', 'https://wc-vendors.com/support/' ) ) . '" aria-label="' . esc_attr__( 'Visit premium customer support', 'wc-vendors' ) . '">' . esc_html__( 'Premium support', 'wc-vendors' ) . '</a>',
|
421 |
+
);
|
422 |
|
423 |
+
return array_merge( $links, $row_meta );
|
|
|
|
|
424 |
}
|
425 |
+
|
426 |
+
return (array) $links;
|
427 |
}
|
428 |
|
429 |
+
/**
|
430 |
+
* Flush rules if the event is queued.
|
431 |
+
*
|
432 |
+
* @since 2.0.0
|
433 |
+
*/
|
434 |
+
public static function maybe_flush_rewrite_rules() {
|
435 |
+
if ( 'yes' === get_option( 'wcvendors_queue_flush_rewrite_rules' ) ) {
|
436 |
+
update_option( 'wcvendors_queue_flush_rewrite_rules', 'no' );
|
437 |
+
flush_rewrite_rules();
|
438 |
+
}
|
439 |
+
}
|
440 |
|
441 |
}
|
442 |
+
|
443 |
+
WCVendors_Install::init();
|
classes/class-shipping.php
CHANGED
@@ -37,19 +37,18 @@ class WCV_Shipping
|
|
37 |
*
|
38 |
* @return unknown
|
39 |
*/
|
40 |
-
public static function get_shipping_due( $order_id, $
|
41 |
-
{
|
42 |
-
global $woocommerce;
|
43 |
|
44 |
-
$shipping_costs
|
45 |
-
$shipping_due
|
46 |
-
$method
|
47 |
-
$_product
|
48 |
-
$order
|
|
|
49 |
|
50 |
if ( $_product && $_product->needs_shipping() && !$_product->is_downloadable() ) {
|
51 |
|
52 |
-
// Get Shipping methods.
|
53 |
$shipping_methods = $order->get_shipping_methods();
|
54 |
|
55 |
// TODO: Currently this only allows one shipping method per order, this definitely needs changing
|
@@ -57,10 +56,10 @@ class WCV_Shipping
|
|
57 |
$method = $shipping_method['method_id'];
|
58 |
break;
|
59 |
}
|
60 |
-
|
61 |
// Per Product Shipping
|
62 |
if ( ( class_exists('WC_Shipping_Per_Product_Init') || function_exists( 'woocommerce_per_product_shipping' ) ) && $method == 'per_product' ) {
|
63 |
-
$shipping_costs = WCV_Shipping::pps_get_due( $order_id, $
|
64 |
|
65 |
// Local Delivery
|
66 |
} else if ( $method == 'local_delivery' ) {
|
@@ -68,8 +67,8 @@ class WCV_Shipping
|
|
68 |
|
69 |
if ( $local_delivery[ 'type' ] == 'product' ) {
|
70 |
|
71 |
-
$shipping_costs['amount'] = $
|
72 |
-
$shipping_costs['tax'] = WCV_Shipping::calculate_shipping_tax( $shipping_costs['amount'], $order );
|
73 |
}
|
74 |
|
75 |
// International Delivery
|
@@ -80,14 +79,14 @@ class WCV_Shipping
|
|
80 |
if ( $int_delivery[ 'type' ] == 'item' ) {
|
81 |
$WC_Shipping_International_Delivery = new WC_Shipping_International_Delivery();
|
82 |
$fee = $WC_Shipping_International_Delivery->get_fee( $int_delivery[ 'fee' ], $_product->get_price() );
|
83 |
-
$shipping_costs['amount'] = ( $int_delivery[ 'cost' ] + $fee ) * $
|
84 |
-
$shipping_costs['tax'] = ( 'taxable' === $int_delivery[ 'tax_status' ] ) ? WCV_Shipping::calculate_shipping_tax( $shipping_costs['amount'], $order ) : 0;
|
85 |
}
|
86 |
|
87 |
}
|
88 |
}
|
89 |
|
90 |
-
$shipping_costs = apply_filters( 'wcvendors_shipping_due', $shipping_costs, $order_id, $
|
91 |
|
92 |
return $shipping_costs;
|
93 |
}
|
@@ -101,24 +100,21 @@ class WCV_Shipping
|
|
101 |
*
|
102 |
* @return array
|
103 |
*/
|
104 |
-
public static function pps_get_due( $order_id, $product )
|
105 |
-
{
|
106 |
-
global $woocommerce;
|
107 |
|
108 |
$item_shipping_cost = 0;
|
109 |
-
$shipping_costs
|
110 |
-
|
111 |
-
$
|
112 |
-
$
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$
|
117 |
-
$
|
118 |
-
|
119 |
-
|
120 |
-
$package[ 'destination' ][ '
|
121 |
-
$package[ 'destination' ][ 'state' ] = $shipping_state;
|
122 |
$package[ 'destination' ][ 'postcode' ] = $shipping_postcode;
|
123 |
$product_id = !empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
|
124 |
|
@@ -142,29 +138,38 @@ class WCV_Shipping
|
|
142 |
self::$pps_shipping_costs[$order_id][] = $rule->rule_id;
|
143 |
}
|
144 |
|
145 |
-
$shipping_costs['amount'] = $item_shipping_cost;
|
146 |
-
$shipping_costs['tax'] = ('taxable' === $taxable ) ? WCV_Shipping::calculate_shipping_tax( $item_shipping_cost, $order ) : 0;
|
147 |
|
148 |
// return $item_shipping_cost;
|
149 |
-
return $shipping_costs;
|
150 |
}
|
151 |
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
$tax_based_on = get_option( 'woocommerce_tax_based_on' );
|
155 |
$wc_tax_enabled = get_option( 'woocommerce_calc_taxes' );
|
156 |
|
157 |
-
$shipping_city =
|
158 |
-
$shipping_country =
|
159 |
-
$shipping_state =
|
160 |
-
$shipping_postcode =
|
161 |
-
$billing_city =
|
162 |
-
$billing_country =
|
163 |
-
$billing_state =
|
164 |
-
$billing_postcode =
|
165 |
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
168 |
|
169 |
if ( 'base' === $tax_based_on ) {
|
170 |
|
@@ -198,10 +203,9 @@ class WCV_Shipping
|
|
198 |
'state' => $state,
|
199 |
'postcode' => $postcode,
|
200 |
'city' => $city,
|
201 |
-
'tax_class' =>
|
202 |
) );
|
203 |
|
204 |
-
|
205 |
if ( $tax_rates ) {
|
206 |
foreach ( $tax_rates as $key => $rate ) {
|
207 |
if ( isset( $rate['shipping'] ) && 'yes' === $rate['shipping'] ) {
|
@@ -213,11 +217,10 @@ class WCV_Shipping
|
|
213 |
$shipping_taxes = WC_Tax::calc_shipping_tax( $shipping_amount, $matched_tax_rates );
|
214 |
$shipping_tax_total = WC_Tax::round( array_sum( $shipping_taxes ) );
|
215 |
|
216 |
-
return $shipping_tax_total;
|
217 |
|
218 |
}
|
219 |
|
220 |
-
|
221 |
/**
|
222 |
*
|
223 |
*/
|
@@ -328,4 +331,4 @@ class WCV_Shipping
|
|
328 |
|
329 |
unset( $woocommerce->session->trs2_shipping_rates, $woocommerce->session->trs2_shipping_class_type );
|
330 |
}
|
331 |
-
}
|
37 |
*
|
38 |
* @return unknown
|
39 |
*/
|
40 |
+
public static function get_shipping_due( $order_id, $order_item, $author, $product_id = 0 ){
|
|
|
|
|
41 |
|
42 |
+
$shipping_costs = array( 'amount' => 0, 'tax' => 0);
|
43 |
+
$shipping_due = 0;
|
44 |
+
$method = '';
|
45 |
+
$_product = wc_get_product( $order_item[ 'product_id' ] );
|
46 |
+
$order = wc_get_order( $order_id );
|
47 |
+
$tax_class = $order_item->get_tax_class();
|
48 |
|
49 |
if ( $_product && $_product->needs_shipping() && !$_product->is_downloadable() ) {
|
50 |
|
51 |
+
// Get Shipping methods.
|
52 |
$shipping_methods = $order->get_shipping_methods();
|
53 |
|
54 |
// TODO: Currently this only allows one shipping method per order, this definitely needs changing
|
56 |
$method = $shipping_method['method_id'];
|
57 |
break;
|
58 |
}
|
59 |
+
|
60 |
// Per Product Shipping
|
61 |
if ( ( class_exists('WC_Shipping_Per_Product_Init') || function_exists( 'woocommerce_per_product_shipping' ) ) && $method == 'per_product' ) {
|
62 |
+
$shipping_costs = WCV_Shipping::pps_get_due( $order_id, $order_item );
|
63 |
|
64 |
// Local Delivery
|
65 |
} else if ( $method == 'local_delivery' ) {
|
67 |
|
68 |
if ( $local_delivery[ 'type' ] == 'product' ) {
|
69 |
|
70 |
+
$shipping_costs['amount'] = $order_item[ 'qty' ] * $local_delivery[ 'fee' ];
|
71 |
+
$shipping_costs['tax'] = WCV_Shipping::calculate_shipping_tax( $shipping_costs['amount'], $order );
|
72 |
}
|
73 |
|
74 |
// International Delivery
|
79 |
if ( $int_delivery[ 'type' ] == 'item' ) {
|
80 |
$WC_Shipping_International_Delivery = new WC_Shipping_International_Delivery();
|
81 |
$fee = $WC_Shipping_International_Delivery->get_fee( $int_delivery[ 'fee' ], $_product->get_price() );
|
82 |
+
$shipping_costs['amount'] = ( $int_delivery[ 'cost' ] + $fee ) * $order_item[ 'qty' ];
|
83 |
+
$shipping_costs['tax'] = ( 'taxable' === $int_delivery[ 'tax_status' ] ) ? WCV_Shipping::calculate_shipping_tax( $shipping_costs['amount'], $order, $tax_class ) : 0;
|
84 |
}
|
85 |
|
86 |
}
|
87 |
}
|
88 |
|
89 |
+
$shipping_costs = apply_filters( 'wcvendors_shipping_due', $shipping_costs, $order_id, $order_item, $author, $product_id );
|
90 |
|
91 |
return $shipping_costs;
|
92 |
}
|
100 |
*
|
101 |
* @return array
|
102 |
*/
|
103 |
+
public static function pps_get_due( $order_id, $product ) {
|
|
|
|
|
104 |
|
105 |
$item_shipping_cost = 0;
|
106 |
+
$shipping_costs = array();
|
107 |
+
$settings = get_option( 'woocommerce_per_product_settings' );
|
108 |
+
$taxable = $settings['tax_status'];
|
109 |
+
$order = wc_get_order( $order_id );
|
110 |
+
$tax_class = $product->get_tax_glass();
|
111 |
+
|
112 |
+
$shipping_country = $order->get_shipping_country();
|
113 |
+
$shipping_state = $order->get_shipping_state();
|
114 |
+
$shipping_postcode = $order->get_shipping_postcode();
|
115 |
+
|
116 |
+
$package[ 'destination' ][ 'country' ] = $shipping_country;
|
117 |
+
$package[ 'destination' ][ 'state' ] = $shipping_state;
|
|
|
118 |
$package[ 'destination' ][ 'postcode' ] = $shipping_postcode;
|
119 |
$product_id = !empty( $product['variation_id'] ) ? $product['variation_id'] : $product['product_id'];
|
120 |
|
138 |
self::$pps_shipping_costs[$order_id][] = $rule->rule_id;
|
139 |
}
|
140 |
|
141 |
+
$shipping_costs['amount'] = $item_shipping_cost;
|
142 |
+
$shipping_costs['tax'] = ('taxable' === $taxable ) ? WCV_Shipping::calculate_shipping_tax( $item_shipping_cost, $order, $tax_class ) : 0;
|
143 |
|
144 |
// return $item_shipping_cost;
|
145 |
+
return $shipping_costs;
|
146 |
}
|
147 |
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Calculate the shipping tax due for the product
|
151 |
+
*
|
152 |
+
*/
|
153 |
+
public static function calculate_shipping_tax( $shipping_amount, $order, $tax_class = '' ) {
|
154 |
|
155 |
$tax_based_on = get_option( 'woocommerce_tax_based_on' );
|
156 |
$wc_tax_enabled = get_option( 'woocommerce_calc_taxes' );
|
157 |
|
158 |
+
$shipping_city = $order->get_shipping_city();
|
159 |
+
$shipping_country = $order->get_shipping_country();
|
160 |
+
$shipping_state = $order->get_shipping_state();
|
161 |
+
$shipping_postcode = $order->get_shipping_postcode();
|
162 |
+
$billing_city = $order->get_billing_city();
|
163 |
+
$billing_country = $order->get_billing_country();
|
164 |
+
$billing_state = $order->get_billing_state();
|
165 |
+
$billing_postcode = $order->get_billing_postcode();
|
166 |
|
167 |
+
$woocommerce_shipping_tax_class = get_option( 'woocommerce_shipping_tax_class' );
|
168 |
+
$tax_class = ( 'inherit' === $woocommerce_shipping_tax_class ) ? $tax_class : $woocommerce_shipping_tax_class;
|
169 |
+
|
170 |
+
|
171 |
+
// if taxes aren't enabled don't calculate them
|
172 |
+
if ( 'no' === $wc_tax_enabled ) return 0;
|
173 |
|
174 |
if ( 'base' === $tax_based_on ) {
|
175 |
|
203 |
'state' => $state,
|
204 |
'postcode' => $postcode,
|
205 |
'city' => $city,
|
206 |
+
'tax_class' => $tax_class
|
207 |
) );
|
208 |
|
|
|
209 |
if ( $tax_rates ) {
|
210 |
foreach ( $tax_rates as $key => $rate ) {
|
211 |
if ( isset( $rate['shipping'] ) && 'yes' === $rate['shipping'] ) {
|
217 |
$shipping_taxes = WC_Tax::calc_shipping_tax( $shipping_amount, $matched_tax_rates );
|
218 |
$shipping_tax_total = WC_Tax::round( array_sum( $shipping_taxes ) );
|
219 |
|
220 |
+
return $shipping_tax_total;
|
221 |
|
222 |
}
|
223 |
|
|
|
224 |
/**
|
225 |
*
|
226 |
*/
|
331 |
|
332 |
unset( $woocommerce->session->trs2_shipping_rates, $woocommerce->session->trs2_shipping_class_type );
|
333 |
}
|
334 |
+
}
|
classes/class-vendor-post-types.php
CHANGED
@@ -31,7 +31,7 @@ class WCV_Post_types {
|
|
31 |
'shop_order_vendor',
|
32 |
apply_filters( 'woocommerce_register_post_type_shop_order_vendor',
|
33 |
array(
|
34 |
-
'label' => __( 'Vendor Orders', '
|
35 |
'capability_type' => 'shop_order',
|
36 |
'public' => false,
|
37 |
'hierarchical' => false,
|
31 |
'shop_order_vendor',
|
32 |
apply_filters( 'woocommerce_register_post_type_shop_order_vendor',
|
33 |
array(
|
34 |
+
'label' => __( 'Vendor Orders', 'wc-vendors' ),
|
35 |
'capability_type' => 'shop_order',
|
36 |
'public' => false,
|
37 |
'hierarchical' => false,
|
classes/class-vendors.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @author Matt Gates <http://mgates.me>, WC Vendors <http://wcvendors.com>
|
7 |
* @package WCVendors
|
8 |
*/
|
9 |
-
|
10 |
|
11 |
class WCV_Vendors
|
12 |
{
|
@@ -47,31 +47,45 @@ class WCV_Vendors
|
|
47 |
|
48 |
|
49 |
/**
|
50 |
-
*
|
51 |
*
|
52 |
* @param object $order
|
53 |
* @param unknown $items (optional)
|
54 |
*
|
55 |
-
* @return array
|
|
|
56 |
*/
|
57 |
-
public static function get_vendors_from_order( $order, $items = false )
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
-
|
63 |
-
foreach ( $items as $key => $product ) {
|
64 |
|
65 |
-
|
|
|
66 |
|
67 |
-
|
68 |
-
if ( !WCV_Vendors::is_vendor( $author ) ) continue;
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
75 |
|
76 |
|
77 |
/**
|
@@ -86,43 +100,43 @@ class WCV_Vendors
|
|
86 |
{
|
87 |
global $woocommerce;
|
88 |
|
89 |
-
$give_tax =
|
90 |
-
$give_shipping =
|
91 |
$receiver = array();
|
92 |
$shipping_given = 0;
|
93 |
$tax_given = 0;
|
94 |
|
95 |
WCV_Shipping::$pps_shipping_costs = array();
|
96 |
|
97 |
-
foreach ( $order->get_items() as $key => $
|
98 |
|
99 |
-
$product_id = !empty( $
|
100 |
$author = WCV_Vendors::get_vendor_from_product( $product_id );
|
101 |
-
$give_tax_override = get_user_meta( $author, 'wcv_give_vendor_tax', true );
|
102 |
-
$give_shipping_override = get_user_meta( $author, 'wcv_give_vendor_shipping', true );
|
103 |
$is_vendor = WCV_Vendors::is_vendor( $author );
|
104 |
-
$commission = $is_vendor ? WCV_Commission::calculate_commission( $
|
105 |
-
$tax = !empty( $
|
106 |
-
$order_id =
|
107 |
-
|
108 |
// Check if shipping is enabled
|
109 |
-
if ( get_option('woocommerce_calc_shipping') === 'no' ) {
|
110 |
-
$shipping = 0; $shipping_tax = 0;
|
111 |
} else {
|
112 |
-
$shipping_costs = WCV_Shipping::get_shipping_due( $order_id, $
|
113 |
-
$shipping = $shipping_costs['amount'];
|
114 |
-
$shipping_tax = $shipping_costs['tax'];
|
115 |
}
|
116 |
-
|
117 |
-
$_product = new WC_Product( $product['product_id'] );
|
118 |
|
119 |
-
|
120 |
-
|
|
|
|
|
121 |
|
122 |
// Tax override on a per vendor basis
|
123 |
-
if ( $give_tax_override ) $give_tax = true;
|
124 |
-
// Shipping override
|
125 |
-
if ( $give_shipping_override ) $give_shipping = true;
|
126 |
|
127 |
if ( $is_vendor ) {
|
128 |
|
@@ -142,7 +156,7 @@ class WCV_Vendors
|
|
142 |
'commission' => !empty( $receiver[ $author ][ 'commission' ] ) ? $receiver[ $author ][ 'commission' ] + $commission : $commission,
|
143 |
'shipping' => $give_shipping ? ( !empty( $receiver[ $author ][ 'shipping' ] ) ? $receiver[ $author ][ 'shipping' ] + $shipping : $shipping) : 0,
|
144 |
'tax' => $give_tax ? ( !empty( $receiver[ $author ][ 'tax' ] ) ? $receiver[ $author ][ 'tax' ] + $total_tax : $total_tax ) : 0,
|
145 |
-
'qty' => !empty( $receiver[ $author ][ 'qty' ] ) ? $receiver[ $author ][ 'qty' ] + $
|
146 |
'total' => $give,
|
147 |
);
|
148 |
|
@@ -154,7 +168,7 @@ class WCV_Vendors
|
|
154 |
'commission' => $commission,
|
155 |
'shipping' => $give_shipping ? $shipping : 0,
|
156 |
'tax' => $give_tax ? $total_tax : 0,
|
157 |
-
'qty' => $
|
158 |
'total' => ($give_shipping ? $shipping : 0) + $commission + ( $give_tax ? $total_tax : 0 ),
|
159 |
);
|
160 |
|
@@ -162,12 +176,12 @@ class WCV_Vendors
|
|
162 |
|
163 |
}
|
164 |
|
165 |
-
$admin_comm = $
|
166 |
|
167 |
if ( $group ) {
|
168 |
$receiver[ 1 ] = array(
|
169 |
'vendor_id' => 1,
|
170 |
-
'qty' => !empty( $receiver[ 1 ][ 'qty' ] ) ? $receiver[ 1 ][ 'qty' ] + $
|
171 |
'commission' => !empty( $receiver[ 1 ][ 'commission' ] ) ? $receiver[ 1 ][ 'commission' ] + $admin_comm : $admin_comm,
|
172 |
'total' => !empty( $receiver[ 1 ] ) ? $receiver[ 1 ][ 'total' ] + $admin_comm : $admin_comm,
|
173 |
);
|
@@ -178,27 +192,27 @@ class WCV_Vendors
|
|
178 |
'commission' => $admin_comm,
|
179 |
'shipping' => 0,
|
180 |
'tax' => 0,
|
181 |
-
'qty' => $
|
182 |
'total' => $admin_comm,
|
183 |
);
|
184 |
}
|
185 |
|
186 |
}
|
187 |
-
|
188 |
// Add remainders on end to admin
|
189 |
-
$discount
|
190 |
$shipping = round( ( $order->get_total_shipping() - $shipping_given ), 2 );
|
191 |
-
$tax = round( $order->get_total_tax() - $tax_given, 2);
|
192 |
$total = ( $tax + $shipping ) - $discount;
|
193 |
|
194 |
if ( $group ) {
|
195 |
-
$r_total = round( $receiver[ 1 ][ 'total' ], 2 ) ;
|
196 |
$receiver[ 1 ][ 'commission' ] = round( $receiver[ 1 ][ 'commission' ], 2 ) - round( $discount, 2 );
|
197 |
$receiver[ 1 ][ 'shipping' ] = $shipping;
|
198 |
$receiver[ 1 ][ 'tax' ] = $tax;
|
199 |
$receiver[ 1 ][ 'total' ] = $r_total + round( $total, 2 );
|
200 |
} else {
|
201 |
-
$r_total = round( $receiver[ 1 ][ $key ][ 'total' ], 2 );
|
202 |
$receiver[ 1 ][ $key ][ 'commission' ] = round( $receiver[ 1 ][ $key ][ 'commission' ], 2 ) - round( $discount, 2 );
|
203 |
$receiver[ 1 ][ $key ][ 'shipping' ] = ( $order->get_total_shipping() - $shipping_given );
|
204 |
$receiver[ 1 ][ $key ][ 'tax' ] = $tax;
|
@@ -287,16 +301,16 @@ class WCV_Vendors
|
|
287 |
*/
|
288 |
public static function get_vendor_from_product( $product_id )
|
289 |
{
|
290 |
-
// Make sure we are returning an author for products or product variations only
|
291 |
-
if ( 'product' === get_post_type( $product_id ) || 'product_variation' === get_post_type( $product_id ) ) {
|
292 |
$parent = get_post_ancestors( $product_id );
|
293 |
if ( $parent ) $product_id = $parent[ 0 ];
|
294 |
|
295 |
$post = get_post( $product_id );
|
296 |
$author = $post ? $post->post_author : 1;
|
297 |
$author = apply_filters( 'pv_product_author', $author, $product_id );
|
298 |
-
} else {
|
299 |
-
$author = -1;
|
300 |
}
|
301 |
return $author;
|
302 |
}
|
@@ -309,20 +323,20 @@ class WCV_Vendors
|
|
309 |
*
|
310 |
* @return bool
|
311 |
*/
|
312 |
-
public static function is_vendor( $user_id )
|
313 |
-
{
|
314 |
-
$user = get_userdata( $user_id );
|
315 |
|
316 |
-
$
|
317 |
-
|
318 |
-
|
|
|
|
|
319 |
|
320 |
foreach ($vendor_roles as $role ) {
|
321 |
-
|
|
|
|
|
|
|
322 |
}
|
323 |
-
|
324 |
-
} else {
|
325 |
-
$is_vendor = false;
|
326 |
}
|
327 |
|
328 |
return apply_filters( 'pv_is_vendor', $is_vendor, $user_id );
|
@@ -379,7 +393,7 @@ class WCV_Vendors
|
|
379 |
$vendor = !$slug ? get_userdata( $vendor_id )->user_login : $slug;
|
380 |
|
381 |
if ( get_option( 'permalink_structure' ) ) {
|
382 |
-
$permalink = trailingslashit(
|
383 |
|
384 |
return trailingslashit( home_url( sprintf( '/%s%s', $permalink, $vendor ) ) );
|
385 |
} else {
|
@@ -422,54 +436,54 @@ class WCV_Vendors
|
|
422 |
return $is_pending;
|
423 |
}
|
424 |
|
425 |
-
/*
|
426 |
-
* Is this a vendor product ?
|
427 |
-
* @param uknown $role
|
428 |
-
*/
|
429 |
-
public static function is_vendor_product($role) {
|
430 |
-
return ($role === 'Vendor') ? true : false;
|
431 |
}
|
432 |
|
433 |
-
/*
|
434 |
-
* Is this the vendors shop archive page ?
|
435 |
*/
|
436 |
-
public static function is_vendor_page() {
|
437 |
|
438 |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) );
|
439 |
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop );
|
440 |
|
441 |
-
return $vendor_id ? true : false;
|
442 |
|
443 |
} // is_vendor_page()
|
444 |
|
445 |
-
/*
|
446 |
-
* Is this a vendor single product page ?
|
447 |
*/
|
448 |
-
public static function is_vendor_product_page($vendor_id) {
|
449 |
|
450 |
-
$vendor_product = WCV_Vendors::is_vendor_product( wcv_get_user_role($vendor_id) );
|
451 |
-
return $vendor_product ? true : false;
|
452 |
|
453 |
} // is_vendor_product_page()
|
454 |
|
455 |
-
public static function get_vendor_sold_by( $vendor_id ){
|
456 |
|
457 |
-
$vendor_display_name =
|
458 |
-
$vendor = get_userdata( $vendor_id );
|
459 |
|
460 |
switch ($vendor_display_name) {
|
461 |
case 'display_name':
|
462 |
$display_name = $vendor->display_name;
|
463 |
break;
|
464 |
-
case 'user_login':
|
465 |
$display_name = $vendor->user_login;
|
466 |
break;
|
467 |
-
case 'user_email':
|
468 |
$display_name = $vendor->user_email;
|
469 |
break;
|
470 |
|
471 |
default:
|
472 |
-
$display_name = WCV_Vendors::get_vendor_shop_name( $vendor_id );
|
473 |
break;
|
474 |
}
|
475 |
|
@@ -480,7 +494,7 @@ class WCV_Vendors
|
|
480 |
/**
|
481 |
* Split order into vendor orders (when applicable) after checkout
|
482 |
*
|
483 |
-
* @since
|
484 |
* @param int $order_id
|
485 |
* @return void
|
486 |
*/
|
@@ -525,7 +539,7 @@ class WCV_Vendors
|
|
525 |
*
|
526 |
* Returns a new vendor_order object on success which can then be used to add additional data.
|
527 |
*
|
528 |
-
* @since
|
529 |
* @param array $args
|
530 |
* @return WC_Order_Vendor|WP_Error
|
531 |
*/
|
@@ -574,7 +588,7 @@ class WCV_Vendors
|
|
574 |
$vendor_order = wc_get_order( $vendor_order_id );
|
575 |
$order = wc_get_order( $args['order_id'] );
|
576 |
|
577 |
-
$order_currency = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->get_order_currency() : $order->get_currency();
|
578 |
|
579 |
// Order currency is the same used for the parent order
|
580 |
update_post_meta( $vendor_order_id, '_order_currency', $order_currency );
|
@@ -674,31 +688,31 @@ class WCV_Vendors
|
|
674 |
} // get_vendor_orders()
|
675 |
|
676 |
/**
|
677 |
-
* Find the parent product id if the variation has been deleted
|
678 |
-
*
|
679 |
* @since 1.9.13
|
680 |
-
* @access public
|
681 |
*/
|
682 |
-
public static function find_parent_id_from_order( $order_id, $product_id ){
|
683 |
|
684 |
-
global $wpdb;
|
685 |
|
686 |
-
$order_item_id_sql = "SELECT `order_item_id` FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = $order_id AND `order_item_type` = 'line_item'";
|
687 |
|
688 |
-
$order_item_ids = $wpdb->get_results( $order_item_id_sql );
|
689 |
|
690 |
foreach ( $order_item_ids as $key => $order_item ) {
|
691 |
|
692 |
$item_product_id = get_metadata( 'order_item', $order_item->order_item_id, '_product_id', true );
|
693 |
-
$item_variation_id = get_metadata( 'order_item', $order_item->order_item_id, '_variation_id', true );
|
694 |
|
695 |
if ( $item_variation_id == $product_id ){
|
696 |
-
return $item_product_id;
|
697 |
}
|
698 |
}
|
699 |
|
700 |
-
return $product_id;
|
701 |
|
702 |
}
|
703 |
|
704 |
-
} // WCV_Vendors
|
6 |
* @author Matt Gates <http://mgates.me>, WC Vendors <http://wcvendors.com>
|
7 |
* @package WCVendors
|
8 |
*/
|
9 |
+
|
10 |
|
11 |
class WCV_Vendors
|
12 |
{
|
47 |
|
48 |
|
49 |
/**
|
50 |
+
* Get vendors from an order including all user meta and vendor items filtered and grouped
|
51 |
*
|
52 |
* @param object $order
|
53 |
* @param unknown $items (optional)
|
54 |
*
|
55 |
+
* @return array $vendors
|
56 |
+
* @version 2.0.0
|
57 |
*/
|
58 |
+
public static function get_vendors_from_order( $order, $items = false ) {
|
59 |
+
|
60 |
+
$vendors = array();
|
61 |
+
$vendor_items = array();
|
62 |
+
|
63 |
+
if ( is_a( $order, 'WC_Order' ) ) {
|
64 |
+
|
65 |
+
foreach ( $order->get_items() as $item_id => $order_item ) {
|
66 |
|
67 |
+
if ( 'line_item' === $order_item->get_type() ){
|
|
|
68 |
|
69 |
+
$product_id = ( $order_item->get_variation_id() ) ? $order_item->get_variation_id() : $order_item->get_product_id();
|
70 |
+
$vendor_id = self::get_vendor_from_product( $product_id );
|
71 |
|
72 |
+
if ( ! self::is_vendor( $vendor_id ) ) continue;
|
|
|
73 |
|
74 |
+
if ( array_key_exists( $vendor_id, $vendors ) ){
|
75 |
+
$vendors[ $vendor_id ][ 'line_items' ][] = $order_item;
|
76 |
+
} else {
|
77 |
+
$vendor_details = array( 'vendor' => get_userdata( $vendor_id ), 'line_items' => array( $order_item ) );
|
78 |
+
$vendors[ $vendor_id ] = $vendor_details;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
}
|
83 |
|
84 |
+
// legacy filter left in place
|
85 |
+
$vendors = apply_filters( 'pv_vendors_from_order', $vendors, $order );
|
86 |
+
return apply_filters( 'wcvendors_get_vendors_from_order', $vendors, $order );
|
87 |
+
|
88 |
+
} // get_vendors_from_order()
|
89 |
|
90 |
|
91 |
/**
|
100 |
{
|
101 |
global $woocommerce;
|
102 |
|
103 |
+
$give_tax = get_option( 'wcvendors_vendor_give_taxes' );
|
104 |
+
$give_shipping = get_option( 'wcvendors_vendor_give_shipping' );
|
105 |
$receiver = array();
|
106 |
$shipping_given = 0;
|
107 |
$tax_given = 0;
|
108 |
|
109 |
WCV_Shipping::$pps_shipping_costs = array();
|
110 |
|
111 |
+
foreach ( $order->get_items() as $key => $order_item ) {
|
112 |
|
113 |
+
$product_id = !empty( $order_item[ 'variation_id' ] ) ? $order_item[ 'variation_id' ] : $order_item[ 'product_id' ];
|
114 |
$author = WCV_Vendors::get_vendor_from_product( $product_id );
|
115 |
+
$give_tax_override = get_user_meta( $author, 'wcv_give_vendor_tax', true );
|
116 |
+
$give_shipping_override = get_user_meta( $author, 'wcv_give_vendor_shipping', true );
|
117 |
$is_vendor = WCV_Vendors::is_vendor( $author );
|
118 |
+
$commission = $is_vendor ? WCV_Commission::calculate_commission( $order_item[ 'line_subtotal' ], $product_id, $order, $order_item[ 'qty' ] ) : 0;
|
119 |
+
$tax = !empty( $order_item[ 'line_tax' ] ) ? (float) $order_item[ 'line_tax' ] : 0;
|
120 |
+
$order_id = $order->get_id();
|
121 |
+
|
122 |
// Check if shipping is enabled
|
123 |
+
if ( get_option('woocommerce_calc_shipping') === 'no' ) {
|
124 |
+
$shipping = 0; $shipping_tax = 0;
|
125 |
} else {
|
126 |
+
$shipping_costs = WCV_Shipping::get_shipping_due( $order_id, $order_item, $author, $product_id );
|
127 |
+
$shipping = $shipping_costs['amount'];
|
128 |
+
$shipping_tax = $shipping_costs['tax'];
|
129 |
}
|
|
|
|
|
130 |
|
131 |
+
$_product = new WC_Product( $order_item['product_id'] );
|
132 |
+
|
133 |
+
// Add line item tax and shipping taxes together
|
134 |
+
$total_tax = ( $_product->is_taxable() ) ? (float) $tax + (float) $shipping_tax : 0;
|
135 |
|
136 |
// Tax override on a per vendor basis
|
137 |
+
if ( $give_tax_override ) $give_tax = true;
|
138 |
+
// Shipping override
|
139 |
+
if ( $give_shipping_override ) $give_shipping = true;
|
140 |
|
141 |
if ( $is_vendor ) {
|
142 |
|
156 |
'commission' => !empty( $receiver[ $author ][ 'commission' ] ) ? $receiver[ $author ][ 'commission' ] + $commission : $commission,
|
157 |
'shipping' => $give_shipping ? ( !empty( $receiver[ $author ][ 'shipping' ] ) ? $receiver[ $author ][ 'shipping' ] + $shipping : $shipping) : 0,
|
158 |
'tax' => $give_tax ? ( !empty( $receiver[ $author ][ 'tax' ] ) ? $receiver[ $author ][ 'tax' ] + $total_tax : $total_tax ) : 0,
|
159 |
+
'qty' => !empty( $receiver[ $author ][ 'qty' ] ) ? $receiver[ $author ][ 'qty' ] + $order_item[ 'qty' ] : $order_item[ 'qty' ],
|
160 |
'total' => $give,
|
161 |
);
|
162 |
|
168 |
'commission' => $commission,
|
169 |
'shipping' => $give_shipping ? $shipping : 0,
|
170 |
'tax' => $give_tax ? $total_tax : 0,
|
171 |
+
'qty' => $order_item[ 'qty' ],
|
172 |
'total' => ($give_shipping ? $shipping : 0) + $commission + ( $give_tax ? $total_tax : 0 ),
|
173 |
);
|
174 |
|
176 |
|
177 |
}
|
178 |
|
179 |
+
$admin_comm = $order_item[ 'line_subtotal' ] - $commission;
|
180 |
|
181 |
if ( $group ) {
|
182 |
$receiver[ 1 ] = array(
|
183 |
'vendor_id' => 1,
|
184 |
+
'qty' => !empty( $receiver[ 1 ][ 'qty' ] ) ? $receiver[ 1 ][ 'qty' ] + $order_item[ 'qty' ] : $order_item[ 'qty' ],
|
185 |
'commission' => !empty( $receiver[ 1 ][ 'commission' ] ) ? $receiver[ 1 ][ 'commission' ] + $admin_comm : $admin_comm,
|
186 |
'total' => !empty( $receiver[ 1 ] ) ? $receiver[ 1 ][ 'total' ] + $admin_comm : $admin_comm,
|
187 |
);
|
192 |
'commission' => $admin_comm,
|
193 |
'shipping' => 0,
|
194 |
'tax' => 0,
|
195 |
+
'qty' => $order_item[ 'qty' ],
|
196 |
'total' => $admin_comm,
|
197 |
);
|
198 |
}
|
199 |
|
200 |
}
|
201 |
+
|
202 |
// Add remainders on end to admin
|
203 |
+
$discount = $order->get_total_discount();
|
204 |
$shipping = round( ( $order->get_total_shipping() - $shipping_given ), 2 );
|
205 |
+
$tax = round( $order->get_total_tax() - $tax_given, 2);
|
206 |
$total = ( $tax + $shipping ) - $discount;
|
207 |
|
208 |
if ( $group ) {
|
209 |
+
$r_total = round( $receiver[ 1 ][ 'total' ], 2 ) ;
|
210 |
$receiver[ 1 ][ 'commission' ] = round( $receiver[ 1 ][ 'commission' ], 2 ) - round( $discount, 2 );
|
211 |
$receiver[ 1 ][ 'shipping' ] = $shipping;
|
212 |
$receiver[ 1 ][ 'tax' ] = $tax;
|
213 |
$receiver[ 1 ][ 'total' ] = $r_total + round( $total, 2 );
|
214 |
} else {
|
215 |
+
$r_total = round( $receiver[ 1 ][ $key ][ 'total' ], 2 );
|
216 |
$receiver[ 1 ][ $key ][ 'commission' ] = round( $receiver[ 1 ][ $key ][ 'commission' ], 2 ) - round( $discount, 2 );
|
217 |
$receiver[ 1 ][ $key ][ 'shipping' ] = ( $order->get_total_shipping() - $shipping_given );
|
218 |
$receiver[ 1 ][ $key ][ 'tax' ] = $tax;
|
301 |
*/
|
302 |
public static function get_vendor_from_product( $product_id )
|
303 |
{
|
304 |
+
// Make sure we are returning an author for products or product variations only
|
305 |
+
if ( 'product' === get_post_type( $product_id ) || 'product_variation' === get_post_type( $product_id ) ) {
|
306 |
$parent = get_post_ancestors( $product_id );
|
307 |
if ( $parent ) $product_id = $parent[ 0 ];
|
308 |
|
309 |
$post = get_post( $product_id );
|
310 |
$author = $post ? $post->post_author : 1;
|
311 |
$author = apply_filters( 'pv_product_author', $author, $product_id );
|
312 |
+
} else {
|
313 |
+
$author = -1;
|
314 |
}
|
315 |
return $author;
|
316 |
}
|
323 |
*
|
324 |
* @return bool
|
325 |
*/
|
326 |
+
public static function is_vendor( $user_id ) {
|
|
|
|
|
327 |
|
328 |
+
$user = get_userdata( $user_id );
|
329 |
+
$vendor_roles = apply_filters( 'wcvendors_vendor_roles', array( 'vendor') );
|
330 |
+
$is_vendor = false;
|
331 |
+
|
332 |
+
if ( is_object( $user ) && is_array( $user->roles ) ) {
|
333 |
|
334 |
foreach ($vendor_roles as $role ) {
|
335 |
+
if ( in_array( $role , $user->roles ) ){
|
336 |
+
$is_vendor = true;
|
337 |
+
break;
|
338 |
+
}
|
339 |
}
|
|
|
|
|
|
|
340 |
}
|
341 |
|
342 |
return apply_filters( 'pv_is_vendor', $is_vendor, $user_id );
|
393 |
$vendor = !$slug ? get_userdata( $vendor_id )->user_login : $slug;
|
394 |
|
395 |
if ( get_option( 'permalink_structure' ) ) {
|
396 |
+
$permalink = trailingslashit( get_option( 'wcvendors_vendor_shop_permalink' ) );
|
397 |
|
398 |
return trailingslashit( home_url( sprintf( '/%s%s', $permalink, $vendor ) ) );
|
399 |
} else {
|
436 |
return $is_pending;
|
437 |
}
|
438 |
|
439 |
+
/*
|
440 |
+
* Is this a vendor product ?
|
441 |
+
* @param uknown $role
|
442 |
+
*/
|
443 |
+
public static function is_vendor_product($role) {
|
444 |
+
return ($role === 'Vendor') ? true : false;
|
445 |
}
|
446 |
|
447 |
+
/*
|
448 |
+
* Is this the vendors shop archive page ?
|
449 |
*/
|
450 |
+
public static function is_vendor_page() {
|
451 |
|
452 |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) );
|
453 |
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop );
|
454 |
|
455 |
+
return $vendor_id ? true : false;
|
456 |
|
457 |
} // is_vendor_page()
|
458 |
|
459 |
+
/*
|
460 |
+
* Is this a vendor single product page ?
|
461 |
*/
|
462 |
+
public static function is_vendor_product_page($vendor_id) {
|
463 |
|
464 |
+
$vendor_product = WCV_Vendors::is_vendor_product( wcv_get_user_role($vendor_id) );
|
465 |
+
return $vendor_product ? true : false;
|
466 |
|
467 |
} // is_vendor_product_page()
|
468 |
|
469 |
+
public static function get_vendor_sold_by( $vendor_id ){
|
470 |
|
471 |
+
$vendor_display_name = get_option( 'wcvendors_display_shop_display_name' );
|
472 |
+
$vendor = get_userdata( $vendor_id );
|
473 |
|
474 |
switch ($vendor_display_name) {
|
475 |
case 'display_name':
|
476 |
$display_name = $vendor->display_name;
|
477 |
break;
|
478 |
+
case 'user_login':
|
479 |
$display_name = $vendor->user_login;
|
480 |
break;
|
481 |
+
case 'user_email':
|
482 |
$display_name = $vendor->user_email;
|
483 |
break;
|
484 |
|
485 |
default:
|
486 |
+
$display_name = WCV_Vendors::get_vendor_shop_name( $vendor_id );
|
487 |
break;
|
488 |
}
|
489 |
|
494 |
/**
|
495 |
* Split order into vendor orders (when applicable) after checkout
|
496 |
*
|
497 |
+
* @since
|
498 |
* @param int $order_id
|
499 |
* @return void
|
500 |
*/
|
539 |
*
|
540 |
* Returns a new vendor_order object on success which can then be used to add additional data.
|
541 |
*
|
542 |
+
* @since
|
543 |
* @param array $args
|
544 |
* @return WC_Order_Vendor|WP_Error
|
545 |
*/
|
588 |
$vendor_order = wc_get_order( $vendor_order_id );
|
589 |
$order = wc_get_order( $args['order_id'] );
|
590 |
|
591 |
+
$order_currency = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->get_order_currency() : $order->get_currency();
|
592 |
|
593 |
// Order currency is the same used for the parent order
|
594 |
update_post_meta( $vendor_order_id, '_order_currency', $order_currency );
|
688 |
} // get_vendor_orders()
|
689 |
|
690 |
/**
|
691 |
+
* Find the parent product id if the variation has been deleted
|
692 |
+
*
|
693 |
* @since 1.9.13
|
694 |
+
* @access public
|
695 |
*/
|
696 |
+
public static function find_parent_id_from_order( $order_id, $product_id ){
|
697 |
|
698 |
+
global $wpdb;
|
699 |
|
700 |
+
$order_item_id_sql = "SELECT `order_item_id` FROM {$wpdb->prefix}woocommerce_order_items WHERE order_id = $order_id AND `order_item_type` = 'line_item'";
|
701 |
|
702 |
+
$order_item_ids = $wpdb->get_results( $order_item_id_sql );
|
703 |
|
704 |
foreach ( $order_item_ids as $key => $order_item ) {
|
705 |
|
706 |
$item_product_id = get_metadata( 'order_item', $order_item->order_item_id, '_product_id', true );
|
707 |
+
$item_variation_id = get_metadata( 'order_item', $order_item->order_item_id, '_variation_id', true );
|
708 |
|
709 |
if ( $item_variation_id == $product_id ){
|
710 |
+
return $item_product_id;
|
711 |
}
|
712 |
}
|
713 |
|
714 |
+
return $product_id;
|
715 |
|
716 |
}
|
717 |
|
718 |
+
} // WCV_Vendors
|
classes/front/class-vendor-cart.php
CHANGED
@@ -18,16 +18,16 @@ class WCV_Vendor_Cart
|
|
18 |
function __construct()
|
19 |
{
|
20 |
|
21 |
-
if (
|
22 |
add_filter( 'woocommerce_get_item_data', array( 'WCV_Vendor_Cart', 'sold_by' ), 10, 2 );
|
23 |
add_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 );
|
24 |
}
|
25 |
-
|
26 |
}
|
27 |
|
28 |
|
29 |
/**
|
30 |
-
* Sold by in cart item
|
31 |
*
|
32 |
* @param unknown $values
|
33 |
* @param unknown $cart_item
|
@@ -37,9 +37,9 @@ class WCV_Vendor_Cart
|
|
37 |
public static function sold_by( $values, $cart_item ){
|
38 |
|
39 |
$product_id = $cart_item[ 'product_id'];
|
40 |
-
$post = get_post( $product_id );
|
41 |
-
$vendor_id = $post->post_author;
|
42 |
-
$sold_by_label =
|
43 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
44 |
? sprintf( '<a href="%s" target="_TOP">%s </a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
45 |
: get_bloginfo( 'name' );
|
@@ -54,12 +54,12 @@ class WCV_Vendor_Cart
|
|
54 |
|
55 |
|
56 |
/**
|
57 |
-
* Single product meta
|
58 |
*/
|
59 |
public static function sold_by_meta()
|
60 |
{
|
61 |
$vendor_id = get_the_author_meta( 'ID' );
|
62 |
-
$sold_by_label =
|
63 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
64 |
? sprintf( '<a href="%s" class="wcvendors_cart_sold_by_meta">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
65 |
: get_bloginfo( 'name' );
|
18 |
function __construct()
|
19 |
{
|
20 |
|
21 |
+
if ( get_option( 'wcvendors_display_label_sold_by_enable' ) ) {
|
22 |
add_filter( 'woocommerce_get_item_data', array( 'WCV_Vendor_Cart', 'sold_by' ), 10, 2 );
|
23 |
add_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 );
|
24 |
}
|
25 |
+
|
26 |
}
|
27 |
|
28 |
|
29 |
/**
|
30 |
+
* Sold by in cart item
|
31 |
*
|
32 |
* @param unknown $values
|
33 |
* @param unknown $cart_item
|
37 |
public static function sold_by( $values, $cart_item ){
|
38 |
|
39 |
$product_id = $cart_item[ 'product_id'];
|
40 |
+
$post = get_post( $product_id );
|
41 |
+
$vendor_id = $post->post_author;
|
42 |
+
$sold_by_label = get_option( 'wcvendors_label_sold_by' );
|
43 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
44 |
? sprintf( '<a href="%s" target="_TOP">%s </a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
45 |
: get_bloginfo( 'name' );
|
54 |
|
55 |
|
56 |
/**
|
57 |
+
* Single product meta
|
58 |
*/
|
59 |
public static function sold_by_meta()
|
60 |
{
|
61 |
$vendor_id = get_the_author_meta( 'ID' );
|
62 |
+
$sold_by_label = get_option( 'wcvendors_label_sold_by' );
|
63 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
64 |
? sprintf( '<a href="%s" class="wcvendors_cart_sold_by_meta">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
65 |
: get_bloginfo( 'name' );
|
classes/front/class-vendor-shop.php
CHANGED
@@ -29,29 +29,23 @@ class WCV_Vendor_Shop
|
|
29 |
add_filter( 'post_type_archive_link', array( 'WCV_Vendor_Shop', 'change_archive_link' ) );
|
30 |
|
31 |
// Add sold by to product loop before add to cart
|
32 |
-
if (
|
33 |
add_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 );
|
34 |
-
}
|
35 |
-
|
36 |
-
// Remove Page Title if on Vendor Shop
|
37 |
-
add_filter ( 'woocommerce_show_page_title', array( 'WCV_Vendor_Shop', 'remove_vendor_title' ) );
|
38 |
-
|
39 |
-
// Show vendor on all sales related invoices
|
40 |
-
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
|
41 |
-
|
42 |
-
add_action( 'woocommerce_add_order_item_meta', array( $this, 'add_vendor_to_order_item_meta_legacy' ), 50, 2 );
|
43 |
|
44 |
-
|
|
|
45 |
|
46 |
-
|
|
|
47 |
|
48 |
-
// Add a vendor header
|
49 |
-
if (
|
50 |
-
add_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'vendor_main_header'), 20 );
|
51 |
-
add_action( 'woocommerce_before_single_product', array('WCV_Vendor_Shop', 'vendor_mini_header'));
|
52 |
}
|
53 |
|
54 |
-
add_filter( 'document_title_parts', array( $this, 'vendor_page_title' ) );
|
55 |
|
56 |
}
|
57 |
|
@@ -116,17 +110,17 @@ class WCV_Vendor_Shop
|
|
116 |
|
117 |
$seller_info = get_user_meta( $post->post_author, 'pv_seller_info', true );
|
118 |
$has_html = get_user_meta( $post->post_author, 'pv_shop_html_enabled', true );
|
119 |
-
$global_html =
|
120 |
|
121 |
-
$seller_info_label =
|
122 |
|
123 |
if ( !empty( $seller_info ) ) {
|
124 |
|
125 |
$seller_info = do_shortcode( $seller_info );
|
126 |
self::$seller_info = '<div class="pv_seller_info">';
|
127 |
-
self::$seller_info .= apply_filters('wcv_before_seller_info_tab', '');
|
128 |
self::$seller_info .= ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $seller_info ) ) ) : sanitize_text_field( $seller_info );
|
129 |
-
self::$seller_info .= apply_filters('wcv_after_seller_info_tab', '');
|
130 |
self::$seller_info .= '</div>';
|
131 |
|
132 |
$tabs[ 'seller_info' ] = array(
|
@@ -160,7 +154,7 @@ class WCV_Vendor_Shop
|
|
160 |
|
161 |
if ( $vendor_id ) {
|
162 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
163 |
-
$global_html =
|
164 |
$description = do_shortcode( get_user_meta( $vendor_id, 'pv_shop_description', true ) );
|
165 |
|
166 |
echo '<div class="pv_shop_description">';
|
@@ -174,7 +168,7 @@ class WCV_Vendor_Shop
|
|
174 |
*/
|
175 |
public static function add_rewrite_rules()
|
176 |
{
|
177 |
-
$permalink = untrailingslashit(
|
178 |
|
179 |
// Remove beginning slash
|
180 |
if ( substr( $permalink, 0, 1 ) == '/' ) {
|
@@ -197,180 +191,180 @@ class WCV_Vendor_Shop
|
|
197 |
}
|
198 |
|
199 |
|
200 |
-
/*
|
201 |
Adding sold by to product loop
|
202 |
*/
|
203 |
-
public static function template_loop_sold_by($product_id) {
|
204 |
$vendor_id = WCV_Vendors::get_vendor_from_product( $product_id );
|
205 |
-
$sold_by_label =
|
206 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
207 |
? sprintf( '<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
208 |
: get_bloginfo( 'name' );
|
209 |
-
|
210 |
wc_get_template( 'vendor-sold-by.php', array(
|
211 |
-
'vendor_id' => $vendor_id,
|
212 |
-
'sold_by_label' => $sold_by_label,
|
213 |
-
'sold_by' => $sold_by,
|
214 |
-
|
215 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
216 |
|
217 |
}
|
218 |
|
219 |
|
220 |
-
/*
|
221 |
* Remove the Page title from Archive-Product while on a vendor Page
|
222 |
-
*/
|
223 |
-
public static function remove_vendor_title( $b ) {
|
224 |
-
|
225 |
-
if ( WCV_Vendors::is_vendor_page() ) {
|
226 |
-
return false;
|
227 |
}
|
228 |
return $b;
|
229 |
}
|
230 |
|
231 |
-
/*
|
232 |
* Display a vendor header at the top of the vendors product archive page
|
233 |
*/
|
234 |
-
public static function vendor_main_header() {
|
235 |
|
236 |
-
// Remove the basic shop description from the loop
|
237 |
remove_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'shop_description' ), 30);
|
238 |
|
239 |
-
if (WCV_Vendors::is_vendor_page()) {
|
240 |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) );
|
241 |
-
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop );
|
242 |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true );
|
243 |
|
244 |
-
// Shop description
|
245 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
246 |
-
$global_html =
|
247 |
$description = do_shortcode( get_user_meta( $vendor_id, 'pv_shop_description', true ) );
|
248 |
$shop_description = ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $description ) ) ) : sanitize_text_field( $description );
|
249 |
$seller_info = ( $global_html || $has_html ) ? wpautop( get_user_meta( $vendor_id, 'pv_seller_info', true ) ) : sanitize_text_field( get_user_meta( $vendor_id, 'pv_seller_info', true ) );
|
250 |
$vendor = get_userdata( $vendor_id );
|
251 |
$vendor_email = $vendor->user_email;
|
252 |
$vendor_login = $vendor->user_login;
|
253 |
-
|
254 |
-
|
255 |
-
do_action('wcv_before_main_header', $vendor_id);
|
256 |
|
257 |
wc_get_template( 'vendor-main-header.php', array(
|
258 |
'vendor' => $vendor,
|
259 |
-
'vendor_id' => $vendor_id,
|
260 |
-
'shop_name' => $shop_name,
|
261 |
-
'shop_description' => $shop_description,
|
262 |
-
'seller_info' => $seller_info,
|
263 |
'vendor_email' => $vendor_email,
|
264 |
'vendor_login' => $vendor_login,
|
265 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
266 |
|
267 |
-
do_action('wcv_after_main_header', $vendor_id);
|
268 |
|
269 |
}
|
270 |
}
|
271 |
|
272 |
|
273 |
-
/*
|
274 |
-
* Display a vendor header at the top of the single-product page
|
275 |
*/
|
276 |
-
public static function vendor_mini_header() {
|
277 |
|
278 |
-
global $product;
|
279 |
|
280 |
-
$post = get_post( $product->get_id() );
|
281 |
|
282 |
-
if ( WCV_Vendors::is_vendor_product_page( $post->post_author ) ) {
|
283 |
-
|
284 |
-
$vendor = get_userdata( $post->post_author );
|
285 |
$vendor_id = $post->post_author;
|
286 |
-
$vendor_shop_link = site_url(
|
287 |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true );
|
288 |
$has_html = $vendor->pv_shop_html_enabled;
|
289 |
-
$global_html =
|
290 |
$description = do_shortcode( $vendor->pv_shop_description );
|
291 |
$shop_description = ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $description ) ) ) : sanitize_text_field( $description );
|
292 |
$seller_info = ( $global_html || $has_html ) ? wpautop( get_user_meta( $vendor_id, 'pv_seller_info', true ) ) : sanitize_text_field( get_user_meta( $vendor_id, 'pv_seller_info', true ) );
|
293 |
$vendor_email = $vendor->user_email;
|
294 |
$vendor_login = $vendor->user_login;
|
295 |
-
|
296 |
do_action('wcv_before_mini_header', $vendor->ID);
|
297 |
|
298 |
wc_get_template( 'vendor-mini-header.php', array(
|
299 |
-
'vendor' => $vendor,
|
300 |
'vendor_id' => $vendor_id,
|
301 |
-
'vendor_shop_link' => $vendor_shop_link,
|
302 |
-
'shop_name' => $vendor->pv_shop_name,
|
303 |
-
'shop_description' => $shop_description,
|
304 |
-
'seller_info' => $seller_info,
|
305 |
'shop_name' => $shop_name,
|
306 |
'vendor_email' => $vendor_email,
|
307 |
'vendor_login' => $vendor_login,
|
308 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
309 |
-
|
310 |
-
do_action('wcv_after_mini_header', $vendor->ID);
|
311 |
|
312 |
}
|
313 |
}
|
314 |
|
315 |
-
/*
|
316 |
* Add Vendor to Order item Meta legacy
|
317 |
-
* Thanks to Asbjoern Andersen for the code
|
318 |
*
|
319 |
-
* @depreciated
|
320 |
-
*/
|
321 |
-
public static function add_vendor_to_order_item_meta_legacy( $item_id, $cart_item) {
|
322 |
|
323 |
-
if (
|
324 |
|
325 |
-
$vendor_id = $cart_item[ 'data' ]->post->post_author;
|
326 |
-
$sold_by_label =
|
327 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id ) ? sprintf( WCV_Vendors::get_vendor_sold_by( $vendor_id ) ): get_bloginfo( 'name' );
|
328 |
|
329 |
-
wc_add_order_item_meta( $item_id, apply_filters( 'wcvendors_sold_by_in_email', $sold_by_label ), $sold_by );
|
330 |
}
|
331 |
}
|
332 |
|
333 |
|
334 |
/**
|
335 |
-
* Add vendor to order item meta WC2.7 and above
|
336 |
-
*
|
337 |
* @since 1.9.9
|
338 |
-
* @access public
|
339 |
*/
|
340 |
public function add_vendor_to_order_item_meta( $item, $cart_item_key, $values ) {
|
341 |
|
342 |
-
if (
|
343 |
|
344 |
$cart = WC()->cart->get_cart();
|
345 |
-
$cart_item = $cart[ $cart_item_key ];
|
346 |
$product_id = $cart_item[ 'product_id'];
|
347 |
-
$post = get_post( $product_id );
|
348 |
-
$vendor_id = $post->post_author;
|
349 |
-
$sold_by_label =
|
350 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id ) ? sprintf( WCV_Vendors::get_vendor_sold_by( $vendor_id ) ): get_bloginfo( 'name' );
|
351 |
|
352 |
$item->add_meta_data( apply_filters( 'wcvendors_sold_by_in_email', $sold_by_label ), $sold_by );
|
353 |
}
|
354 |
|
355 |
|
356 |
-
} // add_vendor_to_order_item_meta()
|
357 |
|
358 |
|
359 |
/**
|
360 |
* Add the Vendor shop name to the <title> tag on archive and single product page
|
361 |
-
*
|
362 |
-
* @since 1.9.9
|
363 |
*/
|
364 |
-
public function vendor_page_title( $title ){
|
365 |
|
366 |
-
if ( WCV_Vendors::is_vendor_page() ) {
|
|
|
|
|
|
|
367 |
|
368 |
-
|
369 |
-
}
|
370 |
-
|
371 |
-
return $title;
|
372 |
|
373 |
} // vendor_page_title
|
374 |
|
375 |
|
376 |
-
}
|
29 |
add_filter( 'post_type_archive_link', array( 'WCV_Vendor_Shop', 'change_archive_link' ) );
|
30 |
|
31 |
// Add sold by to product loop before add to cart
|
32 |
+
if ( apply_filters( 'wcvendors_disable_sold_by_labels', get_option( 'wcvendors_display_label_sold_by_enable' ) ) ) {
|
33 |
add_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 );
|
34 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
// Remove Page Title if on Vendor Shop
|
37 |
+
add_filter ( 'woocommerce_show_page_title', array( 'WCV_Vendor_Shop', 'remove_vendor_title' ) );
|
38 |
|
39 |
+
// Show vendor on all sales related invoices
|
40 |
+
add_action( 'woocommerce_checkout_create_order_line_item', array( $this, 'add_vendor_to_order_item_meta' ), 50, 3 );
|
41 |
|
42 |
+
// Add a vendor header
|
43 |
+
if ( apply_filters( 'wcvendors_disable_shop_headers', get_option( 'wcvendors_display_shop_headers' ) ) ) {
|
44 |
+
add_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'vendor_main_header'), 20 );
|
45 |
+
add_action( 'woocommerce_before_single_product', array('WCV_Vendor_Shop', 'vendor_mini_header'));
|
46 |
}
|
47 |
|
48 |
+
add_filter( 'document_title_parts', array( $this, 'vendor_page_title' ) );
|
49 |
|
50 |
}
|
51 |
|
110 |
|
111 |
$seller_info = get_user_meta( $post->post_author, 'pv_seller_info', true );
|
112 |
$has_html = get_user_meta( $post->post_author, 'pv_shop_html_enabled', true );
|
113 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
114 |
|
115 |
+
$seller_info_label = get_option( 'wcvendors_display_label_store_info' );
|
116 |
|
117 |
if ( !empty( $seller_info ) ) {
|
118 |
|
119 |
$seller_info = do_shortcode( $seller_info );
|
120 |
self::$seller_info = '<div class="pv_seller_info">';
|
121 |
+
self::$seller_info .= apply_filters('wcv_before_seller_info_tab', '');
|
122 |
self::$seller_info .= ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $seller_info ) ) ) : sanitize_text_field( $seller_info );
|
123 |
+
self::$seller_info .= apply_filters('wcv_after_seller_info_tab', '');
|
124 |
self::$seller_info .= '</div>';
|
125 |
|
126 |
$tabs[ 'seller_info' ] = array(
|
154 |
|
155 |
if ( $vendor_id ) {
|
156 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
157 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
158 |
$description = do_shortcode( get_user_meta( $vendor_id, 'pv_shop_description', true ) );
|
159 |
|
160 |
echo '<div class="pv_shop_description">';
|
168 |
*/
|
169 |
public static function add_rewrite_rules()
|
170 |
{
|
171 |
+
$permalink = untrailingslashit( get_option( 'wcvendors_vendor_shop_permalink' ) );
|
172 |
|
173 |
// Remove beginning slash
|
174 |
if ( substr( $permalink, 0, 1 ) == '/' ) {
|
191 |
}
|
192 |
|
193 |
|
194 |
+
/*
|
195 |
Adding sold by to product loop
|
196 |
*/
|
197 |
+
public static function template_loop_sold_by($product_id) {
|
198 |
$vendor_id = WCV_Vendors::get_vendor_from_product( $product_id );
|
199 |
+
$sold_by_label = get_option( 'wcvendors_label_sold_by' );
|
200 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id )
|
201 |
? sprintf( '<a href="%s">%s</a>', WCV_Vendors::get_vendor_shop_page( $vendor_id ), WCV_Vendors::get_vendor_sold_by( $vendor_id ) )
|
202 |
: get_bloginfo( 'name' );
|
203 |
+
|
204 |
wc_get_template( 'vendor-sold-by.php', array(
|
205 |
+
'vendor_id' => $vendor_id,
|
206 |
+
'sold_by_label' => $sold_by_label,
|
207 |
+
'sold_by' => $sold_by,
|
208 |
+
|
209 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
210 |
|
211 |
}
|
212 |
|
213 |
|
214 |
+
/*
|
215 |
* Remove the Page title from Archive-Product while on a vendor Page
|
216 |
+
*/
|
217 |
+
public static function remove_vendor_title( $b ) {
|
218 |
+
|
219 |
+
if ( WCV_Vendors::is_vendor_page() ) {
|
220 |
+
return false;
|
221 |
}
|
222 |
return $b;
|
223 |
}
|
224 |
|
225 |
+
/*
|
226 |
* Display a vendor header at the top of the vendors product archive page
|
227 |
*/
|
228 |
+
public static function vendor_main_header() {
|
229 |
|
230 |
+
// Remove the basic shop description from the loop
|
231 |
remove_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'shop_description' ), 30);
|
232 |
|
233 |
+
if (WCV_Vendors::is_vendor_page()) {
|
234 |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) );
|
235 |
+
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop );
|
236 |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true );
|
237 |
|
238 |
+
// Shop description
|
239 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
240 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
241 |
$description = do_shortcode( get_user_meta( $vendor_id, 'pv_shop_description', true ) );
|
242 |
$shop_description = ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $description ) ) ) : sanitize_text_field( $description );
|
243 |
$seller_info = ( $global_html || $has_html ) ? wpautop( get_user_meta( $vendor_id, 'pv_seller_info', true ) ) : sanitize_text_field( get_user_meta( $vendor_id, 'pv_seller_info', true ) );
|
244 |
$vendor = get_userdata( $vendor_id );
|
245 |
$vendor_email = $vendor->user_email;
|
246 |
$vendor_login = $vendor->user_login;
|
247 |
+
|
248 |
+
|
249 |
+
do_action('wcv_before_main_header', $vendor_id);
|
250 |
|
251 |
wc_get_template( 'vendor-main-header.php', array(
|
252 |
'vendor' => $vendor,
|
253 |
+
'vendor_id' => $vendor_id,
|
254 |
+
'shop_name' => $shop_name,
|
255 |
+
'shop_description' => $shop_description,
|
256 |
+
'seller_info' => $seller_info,
|
257 |
'vendor_email' => $vendor_email,
|
258 |
'vendor_login' => $vendor_login,
|
259 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
260 |
|
261 |
+
do_action('wcv_after_main_header', $vendor_id);
|
262 |
|
263 |
}
|
264 |
}
|
265 |
|
266 |
|
267 |
+
/*
|
268 |
+
* Display a vendor header at the top of the single-product page
|
269 |
*/
|
270 |
+
public static function vendor_mini_header() {
|
271 |
|
272 |
+
global $product;
|
273 |
|
274 |
+
$post = get_post( $product->get_id() );
|
275 |
|
276 |
+
if ( WCV_Vendors::is_vendor_product_page( $post->post_author ) ) {
|
277 |
+
|
278 |
+
$vendor = get_userdata( $post->post_author );
|
279 |
$vendor_id = $post->post_author;
|
280 |
+
$vendor_shop_link = site_url( get_option( 'wcvendors_vendor_approve_registration' ) .'/' .$vendor->pv_shop_slug );
|
281 |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true );
|
282 |
$has_html = $vendor->pv_shop_html_enabled;
|
283 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
284 |
$description = do_shortcode( $vendor->pv_shop_description );
|
285 |
$shop_description = ( $global_html || $has_html ) ? wpautop( wptexturize( wp_kses_post( $description ) ) ) : sanitize_text_field( $description );
|
286 |
$seller_info = ( $global_html || $has_html ) ? wpautop( get_user_meta( $vendor_id, 'pv_seller_info', true ) ) : sanitize_text_field( get_user_meta( $vendor_id, 'pv_seller_info', true ) );
|
287 |
$vendor_email = $vendor->user_email;
|
288 |
$vendor_login = $vendor->user_login;
|
289 |
+
|
290 |
do_action('wcv_before_mini_header', $vendor->ID);
|
291 |
|
292 |
wc_get_template( 'vendor-mini-header.php', array(
|
293 |
+
'vendor' => $vendor,
|
294 |
'vendor_id' => $vendor_id,
|
295 |
+
'vendor_shop_link' => $vendor_shop_link,
|
296 |
+
'shop_name' => $vendor->pv_shop_name,
|
297 |
+
'shop_description' => $shop_description,
|
298 |
+
'seller_info' => $seller_info,
|
299 |
'shop_name' => $shop_name,
|
300 |
'vendor_email' => $vendor_email,
|
301 |
'vendor_login' => $vendor_login,
|
302 |
), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/' );
|
303 |
+
|
304 |
+
do_action('wcv_after_mini_header', $vendor->ID);
|
305 |
|
306 |
}
|
307 |
}
|
308 |
|
309 |
+
/*
|
310 |
* Add Vendor to Order item Meta legacy
|
311 |
+
* Thanks to Asbjoern Andersen for the code
|
312 |
*
|
313 |
+
* @depreciated
|
314 |
+
*/
|
315 |
+
public static function add_vendor_to_order_item_meta_legacy( $item_id, $cart_item) {
|
316 |
|
317 |
+
if ( get_option( 'wcvendors_display_label_sold_by_enable' ) ) {
|
318 |
|
319 |
+
$vendor_id = $cart_item[ 'data' ]->post->post_author;
|
320 |
+
$sold_by_label = get_option( 'wcvendors_label_sold_by' );
|
321 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id ) ? sprintf( WCV_Vendors::get_vendor_sold_by( $vendor_id ) ): get_bloginfo( 'name' );
|
322 |
|
323 |
+
wc_add_order_item_meta( $item_id, apply_filters( 'wcvendors_sold_by_in_email', $sold_by_label ), $sold_by );
|
324 |
}
|
325 |
}
|
326 |
|
327 |
|
328 |
/**
|
329 |
+
* Add vendor to order item meta WC2.7 and above
|
330 |
+
*
|
331 |
* @since 1.9.9
|
332 |
+
* @access public
|
333 |
*/
|
334 |
public function add_vendor_to_order_item_meta( $item, $cart_item_key, $values ) {
|
335 |
|
336 |
+
if ( get_option( 'wcvendors_display_label_sold_by_enable' ) ) {
|
337 |
|
338 |
$cart = WC()->cart->get_cart();
|
339 |
+
$cart_item = $cart[ $cart_item_key ];
|
340 |
$product_id = $cart_item[ 'product_id'];
|
341 |
+
$post = get_post( $product_id );
|
342 |
+
$vendor_id = $post->post_author;
|
343 |
+
$sold_by_label = get_option( 'wcvendors_label_sold_by' );
|
344 |
$sold_by = WCV_Vendors::is_vendor( $vendor_id ) ? sprintf( WCV_Vendors::get_vendor_sold_by( $vendor_id ) ): get_bloginfo( 'name' );
|
345 |
|
346 |
$item->add_meta_data( apply_filters( 'wcvendors_sold_by_in_email', $sold_by_label ), $sold_by );
|
347 |
}
|
348 |
|
349 |
|
350 |
+
} // add_vendor_to_order_item_meta()
|
351 |
|
352 |
|
353 |
/**
|
354 |
* Add the Vendor shop name to the <title> tag on archive and single product page
|
355 |
+
*
|
356 |
+
* @since 1.9.9
|
357 |
*/
|
358 |
+
public function vendor_page_title( $title ){
|
359 |
|
360 |
+
if ( WCV_Vendors::is_vendor_page() ) {
|
361 |
+
|
362 |
+
$title[ 'title' ] = self::page_title();
|
363 |
+
}
|
364 |
|
365 |
+
return $title;
|
|
|
|
|
|
|
366 |
|
367 |
} // vendor_page_title
|
368 |
|
369 |
|
370 |
+
}
|
classes/front/dashboard/class-vendor-dashboard.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
* WCV Vendor Dashboard
|
5 |
*
|
6 |
* @author Matt Gates <http://mgates.me>
|
7 |
* @author Jamie Madden <http://wcvendors.com>
|
8 |
-
* @package WCVendors
|
9 |
*/
|
10 |
|
11 |
|
@@ -27,32 +27,37 @@ class WCV_Vendor_Dashboard
|
|
27 |
|
28 |
public function save_vendor_settings()
|
29 |
{
|
30 |
-
global $woocommerce;
|
31 |
-
|
32 |
$user_id = get_current_user_id();
|
33 |
|
34 |
if ( !empty( $_GET['wc_pv_mark_shipped'] ) ) {
|
35 |
-
|
36 |
-
$
|
37 |
-
$
|
38 |
-
$
|
|
|
|
|
39 |
if ( !in_array( $user_id, $vendor_ids ) ) {
|
40 |
-
|
41 |
-
return null;
|
42 |
}
|
|
|
43 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
44 |
|
45 |
-
// If not in the shippers array mark as shipped otherwise do nothing.
|
46 |
if( !in_array($user_id, $shippers)) {
|
|
|
47 |
$shippers[] = $user_id;
|
48 |
-
|
49 |
if ( !empty( $mails ) ) {
|
50 |
-
|
51 |
}
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
54 |
$shop_name = WCV_Vendors::get_vendor_shop_name( $user_id );
|
55 |
-
$order->add_order_note( apply_filters( 'wcvendors_vendor_shipped_note', sprintf( __( '%s has marked as shipped. ', '
|
|
|
56 |
} elseif ( false != ( $key = array_search( $user_id, $shippers) ) ) {
|
57 |
unset( $shippers[$key] ); // Remove user from the shippers array
|
58 |
}
|
@@ -80,10 +85,10 @@ class WCV_Vendor_Dashboard
|
|
80 |
}
|
81 |
}
|
82 |
if ( $order_item_id ) {
|
83 |
-
wc_delete_order_item_meta( $order_item_id, __( 'Tracking number', '
|
84 |
-
wc_add_order_item_meta( $order_item_id, __( 'Tracking number', '
|
85 |
|
86 |
-
$message = __( 'Success. Your tracking number has been updated.', '
|
87 |
wc_add_notice( $message, 'success' );
|
88 |
|
89 |
// Update order data
|
@@ -100,25 +105,27 @@ class WCV_Vendor_Dashboard
|
|
100 |
return false;
|
101 |
}
|
102 |
|
103 |
-
if (isset ( $_POST[ 'wc-product-vendor-nonce' ] ) ) {
|
104 |
|
105 |
if ( !wp_verify_nonce( $_POST[ 'wc-product-vendor-nonce' ], 'save-shop-settings' ) ) {
|
106 |
return false;
|
107 |
}
|
108 |
|
109 |
|
110 |
-
if ( isset( $_POST[ 'pv_paypal' ] ) ) {
|
111 |
if ( !is_email( $_POST[ 'pv_paypal' ] ) ) {
|
112 |
-
wc_add_notice( __( 'Your PayPal address is not a valid email address.', '
|
113 |
} else {
|
114 |
update_user_meta( $user_id, 'pv_paypal', $_POST[ 'pv_paypal' ] );
|
115 |
}
|
|
|
|
|
116 |
}
|
117 |
|
118 |
if ( !empty( $_POST[ 'pv_shop_name' ] ) ) {
|
119 |
$users = get_users( array( 'meta_key' => 'pv_shop_slug', 'meta_value' => sanitize_title( $_POST[ 'pv_shop_name' ] ) ) );
|
120 |
if ( !empty( $users ) && $users[ 0 ]->ID != $user_id ) {
|
121 |
-
wc_add_notice( __( 'That shop name is already taken. Your shop name must be unique.', '
|
122 |
} else {
|
123 |
update_user_meta( $user_id, 'pv_shop_name', $_POST[ 'pv_shop_name' ] );
|
124 |
update_user_meta( $user_id, 'pv_shop_slug', sanitize_title( $_POST[ 'pv_shop_name' ] ) );
|
@@ -127,16 +134,39 @@ class WCV_Vendor_Dashboard
|
|
127 |
|
128 |
if ( isset( $_POST[ 'pv_shop_description' ] ) ) {
|
129 |
update_user_meta( $user_id, 'pv_shop_description', $_POST[ 'pv_shop_description' ] );
|
|
|
|
|
130 |
}
|
131 |
|
132 |
if ( isset( $_POST[ 'pv_seller_info' ] ) ) {
|
133 |
update_user_meta( $user_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
do_action( 'wcvendors_shop_settings_saved', $user_id );
|
137 |
|
138 |
if ( !wc_notice_count() ) {
|
139 |
-
wc_add_notice( __( 'Settings saved.', '
|
140 |
}
|
141 |
}
|
142 |
}
|
@@ -147,8 +177,8 @@ class WCV_Vendor_Dashboard
|
|
147 |
*/
|
148 |
public function check_access()
|
149 |
{
|
150 |
-
$vendor_dashboard_page =
|
151 |
-
$shop_settings_page =
|
152 |
|
153 |
if ( $vendor_dashboard_page && is_page( $vendor_dashboard_page ) || $shop_settings_page && is_page( $shop_settings_page ) ) {
|
154 |
if ( !is_user_logged_in() ) {
|
@@ -156,8 +186,8 @@ class WCV_Vendor_Dashboard
|
|
156 |
exit;
|
157 |
}
|
158 |
}
|
159 |
-
|
160 |
-
} //check_access()
|
161 |
|
162 |
|
163 |
/**
|
@@ -174,9 +204,9 @@ class WCV_Vendor_Dashboard
|
|
174 |
$start_date = !empty( $_SESSION[ 'PV_Session' ][ 'start_date' ] ) ? $_SESSION[ 'PV_Session' ][ 'start_date' ] : strtotime( date( 'Ymd', strtotime( date( 'Ym', current_time( 'timestamp' ) ) . '01' ) ) );
|
175 |
$end_date = !empty( $_SESSION[ 'PV_Session' ][ 'end_date' ] ) ? $_SESSION[ 'PV_Session' ][ 'end_date' ] : strtotime( date( 'Ymd', current_time( 'timestamp' ) ) );
|
176 |
|
177 |
-
$can_view_orders =
|
178 |
-
$settings_page = get_permalink(
|
179 |
-
$can_submit =
|
180 |
$submit_link = ( $can_submit ) ? admin_url( 'post-new.php?post_type=product' ) : '';
|
181 |
$edit_link = ( $can_submit ) ? admin_url( 'edit.php?post_type=product' ) : '';
|
182 |
|
@@ -201,12 +231,12 @@ class WCV_Vendor_Dashboard
|
|
201 |
|
202 |
wp_enqueue_style( 'wcv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css' );
|
203 |
|
204 |
-
$providers = array();
|
205 |
-
$provider_array = array();
|
206 |
|
207 |
// WC Shipment Tracking Providers
|
208 |
if ( class_exists( 'WC_Shipment_Tracking' ) ) {
|
209 |
-
$WC_Shipment_Tracking = new WC_Shipment_Tracking();
|
210 |
$providers = (method_exists($WC_Shipment_Tracking, 'get_providers')) ? $WC_Shipment_Tracking->get_providers() : $WC_Shipment_Tracking->providers;
|
211 |
$provider_array = array();
|
212 |
foreach ( $providers as $all_providers ) {
|
@@ -228,7 +258,7 @@ class WCV_Vendor_Dashboard
|
|
228 |
'edit_link' => $edit_link,
|
229 |
), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
|
230 |
|
231 |
-
if ( $can_view_sales =
|
232 |
|
233 |
wc_get_template( 'reports.php', array(
|
234 |
'start_date' => $start_date,
|
@@ -288,7 +318,7 @@ class WCV_Vendor_Dashboard
|
|
288 |
$seller_info = get_user_meta( $user_id, 'pv_seller_info', true );
|
289 |
$has_html = get_user_meta( $user_id, 'pv_shop_html_enabled', true );
|
290 |
$shop_page = WCV_Vendors::get_vendor_shop_page( wp_get_current_user()->user_login );
|
291 |
-
$global_html =
|
292 |
|
293 |
ob_start();
|
294 |
wc_get_template( 'settings.php', array(
|
@@ -340,11 +370,9 @@ class WCV_Vendor_Dashboard
|
|
340 |
{
|
341 |
if ( empty( $products ) ) return false;
|
342 |
|
343 |
-
|
344 |
-
$orders_page_id = (string) WC_Vendors::$pv_options->get_option( 'orders_page' );
|
345 |
-
$orders_page_id = ( strlen( $orders_page_id ) > 0 ) ? $orders_page_id : WC_Vendors::$pv_options->get_option( 'product_orders_page' );
|
346 |
$orders_page = get_permalink( $orders_page_id );
|
347 |
-
$default_commission =
|
348 |
$total_qty = $total_cost = 0;
|
349 |
$data = array(
|
350 |
'products' => array(),
|
@@ -363,7 +391,7 @@ class WCV_Vendor_Dashboard
|
|
363 |
|
364 |
$commission_rate = WCV_Commission::get_commission_rate( $order_item->product_id );
|
365 |
$_product = wc_get_product( $order_item->product_id );
|
366 |
-
$parent_id =
|
367 |
$id = !empty( $parent_id ) ?$parent_id : $order_item->product_id;
|
368 |
|
369 |
$data[ 'products' ][$id] = array(
|
@@ -407,16 +435,16 @@ class WCV_Vendor_Dashboard
|
|
407 |
/**
|
408 |
* Load the javascript for the WC Shipment Tracking form
|
409 |
*/
|
410 |
-
public static function wc_st_js( $provider_array ) {
|
411 |
$js = "
|
412 |
jQuery(function() {
|
413 |
|
414 |
var providers = jQuery.parseJSON( '" . json_encode( $provider_array ) . "' );
|
415 |
|
416 |
jQuery('#tracking_number').prop('readonly',true);
|
417 |
-
jQuery('#date_shipped').prop('readonly',true);
|
418 |
|
419 |
-
function updatelink( tracking, provider ) {
|
420 |
|
421 |
var postcode = '32';
|
422 |
postcode = encodeURIComponent(postcode);
|
@@ -425,18 +453,18 @@ class WCV_Vendor_Dashboard
|
|
425 |
link = link.replace('%251%24s', tracking);
|
426 |
link = link.replace('%252%24s', postcode);
|
427 |
link = decodeURIComponent(link);
|
428 |
-
return link;
|
429 |
}
|
430 |
|
431 |
jQuery('.tracking_provider, #tracking_number').unbind().change(function(){
|
432 |
-
|
433 |
var form = jQuery(this).parent().parent().attr('id');
|
434 |
|
435 |
var tracking = jQuery('#' + form + ' input#tracking_number').val();
|
436 |
var provider = jQuery('#' + form + ' #tracking_provider').val();
|
437 |
-
|
438 |
if ( providers[ provider ]) {
|
439 |
-
link = updatelink(tracking, provider);
|
440 |
jQuery('#' + form + ' #tracking_number').prop('readonly',false);
|
441 |
jQuery('#' + form + ' #date_shipped').prop('readonly',false);
|
442 |
jQuery('#' + form + ' .custom_tracking_url_field, #' + form + ' .custom_tracking_provider_name_field').hide();
|
@@ -455,61 +483,56 @@ class WCV_Vendor_Dashboard
|
|
455 |
});
|
456 |
|
457 |
jQuery('#custom_tracking_provider_name').unbind().click(function(){
|
458 |
-
|
459 |
var form = jQuery(this).parent().parent().attr('id');
|
460 |
|
461 |
jQuery('#' + form + ' #tracking_number').prop('readonly',false);
|
462 |
jQuery('#' + form + ' #date_shipped').prop('readonly',false);
|
463 |
-
|
464 |
});
|
465 |
-
|
466 |
});
|
467 |
-
";
|
468 |
|
469 |
-
return $js;
|
470 |
-
} // wc_st_js()
|
471 |
|
472 |
|
473 |
/**
|
474 |
-
* Add custom wcvendors pro css classes
|
475 |
*
|
476 |
* @since 1.0.0
|
477 |
-
* @access public
|
478 |
-
*
|
479 |
-
* @param array $classes - body css classes
|
480 |
-
* @return array $classes - body css classes
|
481 |
*/
|
482 |
-
public function body_class( $classes ){
|
483 |
-
|
484 |
-
$dashboard_page = WC_Vendors::$pv_options->get_option( 'vendor_dashboard_page' );
|
485 |
-
|
486 |
-
// This is required to support existing installations after WC 2.6
|
487 |
-
$orders_page_id = WC_Vendors::$pv_options->get_option( 'orders_page' );
|
488 |
-
$orders_page_id = isset( $orders_page_id ) ? $orders_page_id : WC_Vendors::$pv_options->get_option( 'product_orders_page' );
|
489 |
|
490 |
-
$
|
491 |
-
$
|
492 |
-
$
|
|
|
493 |
|
494 |
-
if ( is_page( $dashboard_page ) ){
|
495 |
-
$classes[] = 'wcvendors wcv-vendor-dashboard-page';
|
496 |
}
|
497 |
|
498 |
-
if ( is_page( $orders_page ) ){
|
499 |
-
$classes[] = 'wcvendors wcv-orders-page';
|
500 |
}
|
501 |
|
502 |
-
if ( is_page( $shop_settings ) ){
|
503 |
-
$classes[] = 'wcvendors wcv-shop-settings-page';
|
504 |
}
|
505 |
|
506 |
-
if ( is_page( $terms_page ) ){
|
507 |
-
$classes[] = 'wcvendors wcv-terms-page';
|
508 |
}
|
509 |
|
510 |
|
511 |
-
return $classes;
|
512 |
|
513 |
|
514 |
-
} // body_class()
|
515 |
-
}
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* WCV Vendor Dashboard
|
5 |
*
|
6 |
* @author Matt Gates <http://mgates.me>
|
7 |
* @author Jamie Madden <http://wcvendors.com>
|
8 |
+
* @package WCVendors
|
9 |
*/
|
10 |
|
11 |
|
27 |
|
28 |
public function save_vendor_settings()
|
29 |
{
|
|
|
|
|
30 |
$user_id = get_current_user_id();
|
31 |
|
32 |
if ( !empty( $_GET['wc_pv_mark_shipped'] ) ) {
|
33 |
+
|
34 |
+
$order_id = $_GET['wc_pv_mark_shipped'];
|
35 |
+
$order = wc_get_order( $order_id );
|
36 |
+
$vendors = WCV_Vendors::get_vendors_from_order( $order );
|
37 |
+
$vendor_ids = array_keys( $vendors );
|
38 |
+
|
39 |
if ( !in_array( $user_id, $vendor_ids ) ) {
|
40 |
+
return;
|
|
|
41 |
}
|
42 |
+
|
43 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
44 |
|
45 |
+
// If not in the shippers array mark as shipped otherwise do nothing.
|
46 |
if( !in_array($user_id, $shippers)) {
|
47 |
+
|
48 |
$shippers[] = $user_id;
|
49 |
+
|
50 |
if ( !empty( $mails ) ) {
|
51 |
+
WC()->mailer()->emails[ 'WC_Email_Notify_Shipped' ]->trigger( $order_id, $user_id );
|
52 |
}
|
53 |
+
|
54 |
+
do_action( 'wcvendors_vendor_ship', $order_id, $user_id, $order );
|
55 |
+
|
56 |
+
wc_add_notice( __( 'Order marked shipped.', 'wc-vendors' ), 'success' );
|
57 |
+
|
58 |
$shop_name = WCV_Vendors::get_vendor_shop_name( $user_id );
|
59 |
+
$order->add_order_note( apply_filters( 'wcvendors_vendor_shipped_note', sprintf( __( '%s has marked as shipped. ', 'wc-vendors'), $shop_name ) , $user_id, $shop_name ) );
|
60 |
+
|
61 |
} elseif ( false != ( $key = array_search( $user_id, $shippers) ) ) {
|
62 |
unset( $shippers[$key] ); // Remove user from the shippers array
|
63 |
}
|
85 |
}
|
86 |
}
|
87 |
if ( $order_item_id ) {
|
88 |
+
wc_delete_order_item_meta( $order_item_id, __( 'Tracking number', 'wc-vendors' ) );
|
89 |
+
wc_add_order_item_meta( $order_item_id, __( 'Tracking number', 'wc-vendors' ), $tracking_number );
|
90 |
|
91 |
+
$message = __( 'Success. Your tracking number has been updated.', 'wc-vendors' );
|
92 |
wc_add_notice( $message, 'success' );
|
93 |
|
94 |
// Update order data
|
105 |
return false;
|
106 |
}
|
107 |
|
108 |
+
if (isset ( $_POST[ 'wc-product-vendor-nonce' ] ) ) {
|
109 |
|
110 |
if ( !wp_verify_nonce( $_POST[ 'wc-product-vendor-nonce' ], 'save-shop-settings' ) ) {
|
111 |
return false;
|
112 |
}
|
113 |
|
114 |
|
115 |
+
if ( isset( $_POST[ 'pv_paypal' ] ) && '' !== $_POST[ 'pv_paypal' ] ) {
|
116 |
if ( !is_email( $_POST[ 'pv_paypal' ] ) ) {
|
117 |
+
wc_add_notice( __( 'Your PayPal address is not a valid email address.', 'wc-vendors' ), 'error' );
|
118 |
} else {
|
119 |
update_user_meta( $user_id, 'pv_paypal', $_POST[ 'pv_paypal' ] );
|
120 |
}
|
121 |
+
} else{
|
122 |
+
update_user_meta( $user_id, 'pv_paypal', '' );
|
123 |
}
|
124 |
|
125 |
if ( !empty( $_POST[ 'pv_shop_name' ] ) ) {
|
126 |
$users = get_users( array( 'meta_key' => 'pv_shop_slug', 'meta_value' => sanitize_title( $_POST[ 'pv_shop_name' ] ) ) );
|
127 |
if ( !empty( $users ) && $users[ 0 ]->ID != $user_id ) {
|
128 |
+
wc_add_notice( __( 'That shop name is already taken. Your shop name must be unique.', 'wc-vendors' ), 'error' );
|
129 |
} else {
|
130 |
update_user_meta( $user_id, 'pv_shop_name', $_POST[ 'pv_shop_name' ] );
|
131 |
update_user_meta( $user_id, 'pv_shop_slug', sanitize_title( $_POST[ 'pv_shop_name' ] ) );
|
134 |
|
135 |
if ( isset( $_POST[ 'pv_shop_description' ] ) ) {
|
136 |
update_user_meta( $user_id, 'pv_shop_description', $_POST[ 'pv_shop_description' ] );
|
137 |
+
} else{
|
138 |
+
update_user_meta( $user_id, 'pv_shop_description', '' );
|
139 |
}
|
140 |
|
141 |
if ( isset( $_POST[ 'pv_seller_info' ] ) ) {
|
142 |
update_user_meta( $user_id, 'pv_seller_info', $_POST[ 'pv_seller_info' ] );
|
143 |
}
|
144 |
|
145 |
+
// Bank details
|
146 |
+
|
147 |
+
if ( isset( $_POST[ 'wcv_bank_account_name' ] ) ){
|
148 |
+
update_user_meta( $user_id, 'wcv_bank_account_name', $_POST['wcv_bank_account_name'] );
|
149 |
+
}
|
150 |
+
if ( isset( $_POST[ 'wcv_bank_account_number' ] ) ){
|
151 |
+
update_user_meta( $user_id, 'wcv_bank_account_name', $_POST['wcv_bank_account_name'] );
|
152 |
+
}
|
153 |
+
if ( isset( $_POST[ 'wcv_bank_name' ] ) ){
|
154 |
+
update_user_meta( $user_id, 'wcv_bank_name', $_POST['wcv_bank_name'] );
|
155 |
+
}
|
156 |
+
if ( isset( $_POST[ 'wcv_bank_routing_number' ] ) ){
|
157 |
+
update_user_meta( $user_id, 'wcv_bank_routing_number', $_POST['wcv_bank_routing_number'] );
|
158 |
+
}
|
159 |
+
if ( isset( $_POST[ 'wcv_bank_iban' ] ) ){
|
160 |
+
update_user_meta( $user_id, 'wcv_bank_iban', $_POST['wcv_bank_iban'] );
|
161 |
+
}
|
162 |
+
if ( isset( $_POST[ 'wcv_bank_bic_swift' ] ) ){
|
163 |
+
update_user_meta( $user_id, 'wcv_bank_bic_swift', $_POST['wcv_bank_bic_swift'] );
|
164 |
+
}
|
165 |
+
|
166 |
do_action( 'wcvendors_shop_settings_saved', $user_id );
|
167 |
|
168 |
if ( !wc_notice_count() ) {
|
169 |
+
wc_add_notice( __( 'Settings saved.', 'wc-vendors' ), 'success' );
|
170 |
}
|
171 |
}
|
172 |
}
|
177 |
*/
|
178 |
public function check_access()
|
179 |
{
|
180 |
+
$vendor_dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
|
181 |
+
$shop_settings_page = get_option( 'wcvendors_shop_settings_page_id' );
|
182 |
|
183 |
if ( $vendor_dashboard_page && is_page( $vendor_dashboard_page ) || $shop_settings_page && is_page( $shop_settings_page ) ) {
|
184 |
if ( !is_user_logged_in() ) {
|
186 |
exit;
|
187 |
}
|
188 |
}
|
189 |
+
|
190 |
+
} //check_access()
|
191 |
|
192 |
|
193 |
/**
|
204 |
$start_date = !empty( $_SESSION[ 'PV_Session' ][ 'start_date' ] ) ? $_SESSION[ 'PV_Session' ][ 'start_date' ] : strtotime( date( 'Ymd', strtotime( date( 'Ym', current_time( 'timestamp' ) ) . '01' ) ) );
|
205 |
$end_date = !empty( $_SESSION[ 'PV_Session' ][ 'end_date' ] ) ? $_SESSION[ 'PV_Session' ][ 'end_date' ] : strtotime( date( 'Ymd', current_time( 'timestamp' ) ) );
|
206 |
|
207 |
+
$can_view_orders = get_option( 'wcvendors_capability_orders_enabled' );
|
208 |
+
$settings_page = get_permalink(get_option( 'wcvendors_shop_settings_page_id' ) );
|
209 |
+
$can_submit = get_option( 'wcvendors_capability_products_enabled' );
|
210 |
$submit_link = ( $can_submit ) ? admin_url( 'post-new.php?post_type=product' ) : '';
|
211 |
$edit_link = ( $can_submit ) ? admin_url( 'edit.php?post_type=product' ) : '';
|
212 |
|
231 |
|
232 |
wp_enqueue_style( 'wcv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css' );
|
233 |
|
234 |
+
$providers = array();
|
235 |
+
$provider_array = array();
|
236 |
|
237 |
// WC Shipment Tracking Providers
|
238 |
if ( class_exists( 'WC_Shipment_Tracking' ) ) {
|
239 |
+
$WC_Shipment_Tracking = new WC_Shipment_Tracking();
|
240 |
$providers = (method_exists($WC_Shipment_Tracking, 'get_providers')) ? $WC_Shipment_Tracking->get_providers() : $WC_Shipment_Tracking->providers;
|
241 |
$provider_array = array();
|
242 |
foreach ( $providers as $all_providers ) {
|
258 |
'edit_link' => $edit_link,
|
259 |
), 'wc-vendors/dashboard/', wcv_plugin_dir . 'templates/dashboard/' );
|
260 |
|
261 |
+
if ( $can_view_sales = get_option( 'wcvendors_capability_frontend_reports' ) ) {
|
262 |
|
263 |
wc_get_template( 'reports.php', array(
|
264 |
'start_date' => $start_date,
|
318 |
$seller_info = get_user_meta( $user_id, 'pv_seller_info', true );
|
319 |
$has_html = get_user_meta( $user_id, 'pv_shop_html_enabled', true );
|
320 |
$shop_page = WCV_Vendors::get_vendor_shop_page( wp_get_current_user()->user_login );
|
321 |
+
$global_html = get_option( 'wcvendors_display_shop_description_html' );
|
322 |
|
323 |
ob_start();
|
324 |
wc_get_template( 'settings.php', array(
|
370 |
{
|
371 |
if ( empty( $products ) ) return false;
|
372 |
|
373 |
+
$orders_page_id = get_option( 'wcvendors_product_orders_page_id' );
|
|
|
|
|
374 |
$orders_page = get_permalink( $orders_page_id );
|
375 |
+
$default_commission = get_option( 'wcvendors_vendor_commission_rate' );
|
376 |
$total_qty = $total_cost = 0;
|
377 |
$data = array(
|
378 |
'products' => array(),
|
391 |
|
392 |
$commission_rate = WCV_Commission::get_commission_rate( $order_item->product_id );
|
393 |
$_product = wc_get_product( $order_item->product_id );
|
394 |
+
$parent_id = $_product->get_parent_id();
|
395 |
$id = !empty( $parent_id ) ?$parent_id : $order_item->product_id;
|
396 |
|
397 |
$data[ 'products' ][$id] = array(
|
435 |
/**
|
436 |
* Load the javascript for the WC Shipment Tracking form
|
437 |
*/
|
438 |
+
public static function wc_st_js( $provider_array ) {
|
439 |
$js = "
|
440 |
jQuery(function() {
|
441 |
|
442 |
var providers = jQuery.parseJSON( '" . json_encode( $provider_array ) . "' );
|
443 |
|
444 |
jQuery('#tracking_number').prop('readonly',true);
|
445 |
+
jQuery('#date_shipped').prop('readonly',true);
|
446 |
|
447 |
+
function updatelink( tracking, provider ) {
|
448 |
|
449 |
var postcode = '32';
|
450 |
postcode = encodeURIComponent(postcode);
|
453 |
link = link.replace('%251%24s', tracking);
|
454 |
link = link.replace('%252%24s', postcode);
|
455 |
link = decodeURIComponent(link);
|
456 |
+
return link;
|
457 |
}
|
458 |
|
459 |
jQuery('.tracking_provider, #tracking_number').unbind().change(function(){
|
460 |
+
|
461 |
var form = jQuery(this).parent().parent().attr('id');
|
462 |
|
463 |
var tracking = jQuery('#' + form + ' input#tracking_number').val();
|
464 |
var provider = jQuery('#' + form + ' #tracking_provider').val();
|
465 |
+
|
466 |
if ( providers[ provider ]) {
|
467 |
+
link = updatelink(tracking, provider);
|
468 |
jQuery('#' + form + ' #tracking_number').prop('readonly',false);
|
469 |
jQuery('#' + form + ' #date_shipped').prop('readonly',false);
|
470 |
jQuery('#' + form + ' .custom_tracking_url_field, #' + form + ' .custom_tracking_provider_name_field').hide();
|
483 |
});
|
484 |
|
485 |
jQuery('#custom_tracking_provider_name').unbind().click(function(){
|
486 |
+
|
487 |
var form = jQuery(this).parent().parent().attr('id');
|
488 |
|
489 |
jQuery('#' + form + ' #tracking_number').prop('readonly',false);
|
490 |
jQuery('#' + form + ' #date_shipped').prop('readonly',false);
|
491 |
+
|
492 |
});
|
493 |
+
|
494 |
});
|
495 |
+
";
|
496 |
|
497 |
+
return $js;
|
498 |
+
} // wc_st_js()
|
499 |
|
500 |
|
501 |
/**
|
502 |
+
* Add custom wcvendors pro css classes
|
503 |
*
|
504 |
* @since 1.0.0
|
505 |
+
* @access public
|
506 |
+
*
|
507 |
+
* @param array $classes - body css classes
|
508 |
+
* @return array $classes - body css classes
|
509 |
*/
|
510 |
+
public function body_class( $classes ){
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
|
512 |
+
$dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
|
513 |
+
$orders_page = get_option( 'wcvendors_product_orders_page_id' );
|
514 |
+
$shop_settings = get_option( 'wcvendors_shop_settings_page_id' );
|
515 |
+
$terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
|
516 |
|
517 |
+
if ( is_page( $dashboard_page ) ){
|
518 |
+
$classes[] = 'wcvendors wcv-vendor-dashboard-page';
|
519 |
}
|
520 |
|
521 |
+
if ( is_page( $orders_page ) ){
|
522 |
+
$classes[] = 'wcvendors wcv-orders-page';
|
523 |
}
|
524 |
|
525 |
+
if ( is_page( $shop_settings ) ){
|
526 |
+
$classes[] = 'wcvendors wcv-shop-settings-page';
|
527 |
}
|
528 |
|
529 |
+
if ( is_page( $terms_page ) ){
|
530 |
+
$classes[] = 'wcvendors wcv-terms-page';
|
531 |
}
|
532 |
|
533 |
|
534 |
+
return $classes;
|
535 |
|
536 |
|
537 |
+
} // body_class()
|
538 |
+
}
|
classes/front/orders/class-export-csv.php
CHANGED
@@ -16,10 +16,10 @@ class WCV_Export_CSV
|
|
16 |
public static function output_csv( $product_id, $headers, $body, $items )
|
17 |
{
|
18 |
|
19 |
-
$headers[ 'quantity' ] = __( 'Quantity', '
|
20 |
-
$headers[ 'item_meta' ] = __( 'Item Meta', '
|
21 |
|
22 |
-
$new_body = array();
|
23 |
|
24 |
foreach ( $body as $i => $order ) {
|
25 |
|
@@ -31,32 +31,32 @@ class WCV_Export_CSV
|
|
31 |
if ( is_int( $key ) ) unset( $order[ $key ] );
|
32 |
}
|
33 |
|
34 |
-
// New order row
|
35 |
-
$new_row = $body[ $i ];
|
36 |
// Remove order to redo
|
37 |
-
unset( $body[ $i ] );
|
38 |
|
39 |
$order = wc_get_order( $i );
|
40 |
|
41 |
foreach ( $items[ $i ][ 'items' ] as $item ) {
|
42 |
|
43 |
-
$product_id = !empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'];
|
44 |
|
45 |
$_product = $order->get_product_from_item( $item );
|
46 |
|
47 |
-
$new_row_with_meta = $new_row;
|
48 |
|
49 |
-
// Add the qty row
|
50 |
$new_row_with_meta[] = $item[ 'qty' ];
|
51 |
-
// Add the new item meta row
|
52 |
-
|
53 |
-
$variation_detail = !empty( $item['variation_id'] ) ? WCV_Orders::get_variation_data( $item[ 'variation_id' ] ) : '';
|
54 |
|
55 |
-
$
|
56 |
-
|
57 |
-
$
|
|
|
|
|
58 |
}
|
59 |
-
}
|
60 |
|
61 |
$headers = apply_filters( 'wcvendors_csv_headers', $headers, $product_id, $items );
|
62 |
$body = apply_filters( 'wcvendors_csv_body', $new_body, $product_id, $items );
|
@@ -75,7 +75,7 @@ class WCV_Export_CSV
|
|
75 |
public static function download( $headers, $body, $filename )
|
76 |
{
|
77 |
// Clear browser output before this point
|
78 |
-
if (ob_get_contents()) ob_end_clean();
|
79 |
|
80 |
// Output headers so that the file is downloaded rather than displayed
|
81 |
header( 'Content-Type: text/csv; charset=utf-8' );
|
16 |
public static function output_csv( $product_id, $headers, $body, $items )
|
17 |
{
|
18 |
|
19 |
+
$headers[ 'quantity' ] = __( 'Quantity', 'wc-vendors' );
|
20 |
+
$headers[ 'item_meta' ] = __( 'Item Meta', 'wc-vendors' );
|
21 |
|
22 |
+
$new_body = array();
|
23 |
|
24 |
foreach ( $body as $i => $order ) {
|
25 |
|
31 |
if ( is_int( $key ) ) unset( $order[ $key ] );
|
32 |
}
|
33 |
|
34 |
+
// New order row
|
35 |
+
$new_row = $body[ $i ];
|
36 |
// Remove order to redo
|
37 |
+
unset( $body[ $i ] );
|
38 |
|
39 |
$order = wc_get_order( $i );
|
40 |
|
41 |
foreach ( $items[ $i ][ 'items' ] as $item ) {
|
42 |
|
43 |
+
$product_id = !empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'];
|
44 |
|
45 |
$_product = $order->get_product_from_item( $item );
|
46 |
|
47 |
+
$new_row_with_meta = $new_row;
|
48 |
|
49 |
+
// Add the qty row
|
50 |
$new_row_with_meta[] = $item[ 'qty' ];
|
51 |
+
// Add the new item meta row
|
|
|
|
|
52 |
|
53 |
+
$variation_detail = !empty( $item['variation_id'] ) ? WCV_Orders::get_variation_data( $item[ 'variation_id' ] ) : '';
|
54 |
+
|
55 |
+
$new_row_with_meta[] = $variation_detail;
|
56 |
+
$new_row_with_meta['product'] = $item[ 'name' ];
|
57 |
+
$new_body[] = $new_row_with_meta;
|
58 |
}
|
59 |
+
}
|
60 |
|
61 |
$headers = apply_filters( 'wcvendors_csv_headers', $headers, $product_id, $items );
|
62 |
$body = apply_filters( 'wcvendors_csv_body', $new_body, $product_id, $items );
|
75 |
public static function download( $headers, $body, $filename )
|
76 |
{
|
77 |
// Clear browser output before this point
|
78 |
+
if (ob_get_contents()) ob_end_clean();
|
79 |
|
80 |
// Output headers so that the file is downloaded rather than displayed
|
81 |
header( 'Content-Type: text/csv; charset=utf-8' );
|
classes/front/orders/class-orders.php
CHANGED
@@ -17,14 +17,12 @@ class WCV_Orders
|
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
-
$this->can_view_orders =
|
21 |
-
$this->can_export_csv =
|
22 |
-
$this->can_view_emails =
|
23 |
|
24 |
add_action( 'template_redirect', array( $this, 'check_access' ) );
|
25 |
-
add_action( 'template_redirect', array( $this, 'process_export_orders' ) );
|
26 |
-
// add_action( 'template_redirect', array( $this, 'display_product_orders' ) );
|
27 |
-
// add_action( 'wp', array( $this, 'display_shortcodes' ) );
|
28 |
add_shortcode( 'wcv_orders', array( $this, 'display_product_orders' ) );
|
29 |
}
|
30 |
|
@@ -35,78 +33,35 @@ class WCV_Orders
|
|
35 |
public function check_access()
|
36 |
{
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
$orders_page_id = isset( $orders_page_id ) ? $orders_page_id : WC_Vendors::$pv_options->get_option( 'product_orders_page' );
|
41 |
-
|
42 |
-
$orders_page = $orders_page_id;
|
43 |
-
// Only if the orders page is set should we check access
|
44 |
if ( $orders_page && is_page( $orders_page ) && !is_user_logged_in() ) {
|
45 |
wp_redirect( get_permalink( wc_get_page_id( 'myaccount' ) ), 303 );
|
46 |
exit;
|
47 |
}
|
48 |
-
|
49 |
-
} // check_access()
|
50 |
-
|
51 |
-
|
52 |
-
/**
|
53 |
-
* DEPRICATED
|
54 |
-
*/
|
55 |
-
public function display_shortcodes()
|
56 |
-
{
|
57 |
-
|
58 |
-
if ( is_page( WC_Vendors::$pv_options->get_option( 'orders_page' ) ) && $this->can_view_orders ) {
|
59 |
-
|
60 |
-
wp_enqueue_script( 'jquery' );
|
61 |
-
|
62 |
-
$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;
|
63 |
-
|
64 |
-
$products = array( $this->product_id );
|
65 |
-
|
66 |
-
$_product = wc_get_product( $this->product_id );
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
$children = $_product->get_children();
|
71 |
|
72 |
-
if ( !empty( $children ) ) {
|
73 |
-
$products = array_merge($products, $children);
|
74 |
-
$products = array_unique($products);
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
$this->orders = WCV_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );
|
79 |
-
|
80 |
-
add_action( 'init', array( $this, 'verify_order_access' ) );
|
81 |
-
add_shortcode( 'wcv_orders', array( $this, 'display_product_orders' ) );
|
82 |
-
|
83 |
-
if ( $this->can_export_csv && !empty( $_POST[ 'export_orders' ] ) ) {
|
84 |
-
$this->download_csv();
|
85 |
-
}
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
}
|
90 |
|
91 |
/**
|
92 |
-
* Processs export orders csv request
|
93 |
-
*
|
94 |
* @since 1.9.4
|
95 |
*/
|
96 |
-
public function process_export_orders( ){
|
97 |
|
98 |
if ( empty( $_GET[ 'orders_for_product' ] ) ) {
|
99 |
|
100 |
-
return __( 'You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', '
|
101 |
-
|
102 |
-
} else {
|
103 |
$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;
|
104 |
-
|
105 |
$products = array( $this->product_id );
|
106 |
|
107 |
$_product = wc_get_product( $this->product_id );
|
108 |
|
109 |
-
if ( is_object( $_product ) ) {
|
110 |
|
111 |
$children = $_product->get_children();
|
112 |
|
@@ -114,20 +69,20 @@ class WCV_Orders
|
|
114 |
$products = array_merge($products, $children);
|
115 |
$products = array_unique($products);
|
116 |
}
|
117 |
-
}
|
118 |
|
119 |
$this->orders = WCV_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );
|
120 |
}
|
121 |
|
122 |
if ( !$this->orders ) {
|
123 |
-
return __( 'No orders.', '
|
124 |
}
|
125 |
|
126 |
if ( $this->can_export_csv && !empty( $_POST[ 'export_orders' ] ) ) {
|
127 |
$this->download_csv();
|
128 |
}
|
129 |
|
130 |
-
} // process_export_orders()
|
131 |
|
132 |
/**
|
133 |
*
|
@@ -163,16 +118,16 @@ class WCV_Orders
|
|
163 |
|
164 |
if ( empty( $_GET[ 'orders_for_product' ] ) ) {
|
165 |
|
166 |
-
return __( 'You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', '
|
167 |
-
|
168 |
-
} else {
|
169 |
$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;
|
170 |
-
|
171 |
$products = array( $this->product_id );
|
172 |
|
173 |
$_product = wc_get_product( $this->product_id );
|
174 |
|
175 |
-
if ( is_object( $_product ) ) {
|
176 |
|
177 |
$children = $_product->get_children();
|
178 |
|
@@ -180,13 +135,13 @@ class WCV_Orders
|
|
180 |
$products = array_merge($products, $children);
|
181 |
$products = array_unique($products);
|
182 |
}
|
183 |
-
}
|
184 |
|
185 |
$this->orders = WCV_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );
|
186 |
}
|
187 |
|
188 |
if ( !$this->orders ) {
|
189 |
-
return __( 'No orders.', '
|
190 |
}
|
191 |
|
192 |
if ( !empty( $_POST[ 'submit_comment' ] ) ) {
|
@@ -206,12 +161,12 @@ class WCV_Orders
|
|
206 |
wp_enqueue_style( 'pv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css' );
|
207 |
wp_enqueue_script( 'pv_frontend_script', wcv_assets_url . 'js/front-orders.js' );
|
208 |
|
209 |
-
$providers = array();
|
210 |
-
$provider_array = array();
|
211 |
|
212 |
// WC Shipment Tracking Providers
|
213 |
if ( class_exists( 'WC_Shipment_Tracking' ) ) {
|
214 |
-
$WC_Shipment_Tracking = new WC_Shipment_Tracking();
|
215 |
$providers = (method_exists($WC_Shipment_Tracking, 'get_providers')) ? $WC_Shipment_Tracking->get_providers() : $WC_Shipment_Tracking->providers;
|
216 |
$provider_array = array();
|
217 |
foreach ( $providers as $all_providers ) {
|
@@ -220,7 +175,7 @@ class WCV_Orders
|
|
220 |
}
|
221 |
}
|
222 |
}
|
223 |
-
|
224 |
// Show the Export CSV button
|
225 |
if ( $this->can_export_csv ) {
|
226 |
wc_get_template( 'csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
|
@@ -232,10 +187,10 @@ class WCV_Orders
|
|
232 |
'items' => $all[ 'items' ],
|
233 |
'product_id' => $all[ 'product_id' ],
|
234 |
'providers' => $providers,
|
235 |
-
'provider_array' => $provider_array,
|
236 |
), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
|
237 |
|
238 |
-
} // display_product_orders()
|
239 |
|
240 |
|
241 |
/**
|
@@ -246,15 +201,15 @@ class WCV_Orders
|
|
246 |
public function get_headers()
|
247 |
{
|
248 |
$headers = array(
|
249 |
-
'order' => __( 'Order', '
|
250 |
-
'product' => __( 'Product Title', '
|
251 |
-
'name' => __( 'Full name', '
|
252 |
-
'address' => __( 'Address', '
|
253 |
-
'city' => __( 'City', '
|
254 |
-
'state' => __( 'State', '
|
255 |
-
'zip' => __( 'Zip', '
|
256 |
-
'email' => __( 'Email address', '
|
257 |
-
'date' => __( 'Date', '
|
258 |
);
|
259 |
|
260 |
if ( !$this->can_view_emails ) {
|
@@ -281,17 +236,17 @@ class WCV_Orders
|
|
281 |
foreach ( $orders as $i => $order ) {
|
282 |
$i = $order->order_id;
|
283 |
$order = wc_get_order( $i );
|
284 |
-
$order_date =
|
285 |
-
|
286 |
-
$shipping_first_name =
|
287 |
-
$shipping_last_name =
|
288 |
-
$shipping_address_1 =
|
289 |
-
$shipping_city =
|
290 |
-
$shipping_country =
|
291 |
-
$shipping_state =
|
292 |
-
$shipping_postcode =
|
293 |
-
$billing_email =
|
294 |
-
$customer_note =
|
295 |
|
296 |
$body[ $i ] = array(
|
297 |
'order_number' => $order->get_order_number(),
|
@@ -345,18 +300,18 @@ class WCV_Orders
|
|
345 |
}
|
346 |
|
347 |
/**
|
348 |
-
* Get the variation data for a product
|
349 |
-
*
|
350 |
* @since 1.9.4
|
351 |
-
* @return string variation_data
|
352 |
*/
|
353 |
-
public static function get_variation_data( $item_id ){
|
354 |
-
|
355 |
$_var_product = new WC_Product_Variation( $item_id );
|
356 |
$variation_data = $_var_product->get_variation_attributes();
|
357 |
$variation_detail = wc_get_formatted_variation( $variation_data, true );
|
358 |
-
return $variation_detail;
|
359 |
|
360 |
-
} // get_variation_data()
|
361 |
|
362 |
-
}
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
+
$this->can_view_orders = get_option( 'wcvendors_capability_orders_enabled' );
|
21 |
+
$this->can_export_csv = get_option( 'wcvendors_capability_orders_export' );
|
22 |
+
$this->can_view_emails = get_option( 'wcvendors_capability_order_customer_email' );
|
23 |
|
24 |
add_action( 'template_redirect', array( $this, 'check_access' ) );
|
25 |
+
add_action( 'template_redirect', array( $this, 'process_export_orders' ) );
|
|
|
|
|
26 |
add_shortcode( 'wcv_orders', array( $this, 'display_product_orders' ) );
|
27 |
}
|
28 |
|
33 |
public function check_access()
|
34 |
{
|
35 |
|
36 |
+
$orders_page = get_option( 'wcvendors_product_orders_page_id' );
|
37 |
+
// Only if the orders page is set should we check access
|
|
|
|
|
|
|
|
|
38 |
if ( $orders_page && is_page( $orders_page ) && !is_user_logged_in() ) {
|
39 |
wp_redirect( get_permalink( wc_get_page_id( 'myaccount' ) ), 303 );
|
40 |
exit;
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
} // check_access()
|
|
|
|
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
/**
|
47 |
+
* Processs export orders csv request
|
48 |
+
*
|
49 |
* @since 1.9.4
|
50 |
*/
|
51 |
+
public function process_export_orders( ){
|
52 |
|
53 |
if ( empty( $_GET[ 'orders_for_product' ] ) ) {
|
54 |
|
55 |
+
return __( 'You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', 'wc-vendors' );
|
56 |
+
|
57 |
+
} else {
|
58 |
$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;
|
59 |
+
|
60 |
$products = array( $this->product_id );
|
61 |
|
62 |
$_product = wc_get_product( $this->product_id );
|
63 |
|
64 |
+
if ( is_object( $_product ) ) {
|
65 |
|
66 |
$children = $_product->get_children();
|
67 |
|
69 |
$products = array_merge($products, $children);
|
70 |
$products = array_unique($products);
|
71 |
}
|
72 |
+
}
|
73 |
|
74 |
$this->orders = WCV_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );
|
75 |
}
|
76 |
|
77 |
if ( !$this->orders ) {
|
78 |
+
return __( 'No orders.', 'wc-vendors' );
|
79 |
}
|
80 |
|
81 |
if ( $this->can_export_csv && !empty( $_POST[ 'export_orders' ] ) ) {
|
82 |
$this->download_csv();
|
83 |
}
|
84 |
|
85 |
+
} // process_export_orders()
|
86 |
|
87 |
/**
|
88 |
*
|
118 |
|
119 |
if ( empty( $_GET[ 'orders_for_product' ] ) ) {
|
120 |
|
121 |
+
return __( 'You haven\'t selected a product\'s orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you\'d like to view.', 'wc-vendors' );
|
122 |
+
|
123 |
+
} else {
|
124 |
$this->product_id = !empty( $_GET[ 'orders_for_product' ] ) ? (int) $_GET[ 'orders_for_product' ] : false;
|
125 |
+
|
126 |
$products = array( $this->product_id );
|
127 |
|
128 |
$_product = wc_get_product( $this->product_id );
|
129 |
|
130 |
+
if ( is_object( $_product ) ) {
|
131 |
|
132 |
$children = $_product->get_children();
|
133 |
|
135 |
$products = array_merge($products, $children);
|
136 |
$products = array_unique($products);
|
137 |
}
|
138 |
+
}
|
139 |
|
140 |
$this->orders = WCV_Queries::get_orders_for_products( $products, array( 'vendor_id' => get_current_user_id() ) );
|
141 |
}
|
142 |
|
143 |
if ( !$this->orders ) {
|
144 |
+
return __( 'No orders.', 'wc-vendors' );
|
145 |
}
|
146 |
|
147 |
if ( !empty( $_POST[ 'submit_comment' ] ) ) {
|
161 |
wp_enqueue_style( 'pv_frontend_style', wcv_assets_url . 'css/wcv-frontend.css' );
|
162 |
wp_enqueue_script( 'pv_frontend_script', wcv_assets_url . 'js/front-orders.js' );
|
163 |
|
164 |
+
$providers = array();
|
165 |
+
$provider_array = array();
|
166 |
|
167 |
// WC Shipment Tracking Providers
|
168 |
if ( class_exists( 'WC_Shipment_Tracking' ) ) {
|
169 |
+
$WC_Shipment_Tracking = new WC_Shipment_Tracking();
|
170 |
$providers = (method_exists($WC_Shipment_Tracking, 'get_providers')) ? $WC_Shipment_Tracking->get_providers() : $WC_Shipment_Tracking->providers;
|
171 |
$provider_array = array();
|
172 |
foreach ( $providers as $all_providers ) {
|
175 |
}
|
176 |
}
|
177 |
}
|
178 |
+
|
179 |
// Show the Export CSV button
|
180 |
if ( $this->can_export_csv ) {
|
181 |
wc_get_template( 'csv-export.php', array(), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
|
187 |
'items' => $all[ 'items' ],
|
188 |
'product_id' => $all[ 'product_id' ],
|
189 |
'providers' => $providers,
|
190 |
+
'provider_array' => $provider_array,
|
191 |
), 'wc-vendors/orders/', wcv_plugin_dir . 'templates/orders/' );
|
192 |
|
193 |
+
} // display_product_orders()
|
194 |
|
195 |
|
196 |
/**
|
201 |
public function get_headers()
|
202 |
{
|
203 |
$headers = array(
|
204 |
+
'order' => __( 'Order', 'wc-vendors' ),
|
205 |
+
'product' => __( 'Product Title', 'wc-vendors' ),
|
206 |
+
'name' => __( 'Full name', 'wc-vendors' ),
|
207 |
+
'address' => __( 'Address', 'wc-vendors' ),
|
208 |
+
'city' => __( 'City', 'wc-vendors' ),
|
209 |
+
'state' => __( 'State', 'wc-vendors' ),
|
210 |
+
'zip' => __( 'Zip', 'wc-vendors' ),
|
211 |
+
'email' => __( 'Email address', 'wc-vendors' ),
|
212 |
+
'date' => __( 'Date', 'wc-vendors' ),
|
213 |
);
|
214 |
|
215 |
if ( !$this->can_view_emails ) {
|
236 |
foreach ( $orders as $i => $order ) {
|
237 |
$i = $order->order_id;
|
238 |
$order = wc_get_order( $i );
|
239 |
+
$order_date = $order->get_date_created();
|
240 |
+
|
241 |
+
$shipping_first_name = $order->get_shipping_first_name();
|
242 |
+
$shipping_last_name = $order->get_shipping_last_name();
|
243 |
+
$shipping_address_1 = $order->get_shipping_address_1();
|
244 |
+
$shipping_city = $order->get_shipping_city();
|
245 |
+
$shipping_country = $order->get_shipping_country();
|
246 |
+
$shipping_state = $order->get_shipping_state();
|
247 |
+
$shipping_postcode = $order->get_shipping_postcode();
|
248 |
+
$billing_email = $order->get_billing_email();
|
249 |
+
$customer_note = $order->get_customer_note();
|
250 |
|
251 |
$body[ $i ] = array(
|
252 |
'order_number' => $order->get_order_number(),
|
300 |
}
|
301 |
|
302 |
/**
|
303 |
+
* Get the variation data for a product
|
304 |
+
*
|
305 |
* @since 1.9.4
|
306 |
+
* @return string variation_data
|
307 |
*/
|
308 |
+
public static function get_variation_data( $item_id ){
|
309 |
+
|
310 |
$_var_product = new WC_Product_Variation( $item_id );
|
311 |
$variation_data = $_var_product->get_variation_attributes();
|
312 |
$variation_detail = wc_get_formatted_variation( $variation_data, true );
|
313 |
+
return $variation_detail;
|
314 |
|
315 |
+
} // get_variation_data()
|
316 |
|
317 |
+
}
|
classes/front/orders/class-submit-comment.php
CHANGED
@@ -38,7 +38,7 @@ class WCV_Submit_Comment
|
|
38 |
|
39 |
// Don't submit empty comments
|
40 |
if ( empty( $_POST[ 'comment_text' ] ) ) {
|
41 |
-
wc_add_notice( __( 'You\'ve left the comment field empty!', '
|
42 |
|
43 |
return false;
|
44 |
}
|
@@ -60,7 +60,7 @@ class WCV_Submit_Comment
|
|
60 |
$found_order->add_order_note( $comment, 1 );
|
61 |
remove_filter( 'woocommerce_new_order_note_data', array( __CLASS__, 'filter_comment' ), 10, 2 );
|
62 |
|
63 |
-
wc_add_notice( __( 'Success. The customer has been notified of your comment.', '
|
64 |
}
|
65 |
|
66 |
}
|
38 |
|
39 |
// Don't submit empty comments
|
40 |
if ( empty( $_POST[ 'comment_text' ] ) ) {
|
41 |
+
wc_add_notice( __( 'You\'ve left the comment field empty!', 'wc-vendors' ), 'error' );
|
42 |
|
43 |
return false;
|
44 |
}
|
60 |
$found_order->add_order_note( $comment, 1 );
|
61 |
remove_filter( 'woocommerce_new_order_note_data', array( __CLASS__, 'filter_comment' ), 10, 2 );
|
62 |
|
63 |
+
wc_add_notice( __( 'Success. The customer has been notified of your comment.', 'wc-vendors' ), 'success' );
|
64 |
}
|
65 |
|
66 |
}
|
classes/front/signup/class-vendor-signup.php
CHANGED
@@ -17,9 +17,9 @@ class WCV_Vendor_Signup
|
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
-
if ( !
|
21 |
|
22 |
-
$this->terms_page =
|
23 |
|
24 |
add_action( 'woocommerce_register_form', array( $this, 'vendor_option' ) );
|
25 |
add_action( 'register_form', array( $this, 'login_apply_vendor_option' ) );
|
@@ -78,7 +78,7 @@ class WCV_Vendor_Signup
|
|
78 |
public function vendor_registration_errors( $errors, $sanitized_user_login, $user_email ) {
|
79 |
|
80 |
if ( empty( $_POST[ 'agree_to_terms' ] ) || ! empty( $_POST[ 'agree_to_terms' ] ) && trim( $_POST[ 'agree_to_terms' ] ) == '' ) {
|
81 |
-
$errors->add( 'terms_errors', sprintf( '<strong>%s</strong>: %s', __( 'ERROR', '
|
82 |
}
|
83 |
|
84 |
return $errors;
|
@@ -97,11 +97,11 @@ class WCV_Vendor_Signup
|
|
97 |
wc_clear_notices();
|
98 |
|
99 |
if ( user_can( $user_id, 'manage_options' ) ) {
|
100 |
-
wc_add_notice( apply_filters( 'wcvendors_application_denied_msg', __( 'Application denied. You are an administrator.', '
|
101 |
} else {
|
102 |
-
wc_add_notice( apply_filters( 'wcvendors_application_submitted_msg', __( 'Your application has been submitted.', '
|
103 |
|
104 |
-
$manual =
|
105 |
$role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
|
106 |
|
107 |
$wp_user_object = new WP_User( $user_id );
|
@@ -125,7 +125,7 @@ class WCV_Vendor_Signup
|
|
125 |
|
126 |
if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
|
127 |
|
128 |
-
$manual =
|
129 |
$role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
|
130 |
|
131 |
$wp_user_object = new WP_User( $user_id );
|
@@ -146,7 +146,7 @@ class WCV_Vendor_Signup
|
|
146 |
|
147 |
if ( $this->terms_page && ! isset( $_POST[ 'agree_to_terms' ] ) ) {
|
148 |
$error = new WP_Error();
|
149 |
-
$error->add( 'no_terms', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', '
|
150 |
return $error;
|
151 |
} else {
|
152 |
return $user;
|
@@ -160,7 +160,7 @@ class WCV_Vendor_Signup
|
|
160 |
|
161 |
public function redirect_to_vendor_dash( $redirect )
|
162 |
{
|
163 |
-
$vendor_dashboard_page =
|
164 |
|
165 |
return apply_filters( 'wcvendors_signup_redirect', get_permalink( $vendor_dashboard_page ) );
|
166 |
}
|
@@ -175,7 +175,7 @@ class WCV_Vendor_Signup
|
|
175 |
{
|
176 |
if ( !isset( $_POST[ 'apply_for_vendor' ] ) ) return false;
|
177 |
|
178 |
-
$vendor_dashboard_page =
|
179 |
$page_id = get_queried_object_id();
|
180 |
|
181 |
if ( $page_id == $vendor_dashboard_page ) {
|
@@ -183,7 +183,7 @@ class WCV_Vendor_Signup
|
|
183 |
if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
|
184 |
self::save_pending( get_current_user_id() );
|
185 |
} else {
|
186 |
-
wc_add_notice( apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', '
|
187 |
}
|
188 |
} else {
|
189 |
self::save_pending( get_current_user_id() );
|
@@ -195,7 +195,7 @@ class WCV_Vendor_Signup
|
|
195 |
|
196 |
if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
|
197 |
if ( $this->terms_page && !isset( $_POST[ 'agree_to_terms' ] ) ) {
|
198 |
-
$validation_errors->add( 'agree_to_terms_error', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', '
|
199 |
}
|
200 |
}
|
201 |
}
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
+
if ( ! get_option( 'wcvendors_vendor_allow_registration' ) ) return;
|
21 |
|
22 |
+
$this->terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
|
23 |
|
24 |
add_action( 'woocommerce_register_form', array( $this, 'vendor_option' ) );
|
25 |
add_action( 'register_form', array( $this, 'login_apply_vendor_option' ) );
|
78 |
public function vendor_registration_errors( $errors, $sanitized_user_login, $user_email ) {
|
79 |
|
80 |
if ( empty( $_POST[ 'agree_to_terms' ] ) || ! empty( $_POST[ 'agree_to_terms' ] ) && trim( $_POST[ 'agree_to_terms' ] ) == '' ) {
|
81 |
+
$errors->add( 'terms_errors', sprintf( '<strong>%s</strong>: %s', __( 'ERROR', 'wc-vendors' ), __( 'Please agree to the terms and conditions', 'mydomain' ) ) );
|
82 |
}
|
83 |
|
84 |
return $errors;
|
97 |
wc_clear_notices();
|
98 |
|
99 |
if ( user_can( $user_id, 'manage_options' ) ) {
|
100 |
+
wc_add_notice( apply_filters( 'wcvendors_application_denied_msg', __( 'Application denied. You are an administrator.', 'wc-vendors' ) ), 'error' );
|
101 |
} else {
|
102 |
+
wc_add_notice( apply_filters( 'wcvendors_application_submitted_msg', __( 'Your application has been submitted.', 'wc-vendors' ) ), 'notice' );
|
103 |
|
104 |
+
$manual = get_option( 'wcvendors_vendor_approve_registration' );
|
105 |
$role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
|
106 |
|
107 |
$wp_user_object = new WP_User( $user_id );
|
125 |
|
126 |
if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
|
127 |
|
128 |
+
$manual = get_option( 'wcvendors_vendor_approve_registration' );
|
129 |
$role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
|
130 |
|
131 |
$wp_user_object = new WP_User( $user_id );
|
146 |
|
147 |
if ( $this->terms_page && ! isset( $_POST[ 'agree_to_terms' ] ) ) {
|
148 |
$error = new WP_Error();
|
149 |
+
$error->add( 'no_terms', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wc-vendors' ) ) );
|
150 |
return $error;
|
151 |
} else {
|
152 |
return $user;
|
160 |
|
161 |
public function redirect_to_vendor_dash( $redirect )
|
162 |
{
|
163 |
+
$vendor_dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
|
164 |
|
165 |
return apply_filters( 'wcvendors_signup_redirect', get_permalink( $vendor_dashboard_page ) );
|
166 |
}
|
175 |
{
|
176 |
if ( !isset( $_POST[ 'apply_for_vendor' ] ) ) return false;
|
177 |
|
178 |
+
$vendor_dashboard_page = get_option( 'wcvendors_vendor_dashboard_page_id' );
|
179 |
$page_id = get_queried_object_id();
|
180 |
|
181 |
if ( $page_id == $vendor_dashboard_page ) {
|
183 |
if ( isset( $_POST[ 'agree_to_terms' ] ) ) {
|
184 |
self::save_pending( get_current_user_id() );
|
185 |
} else {
|
186 |
+
wc_add_notice( apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wc-vendors' ), 'error' ) );
|
187 |
}
|
188 |
} else {
|
189 |
self::save_pending( get_current_user_id() );
|
195 |
|
196 |
if ( isset( $_POST[ 'apply_for_vendor' ] ) ) {
|
197 |
if ( $this->terms_page && !isset( $_POST[ 'agree_to_terms' ] ) ) {
|
198 |
+
$validation_errors->add( 'agree_to_terms_error', apply_filters( 'wcvendors_agree_to_terms_error', __( 'You must accept the terms and conditions to become a vendor.', 'wc-vendors' ) ) );
|
199 |
}
|
200 |
}
|
201 |
}
|
classes/front/signup/views/html-vendor-signup.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<p>
|
20 |
<label for="apply_for_vendor">
|
21 |
<input class="input-checkbox" id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?> type="checkbox" name="apply_for_vendor" value="1"/>
|
22 |
-
<?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', '
|
23 |
</label>
|
24 |
<br />
|
25 |
</p>
|
@@ -33,7 +33,7 @@
|
|
33 |
<p class="agree-to-terms-container" style="display:none;">
|
34 |
<label for="agree_to_terms">
|
35 |
<input class="input-checkbox" id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ); ?> type="checkbox" name="agree_to_terms" value="1"/>
|
36 |
-
<?php apply_filters( 'wcvendors_vendor_registration_terms', printf( __( 'I have read and accepted the <a target="top" href="%s">terms and conditions</a>.', '
|
37 |
</label>
|
38 |
</p>
|
39 |
|
@@ -42,21 +42,20 @@
|
|
42 |
|
43 |
<script type="text/javascript">
|
44 |
|
45 |
-
var error_message = "<?php _e( 'Please agree to the terms and conditions', '
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
if ( this.checked ) {
|
51 |
-
|
52 |
} else {
|
53 |
-
|
54 |
}
|
55 |
});
|
56 |
|
57 |
$( 'form.register').on( 'submit', function ( e ){
|
58 |
-
if (
|
59 |
-
alert( error_message );
|
60 |
e.preventDefault();
|
61 |
}
|
62 |
} );
|
19 |
<p>
|
20 |
<label for="apply_for_vendor">
|
21 |
<input class="input-checkbox" id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?> type="checkbox" name="apply_for_vendor" value="1"/>
|
22 |
+
<?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', 'wc-vendors' )); ?>
|
23 |
</label>
|
24 |
<br />
|
25 |
</p>
|
33 |
<p class="agree-to-terms-container" style="display:none;">
|
34 |
<label for="agree_to_terms">
|
35 |
<input class="input-checkbox" id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ); ?> type="checkbox" name="agree_to_terms" value="1"/>
|
36 |
+
<?php apply_filters( 'wcvendors_vendor_registration_terms', printf( __( 'I have read and accepted the <a target="top" href="%s">terms and conditions</a>.', 'wc-vendors' ), get_permalink( $this->terms_page ) ) ); ?>
|
37 |
</label>
|
38 |
</p>
|
39 |
|
42 |
|
43 |
<script type="text/javascript">
|
44 |
|
45 |
+
var error_message = "<?php _e( 'Please agree to the terms and conditions', 'wc-vendors'); ?>";
|
46 |
|
47 |
+
jQuery( function( $ ){
|
48 |
|
49 |
+
jQuery( "#apply_for_vendor" ).change( function() {
|
50 |
if ( this.checked ) {
|
51 |
+
jQuery('.agree-to-terms-container').show();
|
52 |
} else {
|
53 |
+
jQuery('.agree-to-terms-container').hide();
|
54 |
}
|
55 |
});
|
56 |
|
57 |
$( 'form.register').on( 'submit', function ( e ){
|
58 |
+
if ( jQuery('#agree_to_terms').is(':visible') && ! jQuery('#agree_to_terms').is(':checked') ) {
|
|
|
59 |
e.preventDefault();
|
60 |
}
|
61 |
} );
|
classes/gateways/PayPal_AdvPayments/paypal_ap.php
CHANGED
@@ -40,7 +40,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
40 |
/* Standard WooCommerce Configuration */
|
41 |
$this->id = 'paypalap';
|
42 |
$this->icon = plugin_dir_url( __FILE__ ) . 'PayPal_AP/assets/icons/paypalap.png';
|
43 |
-
$this->method_title = __( 'PayPal Adaptive Payments', '
|
44 |
$this->has_fields = false;
|
45 |
|
46 |
// Load the settings
|
@@ -56,8 +56,8 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
56 |
/* PayPal Adaptive Payments Configuration. */
|
57 |
$this->sandbox = $this->settings[ 'sandbox_enabled' ];
|
58 |
$this->main_paypal = $this->sandbox == 'yes' ? $this->settings[ 'main_paypal' ] : $this->settings[ 'main_paypal_live' ];
|
59 |
-
$this->instapay =
|
60 |
-
$this->give_tax =
|
61 |
|
62 |
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
63 |
|
@@ -116,12 +116,12 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
116 |
if ( !$order ) return false;
|
117 |
|
118 |
if ( $_POST[ 'status' ] !== 'COMPLETED' ) {
|
119 |
-
$order->update_status( 'failed', sprintf( __( 'Something went wrong. Response from PayPal invalidated this order. Status: %s.', '
|
120 |
exit;
|
121 |
}
|
122 |
|
123 |
$order->payment_complete();
|
124 |
-
$order->add_order_note( __( 'IPN payment completed', '
|
125 |
|
126 |
if ( $this->instapay ) {
|
127 |
WCV_Commission::set_order_commission_paid( $order_id );
|
@@ -143,22 +143,22 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
143 |
|
144 |
// List each option in order of appearance with details
|
145 |
$this->form_fields[ 'enabled' ] = array(
|
146 |
-
'title' => __( 'Enable PayPal Adaptive Payments', '
|
147 |
'default' => 'no',
|
148 |
'type' => 'checkbox',
|
149 |
);
|
150 |
|
151 |
$this->form_fields[ 'title' ] = array(
|
152 |
-
'title' => __( 'Method Title', '
|
153 |
-
'description' => __( 'This controls the title which the user sees during checkout.', '
|
154 |
-
'default' => __( 'PayPal', '
|
155 |
'type' => 'text'
|
156 |
);
|
157 |
|
158 |
$this->form_fields[ 'description' ] = array(
|
159 |
-
'title' => __( 'Description', '
|
160 |
-
'description' => __( 'This controls the description which the user sees during checkout.', '
|
161 |
-
'default' => __( "Pay via PayPal!", '
|
162 |
'type' => 'textarea'
|
163 |
);
|
164 |
|
@@ -169,64 +169,64 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
169 |
// ------------------------------------------------------------------
|
170 |
|
171 |
$this->form_fields[ ] = array(
|
172 |
-
'title' => __( 'Live Credentials', '
|
173 |
'type' => 'title',
|
174 |
-
'description' => sprintf( __( 'You must have an <a href="%s">Application ID</a> to process live transactions. You do not need one for testing in Sandbox mode.', '
|
175 |
, 'https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goingLive/' )
|
176 |
);
|
177 |
|
178 |
$this->form_fields[ 'main_paypal_live' ] = array(
|
179 |
-
'title' => __( 'PayPal Email', '
|
180 |
-
'description' => __( 'The email address main payments should go to.', '
|
181 |
'type' => 'text'
|
182 |
);
|
183 |
|
184 |
$this->form_fields[ 'username_live' ] = array(
|
185 |
-
'title' => __( 'API Username', '
|
186 |
'type' => 'text'
|
187 |
);
|
188 |
|
189 |
$this->form_fields[ 'password_live' ] = array(
|
190 |
-
'title' => __( 'API Password', '
|
191 |
'type' => 'text'
|
192 |
);
|
193 |
|
194 |
$this->form_fields[ 'signature_live' ] = array(
|
195 |
-
'title' => __( 'API Signature', '
|
196 |
'type' => 'text'
|
197 |
);
|
198 |
|
199 |
$this->form_fields[ 'app_id' ] = array(
|
200 |
-
'title' => __( 'Application ID', '
|
201 |
'type' => 'text',
|
202 |
-
'description' => __( 'Only required when doing live transactions.', '
|
203 |
);
|
204 |
|
205 |
$this->form_fields[ ] = array(
|
206 |
-
'title' => __( 'Sandbox Credentials', '
|
207 |
'type' => 'title',
|
208 |
-
'description' => sprintf( __( 'You can signup for a sandbox developer account <a href="%s">here</a>. You need a developer account if you want to enable Sandbox mode for testing.', '
|
209 |
, 'https://developer.paypal.com/' )
|
210 |
);
|
211 |
|
212 |
$this->form_fields[ 'main_paypal' ] = array(
|
213 |
-
'title' => __( 'PayPal Email', '
|
214 |
-
'description' => __( 'The email address main payments should go to.', '
|
215 |
'type' => 'text'
|
216 |
);
|
217 |
|
218 |
$this->form_fields[ 'username' ] = array(
|
219 |
-
'title' => __( 'API Username', '
|
220 |
'type' => 'text'
|
221 |
);
|
222 |
|
223 |
$this->form_fields[ 'password' ] = array(
|
224 |
-
'title' => __( 'API Password', '
|
225 |
'type' => 'text'
|
226 |
);
|
227 |
|
228 |
$this->form_fields[ 'signature' ] = array(
|
229 |
-
'title' => __( 'API Signature', '
|
230 |
'type' => 'text'
|
231 |
);
|
232 |
|
@@ -237,18 +237,18 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
237 |
// ------------------------------------------------------------------
|
238 |
|
239 |
$this->form_fields[ ] = array(
|
240 |
-
'title' => __( 'Misc. Settings', '
|
241 |
'type' => 'title',
|
242 |
);
|
243 |
|
244 |
$this->form_fields[ 'sandbox_enabled' ] = array(
|
245 |
-
'title' => __( 'Enable PayPal Sandbox mode', '
|
246 |
'default' => 'yes',
|
247 |
'type' => 'checkbox',
|
248 |
);
|
249 |
|
250 |
$this->form_fields[ 'logging_enabled' ] = array(
|
251 |
-
'title' => __( 'Enable logging', '
|
252 |
'default' => 'no',
|
253 |
'type' => 'checkbox',
|
254 |
);
|
@@ -266,8 +266,8 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
266 |
{
|
267 |
?>
|
268 |
<h3><?php echo $this->method_title; ?></h3>
|
269 |
-
<p><?php _e( 'The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled).', '
|
270 |
-
<p><strong><?php _e( 'Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function.
|
271 |
<table class="form-table">
|
272 |
|
273 |
<?php if ( $this->is_valid_currency() ) :
|
@@ -278,7 +278,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
278 |
else : ?>
|
279 |
|
280 |
<div class="inline error"><p>
|
281 |
-
<strong><?php _e( 'Gateway Disabled', '
|
282 |
</p></div>
|
283 |
|
284 |
<?php endif; ?>
|
@@ -305,7 +305,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
305 |
$receivers = WCV_Vendors::get_vendor_dues_from_order( $order );
|
306 |
$i = 0;
|
307 |
|
308 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
309 |
|
310 |
foreach ( $receivers as $author => $values ) {
|
311 |
if ( empty( $values[ 'total' ] ) ) continue;
|
@@ -351,9 +351,9 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
351 |
$this->include_paypal_sdk();
|
352 |
$this->logger = new PPLoggingManager( 'Pay' );
|
353 |
$order = wc_get_order( $order_id );
|
354 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
355 |
-
$order_key = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_key : $order->get_order_key();
|
356 |
-
$customer_note = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->customer_note : $order->get_customer_note();
|
357 |
|
358 |
$receivers = $this->get_receivers( $order );
|
359 |
$receiverList = new ReceiverList( $receivers );
|
@@ -387,7 +387,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
387 |
try {
|
388 |
$response = $service->Pay( $payRequest );
|
389 |
} catch ( Exception $ex ) {
|
390 |
-
wc_add_notice( sprintf( __( 'Error: %s', '
|
391 |
|
392 |
return false;
|
393 |
}
|
@@ -396,8 +396,8 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
396 |
$ack = strtoupper( $response->responseEnvelope->ack );
|
397 |
|
398 |
if ( $ack != 'SUCCESS' ) {
|
399 |
-
$order->update_status( 'cancelled', sprintf( __( 'Error ID: %s. %s', '
|
400 |
-
wc_add_notice( sprintf( __( 'Error ID: %s. %s', '
|
401 |
|
402 |
return false;
|
403 |
}
|
@@ -503,7 +503,7 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
503 |
try {
|
504 |
$response = $service->SetPaymentOptions( $setPaymentOptionsRequest );
|
505 |
} catch ( Exception $ex ) {
|
506 |
-
wc_add_notice( sprintf( __( 'Error: %s', '
|
507 |
|
508 |
return false;
|
509 |
}
|
@@ -511,8 +511,8 @@ class WC_PaypalAP extends WC_Payment_Gateway
|
|
511 |
$this->logger->error( "Received SetPaymentOptionsResponse:" );
|
512 |
$ack = strtoupper( $response->responseEnvelope->ack );
|
513 |
if ( $ack != "SUCCESS" ) {
|
514 |
-
$order->update_status( 'cancelled', sprintf( __( 'Error ID: %d. %s', '
|
515 |
-
wc_add_notice( sprintf( __( 'Error ID: %d. %s', '
|
516 |
|
517 |
return false;
|
518 |
}
|
40 |
/* Standard WooCommerce Configuration */
|
41 |
$this->id = 'paypalap';
|
42 |
$this->icon = plugin_dir_url( __FILE__ ) . 'PayPal_AP/assets/icons/paypalap.png';
|
43 |
+
$this->method_title = __( 'PayPal Adaptive Payments', 'wc-vendors' );
|
44 |
$this->has_fields = false;
|
45 |
|
46 |
// Load the settings
|
56 |
/* PayPal Adaptive Payments Configuration. */
|
57 |
$this->sandbox = $this->settings[ 'sandbox_enabled' ];
|
58 |
$this->main_paypal = $this->sandbox == 'yes' ? $this->settings[ 'main_paypal' ] : $this->settings[ 'main_paypal_live' ];
|
59 |
+
$this->instapay = get_option( 'wcvendors_payments_paypal_instantpay_enable' );
|
60 |
+
$this->give_tax = get_option( 'wcvendors_vendor_give_taxes' );
|
61 |
|
62 |
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
|
63 |
|
116 |
if ( !$order ) return false;
|
117 |
|
118 |
if ( $_POST[ 'status' ] !== 'COMPLETED' ) {
|
119 |
+
$order->update_status( 'failed', sprintf( __( 'Something went wrong. Response from PayPal invalidated this order. Status: %s.', 'wc-vendors' ), $_POST[ 'status' ] ) );
|
120 |
exit;
|
121 |
}
|
122 |
|
123 |
$order->payment_complete();
|
124 |
+
$order->add_order_note( __( 'IPN payment completed', 'wc-vendors' ) );
|
125 |
|
126 |
if ( $this->instapay ) {
|
127 |
WCV_Commission::set_order_commission_paid( $order_id );
|
143 |
|
144 |
// List each option in order of appearance with details
|
145 |
$this->form_fields[ 'enabled' ] = array(
|
146 |
+
'title' => __( 'Enable PayPal Adaptive Payments', 'wc-vendors' ),
|
147 |
'default' => 'no',
|
148 |
'type' => 'checkbox',
|
149 |
);
|
150 |
|
151 |
$this->form_fields[ 'title' ] = array(
|
152 |
+
'title' => __( 'Method Title', 'wc-vendors' ),
|
153 |
+
'description' => __( 'This controls the title which the user sees during checkout.', 'wc-vendors' ),
|
154 |
+
'default' => __( 'PayPal', 'wc-vendors' ),
|
155 |
'type' => 'text'
|
156 |
);
|
157 |
|
158 |
$this->form_fields[ 'description' ] = array(
|
159 |
+
'title' => __( 'Description', 'wc-vendors' ),
|
160 |
+
'description' => __( 'This controls the description which the user sees during checkout.', 'wc-vendors' ),
|
161 |
+
'default' => __( "Pay via PayPal!", 'wc-vendors' ),
|
162 |
'type' => 'textarea'
|
163 |
);
|
164 |
|
169 |
// ------------------------------------------------------------------
|
170 |
|
171 |
$this->form_fields[ ] = array(
|
172 |
+
'title' => __( 'Live Credentials', 'wc-vendors' ),
|
173 |
'type' => 'title',
|
174 |
+
'description' => sprintf( __( 'You must have an <a href="%s">Application ID</a> to process live transactions. You do not need one for testing in Sandbox mode.', 'wc-vendors' )
|
175 |
, 'https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goingLive/' )
|
176 |
);
|
177 |
|
178 |
$this->form_fields[ 'main_paypal_live' ] = array(
|
179 |
+
'title' => __( 'PayPal Email', 'wc-vendors' ),
|
180 |
+
'description' => __( 'The email address main payments should go to.', 'wc-vendors' ),
|
181 |
'type' => 'text'
|
182 |
);
|
183 |
|
184 |
$this->form_fields[ 'username_live' ] = array(
|
185 |
+
'title' => __( 'API Username', 'wc-vendors' ),
|
186 |
'type' => 'text'
|
187 |
);
|
188 |
|
189 |
$this->form_fields[ 'password_live' ] = array(
|
190 |
+
'title' => __( 'API Password', 'wc-vendors' ),
|
191 |
'type' => 'text'
|
192 |
);
|
193 |
|
194 |
$this->form_fields[ 'signature_live' ] = array(
|
195 |
+
'title' => __( 'API Signature', 'wc-vendors' ),
|
196 |
'type' => 'text'
|
197 |
);
|
198 |
|
199 |
$this->form_fields[ 'app_id' ] = array(
|
200 |
+
'title' => __( 'Application ID', 'wc-vendors' ),
|
201 |
'type' => 'text',
|
202 |
+
'description' => __( 'Only required when doing live transactions.', 'wc-vendors' ),
|
203 |
);
|
204 |
|
205 |
$this->form_fields[ ] = array(
|
206 |
+
'title' => __( 'Sandbox Credentials', 'wc-vendors' ),
|
207 |
'type' => 'title',
|
208 |
+
'description' => sprintf( __( 'You can signup for a sandbox developer account <a href="%s">here</a>. You need a developer account if you want to enable Sandbox mode for testing.', 'wc-vendors' )
|
209 |
, 'https://developer.paypal.com/' )
|
210 |
);
|
211 |
|
212 |
$this->form_fields[ 'main_paypal' ] = array(
|
213 |
+
'title' => __( 'PayPal Email', 'wc-vendors' ),
|
214 |
+
'description' => __( 'The email address main payments should go to.', 'wc-vendors' ),
|
215 |
'type' => 'text'
|
216 |
);
|
217 |
|
218 |
$this->form_fields[ 'username' ] = array(
|
219 |
+
'title' => __( 'API Username', 'wc-vendors' ),
|
220 |
'type' => 'text'
|
221 |
);
|
222 |
|
223 |
$this->form_fields[ 'password' ] = array(
|
224 |
+
'title' => __( 'API Password', 'wc-vendors' ),
|
225 |
'type' => 'text'
|
226 |
);
|
227 |
|
228 |
$this->form_fields[ 'signature' ] = array(
|
229 |
+
'title' => __( 'API Signature', 'wc-vendors' ),
|
230 |
'type' => 'text'
|
231 |
);
|
232 |
|
237 |
// ------------------------------------------------------------------
|
238 |
|
239 |
$this->form_fields[ ] = array(
|
240 |
+
'title' => __( 'Misc. Settings', 'wc-vendors' ),
|
241 |
'type' => 'title',
|
242 |
);
|
243 |
|
244 |
$this->form_fields[ 'sandbox_enabled' ] = array(
|
245 |
+
'title' => __( 'Enable PayPal Sandbox mode', 'wc-vendors' ),
|
246 |
'default' => 'yes',
|
247 |
'type' => 'checkbox',
|
248 |
);
|
249 |
|
250 |
$this->form_fields[ 'logging_enabled' ] = array(
|
251 |
+
'title' => __( 'Enable logging', 'wc-vendors' ),
|
252 |
'default' => 'no',
|
253 |
'type' => 'checkbox',
|
254 |
);
|
266 |
{
|
267 |
?>
|
268 |
<h3><?php echo $this->method_title; ?></h3>
|
269 |
+
<p><?php _e( 'The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled).', 'wc-vendors' ); ?></p>
|
270 |
+
<p><strong><?php _e( 'Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function.', 'wc-vendors' ); ?></strong></p>
|
271 |
<table class="form-table">
|
272 |
|
273 |
<?php if ( $this->is_valid_currency() ) :
|
278 |
else : ?>
|
279 |
|
280 |
<div class="inline error"><p>
|
281 |
+
<strong><?php _e( 'Gateway Disabled', 'wc-vendors' ); ?></strong>: <?php printf( __( '%s does not support your store currency.', 'wc-vendors' ), $this->method_title ); ?>
|
282 |
</p></div>
|
283 |
|
284 |
<?php endif; ?>
|
305 |
$receivers = WCV_Vendors::get_vendor_dues_from_order( $order );
|
306 |
$i = 0;
|
307 |
|
308 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
309 |
|
310 |
foreach ( $receivers as $author => $values ) {
|
311 |
if ( empty( $values[ 'total' ] ) ) continue;
|
351 |
$this->include_paypal_sdk();
|
352 |
$this->logger = new PPLoggingManager( 'Pay' );
|
353 |
$order = wc_get_order( $order_id );
|
354 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
355 |
+
$order_key = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_key : $order->get_order_key();
|
356 |
+
$customer_note = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->customer_note : $order->get_customer_note();
|
357 |
|
358 |
$receivers = $this->get_receivers( $order );
|
359 |
$receiverList = new ReceiverList( $receivers );
|
387 |
try {
|
388 |
$response = $service->Pay( $payRequest );
|
389 |
} catch ( Exception $ex ) {
|
390 |
+
wc_add_notice( sprintf( __( 'Error: %s', 'wc-vendors' ), $ex->getMessage() ), 'error' );
|
391 |
|
392 |
return false;
|
393 |
}
|
396 |
$ack = strtoupper( $response->responseEnvelope->ack );
|
397 |
|
398 |
if ( $ack != 'SUCCESS' ) {
|
399 |
+
$order->update_status( 'cancelled', sprintf( __( 'Error ID: %s. %s', 'wc-vendors' ), $response->error[ 0 ]->errorId, $response->error[ 0 ]->message ) );
|
400 |
+
wc_add_notice( sprintf( __( 'Error ID: %s. %s', 'wc-vendors' ), $response->error[ 0 ]->errorId, $response->error[ 0 ]->message ), 'error' );
|
401 |
|
402 |
return false;
|
403 |
}
|
503 |
try {
|
504 |
$response = $service->SetPaymentOptions( $setPaymentOptionsRequest );
|
505 |
} catch ( Exception $ex ) {
|
506 |
+
wc_add_notice( sprintf( __( 'Error: %s', 'wc-vendors' ), $ex->getMessage() ), 'error' );
|
507 |
|
508 |
return false;
|
509 |
}
|
511 |
$this->logger->error( "Received SetPaymentOptionsResponse:" );
|
512 |
$ack = strtoupper( $response->responseEnvelope->ack );
|
513 |
if ( $ack != "SUCCESS" ) {
|
514 |
+
$order->update_status( 'cancelled', sprintf( __( 'Error ID: %d. %s', 'wc-vendors'), $response->error[ 0 ]->errorId, $response->error[ 0 ]->message ) );
|
515 |
+
wc_add_notice( sprintf( __( 'Error ID: %d. %s', 'wc-vendors' ), $response->error[ 0 ]->errorId, $response->error[ 0 ]->message ), 'error' );
|
516 |
|
517 |
return false;
|
518 |
}
|
classes/gateways/PayPal_Masspay/class-paypal-masspay.php
CHANGED
@@ -12,7 +12,7 @@ class WCV_Mass_Pay
|
|
12 |
{
|
13 |
|
14 |
private static $pluginDir;
|
15 |
-
private $orders_paid;
|
16 |
|
17 |
/**
|
18 |
* Pay out all outstanding commission.
|
@@ -21,7 +21,7 @@ class WCV_Mass_Pay
|
|
21 |
*/
|
22 |
public function do_payments()
|
23 |
{
|
24 |
-
$vendors = array();
|
25 |
self::$pluginDir = trailingslashit( dirname( __FILE__ ) );
|
26 |
$vendors = $this->get_users();
|
27 |
|
@@ -52,7 +52,7 @@ class WCV_Mass_Pay
|
|
52 |
if ( empty( $orders ) ) return false;
|
53 |
|
54 |
// Initialise the arrays
|
55 |
-
$vendors = array();
|
56 |
$due_amounts = array();
|
57 |
|
58 |
foreach ( $orders as $data ) {
|
@@ -112,13 +112,13 @@ class WCV_Mass_Pay
|
|
112 |
private function pay_vendors( $vendors )
|
113 |
{
|
114 |
if ( empty( $vendors ) ) {
|
115 |
-
$return = array( 'status' => 'error', 'msg' => __( 'No vendors found to pay. Maybe they haven\'t set a PayPal address?', '
|
116 |
$this->mail_results( $return );
|
117 |
|
118 |
return $return;
|
119 |
}
|
120 |
|
121 |
-
$vendor_ids = array();
|
122 |
|
123 |
$this->include_paypal_sdk();
|
124 |
|
@@ -150,7 +150,7 @@ class WCV_Mass_Pay
|
|
150 |
} catch ( Exception $ex ) {
|
151 |
$return = array(
|
152 |
'status' => 'error',
|
153 |
-
'msg' => sprintf( __( 'Error: %s', '
|
154 |
'total' => $total_pay,
|
155 |
);
|
156 |
|
@@ -164,13 +164,13 @@ class WCV_Mass_Pay
|
|
164 |
if ( $this->purge_user_meta( $vendor_ids ) ) {
|
165 |
$return = array(
|
166 |
'status' => 'updated',
|
167 |
-
'msg' => __( 'All due commission has been paid for.', '
|
168 |
'total' => $total_pay,
|
169 |
);
|
170 |
} else {
|
171 |
$return = array(
|
172 |
'status' => 'error',
|
173 |
-
'msg' => __( 'All due commission has been paid for, but I could not clear it from their profiles due to an internal error. Commission will still be listed as due. Please manually mark the commission as paid from the Commissions page.', '
|
174 |
'total' => $total_pay,
|
175 |
);
|
176 |
}
|
@@ -200,19 +200,19 @@ class WCV_Mass_Pay
|
|
200 |
{
|
201 |
global $woocommerce;
|
202 |
|
203 |
-
$send_results =
|
204 |
|
205 |
if ( !$send_results ) return false;
|
206 |
|
207 |
$to = sanitize_email( get_option( 'woocommerce_email_from_address' ) );
|
208 |
-
$subject = __( 'WooCommerce: Mass payments for vendors update', '
|
209 |
|
210 |
-
$message = __( 'Hello! A payment was just triggered to mass pay all vendors their due commission.', '
|
211 |
-
$message .= sprintf( __( 'Payment status: %s.', '
|
212 |
-
$message .= sprintf( __( 'Payment message: %s.', '
|
213 |
|
214 |
if ( !empty( $result[ 'total' ] ) )
|
215 |
-
$message .= sprintf( __( 'Payment total: %s.', '
|
216 |
|
217 |
$sent = wp_mail( $to, $subject, $message, "From: " . $to . "\r\n" );
|
218 |
|
12 |
{
|
13 |
|
14 |
private static $pluginDir;
|
15 |
+
private $orders_paid;
|
16 |
|
17 |
/**
|
18 |
* Pay out all outstanding commission.
|
21 |
*/
|
22 |
public function do_payments()
|
23 |
{
|
24 |
+
$vendors = array();
|
25 |
self::$pluginDir = trailingslashit( dirname( __FILE__ ) );
|
26 |
$vendors = $this->get_users();
|
27 |
|
52 |
if ( empty( $orders ) ) return false;
|
53 |
|
54 |
// Initialise the arrays
|
55 |
+
$vendors = array();
|
56 |
$due_amounts = array();
|
57 |
|
58 |
foreach ( $orders as $data ) {
|
112 |
private function pay_vendors( $vendors )
|
113 |
{
|
114 |
if ( empty( $vendors ) ) {
|
115 |
+
$return = array( 'status' => 'error', 'msg' => __( 'No vendors found to pay. Maybe they haven\'t set a PayPal address?', 'wc-vendors' ) );
|
116 |
$this->mail_results( $return );
|
117 |
|
118 |
return $return;
|
119 |
}
|
120 |
|
121 |
+
$vendor_ids = array();
|
122 |
|
123 |
$this->include_paypal_sdk();
|
124 |
|
150 |
} catch ( Exception $ex ) {
|
151 |
$return = array(
|
152 |
'status' => 'error',
|
153 |
+
'msg' => sprintf( __( 'Error: %s', 'wc-vendors' ), $ex->getMessage() ),
|
154 |
'total' => $total_pay,
|
155 |
);
|
156 |
|
164 |
if ( $this->purge_user_meta( $vendor_ids ) ) {
|
165 |
$return = array(
|
166 |
'status' => 'updated',
|
167 |
+
'msg' => __( 'All due commission has been paid for.', 'wc-vendors' ),
|
168 |
'total' => $total_pay,
|
169 |
);
|
170 |
} else {
|
171 |
$return = array(
|
172 |
'status' => 'error',
|
173 |
+
'msg' => __( 'All due commission has been paid for, but I could not clear it from their profiles due to an internal error. Commission will still be listed as due. Please manually mark the commission as paid from the Commissions page.', 'wc-vendors' ),
|
174 |
'total' => $total_pay,
|
175 |
);
|
176 |
}
|
200 |
{
|
201 |
global $woocommerce;
|
202 |
|
203 |
+
$send_results = get_option( 'wcvendors_payments_paypal_email_enable' );
|
204 |
|
205 |
if ( !$send_results ) return false;
|
206 |
|
207 |
$to = sanitize_email( get_option( 'woocommerce_email_from_address' ) );
|
208 |
+
$subject = __( 'WooCommerce: Mass payments for vendors update', 'wc-vendors' );
|
209 |
|
210 |
+
$message = __( 'Hello! A payment was just triggered to mass pay all vendors their due commission.', 'wc-vendors' ) . PHP_EOL . PHP_EOL;
|
211 |
+
$message .= sprintf( __( 'Payment status: %s.', 'wc-vendors' ), $result[ 'status' ] ) . PHP_EOL;
|
212 |
+
$message .= sprintf( __( 'Payment message: %s.', 'wc-vendors' ), $result[ 'msg' ] ) . PHP_EOL;
|
213 |
|
214 |
if ( !empty( $result[ 'total' ] ) )
|
215 |
+
$message .= sprintf( __( 'Payment total: %s.', 'wc-vendors' ), $result[ 'total' ] );
|
216 |
|
217 |
$sent = wp_mail( $to, $subject, $message, "From: " . $to . "\r\n" );
|
218 |
|
classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php
CHANGED
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
* @package WooCommerce/Classes/Payment
|
16 |
* @author WC Vendors Ben Agresta
|
17 |
*/
|
18 |
-
|
19 |
function add_wcvendors_test_gateway( $methods )
|
20 |
{
|
21 |
$methods[ ] = 'WC_Gateway_WCV_Gateway_Test';
|
@@ -32,8 +32,8 @@ class WC_Gateway_WCV_Gateway_Test extends WC_Payment_Gateway {
|
|
32 |
$this->id = 'wcvendors_test_gateway';
|
33 |
$this->icon = apply_filters('woocommerce_cheque_icon', '');
|
34 |
$this->has_fields = false;
|
35 |
-
$this->method_title = __( 'WC Vendors Test Gateway', '
|
36 |
-
$this->method_description = __( 'This gateway will set orders to processing upon receipt allowing you to test transactions in your store. Some WooCommerce included gateways have problems with this - you should use this gateway for all of your non-PayPal testing.', '
|
37 |
|
38 |
// Load the settings.
|
39 |
$this->init_form_fields();
|
@@ -59,29 +59,29 @@ class WC_Gateway_WCV_Gateway_Test extends WC_Payment_Gateway {
|
|
59 |
|
60 |
$this->form_fields = array(
|
61 |
'enabled' => array(
|
62 |
-
'title' => __( 'Enable/Disable', '
|
63 |
'type' => 'checkbox',
|
64 |
-
'label' => __( 'Enable WC Vendors Test Gateway Payment', '
|
65 |
'default' => 'no'
|
66 |
),
|
67 |
'title' => array(
|
68 |
-
'title' => __( 'Title', '
|
69 |
'type' => 'text',
|
70 |
-
'description' => __( 'This controls the title which the user sees during checkout.', '
|
71 |
-
'default' => __( 'WC Vendors Test Gateway', '
|
72 |
'desc_tip' => true,
|
73 |
),
|
74 |
'description' => array(
|
75 |
-
'title' => __( 'Description', '
|
76 |
'type' => 'textarea',
|
77 |
-
'description' => __( 'Payment method description that the customer will see on your checkout.', '
|
78 |
-
'default' => __( 'This is a test gateway -- not to be used on live sites for live transactions. <a href="http://www.wcvendors.com/" target="top">Click here to visit WCVendors.com</a>.', '
|
79 |
'desc_tip' => true,
|
80 |
),
|
81 |
'instructions' => array(
|
82 |
-
'title' => __( 'Instructions', '
|
83 |
'type' => 'textarea',
|
84 |
-
'description' => __( 'Success! Your test order is now marked as processing and any vendors will be sent an email as long as you have the Notify Vendors email enabled under WooCommerce--Settings--Emails.', '
|
85 |
'default' => '',
|
86 |
'desc_tip' => true,
|
87 |
),
|
@@ -106,7 +106,7 @@ class WC_Gateway_WCV_Gateway_Test extends WC_Payment_Gateway {
|
|
106 |
*/
|
107 |
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
|
108 |
|
109 |
-
$payment_method = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->payment_method : $order->get_payment_method();
|
110 |
|
111 |
if ( $this->instructions && ! $sent_to_admin && 'wcvendors_test_gateway' === $payment_method && $order->has_status( 'processing' ) ) {
|
112 |
echo wpautop( wptexturize( $this->instructions ) ) . PHP_EOL;
|
@@ -124,15 +124,15 @@ class WC_Gateway_WCV_Gateway_Test extends WC_Payment_Gateway {
|
|
124 |
$order = wc_get_order( $order_id );
|
125 |
|
126 |
// Mark as processing
|
127 |
-
$order->update_status( 'processing', __( 'Test gateway transation complete. Order processing.', '
|
128 |
|
129 |
// Reduce stock levels
|
130 |
-
if ( version_compare( WC_VERSION, '2.7', '<' ) ){
|
131 |
$order->reduce_order_stock();
|
132 |
-
} else {
|
133 |
wc_reduce_stock_levels( $order_id );
|
134 |
}
|
135 |
-
|
136 |
|
137 |
// Remove cart
|
138 |
WC()->cart->empty_cart();
|
@@ -143,4 +143,4 @@ class WC_Gateway_WCV_Gateway_Test extends WC_Payment_Gateway {
|
|
143 |
'redirect' => $this->get_return_url( $order )
|
144 |
);
|
145 |
}
|
146 |
-
}
|
15 |
* @package WooCommerce/Classes/Payment
|
16 |
* @author WC Vendors Ben Agresta
|
17 |
*/
|
18 |
+
|
19 |
function add_wcvendors_test_gateway( $methods )
|
20 |
{
|
21 |
$methods[ ] = 'WC_Gateway_WCV_Gateway_Test';
|
32 |
$this->id = 'wcvendors_test_gateway';
|
33 |
$this->icon = apply_filters('woocommerce_cheque_icon', '');
|
34 |
$this->has_fields = false;
|
35 |
+
$this->method_title = __( 'WC Vendors Test Gateway', 'wc-vendors' );
|
36 |
+
$this->method_description = __( 'This gateway will set orders to processing upon receipt allowing you to test transactions in your store. Some WooCommerce included gateways have problems with this - you should use this gateway for all of your non-PayPal testing.', 'wc-vendors' );
|
37 |
|
38 |
// Load the settings.
|
39 |
$this->init_form_fields();
|
59 |
|
60 |
$this->form_fields = array(
|
61 |
'enabled' => array(
|
62 |
+
'title' => __( 'Enable/Disable', 'wc-vendors' ),
|
63 |
'type' => 'checkbox',
|
64 |
+
'label' => __( 'Enable WC Vendors Test Gateway Payment', 'wc-vendors' ),
|
65 |
'default' => 'no'
|
66 |
),
|
67 |
'title' => array(
|
68 |
+
'title' => __( 'Title', 'wc-vendors' ),
|
69 |
'type' => 'text',
|
70 |
+
'description' => __( 'This controls the title which the user sees during checkout.', 'wc-vendors' ),
|
71 |
+
'default' => __( 'WC Vendors Test Gateway', 'wc-vendors' ),
|
72 |
'desc_tip' => true,
|
73 |
),
|
74 |
'description' => array(
|
75 |
+
'title' => __( 'Description', 'wc-vendors' ),
|
76 |
'type' => 'textarea',
|
77 |
+
'description' => __( 'Payment method description that the customer will see on your checkout.', 'wc-vendors' ),
|
78 |
+
'default' => __( 'This is a test gateway -- not to be used on live sites for live transactions. <a href="http://www.wcvendors.com/" target="top">Click here to visit WCVendors.com</a>.', 'wc-vendors' ),
|
79 |
'desc_tip' => true,
|
80 |
),
|
81 |
'instructions' => array(
|
82 |
+
'title' => __( 'Instructions', 'wc-vendors' ),
|
83 |
'type' => 'textarea',
|
84 |
+
'description' => __( 'Success! Your test order is now marked as processing and any vendors will be sent an email as long as you have the Notify Vendors email enabled under WooCommerce--Settings--Emails.', 'wc-vendors' ),
|
85 |
'default' => '',
|
86 |
'desc_tip' => true,
|
87 |
),
|
106 |
*/
|
107 |
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
|
108 |
|
109 |
+
$payment_method = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->payment_method : $order->get_payment_method();
|
110 |
|
111 |
if ( $this->instructions && ! $sent_to_admin && 'wcvendors_test_gateway' === $payment_method && $order->has_status( 'processing' ) ) {
|
112 |
echo wpautop( wptexturize( $this->instructions ) ) . PHP_EOL;
|
124 |
$order = wc_get_order( $order_id );
|
125 |
|
126 |
// Mark as processing
|
127 |
+
$order->update_status( 'processing', __( 'Test gateway transation complete. Order processing.', 'wc-vendors' ) );
|
128 |
|
129 |
// Reduce stock levels
|
130 |
+
if ( version_compare( WC_VERSION, '2.7', '<' ) ){
|
131 |
$order->reduce_order_stock();
|
132 |
+
} else {
|
133 |
wc_reduce_stock_levels( $order_id );
|
134 |
}
|
135 |
+
|
136 |
|
137 |
// Remove cart
|
138 |
WC()->cart->empty_cart();
|
143 |
'redirect' => $this->get_return_url( $order )
|
144 |
);
|
145 |
}
|
146 |
+
}
|
classes/includes/class-dependencies.php
CHANGED
@@ -38,41 +38,5 @@ class WCV_Dependencies
|
|
38 |
|
39 |
return false;
|
40 |
}
|
41 |
-
|
42 |
-
|
43 |
-
/**
|
44 |
-
*
|
45 |
-
*
|
46 |
-
* @return boolean
|
47 |
-
*/
|
48 |
-
public static function jigoshop_active_check()
|
49 |
-
{
|
50 |
-
if ( !self::$active_plugins ) self::init();
|
51 |
-
|
52 |
-
foreach ( self::$active_plugins as $plugin ) {
|
53 |
-
if ( strpos( $plugin, '/jigoshop.php' ) ) return true;
|
54 |
-
}
|
55 |
-
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
|
59 |
-
|
60 |
-
/**
|
61 |
-
*
|
62 |
-
*
|
63 |
-
* @return boolean
|
64 |
-
*/
|
65 |
-
public static function edd_active_check()
|
66 |
-
{
|
67 |
-
if ( !self::$active_plugins ) self::init();
|
68 |
-
|
69 |
-
foreach ( self::$active_plugins as $plugin ) {
|
70 |
-
if ( strpos( $plugin, '/easy-digital-downloads.php' ) ) return true;
|
71 |
-
}
|
72 |
-
|
73 |
-
return false;
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
}
|
78 |
-
?>
|
38 |
|
39 |
return false;
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
+
?>
|
classes/includes/class-functions.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
if ( !class_exists( 'WCV_Dependencies' ) ) require_once 'class-dependencies.php';
|
4 |
|
@@ -12,32 +12,12 @@ if ( !function_exists( 'wcv_is_woocommerce_activated' ) ) {
|
|
12 |
}
|
13 |
}
|
14 |
|
15 |
-
|
16 |
-
* JS Detection
|
17 |
-
* */
|
18 |
-
if ( !function_exists( 'wcv_is_jigoshop_activated' ) ) {
|
19 |
-
function wcv_is_jigoshop_activated()
|
20 |
-
{
|
21 |
-
return WCV_Dependencies::jigoshop_active_check();
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* EDD Detection
|
27 |
-
* */
|
28 |
-
if ( !function_exists( 'wcv_is_edd_activated' ) ) {
|
29 |
-
function wcv_is_edd_activated()
|
30 |
-
{
|
31 |
-
return WCV_Dependencies::edd_active_check();
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
/*
|
36 |
*
|
37 |
-
* Get User Role
|
38 |
*/
|
39 |
-
if (!function_exists('wcv_get_user_role')) {
|
40 |
-
function wcv_get_user_role($user_id) {
|
41 |
global $wp_roles;
|
42 |
$user = new WP_User($user_id);
|
43 |
$roles = $user->roles;
|
@@ -45,4 +25,43 @@ if (!function_exists('wcv_get_user_role')) {
|
|
45 |
return isset($wp_roles->role_names[$role]) ? translate_user_role($wp_roles->role_names[$role] ) : false;
|
46 |
}
|
47 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
?>
|
1 |
+
<?php
|
2 |
|
3 |
if ( !class_exists( 'WCV_Dependencies' ) ) require_once 'class-dependencies.php';
|
4 |
|
12 |
}
|
13 |
}
|
14 |
|
15 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*
|
17 |
+
* Get User Role
|
18 |
*/
|
19 |
+
if (!function_exists('wcv_get_user_role')) {
|
20 |
+
function wcv_get_user_role($user_id) {
|
21 |
global $wp_roles;
|
22 |
$user = new WP_User($user_id);
|
23 |
$roles = $user->roles;
|
25 |
return isset($wp_roles->role_names[$role]) ? translate_user_role($wp_roles->role_names[$role] ) : false;
|
26 |
}
|
27 |
}
|
28 |
+
|
29 |
+
|
30 |
+
/**
|
31 |
+
* This function gets the vendor name used throughout the interface on the front and backend
|
32 |
+
*/
|
33 |
+
function wcv_get_vendor_name( $singluar = true ){
|
34 |
+
if ( $singluar ){
|
35 |
+
return apply_filters( 'wcv_vendor_display_name_singluar', __( 'Vendor', 'wc-vendors' ) );
|
36 |
+
} else {
|
37 |
+
return apply_filters( 'wcv_vendor_display_name_plural', __( 'Vendors', 'wc-vendors' ) );
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
// Output a single select page drop down
|
42 |
+
function wcv_single_select_page( $id, $value, $class = '', $css = '' ){
|
43 |
+
|
44 |
+
$dropdown_args = array(
|
45 |
+
'name' => $id,
|
46 |
+
'id' => $id,
|
47 |
+
'sort_column' => 'menu_order',
|
48 |
+
'sort_order' => 'ASC',
|
49 |
+
'show_option_none' => ' ',
|
50 |
+
'class' => $class,
|
51 |
+
'echo' => false,
|
52 |
+
'selected' => $value
|
53 |
+
);
|
54 |
+
|
55 |
+
echo str_replace( ' id=', " data-placeholder='" . esc_attr__( 'Select a page…', 'wc-vendors' ) . "' style='" . $css . "' class='" . $class . "' id=", wp_dropdown_pages( $dropdown_args ) );
|
56 |
+
}
|
57 |
+
|
58 |
+
function wcv_get_screen_ids(){
|
59 |
+
return apply_filters( 'wcv_get_screen_ids', array(
|
60 |
+
'wc-vendors_page_wcv-settings',
|
61 |
+
'wc-vendors_page_wcv-commissions',
|
62 |
+
'wc-vendors_page_wcv-extensions',
|
63 |
+
) );
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
?>
|
classes/includes/class-sf-settings.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Empty class of old settings systems.
|
6 |
+
*
|
7 |
+
* This is only to allow 3rd party extensions a notification that the system has changed. This will be completely removed in a future version.
|
8 |
+
*
|
9 |
+
* @since 2.0.0
|
10 |
+
*/
|
11 |
+
class SF_Settings_API {
|
12 |
+
|
13 |
+
|
14 |
+
public function __construct( ) {
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
public function get_option( $name, $default = false ) {
|
19 |
+
|
20 |
+
$mappings = wcv_get_settings_mapping();
|
21 |
+
|
22 |
+
if ( array_key_exists( $name, $mappings ) ) {
|
23 |
+
WC_Vendors::log( __function__ . ' has been depreciated please replace WC_Vendors::$pv_options->get_option(\'' . $name . '\') with get_option(\'' . $mappings[ $name ] . '\')' );
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
return ( array_key_exists( $name, $mappings ) ) ? get_option( $mappings[ $name ] ) : null;
|
28 |
+
|
29 |
+
}
|
30 |
+
}
|
classes/includes/wcv-template-functions.php
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WC Vendors Template functions
|
4 |
+
*
|
5 |
+
* Functions for templates
|
6 |
+
*
|
7 |
+
* @package WCVendors/Functions
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
|
16 |
+
if ( ! function_exists( 'wcv_get_vendor_order_items' ) ) {
|
17 |
+
/**
|
18 |
+
* Get HTML for the order items to be shown in emails.
|
19 |
+
*
|
20 |
+
* @param WC_Order $order Order object.
|
21 |
+
* @param array $args Arguments.
|
22 |
+
*
|
23 |
+
* @since 2.0.0
|
24 |
+
* @return string
|
25 |
+
*/
|
26 |
+
function wcv_get_vendor_order_items( $order, $args = array() ) {
|
27 |
+
ob_start();
|
28 |
+
|
29 |
+
$defaults = array(
|
30 |
+
'show_sku' => false,
|
31 |
+
'show_image' => false,
|
32 |
+
'image_size' => array( 32, 32 ),
|
33 |
+
'plain_text' => false,
|
34 |
+
'sent_to_admin' => false,
|
35 |
+
'sent_to_vendor' => false,
|
36 |
+
'totals_display' => 'both',
|
37 |
+
'vendor_items' => array(),
|
38 |
+
'vendor_id' => 0,
|
39 |
+
);
|
40 |
+
|
41 |
+
$args = wp_parse_args( $args, $defaults );
|
42 |
+
$template = $args['plain_text'] ? 'emails/plain/vendor-order-items.php' : 'emails/vendor-order-items.php';
|
43 |
+
|
44 |
+
wc_get_template( $template, apply_filters( 'wcvendors_vendor_order_items_args', array(
|
45 |
+
'order' => $order,
|
46 |
+
'items' => $args[ 'vendor_items' ],
|
47 |
+
'show_sku' => $args['show_sku'],
|
48 |
+
'show_image' => $args['show_image'],
|
49 |
+
'image_size' => $args['image_size'],
|
50 |
+
'plain_text' => $args['plain_text'],
|
51 |
+
'sent_to_admin' => $args['sent_to_admin'],
|
52 |
+
'sent_to_vendor' => $args['sent_to_vendor'],
|
53 |
+
'totals_display' => $args['totals_display'],
|
54 |
+
'vendor_id' => $args[ 'vendor_id' ],
|
55 |
+
) ), 'woocommerce', WCV_TEMPLATE_BASE );
|
56 |
+
|
57 |
+
return apply_filters( 'wcvendors_vendor_order_items_table', ob_get_clean(), $order );
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
if ( ! function_exists( 'wcv_get_vendor_item_totals' ) ) {
|
64 |
+
/**
|
65 |
+
* Get the Vendor order item total rows
|
66 |
+
*
|
67 |
+
* @param WC_Order $order Order object.
|
68 |
+
* @param array $args Arguments.
|
69 |
+
*
|
70 |
+
* @since 2.0.0
|
71 |
+
* @return string
|
72 |
+
*/
|
73 |
+
function wcv_get_vendor_item_totals( $order, $items, $vendor_id, $email, $totals_display = 'both' ) {
|
74 |
+
|
75 |
+
$product_subtotal = 0;
|
76 |
+
$commission_subtotal = 0;
|
77 |
+
$commission_total = 0;
|
78 |
+
$tax = 0;
|
79 |
+
$shipping = 0;
|
80 |
+
$total = 0;
|
81 |
+
$total_rows = array();
|
82 |
+
|
83 |
+
$vendor_commissions = WCV_Vendors::get_vendor_dues_from_order( $order );
|
84 |
+
|
85 |
+
// Get vendor commission information
|
86 |
+
foreach ( $vendor_commissions as $commission ) {
|
87 |
+
|
88 |
+
if ( $vendor_id == $commission[ 'vendor_id' ] ){
|
89 |
+
|
90 |
+
$commission_subtotal = $commission[ 'commission' ];
|
91 |
+
$shipping = $commission[ 'shipping' ];
|
92 |
+
$tax = $commission[ 'tax' ];
|
93 |
+
$commission_total = $commission[ 'total' ];
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
// Commission subtotal
|
99 |
+
if ( 'commission' === $totals_display || 'both' === $totals_display ){
|
100 |
+
// Commission Subtotal
|
101 |
+
$total_rows[ 'commission_subtotal' ] = array(
|
102 |
+
'label' => __( 'Commission subtotal:', 'wc-vendors' ),
|
103 |
+
'value' => wc_price( $commission_subtotal, array( 'currency' => $order->get_currency() ) ),
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
+
// Product subtotals
|
108 |
+
if ( 'product' === $totals_display || 'both' === $totals_display ){
|
109 |
+
|
110 |
+
foreach ( $items as $item ) {
|
111 |
+
$product_subtotal += $item->get_subtotal();
|
112 |
+
}
|
113 |
+
|
114 |
+
$total_rows[ 'product_subtotal' ] = array(
|
115 |
+
'label' => __( 'Product subtotal:', 'wc-vendors' ),
|
116 |
+
'value' => wc_price( $product_subtotal, array( 'currency' => $order->get_currency() ) ),
|
117 |
+
);
|
118 |
+
}
|
119 |
+
|
120 |
+
// Shipping
|
121 |
+
if ( 'yes' == get_option( 'wcvendors_vendor_give_shipping' ) ) {
|
122 |
+
$total_rows[ 'shipping' ] = array(
|
123 |
+
'label' => __( 'Shipping:', 'wc-vendors' ),
|
124 |
+
'value' => wc_price( $shipping, array( 'currency' => $order->get_currency() ) ),
|
125 |
+
);
|
126 |
+
}
|
127 |
+
|
128 |
+
// Tax
|
129 |
+
if ( 'yes' == get_option( 'wcvendors_vendor_give_taxes' ) ) {
|
130 |
+
$total_rows[ 'tax' ] = array(
|
131 |
+
'label' => __( 'Shipping:', 'wc-vendors' ),
|
132 |
+
'value' => wc_price( $tax, array( 'currency' => $order->get_currency() ) ),
|
133 |
+
);
|
134 |
+
}
|
135 |
+
|
136 |
+
// Payment Method
|
137 |
+
if ( 'yes' == $email->get_option('payment_method' ) ) {
|
138 |
+
$total_rows[ 'payment_method' ] = array(
|
139 |
+
'label' => __( 'Payment method:', 'wc-vendors' ),
|
140 |
+
'value' => $order->get_payment_method_title(),
|
141 |
+
);
|
142 |
+
}
|
143 |
+
|
144 |
+
// Commission total
|
145 |
+
if ( 'both' === $totals_display || 'commission' === $totals_display ){
|
146 |
+
// Commission Subtotal
|
147 |
+
$total_rows[ 'commission_total' ] = array(
|
148 |
+
'label' => __( 'Commission total:', 'wc-vendors' ),
|
149 |
+
'value' => wc_price( $commission_total, array( 'currency' => $order->get_currency() ) ),
|
150 |
+
);
|
151 |
+
}
|
152 |
+
|
153 |
+
// Product totals
|
154 |
+
if ( 'both' === $totals_display || 'product' === $totals_display ){
|
155 |
+
$product_total = $product_subtotal + $shipping + $tax;
|
156 |
+
|
157 |
+
$total_rows[ 'product_total' ] = array(
|
158 |
+
'label' => __( 'Product total:', 'wc-vendors' ),
|
159 |
+
'value' => wc_price( $product_total, array( 'currency' => $order->get_currency() ) ),
|
160 |
+
);
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( 'none' === $totals_display ) $total_rows = array();
|
164 |
+
|
165 |
+
return apply_filters( 'wcvendors_get_vendor_item_totals', $total_rows, $order, $items, $vendor_id, $totals_display );
|
166 |
+
|
167 |
+
} // wcv_get_vendor_item_totals
|
168 |
+
}
|
classes/includes/wcv-update-functions.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WC Vendors Updates
|
4 |
+
*
|
5 |
+
* Functions for updating data, used by the background updater.
|
6 |
+
*
|
7 |
+
* @package WCVendors/Functions
|
8 |
+
* @version 2.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit;
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Map WC Vendors version one settings to version two settings
|
17 |
+
*
|
18 |
+
* @since 2.0.0
|
19 |
+
*/
|
20 |
+
function wcv_migrate_settings(){
|
21 |
+
|
22 |
+
$version_one = get_option( 'wc_prd_vendor_options', null );
|
23 |
+
$mappings = wcv_get_settings_mapping();
|
24 |
+
|
25 |
+
if ( is_null( $version_one ) ) return;
|
26 |
+
|
27 |
+
foreach ( $version_one as $setting => $value ) {
|
28 |
+
|
29 |
+
if ( array_key_exists( $setting, $mappings ) ){
|
30 |
+
|
31 |
+
$value = maybe_unserialize( $value );
|
32 |
+
|
33 |
+
if ( $setting == 'hide_product_misc' && ! empty( $value ) ){
|
34 |
+
|
35 |
+
update_option( 'wcvendors_capability_product_featured', $value[ 'featured' ] );
|
36 |
+
update_option( 'wcvendors_capability_product_duplicate', $value[ 'duplicate' ] );
|
37 |
+
update_option( 'wcvendors_capability_product_sku', $value[ 'sku' ] );
|
38 |
+
update_option( 'wcvendors_capability_product_taxes', $value[ 'taxes' ] );
|
39 |
+
|
40 |
+
} else {
|
41 |
+
|
42 |
+
if ( $value == 1 ) $value = 'yes';
|
43 |
+
|
44 |
+
update_option( $mappings[ $setting ], $value );
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
flush_rewrite_rules();
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Settings Map
|
55 |
+
*
|
56 |
+
* @since 2.0.0
|
57 |
+
*/
|
58 |
+
function wcv_get_settings_mapping(){
|
59 |
+
|
60 |
+
return apply_filters( 'wcvendors_settings_mappings', array(
|
61 |
+
'hide_product_types' => 'wcvendors_capability_product_types',
|
62 |
+
'hide_product_type_options' => 'wcvendors_capability_product_type_options',
|
63 |
+
'hide_product_panel' => 'wcvendors_capability_product_data_tabs',
|
64 |
+
'can_submit_products' => 'wcvendors_capability_products_enabled',
|
65 |
+
'can_edit_published_products' => 'wcvendors_capability_products_edit',
|
66 |
+
'can_submit_live_products' => 'wcvendors_capability_products_live',
|
67 |
+
'can_show_orders' => 'wcvendors_capability_orders_enabled',
|
68 |
+
'can_export_csv' => 'wcvendors_capability_orders_export',
|
69 |
+
'can_view_order_emails' => 'wcvendors_capability_order_customer_email',
|
70 |
+
'can_view_order_comments' => 'wcvendors_capability_order_read_notes',
|
71 |
+
'can_submit_order_comments' => 'wcvendors_capability_order_update_notes',
|
72 |
+
'can_view_frontend_reports' => 'wcvendors_capability_frontend_reports',
|
73 |
+
'default_commission' => 'wcvendors_commission_percent',
|
74 |
+
'sold_by' => 'wcvendors_display_label_sold_by_enable',
|
75 |
+
'sold_by_label' => 'wcvendors_label_sold_by',
|
76 |
+
'seller_info_label' => 'wcvendors_display_label_store_info',
|
77 |
+
'vendor_dashboard_page' => 'wcvendors_vendor_dashboard_page_id',
|
78 |
+
'shop_settings_page' => 'wcvendors_shop_settings_page_id',
|
79 |
+
'product_orders_page' => 'wcvendors_product_orders_page_id',
|
80 |
+
'terms_to_apply_page' => 'wcvendors_vendor_terms_page_id',
|
81 |
+
'shop_headers_enabled' => 'wcvendors_display_shop_headers',
|
82 |
+
'shop_html_enabled' => 'wcvendors_display_shop_description_html',
|
83 |
+
'vendor_display_name' => 'wcvendors_display_shop_display_name',
|
84 |
+
'vendor_shop_permalink' => 'wcvendors_vendor_shop_permalink',
|
85 |
+
'product_page_css' => 'wcvendors_display_advanced_stylesheet',
|
86 |
+
'show_vendor_registration' => 'wcvendors_vendor_allow_registration',
|
87 |
+
'manual_vendor_registration' => 'wcvendors_vendor_approve_registration',
|
88 |
+
'give_tax' => 'wcvendors_vendor_give_taxes',
|
89 |
+
'give_shipping' => 'wcvendors_vendor_give_shipping',
|
90 |
+
'instapay' => 'wcvendors_payments_paypal_instantpay_enable',
|
91 |
+
'schedule' => 'wcvendors_payments_paypal_schedule',
|
92 |
+
'mail_mass_pay_results' => 'wcvendors_payments_paypal_email_enable'
|
93 |
+
|
94 |
+
) );
|
95 |
+
}
|
96 |
+
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Enable legacy emails for existing installs.
|
100 |
+
*
|
101 |
+
* @since 2.0.0
|
102 |
+
*/
|
103 |
+
function wcv_enable_legacy_emails(){
|
104 |
+
$notice = sprintf( __( 'WC Vendors legacy emails are enabled. Please migrate your email templates to the new system. <a href="%s">Click here to view your email settings.</a>', 'wc-vendors' ), esc_url( admin_url( 'admin.php?page=wc-settings&tab=email' ) ) );
|
105 |
+
WCVendors_Admin_Notices::add_custom_notice( 'email_updates', $notice );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Finish Settings update
|
110 |
+
*
|
111 |
+
* @since 2.0.0
|
112 |
+
*/
|
113 |
+
function wcv_update_200_db_version(){
|
114 |
+
WCVendors_Install::update_db_version( '2.0.0' );
|
115 |
+
}
|
gulpfile.js
CHANGED
@@ -1,22 +1,48 @@
|
|
1 |
-
// Load the dependencies
|
2 |
var gulp = require('gulp'),
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
gulp.task('build-i18n-pot', function () {
|
8 |
return gulp.src([ 'classes/**/*.php', 'templates/**/*.php', '*.php' ] )
|
9 |
.pipe( sort() )
|
10 |
.pipe( wpPot( {
|
11 |
-
domain: '
|
12 |
destFile:'default.pot',
|
13 |
-
package: '
|
14 |
bugReport: 'https://www.wcvendors.com',
|
15 |
-
lastTranslator: 'Jamie Madden <
|
16 |
-
team: 'WC Vendors <
|
17 |
} ) )
|
18 |
-
.pipe( gulp.dest('languages') );
|
19 |
});
|
20 |
|
21 |
|
22 |
-
gulp.task('default', [ 'build-i18n-pot' ] );
|
1 |
+
// Load the dependencies
|
2 |
var gulp = require('gulp'),
|
3 |
+
sass = require('gulp-sass'),
|
4 |
+
autoprefixer = require('gulp-autoprefixer'),
|
5 |
+
minifycss = require('gulp-clean-css'),
|
6 |
+
jshint = require('gulp-jshint'),
|
7 |
+
uglify = require('gulp-uglify'),
|
8 |
+
rename = require('gulp-rename'),
|
9 |
+
concat = require('gulp-concat'),
|
10 |
+
notify = require('gulp-notify'),
|
11 |
+
cache = require('gulp-cache'),
|
12 |
+
livereload = require('gulp-livereload'),
|
13 |
+
del = require('del'),
|
14 |
+
wpPot = require('gulp-wp-pot'),
|
15 |
+
sort = require('gulp-sort'),
|
16 |
+
pump = require('pump');
|
17 |
|
18 |
+
|
19 |
+
// Styles
|
20 |
+
gulp.task('styles', function(cb) {
|
21 |
+
pump([
|
22 |
+
gulp.src( 'assets/css/*.scss' ),
|
23 |
+
sass( { 'sourcemap=none': true, outputStyle: 'compact' } ),
|
24 |
+
autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'),
|
25 |
+
gulp.dest('assets/css'),
|
26 |
+
rename({suffix: '.min'}),
|
27 |
+
minifycss(),
|
28 |
+
gulp.dest('assets/css')
|
29 |
+
], cb);
|
30 |
+
});
|
31 |
+
|
32 |
+
// i18n files
|
33 |
gulp.task('build-i18n-pot', function () {
|
34 |
return gulp.src([ 'classes/**/*.php', 'templates/**/*.php', '*.php' ] )
|
35 |
.pipe( sort() )
|
36 |
.pipe( wpPot( {
|
37 |
+
domain: 'wc-vendors',
|
38 |
destFile:'default.pot',
|
39 |
+
package: 'wc-vendors',
|
40 |
bugReport: 'https://www.wcvendors.com',
|
41 |
+
lastTranslator: 'Jamie Madden <translate@wcvendors.com>',
|
42 |
+
team: 'WC Vendors <translate@wcvendors.com>'
|
43 |
} ) )
|
44 |
+
.pipe( gulp.dest('languages/wc-vendors.pot') );
|
45 |
});
|
46 |
|
47 |
|
48 |
+
gulp.task( 'default', [ 'styles', 'build-i18n-pot' ] );
|
languages/default.pot
CHANGED
@@ -1,569 +1,1246 @@
|
|
1 |
-
# Copyright (C)
|
2 |
-
# This file is distributed under the same license as the
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version:
|
6 |
"Report-Msgid-Bugs-To: https://www.wcvendors.com\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"PO-Revision-Date:
|
11 |
-
"Last-Translator: Jamie Madden <
|
12 |
-
"Language-Team: WC Vendors <
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
-
#: class-wc-vendors.php:
|
20 |
msgid "WC Vendors requires WooCommerce to run. Please install WooCommerce and activate before attempting to activate again."
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: class-wc-vendors.php:
|
24 |
msgid "WC Vendors"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: class-wc-vendors.php:
|
28 |
-
msgid "<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: class-wc-vendors.php:
|
32 |
msgid "Capabilities"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: class-wc-vendors.php:
|
36 |
msgid "Vendor"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: class-wc-vendors.php:
|
40 |
msgid "General"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: class-wc-vendors.php:
|
44 |
-
msgid "Documentation
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: class-wc-vendors.php:
|
48 |
-
msgid "
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: class-wc-vendors.php:
|
52 |
-
msgid "
|
53 |
msgstr ""
|
54 |
|
55 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
msgid "Vendors shipped"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: classes/admin/class-admin-
|
60 |
-
msgid "Vendors Shipped"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: classes/admin/
|
64 |
-
msgid "
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: classes/admin/class-admin-
|
68 |
-
msgid "
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: classes/admin/class-admin-
|
72 |
-
msgid "
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: classes/admin/class-admin-
|
76 |
-
msgid "
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: classes/admin/class-admin-
|
80 |
-
msgid "
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: classes/admin/class-admin-
|
84 |
-
msgid "
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: classes/admin/class-admin-
|
88 |
-
msgid "
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: classes/admin/class-
|
92 |
-
msgid "
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: classes/admin/class-
|
96 |
-
msgid "
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: classes/admin/class-
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: classes/admin/class-
|
104 |
-
msgid "
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: classes/admin/class-
|
108 |
-
msgid "
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: classes/admin/class-
|
112 |
-
msgid "
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: classes/admin/
|
116 |
-
msgid "
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: classes/admin/class-
|
120 |
-
msgid "
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: classes/admin/
|
124 |
-
msgid "
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: classes/admin/
|
128 |
-
msgid "
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: classes/admin/class-
|
132 |
-
msgid "
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: classes/admin/class-
|
136 |
-
msgid "
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: classes/admin/class-
|
140 |
-
msgid "
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: classes/admin/class-
|
144 |
-
msgid "
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: classes/admin/class-
|
148 |
-
msgid "
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: classes/admin/class-
|
152 |
-
msgid "
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: classes/admin/class-
|
156 |
-
msgid "
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: classes/admin/
|
160 |
-
msgid "
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: classes/admin/
|
164 |
-
msgid "
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: classes/admin/
|
168 |
-
msgid "
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: classes/admin/class-
|
172 |
-
msgid "
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: classes/admin/class-
|
176 |
-
msgid "
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: classes/admin/class-
|
180 |
-
msgid "
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: classes/admin/class-
|
184 |
-
msgid "
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: classes/admin/class-
|
188 |
-
msgid "
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: classes/admin/class-admin-
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: classes/admin/class-
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: classes/admin/class-
|
200 |
-
msgid "
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: classes/admin/
|
204 |
-
msgid "
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: classes/admin/class-
|
208 |
-
msgid "
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: classes/admin/class-
|
212 |
-
msgid "
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: classes/admin/class-admin-
|
216 |
-
msgid "
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: classes/admin/
|
220 |
-
msgid "
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: classes/admin/class-admin-
|
224 |
-
msgid "
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: classes/admin/class-
|
228 |
-
msgid "
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: classes/admin/class-
|
232 |
-
msgid "
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: classes/admin/class-
|
236 |
-
msgid "
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: classes/admin/class-
|
240 |
-
msgid "
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: classes/admin/class-admin-
|
244 |
-
msgid "
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: classes/admin/class-
|
248 |
-
msgid "
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: classes/admin/class-admin-
|
252 |
-
msgid "
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: classes/admin/class-
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: classes/admin/class-
|
260 |
-
msgid "
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: classes/admin/class-
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: classes/admin/class-
|
268 |
-
msgid "
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: classes/admin/class-
|
272 |
-
msgid "
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: classes/admin/class-
|
276 |
-
msgid "
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: classes/admin/class-
|
280 |
-
msgid "
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: classes/admin/class-
|
284 |
-
msgid "
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: classes/admin/class-
|
288 |
-
msgid "
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: classes/admin/class-
|
292 |
-
msgid "
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: classes/admin/class-
|
296 |
-
msgid "
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: classes/admin/class-
|
300 |
-
msgid "
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: classes/admin/class-
|
304 |
-
msgid "
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: classes/admin/class-
|
308 |
-
msgid "
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: classes/admin/class-
|
312 |
-
msgid "
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: classes/admin/class-
|
316 |
-
msgid "
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: classes/admin/class-
|
320 |
-
msgid "
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: classes/admin/class-
|
324 |
-
msgid "
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: classes/admin/class-
|
328 |
-
msgid "
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: classes/admin/class-
|
332 |
-
msgid "
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: classes/admin/
|
336 |
-
msgid "
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: classes/admin/
|
340 |
-
msgid "
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: classes/admin/class-
|
344 |
-
msgid "
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: classes/admin/class-
|
348 |
-
msgid "
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: classes/admin/
|
352 |
-
msgid "
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: classes/admin/class-
|
356 |
-
msgid "
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: classes/admin/class-
|
360 |
-
msgid "
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: classes/admin/class-
|
364 |
-
msgid "
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: classes/admin/class-
|
368 |
-
msgid "
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: classes/admin/class-
|
372 |
-
msgid "
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: classes/admin/class-
|
376 |
-
msgid "
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: classes/admin/class-
|
380 |
-
msgid "
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: classes/admin/class-
|
384 |
-
msgid "
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: classes/admin/class-
|
388 |
-
msgid "
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: classes/admin/class-
|
392 |
-
msgid "
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: classes/admin/class-
|
396 |
-
msgid "
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: classes/admin/class-
|
400 |
-
msgid "
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: classes/admin/class-
|
404 |
-
msgid "
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: classes/admin/class-
|
408 |
-
msgid "
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: classes/admin/
|
412 |
-
msgid "
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: classes/admin/
|
416 |
-
msgid "
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: classes/admin/
|
420 |
-
msgid "
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: classes/admin/
|
424 |
-
msgid "
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: classes/admin/
|
428 |
-
msgid "
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: classes/admin/
|
432 |
-
msgid "
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: classes/admin/
|
436 |
-
msgid "
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: classes/admin/
|
440 |
-
msgid "
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: classes/admin/
|
444 |
-
msgid "Enable
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: classes/admin/
|
448 |
-
msgid "
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: classes/admin/
|
452 |
-
msgid "
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: classes/admin/
|
456 |
-
msgid "
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: classes/admin/
|
460 |
-
msgid "
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: classes/admin/
|
464 |
-
msgid "
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: classes/admin/
|
468 |
-
msgid "
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: classes/admin/
|
472 |
-
msgid "
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: classes/admin/
|
476 |
-
msgid "
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: classes/admin/
|
480 |
-
msgid "
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: classes/admin/
|
484 |
-
msgid "
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: classes/admin/
|
488 |
-
msgid "
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: classes/admin/
|
492 |
-
msgid "
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: classes/admin/
|
496 |
-
msgid "
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: classes/admin/
|
500 |
-
msgid "
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: classes/admin/
|
504 |
-
msgid "
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: classes/admin/
|
508 |
-
msgid "
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: classes/admin/
|
512 |
-
msgid "
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: classes/admin/
|
516 |
-
msgid "
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: classes/admin/
|
520 |
-
msgid "
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: classes/admin/
|
524 |
-
msgid "
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: classes/admin/
|
528 |
-
msgid "
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: classes/admin/
|
532 |
-
msgid "
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: classes/admin/
|
536 |
-
msgid "
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: classes/admin/
|
540 |
-
msgid "
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: classes/admin/
|
544 |
-
msgid "
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: classes/admin/
|
548 |
-
msgid "
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: classes/admin/
|
552 |
-
msgid "
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: classes/admin/
|
556 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: classes/admin/settings/classes/sf-class-format-options.php:211, classes/admin/settings/classes/sf-class-settings.php:
|
560 |
msgid "Select a page..."
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: classes/admin/settings/classes/sf-class-settings.php:153, templates/dashboard/settings/settings.php:1
|
564 |
msgid "Settings"
|
565 |
msgstr ""
|
566 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
#: classes/admin/settings/classes/sf-class-settings.php:305
|
568 |
msgid "Could not load settings at: "
|
569 |
msgstr ""
|
@@ -577,26 +1254,26 @@ msgid "Save %s changes"
|
|
577 |
msgstr ""
|
578 |
|
579 |
#: classes/admin/settings/classes/sf-class-settings.php:502
|
580 |
-
msgid "Please help with a <a href=\"https://wordpress.org/support/view/plugin-reviews/wc-vendors?rate=5#postform\" target=\"top\">High Five!</a> | <a href=\"https://www.wcvendors.com/product/wc-vendors-pro
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: classes/admin/settings/classes/sf-class-settings.php:
|
584 |
msgid "Edit Page"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: classes/admin/settings/classes/sf-class-settings.php:
|
588 |
msgid "View Page"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: classes/admin/settings/classes/sf-class-settings.php:
|
592 |
msgid "Update %s"
|
593 |
msgstr ""
|
594 |
|
595 |
-
#: classes/admin/settings/classes/sf-class-settings.php:
|
596 |
msgid "Add %s"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: classes/admin/settings/classes/sf-class-settings.php:
|
600 |
msgid "Upload an image for the %s"
|
601 |
msgstr ""
|
602 |
|
@@ -636,10 +1313,6 @@ msgstr ""
|
|
636 |
msgid "With this unchecked, all vendor applications are automatically accepted. Otherwise, you must approve each manually."
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: classes/admin/settings/sf-options.php:43, classes/admin/settings/sf-options.php:175
|
640 |
-
msgid "Taxes"
|
641 |
-
msgstr ""
|
642 |
-
|
643 |
#: classes/admin/settings/sf-options.php:44
|
644 |
msgid "Give vendors any tax collected per-product"
|
645 |
msgstr ""
|
@@ -660,10 +1333,6 @@ msgstr ""
|
|
660 |
msgid "Shop options"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: classes/admin/settings/sf-options.php:63
|
664 |
-
msgid "Shop HTML"
|
665 |
-
msgstr ""
|
666 |
-
|
667 |
#: classes/admin/settings/sf-options.php:64
|
668 |
msgid "Enable HTML for a vendor's shop description by default. You can enable or disable this per vendor by editing the vendors user account."
|
669 |
msgstr ""
|
@@ -696,10 +1365,6 @@ msgstr ""
|
|
696 |
msgid "Select what will be displayed for the sold by text throughout the store."
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: classes/admin/settings/sf-options.php:93
|
700 |
-
msgid "Display Name"
|
701 |
-
msgstr ""
|
702 |
-
|
703 |
#: classes/admin/settings/sf-options.php:94, classes/admin/views/html-vendor-settings-page.php:22, templates/dashboard/settings/shop-name.php:2
|
704 |
msgid "Shop Name"
|
705 |
msgstr ""
|
@@ -709,15 +1374,7 @@ msgid "User Login"
|
|
709 |
msgstr ""
|
710 |
|
711 |
#: classes/admin/settings/sf-options.php:96
|
712 |
-
msgid "User Email"
|
713 |
-
msgstr ""
|
714 |
-
|
715 |
-
#: classes/admin/settings/sf-options.php:103, classes/admin/settings/sf-options.php:116
|
716 |
-
msgid "Sold By"
|
717 |
-
msgstr ""
|
718 |
-
|
719 |
-
#: classes/admin/settings/sf-options.php:104
|
720 |
-
msgid "Enable sold by labels"
|
721 |
msgstr ""
|
722 |
|
723 |
#: classes/admin/settings/sf-options.php:105
|
@@ -760,22 +1417,6 @@ msgstr ""
|
|
760 |
msgid "CHECKING these boxes will **HIDE** these areas of the add product page for vendors"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: classes/admin/settings/sf-options.php:135
|
764 |
-
msgid "Inventory"
|
765 |
-
msgstr ""
|
766 |
-
|
767 |
-
#: classes/admin/settings/sf-options.php:137
|
768 |
-
msgid "Linked Products"
|
769 |
-
msgstr ""
|
770 |
-
|
771 |
-
#: classes/admin/settings/sf-options.php:138
|
772 |
-
msgid "Attributes"
|
773 |
-
msgstr ""
|
774 |
-
|
775 |
-
#: classes/admin/settings/sf-options.php:139
|
776 |
-
msgid "Advanced"
|
777 |
-
msgstr ""
|
778 |
-
|
779 |
#: classes/admin/settings/sf-options.php:146
|
780 |
msgid "Types"
|
781 |
msgstr ""
|
@@ -808,30 +1449,14 @@ msgstr ""
|
|
808 |
msgid "CHECKING these boxes will **HIDE** these product options from the vendor"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: classes/admin/settings/sf-options.php:164
|
812 |
-
msgid "Virtual"
|
813 |
-
msgstr ""
|
814 |
-
|
815 |
-
#: classes/admin/settings/sf-options.php:165
|
816 |
-
msgid "Downloadable"
|
817 |
-
msgstr ""
|
818 |
-
|
819 |
#: classes/admin/settings/sf-options.php:172
|
820 |
msgid "Miscellaneous"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: classes/admin/settings/sf-options.php:176
|
824 |
-
msgid "SKU"
|
825 |
-
msgstr ""
|
826 |
-
|
827 |
#: classes/admin/settings/sf-options.php:177
|
828 |
msgid "Featured"
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: classes/admin/settings/sf-options.php:178
|
832 |
-
msgid "Duplicate Product"
|
833 |
-
msgstr ""
|
834 |
-
|
835 |
#: classes/admin/settings/sf-options.php:185
|
836 |
msgid "Stylesheet"
|
837 |
msgstr ""
|
@@ -840,10 +1465,6 @@ msgstr ""
|
|
840 |
msgid "You can add CSS in this textarea, which will be loaded on the product add/edit page for vendors."
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: classes/admin/settings/sf-options.php:193
|
844 |
-
msgid "Permissions"
|
845 |
-
msgstr ""
|
846 |
-
|
847 |
#: classes/admin/settings/sf-options.php:193
|
848 |
msgid "General permissions used around the shop"
|
849 |
msgstr ""
|
@@ -889,158 +1510,138 @@ msgid "Vendors could export orders for a product on the frontend"
|
|
889 |
msgstr ""
|
890 |
|
891 |
#: classes/admin/settings/sf-options.php:237
|
892 |
-
msgid "Reports"
|
893 |
-
msgstr ""
|
894 |
-
|
895 |
-
#: classes/admin/settings/sf-options.php:238
|
896 |
-
msgid "<strike>View backend sales reports</strike>. <strong>Depreciated</strong>"
|
897 |
-
msgstr ""
|
898 |
-
|
899 |
-
#: classes/admin/settings/sf-options.php:239
|
900 |
-
msgid "This option has been removed and will no longer function. It will be completely removed in future versions. Vendors should use their Vendor Dashboard for reports as all identical functionality is already there. "
|
901 |
-
msgstr ""
|
902 |
-
|
903 |
-
#: classes/admin/settings/sf-options.php:246
|
904 |
msgid "View Frontend sales reports"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: classes/admin/settings/sf-options.php:
|
908 |
msgid "Sales table on the frontend on the Vendor Dashboard page. The table will only display sales data that pertain to their products, and only for orders that are processing or completed."
|
909 |
msgstr ""
|
910 |
|
911 |
-
#: classes/admin/settings/sf-options.php:
|
912 |
msgid "Submit products"
|
913 |
msgstr ""
|
914 |
|
915 |
-
#: classes/admin/settings/sf-options.php:
|
916 |
msgid "Check to allow vendors to list new products. Admin must approve new products by editing the product, and clicking Publish."
|
917 |
msgstr ""
|
918 |
|
919 |
-
#: classes/admin/settings/sf-options.php:
|
920 |
msgid "Edit live products"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: classes/admin/settings/sf-options.php:
|
924 |
msgid "Vendors could edit an approved product after it has already gone live. There is no approval or review after editing a live product. This could be dangerous with malicious vendors, so take caution."
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: classes/admin/settings/sf-options.php:
|
928 |
msgid "Submit products live without requiring approval"
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: classes/admin/settings/sf-options.php:
|
932 |
msgid "Vendors can submit products without review or approval from a shop admin. This could be dangerous with malicious vendors, so take caution."
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: classes/admin/settings/sf-options.php:
|
936 |
-
msgid "Pages"
|
937 |
-
msgstr ""
|
938 |
-
|
939 |
-
#: classes/admin/settings/sf-options.php:279
|
940 |
msgid "Page configuration"
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: classes/admin/settings/sf-options.php:
|
944 |
msgid "Vendor dashboard"
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: classes/admin/settings/sf-options.php:
|
948 |
msgid "Choose the page that has the shortcode <code>[wcv_vendor_dashboard]</code><br/>. If this page is not set, you will break your site. If you upgrade to Pro, keep this page unchanged as both Pro Dashboard and this Dashboard page must be set."
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: classes/admin/settings/sf-options.php:
|
952 |
msgid "Shop settings"
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: classes/admin/settings/sf-options.php:
|
956 |
msgid "Choose the page that has the shortcode <code>[wcv_shop_settings]</code><br/>These are the shop settings a vendor can configure. By default, Vendor Dashboard > Shop Settings should have this shortcode."
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: classes/admin/settings/sf-options.php:
|
960 |
msgid "Orders page"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: classes/admin/settings/sf-options.php:
|
964 |
msgid "Choose the page that has the shortcode <code>[wcv_orders]</code><br/>By default, Vendor Dashboard > Orders should have the shortcode."
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: classes/admin/settings/sf-options.php:
|
968 |
msgid "Vendor terms"
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: classes/admin/settings/sf-options.php:
|
972 |
msgid "These terms are shown to a user when submitting an application to become a vendor.<br/>If left blank, no terms will be shown to the applicant. Vendor must accept terms in order to register, if set."
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: classes/admin/settings/sf-options.php:
|
976 |
msgid "payments"
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: classes/admin/settings/sf-options.php:
|
980 |
-
msgid "Payments"
|
981 |
-
msgstr ""
|
982 |
-
|
983 |
-
#: classes/admin/settings/sf-options.php:327
|
984 |
-
msgid "PayPal Adaptive Payments Scheduling"
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: classes/admin/settings/sf-options.php:
|
988 |
msgid "Total commission currently due: %s. <a href=\"%s\">View details</a>."
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: classes/admin/settings/sf-options.php:
|
992 |
-
msgid "Make sure you update your PayPal Adaptive Payments settings <a href=\"%s\">here</a>. <br><br>To instantly pay with Adaptive Payments you must activate the PayPal AP gateway in your Checkout settings. <br><a href=\"https://www.wcvendors.com/kb/configuring-paypal-adaptive-payments/\" target=\"top\">PayPal AP Application Help</a>. <br><br>Another gateway that offers instant payments to vendors that also accepts credit cards directly on your checkout page is Stripe. <br><a href=\"https://www.wcvendors.com/product/stripe-commissions-gateway/\" target=\"top\">Stripe Commissions & Gateway plugin</a> is
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: classes/admin/settings/sf-options.php:
|
996 |
msgid "Instant pay"
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: classes/admin/settings/sf-options.php:
|
1000 |
msgid "Instantly pay vendors their commission when an order is made, and if a vendor has a valid PayPal email added on their Shop Settings page."
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: classes/admin/settings/sf-options.php:
|
1004 |
msgid "For this to work, customers must checkout with the PayPal Adaptive Payments gateway. Using any other gateways will not pay vendors instantly"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: classes/admin/settings/sf-options.php:
|
1008 |
msgid "Payment schedule"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
-
#: classes/admin/settings/sf-options.php:
|
1012 |
msgid "Note: Schedule will only work if instant pay is unchecked"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
-
#: classes/admin/settings/sf-options.php:
|
1016 |
msgid "Daily"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: classes/admin/settings/sf-options.php:
|
1020 |
msgid "Weekly"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: classes/admin/settings/sf-options.php:
|
1024 |
msgid "Biweekly"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: classes/admin/settings/sf-options.php:
|
1028 |
msgid "Monthly"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: classes/admin/settings/sf-options.php:
|
1032 |
msgid "Manual"
|
1033 |
msgstr ""
|
1034 |
|
1035 |
-
#: classes/admin/settings/sf-options.php:
|
1036 |
msgid "Now"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: classes/admin/settings/sf-options.php:
|
1040 |
msgid "Email notification"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: classes/admin/settings/sf-options.php:
|
1044 |
msgid "Send the WooCommerce admin an email each time a payment has been made via the payment schedule options above"
|
1045 |
msgstr ""
|
1046 |
|
@@ -1072,27 +1673,315 @@ msgstr ""
|
|
1072 |
msgid "Save Shop Settings"
|
1073 |
msgstr ""
|
1074 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1075 |
#: classes/class-cron.php:87
|
1076 |
msgid "Payment total: %s"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: classes/class-install.php:
|
1080 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: classes/front/dashboard/class-vendor-dashboard.php:
|
1084 |
msgid "Order marked shipped."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: classes/front/dashboard/class-vendor-dashboard.php:
|
1088 |
msgid "%s has marked as shipped. "
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: classes/front/dashboard/class-vendor-dashboard.php:
|
1092 |
msgid "Tracking number"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: classes/front/dashboard/class-vendor-dashboard.php:
|
1096 |
msgid "Success. Your tracking number has been updated."
|
1097 |
msgstr ""
|
1098 |
|
@@ -1136,10 +2025,6 @@ msgstr ""
|
|
1136 |
msgid "Zip"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: classes/front/orders/class-orders.php:256
|
1140 |
-
msgid "Email address"
|
1141 |
-
msgstr ""
|
1142 |
-
|
1143 |
#: classes/front/orders/class-submit-comment.php:41
|
1144 |
msgid "You've left the comment field empty!"
|
1145 |
msgstr ""
|
@@ -1148,27 +2033,31 @@ msgstr ""
|
|
1148 |
msgid "Success. The customer has been notified of your comment."
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: classes/front/signup/class-vendor-signup.php:
|
|
|
|
|
|
|
|
|
1152 |
msgid "Application denied. You are an administrator."
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: classes/front/signup/class-vendor-signup.php:
|
1156 |
msgid "Your application has been submitted."
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: classes/front/signup/class-vendor-signup.php:
|
1160 |
msgid "You must accept the terms and conditions to become a vendor."
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: classes/front/signup/views/html-vendor-signup.php:
|
1164 |
msgid "Apply to become a vendor? "
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: classes/front/signup/views/html-vendor-signup.php:
|
1168 |
-
msgid "I have read and accepted the <a target=\"top\" href=\"%s\">terms and conditions</a
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: classes/front/signup/views/html-vendor-signup.php:
|
1172 |
msgid "Please agree to the terms and conditions"
|
1173 |
msgstr ""
|
1174 |
|
@@ -1192,7 +2081,7 @@ msgstr ""
|
|
1192 |
msgid "Method Title"
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:153
|
1196 |
msgid "This controls the title which the user sees during checkout."
|
1197 |
msgstr ""
|
1198 |
|
@@ -1200,7 +2089,7 @@ msgstr ""
|
|
1200 |
msgid "PayPal"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:159
|
1204 |
msgid "Description"
|
1205 |
msgstr ""
|
1206 |
|
@@ -1272,24 +2161,28 @@ msgstr ""
|
|
1272 |
msgid "The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled)."
|
1273 |
msgstr ""
|
1274 |
|
1275 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:
|
|
|
|
|
|
|
|
|
1276 |
msgid "Gateway Disabled"
|
1277 |
msgstr ""
|
1278 |
|
1279 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:
|
1280 |
msgid "%s does not support your store currency."
|
1281 |
msgstr ""
|
1282 |
|
1283 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:
|
1284 |
msgid "Error: %s"
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:
|
1288 |
msgid "Error ID: %s. %s"
|
1289 |
msgstr ""
|
1290 |
|
1291 |
-
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:
|
1292 |
-
msgid "
|
1293 |
msgstr ""
|
1294 |
|
1295 |
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:115
|
@@ -1324,6 +2217,54 @@ msgstr ""
|
|
1324 |
msgid "Payment total: %s."
|
1325 |
msgstr ""
|
1326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1327 |
#: templates/dashboard/denied.php:8
|
1328 |
msgid "Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!"
|
1329 |
msgstr ""
|
@@ -1344,10 +2285,6 @@ msgstr ""
|
|
1344 |
msgid "View Your Store"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: templates/dashboard/links.php:4
|
1348 |
-
msgid "Store Settings"
|
1349 |
-
msgstr ""
|
1350 |
-
|
1351 |
#: templates/dashboard/links.php:7
|
1352 |
msgid "Add New Product"
|
1353 |
msgstr ""
|
@@ -1404,15 +2341,11 @@ msgstr ""
|
|
1404 |
msgid "Save"
|
1405 |
msgstr ""
|
1406 |
|
1407 |
-
#: templates/emails/application-status.php:5
|
1408 |
-
msgid "Hi there. This is a notification about a vendor application on %s."
|
1409 |
-
msgstr ""
|
1410 |
-
|
1411 |
#: templates/emails/application-status.php:8
|
1412 |
msgid "Application status: %s"
|
1413 |
msgstr ""
|
1414 |
|
1415 |
-
#: templates/emails/application-status.php:9
|
1416 |
msgid "Applicant username: %s"
|
1417 |
msgstr ""
|
1418 |
|
@@ -1460,6 +2393,10 @@ msgstr ""
|
|
1460 |
msgid "You have received an order from %s. Their order is as follows:"
|
1461 |
msgstr ""
|
1462 |
|
|
|
|
|
|
|
|
|
1463 |
#: templates/orders/comments/add-new-comment.php:11
|
1464 |
msgid "Add comment"
|
1465 |
msgstr ""
|
@@ -1480,7 +2417,7 @@ msgstr ""
|
|
1480 |
msgid "No customer note."
|
1481 |
msgstr ""
|
1482 |
|
1483 |
-
#: templates/orders/orders.php:
|
1484 |
msgid "Comments (%s)"
|
1485 |
msgstr ""
|
1486 |
|
1 |
+
# Copyright (C) 2018 wc-vendors
|
2 |
+
# This file is distributed under the same license as the wc-vendors package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: wc-vendors\n"
|
6 |
"Report-Msgid-Bugs-To: https://www.wcvendors.com\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
|
11 |
+
"Last-Translator: Jamie Madden <translate@wcvendors.com>\n"
|
12 |
+
"Language-Team: WC Vendors <translate@wcvendors.com>\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
#: class-wc-vendors.php:105
|
20 |
msgid "WC Vendors requires WooCommerce to run. Please install WooCommerce and activate before attempting to activate again."
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: class-wc-vendors.php:205, classes/admin/class-admin-menus.php:41, classes/admin/class-admin-menus.php:41, classes/admin/class-admin-reports.php:41, classes/admin/class-admin-users.php:384
|
24 |
msgid "WC Vendors"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: class-wc-vendors.php:263
|
28 |
+
msgid "<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce 3.0.0 to operate."
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: class-wc-vendors.php:603, classes/admin/class-setup-wizard.php:74, classes/admin/settings/class-wcv-settings-capabilities.php:31, classes/admin/settings/sf-options.php:192
|
32 |
msgid "Capabilities"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: class-wc-vendors.php:647, classes/admin/class-admin-reports.php:178, classes/admin/class-admin-reports.php:461, classes/admin/class-product-meta.php:46, classes/admin/class-product-meta.php:187, classes/admin/class-product-meta.php:223, classes/admin/class-wcv-admin-setup.php:154, classes/admin/class-wcv-commissions-csv-exporter.php:43, classes/admin/class-wcv-commissions-page.php:121, classes/class-install.php:124, classes/includes/class-functions.php:55
|
36 |
msgid "Vendor"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: class-wc-vendors.php:651, classes/admin/settings/class-wcv-settings-capabilities.php:43, classes/admin/settings/class-wcv-settings-capabilities.php:105, classes/admin/settings/class-wcv-settings-commission.php:43, classes/admin/settings/class-wcv-settings-display.php:43, classes/admin/settings/class-wcv-settings-general.php:31, classes/admin/settings/class-wcv-settings-general.php:43, classes/admin/settings/class-wcv-settings-payments.php:43, classes/admin/settings/sf-options.php:4, classes/admin/views/setup/general.php:19
|
40 |
msgid "General"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: class-wc-vendors.php:729
|
44 |
+
msgid "Documentation"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: class-wc-vendors.php:731, class-wc-vendors.php:869
|
48 |
+
msgid "Upgrade to Pro"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: class-wc-vendors.php:733
|
52 |
+
msgid "Contact Us"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: class-wc-vendors.php:875
|
56 |
+
msgid "Upgrade to WC Vendors Pro!"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: class-wc-vendors.php:879
|
60 |
+
msgid ""
|
61 |
+
"WC Vendors Pro extends your marketplace to include some of the following enhanced features
|
62 |
+
" <ul>
|
63 |
+
" <li>Complete front end dashboard for your vendors</li>
|
64 |
+
" <li>Vendor Coupons</li>
|
65 |
+
" <li>Vendor product management</li>
|
66 |
+
" <li>Vendor Order management</li>
|
67 |
+
" <li>Vendor ratings</li>
|
68 |
+
" <li>Vendors can upload their own store banners</li>
|
69 |
+
" <li>A comprehensive shipping system for your vendors including two systems. Flat rate and Table rate shipping.</li>
|
70 |
+
" <li>All default product types supported on the front end</li>
|
71 |
+
" <li>Custom product-edit templates</li>
|
72 |
+
" <li>Complete vendor signup form</li>
|
73 |
+
" </ul>
|
74 |
+
" <a href=\"http://www.wcvendors.com/home/comparison/?utm_source=plugin\">See the complete comparison list here.</a>
|
75 |
+
" <h1><a href=\"https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo\">Buy Pro Today</a></h1>"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: classes/admin/class-admin-menus.php:48
|
79 |
+
msgid "WC Vendors Extensions"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: classes/admin/class-admin-menus.php:48, classes/admin/views/setup/ready.php:65
|
83 |
+
msgid "Extensions"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: classes/admin/class-admin-reports.php:44
|
87 |
+
msgid "Overview"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: classes/admin/class-admin-reports.php:50
|
91 |
+
msgid "Commission by vendor"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: classes/admin/class-admin-reports.php:56
|
95 |
+
msgid "Commission by product"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: classes/admin/class-admin-reports.php:62, classes/admin/class-admin-reports.php:348
|
99 |
+
msgid "Commission Totals"
|
100 |
+
msgstr ""
|
101 |
+
|
102 |
+
#: classes/admin/class-admin-reports.php:63
|
103 |
+
msgid "Commission totals for all vendors includes shipping and taxes. By default no date range is used and all due commissions are returned. Use the date range to filter."
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: classes/admin/class-admin-reports.php:124, classes/admin/class-admin-reports.php:440, templates/dashboard/date-picker.php:3
|
107 |
+
msgid "From:"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: classes/admin/class-admin-reports.php:126, classes/admin/class-admin-reports.php:442, templates/dashboard/date-picker.php:7
|
111 |
+
msgid "To:"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: classes/admin/class-admin-reports.php:128, classes/admin/class-admin-reports.php:286, classes/admin/class-admin-reports.php:451, templates/dashboard/date-picker.php:12
|
115 |
+
msgid "Show"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: classes/admin/class-admin-reports.php:134
|
119 |
+
msgid "Total paid in range"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: classes/admin/class-admin-reports.php:137, classes/admin/class-admin-reports.php:144, classes/admin/class-admin-reports.php:151
|
123 |
+
msgid "n/a"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: classes/admin/class-admin-reports.php:141
|
127 |
+
msgid "Total due in range"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: classes/admin/class-admin-reports.php:148
|
131 |
+
msgid "Total reversed in range"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: classes/admin/class-admin-reports.php:158
|
135 |
+
msgid "Recent Commission"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: classes/admin/class-admin-reports.php:176, classes/front/orders/class-orders.php:249, templates/dashboard/orders.php:44
|
139 |
+
msgid "Order"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: classes/admin/class-admin-reports.php:177, classes/admin/class-wcv-commissions-csv-exporter.php:41, classes/admin/class-wcv-commissions-page.php:119, templates/dashboard/reports.php:17, templates/emails/notify-vendor-shipped.php:26, templates/emails/vendor-new-order.php:30
|
143 |
+
msgid "Product"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: classes/admin/class-admin-reports.php:179, classes/admin/class-admin-reports.php:377, classes/admin/class-vendor-admin-dashboard.php:325, classes/admin/class-wcv-commissions-csv-exporter.php:47, classes/admin/class-wcv-commissions-page.php:125, templates/dashboard/orders.php:46
|
147 |
+
msgid "Total"
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: classes/admin/class-admin-reports.php:180
|
151 |
+
msgid "Date & Time"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: classes/admin/class-admin-reports.php:181, classes/admin/class-admin-reports.php:464, classes/admin/class-wcv-commissions-csv-exporter.php:48, classes/admin/class-wcv-commissions-page.php:126
|
155 |
+
msgid "Status"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: classes/admin/class-admin-reports.php:189
|
159 |
+
msgid "N/A"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: classes/admin/class-admin-reports.php:194
|
163 |
+
msgid "D j M Y at h:ia"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: classes/admin/class-admin-reports.php:203
|
167 |
+
msgid "No commission yet"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: classes/admin/class-admin-reports.php:237
|
171 |
+
msgid "Show:"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: classes/admin/class-admin-reports.php:249
|
175 |
+
msgid "Type in a product name to start searching..."
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: classes/admin/class-admin-reports.php:281
|
179 |
+
msgid "Select a vendor…"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: classes/admin/class-admin-reports.php:347
|
183 |
+
msgid "Month"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: classes/admin/class-admin-reports.php:349, classes/admin/class-wcv-commissions-csv-exporter.php:46, classes/admin/class-wcv-commissions-page.php:124
|
187 |
+
msgid "Tax"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: classes/admin/class-admin-reports.php:350, classes/admin/class-wcv-commissions-csv-exporter.php:45, classes/admin/class-wcv-commissions-page.php:123, classes/admin/settings/class-wcv-settings-capabilities.php:107, classes/admin/settings/sf-options.php:52, classes/admin/settings/sf-options.php:136, templates/dashboard/orders.php:45, templates/orders/orders.php:113
|
191 |
+
msgid "Shipping"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: classes/admin/class-admin-reports.php:351, classes/admin/class-admin-reports.php:448, classes/admin/class-wcv-commissions-page.php:284, classes/class-commission.php:57
|
195 |
+
msgid "Reversed"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: classes/admin/class-admin-reports.php:352, classes/admin/class-admin-reports.php:447, classes/admin/class-wcv-commissions-page.php:283, classes/admin/class-wcv-commissions-page.php:549, classes/class-commission.php:56
|
199 |
+
msgid "Paid"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: classes/admin/class-admin-reports.php:353, classes/admin/class-admin-reports.php:446, classes/admin/class-wcv-commissions-page.php:282, classes/admin/class-wcv-commissions-page.php:548, classes/class-commission.php:55
|
203 |
+
msgid "Due"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: classes/admin/class-admin-reports.php:462
|
207 |
+
msgid "Tax Total"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: classes/admin/class-admin-reports.php:463
|
211 |
+
msgid "Shipping Total"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: classes/admin/class-admin-reports.php:465
|
215 |
+
msgid "Commission Total"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: classes/admin/class-admin-reports.php:487
|
219 |
+
msgid "No commissions found."
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: classes/admin/class-admin-users.php:394
|
223 |
+
msgid "Enable HTML for the shop description"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: classes/admin/class-admin-users.php:400, classes/admin/settings/class-wcv-settings-display.php:234
|
227 |
+
msgid "Shop name"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: classes/admin/class-admin-users.php:407
|
231 |
+
msgid "PayPal E-mail"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: classes/admin/class-admin-users.php:408
|
235 |
+
msgid "required"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: classes/admin/class-admin-users.php:415
|
239 |
+
msgid "Commission rate"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: classes/admin/class-admin-users.php:416, classes/admin/class-product-meta.php:174
|
243 |
+
msgid "Leave blank for default"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: classes/admin/class-admin-users.php:422
|
247 |
+
msgid "Give Tax"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: classes/admin/class-admin-users.php:427
|
251 |
+
msgid "Tax override for vendor"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: classes/admin/class-admin-users.php:433
|
255 |
+
msgid "Give Shipping"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: classes/admin/class-admin-users.php:438
|
259 |
+
msgid "Shipping override for vendor"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: classes/admin/class-admin-users.php:444, classes/admin/views/html-vendor-settings-page.php:30, templates/dashboard/settings/seller-info.php:3
|
263 |
+
msgid "Seller info"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: classes/admin/class-admin-users.php:449
|
267 |
+
msgid "Shop description"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: classes/admin/class-product-meta.php:151, classes/admin/class-product-meta.php:167, classes/admin/class-wcv-admin-setup.php:272, classes/admin/class-wcv-commissions-csv-exporter.php:44, classes/admin/class-wcv-commissions-page.php:122, classes/admin/settings/class-wcv-settings-commission.php:31, classes/admin/views/setup/general.php:79, templates/dashboard/reports.php:19
|
271 |
+
msgid "Commission"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: classes/admin/class-setup-wizard.php:69
|
275 |
+
msgid "Start"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: classes/admin/class-setup-wizard.php:79, classes/admin/settings/class-wcv-settings-display.php:138, classes/admin/settings/sf-options.php:269, classes/admin/views/setup/pages.php:19
|
279 |
+
msgid "Pages"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: classes/admin/class-setup-wizard.php:84
|
283 |
+
msgid "Ready!"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: classes/admin/class-setup-wizard.php:99
|
287 |
+
msgctxt "enhanced select"
|
288 |
+
msgid "No matches found"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: classes/admin/class-setup-wizard.php:100
|
292 |
+
msgctxt "enhanced select"
|
293 |
+
msgid "Loading failed"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: classes/admin/class-setup-wizard.php:101
|
297 |
+
msgctxt "enhanced select"
|
298 |
+
msgid "Please enter 1 or more characters"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: classes/admin/class-setup-wizard.php:102
|
302 |
+
msgctxt "enhanced select"
|
303 |
+
msgid "Please enter %qty% or more characters"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: classes/admin/class-setup-wizard.php:103
|
307 |
+
msgctxt "enhanced select"
|
308 |
+
msgid "Please delete 1 character"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: classes/admin/class-setup-wizard.php:104
|
312 |
+
msgctxt "enhanced select"
|
313 |
+
msgid "Please delete %qty% characters"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: classes/admin/class-setup-wizard.php:105
|
317 |
+
msgctxt "enhanced select"
|
318 |
+
msgid "You can only select 1 item"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: classes/admin/class-setup-wizard.php:106
|
322 |
+
msgctxt "enhanced select"
|
323 |
+
msgid "You can only select %qty% items"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: classes/admin/class-setup-wizard.php:107
|
327 |
+
msgctxt "enhanced select"
|
328 |
+
msgid "Loading more results…"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: classes/admin/class-setup-wizard.php:108
|
332 |
+
msgctxt "enhanced select"
|
333 |
+
msgid "Searching…"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: classes/admin/class-setup-wizard.php:339
|
337 |
+
msgid "Don't forget to check our <a href=\"%1$s\" target=\"_blank\">documentation</a> to learn more about setting up WC Vendors and if you need help, be sure to visit our <a href=\"%2$s\" target=\"_blank\">free support forums</a>."
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: classes/admin/class-vendor-admin-dashboard.php:22, classes/admin/class-vendor-admin-dashboard.php:22, classes/admin/settings/class-wcv-settings-display.php:153
|
341 |
+
msgid "Shop Settings"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: classes/admin/class-vendor-admin-dashboard.php:23, classes/admin/class-vendor-admin-dashboard.php:23, classes/admin/class-vendor-admin-dashboard.php:183, classes/admin/settings/class-wcv-settings-capabilities.php:45, classes/admin/settings/class-wcv-settings-capabilities.php:281, classes/admin/settings/class-wcv-settings-display.php:162, classes/admin/settings/sf-options.php:196, classes/admin/views/setup/capabilities.php:70, templates/dashboard/orders.php:35
|
345 |
+
msgid "Orders"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: classes/admin/class-vendor-admin-dashboard.php:70, classes/front/dashboard/class-vendor-dashboard.php:117
|
349 |
+
msgid "Your PayPal address is not a valid email address."
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: classes/admin/class-vendor-admin-dashboard.php:79, classes/front/dashboard/class-vendor-dashboard.php:126
|
353 |
+
msgid "That shop name is already taken. Your shop name must be unique."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: classes/admin/class-vendor-admin-dashboard.php:115, classes/admin/settings/classes/sf-class-settings.php:371, classes/front/dashboard/class-vendor-dashboard.php:144
|
357 |
+
msgid "Settings saved."
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: classes/admin/class-vendor-admin-dashboard.php:246
|
361 |
+
msgid "order"
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: classes/admin/class-vendor-admin-dashboard.php:247
|
365 |
+
msgid "orders"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: classes/admin/class-vendor-admin-dashboard.php:322, classes/admin/class-wcv-commissions-csv-exporter.php:42, classes/admin/class-wcv-commissions-page.php:120
|
369 |
+
msgid "Order ID"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: classes/admin/class-vendor-admin-dashboard.php:323
|
373 |
+
msgid "Customer"
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: classes/admin/class-vendor-admin-dashboard.php:324, classes/admin/settings/class-wcv-settings-capabilities.php:44, classes/admin/settings/class-wcv-settings-capabilities.php:248, classes/admin/settings/sf-options.php:127, classes/admin/settings/sf-options.php:245, classes/admin/views/setup/capabilities.php:19
|
377 |
+
msgid "Products"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: classes/admin/class-vendor-admin-dashboard.php:326
|
381 |
+
msgid "Comments to Customer"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: classes/admin/class-vendor-admin-dashboard.php:327, classes/admin/class-wcv-commissions-csv-exporter.php:49, classes/admin/class-wcv-commissions-page.php:127, classes/front/orders/class-orders.php:257, templates/dashboard/orders.php:47
|
385 |
+
msgid "Date"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: classes/admin/class-vendor-admin-dashboard.php:328, templates/dashboard/orders.php:106
|
389 |
+
msgid "Shipped"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: classes/admin/class-vendor-admin-dashboard.php:364, templates/dashboard/orders.php:99
|
393 |
+
msgid "Mark shipped"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: classes/admin/class-vendor-admin-dashboard.php:390
|
397 |
+
msgid "Orders marked shipped."
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: classes/admin/class-vendor-admin-dashboard.php:554
|
401 |
+
msgid "Yes"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: classes/admin/class-vendor-admin-dashboard.php:554
|
405 |
+
msgid "No"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: classes/admin/class-vendor-applicants.php:74
|
409 |
+
msgid "Vendor has been <b>denied</b>."
|
410 |
+
msgstr ""
|
411 |
+
|
412 |
+
#: classes/admin/class-vendor-applicants.php:85
|
413 |
+
msgid "Vendor has been <b>approved</b>."
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: classes/admin/class-vendor-applicants.php:99
|
417 |
+
msgid "Pending Vendors"
|
418 |
+
msgstr ""
|
419 |
+
|
420 |
+
#: classes/admin/class-wcv-admin-setup.php:41
|
421 |
msgid "Vendors shipped"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: classes/admin/class-wcv-admin-setup.php:66
|
425 |
+
msgid "Vendors Shipped"
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: classes/admin/class-wcv-admin-setup.php:90, classes/admin/class-wcv-admin-setup.php:90
|
429 |
+
msgid "Commissions"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
#: classes/admin/class-wcv-admin-setup.php:108
|
433 |
+
msgid "Reset WC Vendors roles "
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: classes/admin/class-wcv-admin-setup.php:109
|
437 |
+
msgid "Reset WC Vendor Roles"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: classes/admin/class-wcv-admin-setup.php:110
|
441 |
+
msgid "This will reset the wcvendors roles ( vendor & pending_vendor ), back to the default capabilities."
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: classes/admin/class-wcv-admin-setup.php:115
|
445 |
+
msgid "Reset WC Vendors "
|
446 |
+
msgstr ""
|
447 |
+
|
448 |
+
#: classes/admin/class-wcv-admin-setup.php:116
|
449 |
+
msgid "Reset WC Vendors Settings"
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#: classes/admin/class-wcv-admin-setup.php:117
|
453 |
+
msgid "This will reset wcvendors back to defaults. This DELETES ALL YOUR Settings."
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: classes/admin/class-wcv-admin-setup.php:157, classes/class-install.php:117
|
457 |
+
msgid "Pending Vendor"
|
458 |
+
msgstr ""
|
459 |
+
|
460 |
+
#: classes/admin/class-wcv-admin-setup.php:163
|
461 |
+
msgid "WC Vendor roles successfully reset."
|
462 |
+
msgstr ""
|
463 |
+
|
464 |
+
#: classes/admin/class-wcv-admin-setup.php:177
|
465 |
+
msgid "WC Vendors was successfully reset. All settings have been reset."
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: classes/admin/class-wcv-admin-setup.php:191
|
469 |
+
msgid "Select a Vendor"
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: classes/admin/class-wcv-commissions-page.php:171
|
473 |
+
msgid "Mark paid"
|
474 |
+
msgstr ""
|
475 |
+
|
476 |
+
#: classes/admin/class-wcv-commissions-page.php:172
|
477 |
+
msgid "Mark due"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: classes/admin/class-wcv-commissions-page.php:173
|
481 |
+
msgid "Mark reversed"
|
482 |
+
msgstr ""
|
483 |
+
|
484 |
+
#: classes/admin/class-wcv-commissions-page.php:174
|
485 |
+
msgid "Delete"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: classes/admin/class-wcv-commissions-page.php:246
|
489 |
+
msgid "Show all dates"
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: classes/admin/class-wcv-commissions-page.php:281
|
493 |
+
msgid "Show all Statuses"
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: classes/admin/class-wcv-commissions-page.php:337
|
497 |
+
msgid "Commission marked paid."
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: classes/admin/class-wcv-commissions-page.php:344
|
501 |
+
msgid "Commission marked due."
|
502 |
+
msgstr ""
|
503 |
+
|
504 |
+
#: classes/admin/class-wcv-commissions-page.php:351
|
505 |
+
msgid "Commission marked reversed."
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: classes/admin/class-wcv-commissions-page.php:547
|
509 |
+
msgid "All"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: classes/admin/class-wcv-commissions-page.php:550
|
513 |
+
msgid "Void"
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: classes/admin/emails/class-emails.php:69, classes/admin/emails/class-emails.php:200, classes/admin/emails/class-wc-approve-vendor.php:70
|
517 |
+
msgid "pending"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: classes/admin/emails/class-emails.php:71
|
521 |
+
msgid "approved"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: classes/admin/emails/class-emails.php:73
|
525 |
+
msgid "denied"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: classes/admin/emails/class-emails.php:174
|
529 |
+
msgid "Resend vendor new order notification"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:28
|
533 |
+
msgid "Vendor Application"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:29
|
537 |
+
msgid "Vendor application will either be approved, denied, or pending."
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:31
|
541 |
+
msgid "Application {status}"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:32
|
545 |
+
msgid "[{blogname}] Your vendor application has been {status}"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:123, classes/admin/emails/class-wc-notify-admin.php:134, classes/admin/emails/class-wc-notify-shipped.php:166, classes/admin/emails/class-wc-notify-vendor.php:268, classes/admin/emails/class-wcv-admin-notify-shipped.php:135, classes/admin/emails/class-wcv-vendor-notify-application.php:130, classes/admin/emails/class-wcv-vendor-notify-approved.php:138, classes/admin/emails/class-wcv-vendor-notify-denied.php:148, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:62
|
549 |
+
msgid "Enable/Disable"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:125, classes/admin/emails/class-wc-notify-admin.php:136, classes/admin/emails/class-wc-notify-shipped.php:168, classes/admin/emails/class-wc-notify-vendor.php:270, classes/admin/emails/class-wcv-admin-notify-shipped.php:137, classes/admin/emails/class-wcv-vendor-notify-application.php:132, classes/admin/emails/class-wcv-vendor-notify-approved.php:140, classes/admin/emails/class-wcv-vendor-notify-denied.php:150
|
553 |
+
msgid "Enable this email notification"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:131
|
557 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to <code>%s</code>."
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:136, classes/admin/emails/class-wc-notify-admin.php:147, classes/admin/emails/class-wc-notify-shipped.php:172, classes/admin/emails/class-wc-notify-vendor.php:274, classes/admin/emails/class-wcv-admin-notify-shipped.php:149, classes/admin/emails/class-wcv-vendor-notify-application.php:136, classes/admin/emails/class-wcv-vendor-notify-approved.php:144, classes/admin/emails/class-wcv-vendor-notify-denied.php:154
|
561 |
+
msgid "Subject"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:138, classes/admin/emails/class-wc-notify-admin.php:149, classes/admin/emails/class-wc-notify-shipped.php:174, classes/admin/emails/class-wc-notify-vendor.php:276
|
565 |
+
msgid "This controls the email subject line. Leave blank to use the default subject: <code>%s</code>."
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:143, classes/admin/emails/class-wc-notify-admin.php:154, classes/admin/emails/class-wc-notify-shipped.php:179, classes/admin/emails/class-wc-notify-vendor.php:281
|
569 |
+
msgid "Email Heading"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:145, classes/admin/emails/class-wc-notify-admin.php:156, classes/admin/emails/class-wc-notify-shipped.php:181, classes/admin/emails/class-wc-notify-vendor.php:283
|
573 |
+
msgid "This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>."
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:150, classes/admin/emails/class-wc-notify-admin.php:161, classes/admin/emails/class-wc-notify-shipped.php:186, classes/admin/emails/class-wc-notify-vendor.php:294, classes/admin/emails/class-wcv-admin-notify-shipped.php:167, classes/admin/emails/class-wcv-vendor-notify-application.php:154, classes/admin/emails/class-wcv-vendor-notify-approved.php:171, classes/admin/emails/class-wcv-vendor-notify-denied.php:189
|
577 |
+
msgid "Email type"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:152, classes/admin/emails/class-wc-notify-admin.php:163, classes/admin/emails/class-wc-notify-shipped.php:188, classes/admin/emails/class-wc-notify-vendor.php:296, classes/admin/emails/class-wcv-admin-notify-shipped.php:169, classes/admin/emails/class-wcv-vendor-notify-application.php:156, classes/admin/emails/class-wcv-vendor-notify-approved.php:173, classes/admin/emails/class-wcv-vendor-notify-denied.php:191
|
581 |
+
msgid "Choose which format of email to send."
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:156, classes/admin/emails/class-wc-notify-admin.php:167, classes/admin/emails/class-wc-notify-shipped.php:192, classes/admin/emails/class-wc-notify-vendor.php:300
|
585 |
+
msgid "Plain text"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:157, classes/admin/emails/class-wc-notify-admin.php:168, classes/admin/emails/class-wc-notify-shipped.php:193, classes/admin/emails/class-wc-notify-vendor.php:301
|
589 |
+
msgid "HTML"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:158, classes/admin/emails/class-wc-notify-admin.php:169, classes/admin/emails/class-wc-notify-shipped.php:194, classes/admin/emails/class-wc-notify-vendor.php:302
|
593 |
+
msgid "Multipart"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: classes/admin/emails/class-wc-notify-admin.php:28
|
597 |
+
msgid "New Vendor Product"
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: classes/admin/emails/class-wc-notify-admin.php:29
|
601 |
+
msgid "New order emails are sent when a new product is submitted by a vendor"
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: classes/admin/emails/class-wc-notify-admin.php:31
|
605 |
+
msgid "New product submitted: {product_name}"
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: classes/admin/emails/class-wc-notify-admin.php:32
|
609 |
+
msgid "[{blogname}] New product submitted by {vendor_name} - {product_name}"
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:28, classes/admin/emails/class-wcv-admin-notify-shipped.php:62
|
613 |
+
msgid "Vendor has shipped"
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:29
|
617 |
+
msgid "An email is sent when a vendor has marked one of their orders as shipped."
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:31
|
621 |
+
msgid "Your order has been shipped"
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:32
|
625 |
+
msgid "[{blogname}] Your order has been shipped ({order_number}) - {order_date}"
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:115
|
629 |
+
msgid "Subtotal:"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:27
|
633 |
+
msgid "Notify vendors"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:28
|
637 |
+
msgid "New order emails are sent when an order is received/paid by a customer."
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:30
|
641 |
+
msgid "New customer order"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:31
|
645 |
+
msgid "[{blogname}] New customer order ({order_number}) - {order_date}"
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:107
|
649 |
+
msgid "Commission Subtotal:"
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:113
|
653 |
+
msgid "Tax Subtotal:"
|
654 |
+
msgstr ""
|
655 |
+
|
656 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:121
|
657 |
+
msgid "Shipping Subtotal:"
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:288
|
661 |
+
msgid "Product Totals"
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:290
|
665 |
+
msgid "Show the commission due/paid as the product totals instead of the product prices."
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:27
|
669 |
+
msgid "Admin notify vendor shipped"
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:28
|
673 |
+
msgid "Notification is sent to chosen recipient(s) when a vendor marks an order shipped."
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:52
|
677 |
+
msgid "[{site_title}] Vendor has marked shipped ({order_number}) - {order_date}"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:141
|
681 |
+
msgid "Recipient(s)"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:143
|
685 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to %s."
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:153, classes/admin/emails/class-wcv-admin-notify-shipped.php:162, classes/admin/emails/class-wcv-vendor-notify-application.php:140, classes/admin/emails/class-wcv-vendor-notify-application.php:149, classes/admin/emails/class-wcv-vendor-notify-approved.php:148, classes/admin/emails/class-wcv-vendor-notify-approved.php:166, classes/admin/emails/class-wcv-vendor-notify-denied.php:158, classes/admin/emails/class-wcv-vendor-notify-denied.php:167, classes/admin/emails/class-wcv-vendor-notify-denied.php:184
|
689 |
+
msgid "Available placeholders: %s"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:158, classes/admin/emails/class-wcv-vendor-notify-application.php:145, classes/admin/emails/class-wcv-vendor-notify-approved.php:162, classes/admin/emails/class-wcv-vendor-notify-denied.php:180
|
693 |
+
msgid "Email heading"
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:27
|
697 |
+
msgid "Vendor notify application"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:28
|
701 |
+
msgid "Notification is sent to the vendor that their application has been received"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:48
|
705 |
+
msgid "[{site_title}] Your vendor application has been received"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:58
|
709 |
+
msgid "Vendor application received"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:62, templates/emails/application-status.php:5, templates/emails/plain/vendor-notify-application.php:21, templates/emails/vendor-notify-application.php:22
|
713 |
+
msgid "Hi there. This is a notification about a vendor application on %s."
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:27
|
717 |
+
msgid "Vendor notify approved"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:28
|
721 |
+
msgid "Notification is sent to the vendor that their application has been approved"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:48
|
725 |
+
msgid "[{site_title}] Your vendor application has been approved"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:58
|
729 |
+
msgid "Vendor Application Approved"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:68
|
733 |
+
msgid "Your application to become a vendor on has been approved."
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:153, classes/admin/emails/class-wcv-vendor-notify-denied.php:163
|
737 |
+
msgid "Content"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:27
|
741 |
+
msgid "Vendor notify denied"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:28
|
745 |
+
msgid "Notification is sent to the vendor that their application has been denied"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:48
|
749 |
+
msgid "[{site_title}] Your vendor application has been denied"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:58
|
753 |
+
msgid "Vendor Application Denied"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:68
|
757 |
+
msgid "Your application to become a vendor has been denied."
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:78
|
761 |
+
msgid "We are not taking any new applications at this time."
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:172
|
765 |
+
msgid "Reason"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:175
|
769 |
+
msgid "Provide a reason for denying the vendor application"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:63
|
773 |
+
msgid "Add / Edit Product"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:65
|
777 |
+
msgid "Configure what product information to hide from a %s when creating or editing a product"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:70
|
781 |
+
msgid "Product Types"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:71
|
785 |
+
msgid "This controls what product types a %s can create"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:82
|
789 |
+
msgid "Product Type Options"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:83
|
793 |
+
msgid "This controls what product type options a %s can use"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:90, classes/admin/settings/sf-options.php:164
|
797 |
+
msgid "Virtual"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:91, classes/admin/settings/sf-options.php:165
|
801 |
+
msgid "Downloadable"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:97
|
805 |
+
msgid "Product Data Tabs"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:98
|
809 |
+
msgid "This controls what product data tabs a %s can use"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:106, classes/admin/settings/sf-options.php:135
|
813 |
+
msgid "Inventory"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:108, classes/admin/settings/sf-options.php:137
|
817 |
+
msgid "Linked Products"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:109, classes/admin/settings/sf-options.php:138
|
821 |
+
msgid "Attributes"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:110
|
825 |
+
msgid "Variations"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:111, classes/admin/settings/class-wcv-settings-display.php:45, classes/admin/settings/sf-options.php:139
|
829 |
+
msgid "Advanced"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:118
|
833 |
+
msgid "Featured Product"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:119
|
837 |
+
msgid "Allow %s to use the featured product option"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:126, classes/admin/settings/sf-options.php:178
|
841 |
+
msgid "Duplicate Product"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:127
|
845 |
+
msgid "Allow %s to duplicate products"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:134, classes/admin/settings/sf-options.php:176
|
849 |
+
msgid "SKU"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:135
|
853 |
+
msgid "Hide sku field from %s"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:142, classes/admin/settings/sf-options.php:43, classes/admin/settings/sf-options.php:175
|
857 |
+
msgid "Taxes"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:143
|
861 |
+
msgid "Hide tax fields from %s"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:151
|
865 |
+
msgid "Import Products"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:152
|
869 |
+
msgid "Allow %s to import products"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:159
|
873 |
+
msgid "Export Products"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:160
|
877 |
+
msgid "Allow %s to export products"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:177
|
881 |
+
msgid "Configure what order information a %s can view from an order"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:182
|
885 |
+
msgid "View Order Notes"
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:183, classes/admin/views/setup/capabilities.php:102
|
889 |
+
msgid "Allow %s to view order notes"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:190
|
893 |
+
msgid "Add Order notes"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:191, classes/admin/views/setup/capabilities.php:115
|
897 |
+
msgid "Allow %s to add order notes."
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:198
|
901 |
+
msgid "Customer Billing Address"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:199
|
905 |
+
msgid "Allow %s to view customer billing address fields"
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:206
|
909 |
+
msgid "Customer Shipping Address"
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:207
|
913 |
+
msgid "Allow %s to view the customer shipping fields"
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:214
|
917 |
+
msgid "Customer Email"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:215
|
921 |
+
msgid "Allow %s to view the customer email address"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:222
|
925 |
+
msgid "Customer Phone"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:223
|
929 |
+
msgid "Allow %s to view the customer phone number"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:238, classes/admin/settings/sf-options.php:193
|
933 |
+
msgid "Permissions"
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:240
|
937 |
+
msgid "Enable or disable functionality for your %s"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:254
|
941 |
+
msgid "Submit Products"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:255, classes/admin/views/setup/capabilities.php:25
|
945 |
+
msgid "Allow %s to add/edit products"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:262
|
949 |
+
msgid "Edit Live Products"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:263, classes/admin/views/setup/capabilities.php:38
|
953 |
+
msgid "Allow %s to edit published (live) products"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:270
|
957 |
+
msgid "Publish Approval"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:271
|
961 |
+
msgid "Allow %s to publish products directly to the marketplace without requiring approval."
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:287
|
965 |
+
msgid "View Orders"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:288, classes/admin/views/setup/capabilities.php:76
|
969 |
+
msgid "Allow %s to view orders"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:295
|
973 |
+
msgid "Export Orders"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:296, classes/admin/views/setup/capabilities.php:89
|
977 |
+
msgid "Allow %s to export their orders to a CSV file"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:303
|
981 |
+
msgid "Front End Sales Reports"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:304
|
985 |
+
msgid "Allow %s to view sales table on the frontend on the %s dashboard page."
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:316
|
989 |
+
msgid "Reports"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:322
|
993 |
+
msgid "View Reports"
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:323
|
997 |
+
msgid "Allow %s to view reports"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:61
|
1001 |
+
msgid "These are the commission settings for your marketplace"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:65
|
1005 |
+
msgid "%s Commission %%"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:66
|
1009 |
+
msgid "The global commission rate for your %s"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: classes/admin/settings/class-wcv-settings-display.php:31
|
1013 |
+
msgid "Display"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: classes/admin/settings/class-wcv-settings-display.php:44
|
1017 |
+
msgid "Labels"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: classes/admin/settings/class-wcv-settings-display.php:64, classes/admin/settings/class-wcv-settings-display.php:89, classes/admin/settings/class-wcv-settings-payments.php:80
|
1021 |
+
msgid ""
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: classes/admin/settings/class-wcv-settings-display.php:66
|
1025 |
+
msgid "Advanced options provide extra display options"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: classes/admin/settings/class-wcv-settings-display.php:70
|
1029 |
+
msgid "Product Page Stylesheet"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: classes/admin/settings/class-wcv-settings-display.php:71
|
1033 |
+
msgid "You can add CSS in this textarea, which will be loaded on the product add/edit page for vendors"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: classes/admin/settings/class-wcv-settings-display.php:72, classes/admin/settings/class-wcv-settings-display.php:98
|
1037 |
+
msgid "This enables the sold by labels used to show which %s shop the product belongs to"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: classes/admin/settings/class-wcv-settings-display.php:91
|
1041 |
+
msgid "Labels are shown on the front end, in orders and emails."
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: classes/admin/settings/class-wcv-settings-display.php:96
|
1045 |
+
msgid "Sold by"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: classes/admin/settings/class-wcv-settings-display.php:97, classes/admin/settings/sf-options.php:104
|
1049 |
+
msgid "Enable sold by labels"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: classes/admin/settings/class-wcv-settings-display.php:105
|
1053 |
+
msgid "Sold by label"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: classes/admin/settings/class-wcv-settings-display.php:106
|
1057 |
+
msgid "The sold by label"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: classes/admin/settings/class-wcv-settings-display.php:109, classes/admin/settings/sf-options.php:103, classes/admin/settings/sf-options.php:116
|
1061 |
+
msgid "Sold By"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: classes/admin/settings/class-wcv-settings-display.php:113
|
1065 |
+
msgid "%s Store Info"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: classes/admin/settings/class-wcv-settings-display.php:114
|
1069 |
+
msgid "Enable %s store info tab on the single product page"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: classes/admin/settings/class-wcv-settings-display.php:121
|
1073 |
+
msgid "%s store Info label"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: classes/admin/settings/class-wcv-settings-display.php:122
|
1077 |
+
msgid "The %s store info label"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: classes/admin/settings/class-wcv-settings-display.php:125
|
1081 |
+
msgid "Store Info"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: classes/admin/settings/class-wcv-settings-display.php:140
|
1085 |
+
msgid "These pages used on the front end by %s."
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: classes/admin/settings/class-wcv-settings-display.php:144
|
1089 |
+
msgid "Dashboard"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: classes/admin/settings/class-wcv-settings-display.php:150
|
1093 |
+
msgid "<br />This sets the page used to display the front end %s dashboard. This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: classes/admin/settings/class-wcv-settings-display.php:159
|
1097 |
+
msgid "<br />This sets the page used to display the %s shop settings page. This page should contain the following shortcode. <code>[wcv_shop_settings]</code>"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: classes/admin/settings/class-wcv-settings-display.php:168
|
1101 |
+
msgid "<br />This sets the page used to display the %s orders page. This page should contain the following shortcode. <code>[wcv_orders]</code>"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: classes/admin/settings/class-wcv-settings-display.php:171
|
1105 |
+
msgid "%s"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: classes/admin/settings/class-wcv-settings-display.php:177
|
1109 |
+
msgid "<br />This sets the page used to display a paginated list of all %1$s stores. Your %1$s stores will be available at <code>%2$s/page-slug/store-name/</code><br />This page should contain the following shortcode. <code>[wcv_vendorslist]</code>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: classes/admin/settings/class-wcv-settings-display.php:180
|
1113 |
+
msgid "Terms and Conditions"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: classes/admin/settings/class-wcv-settings-display.php:186
|
1117 |
+
msgid "<br />This sets the page used to display the terms and conditions when a %s signs up."
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: classes/admin/settings/class-wcv-settings-display.php:193, templates/dashboard/links.php:4
|
1121 |
+
msgid "Store Settings"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: classes/admin/settings/class-wcv-settings-display.php:195
|
1125 |
+
msgid "These are the settings for the individual vendor stores."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: classes/admin/settings/class-wcv-settings-display.php:200
|
1129 |
+
msgid "%s Store URL"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: classes/admin/settings/class-wcv-settings-display.php:201
|
1133 |
+
msgid "If you enter \"vendors\" your %s store will be %s/vendors/store-name/"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: classes/admin/settings/class-wcv-settings-display.php:208
|
1137 |
+
msgid "Shop Header"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: classes/admin/settings/class-wcv-settings-display.php:209
|
1141 |
+
msgid "Enable %s shop headers"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: classes/admin/settings/class-wcv-settings-display.php:210
|
1145 |
+
msgid "This enables the %s shop header template and disables the shop description text."
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: classes/admin/settings/class-wcv-settings-display.php:217, classes/admin/settings/sf-options.php:63
|
1149 |
+
msgid "Shop HTML"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: classes/admin/settings/class-wcv-settings-display.php:218
|
1153 |
+
msgid "Allow HTML in %s shop desription"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: classes/admin/settings/class-wcv-settings-display.php:219
|
1157 |
+
msgid "Enable HTML for a %s shop description. You can enable or disable this per vendor by editing the vendors user account."
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: classes/admin/settings/class-wcv-settings-display.php:226, classes/admin/settings/sf-options.php:93
|
1161 |
+
msgid "Display Name"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: classes/admin/settings/class-wcv-settings-display.php:228
|
1165 |
+
msgid "Select what will be used to display the %s name throughout the marketplace."
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: classes/admin/settings/class-wcv-settings-display.php:233
|
1169 |
+
msgid "Display name"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: classes/admin/settings/class-wcv-settings-display.php:235
|
1173 |
+
msgid "%s Username"
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: classes/admin/settings/class-wcv-settings-display.php:236
|
1177 |
+
msgid "%s Email"
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#: classes/admin/settings/class-wcv-settings-general.php:60
|
1181 |
+
msgid "Marketplace Options"
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: classes/admin/settings/class-wcv-settings-general.php:62
|
1185 |
+
msgid "These are the general settings for your marketplace"
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: classes/admin/settings/class-wcv-settings-general.php:66
|
1189 |
+
msgid "%s Registration"
|
1190 |
+
msgstr ""
|
1191 |
+
|
1192 |
+
#: classes/admin/settings/class-wcv-settings-general.php:67, classes/admin/views/setup/general.php:25
|
1193 |
+
msgid "Allow users to apply to become a %s"
|
1194 |
+
msgstr ""
|
1195 |
+
|
1196 |
+
#: classes/admin/settings/class-wcv-settings-general.php:73
|
1197 |
+
msgid "%s Approval"
|
1198 |
+
msgstr ""
|
1199 |
+
|
1200 |
+
#: classes/admin/settings/class-wcv-settings-general.php:74
|
1201 |
+
msgid "Manually approve all %s applications"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: classes/admin/settings/class-wcv-settings-general.php:81
|
1205 |
+
msgid "%s Taxes"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: classes/admin/settings/class-wcv-settings-general.php:82
|
1209 |
+
msgid "Give any taxes to the %s"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: classes/admin/settings/class-wcv-settings-general.php:88
|
1213 |
+
msgid "%s Shipping"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: classes/admin/settings/class-wcv-settings-general.php:89
|
1217 |
+
msgid "Give any shipping to the %s"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:31, classes/admin/settings/sf-options.php:316
|
1221 |
+
msgid "Payments"
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:82
|
1225 |
+
msgid "<strong>Payments controls how your %s commission is paid out. To enable commission payments you will be required to purchase one of our available payment extensions. </strong> "
|
1226 |
msgstr ""
|
1227 |
|
1228 |
+
#: classes/admin/settings/classes/sf-class-format-options.php:211, classes/admin/settings/classes/sf-class-settings.php:796, classes/admin/settings/classes/sf-class-settings.php:830
|
1229 |
msgid "Select a page..."
|
1230 |
msgstr ""
|
1231 |
|
1232 |
+
#: classes/admin/settings/classes/sf-class-settings.php:153, classes/class-install.php:400, templates/dashboard/settings/settings.php:1
|
1233 |
msgid "Settings"
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: classes/admin/settings/classes/sf-class-settings.php:251
|
1237 |
+
msgid "WC Vendors Settings"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
+
#: classes/admin/settings/classes/sf-class-settings.php:251
|
1241 |
+
msgid "Settings Old"
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
#: classes/admin/settings/classes/sf-class-settings.php:305
|
1245 |
msgid "Could not load settings at: "
|
1246 |
msgstr ""
|
1254 |
msgstr ""
|
1255 |
|
1256 |
#: classes/admin/settings/classes/sf-class-settings.php:502
|
1257 |
+
msgid "Please help with a <a href=\"https://wordpress.org/support/view/plugin-reviews/wc-vendors?rate=5#postform\" target=\"top\">High Five!</a> | <a href=\"https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top\">WC Vendors Pro</a> | <a href=\"https://www.wcvendors.com/product/stripe-commissions-gateway/?utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top\">Stripe Commissions & Gateway</a> | <a href=\"https://docs.wcvendors.com/\" target=\"top\">Documentation</a> | <a href=\"https://wordpress.org/support/plugin/wc-vendors/\" target=\"top\">Free Support Forums</a>"
|
1258 |
msgstr ""
|
1259 |
|
1260 |
+
#: classes/admin/settings/classes/sf-class-settings.php:789, classes/admin/settings/classes/sf-class-settings.php:823
|
1261 |
msgid "Edit Page"
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: classes/admin/settings/classes/sf-class-settings.php:790, classes/admin/settings/classes/sf-class-settings.php:824
|
1265 |
msgid "View Page"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888
|
1269 |
msgid "Update %s"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888, classes/admin/settings/classes/sf-class-settings.php:888
|
1273 |
msgid "Add %s"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888
|
1277 |
msgid "Upload an image for the %s"
|
1278 |
msgstr ""
|
1279 |
|
1313 |
msgid "With this unchecked, all vendor applications are automatically accepted. Otherwise, you must approve each manually."
|
1314 |
msgstr ""
|
1315 |
|
|
|
|
|
|
|
|
|
1316 |
#: classes/admin/settings/sf-options.php:44
|
1317 |
msgid "Give vendors any tax collected per-product"
|
1318 |
msgstr ""
|
1333 |
msgid "Shop options"
|
1334 |
msgstr ""
|
1335 |
|
|
|
|
|
|
|
|
|
1336 |
#: classes/admin/settings/sf-options.php:64
|
1337 |
msgid "Enable HTML for a vendor's shop description by default. You can enable or disable this per vendor by editing the vendors user account."
|
1338 |
msgstr ""
|
1365 |
msgid "Select what will be displayed for the sold by text throughout the store."
|
1366 |
msgstr ""
|
1367 |
|
|
|
|
|
|
|
|
|
1368 |
#: classes/admin/settings/sf-options.php:94, classes/admin/views/html-vendor-settings-page.php:22, templates/dashboard/settings/shop-name.php:2
|
1369 |
msgid "Shop Name"
|
1370 |
msgstr ""
|
1374 |
msgstr ""
|
1375 |
|
1376 |
#: classes/admin/settings/sf-options.php:96
|
1377 |
+
msgid "User Email"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1378 |
msgstr ""
|
1379 |
|
1380 |
#: classes/admin/settings/sf-options.php:105
|
1417 |
msgid "CHECKING these boxes will **HIDE** these areas of the add product page for vendors"
|
1418 |
msgstr ""
|
1419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1420 |
#: classes/admin/settings/sf-options.php:146
|
1421 |
msgid "Types"
|
1422 |
msgstr ""
|
1449 |
msgid "CHECKING these boxes will **HIDE** these product options from the vendor"
|
1450 |
msgstr ""
|
1451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1452 |
#: classes/admin/settings/sf-options.php:172
|
1453 |
msgid "Miscellaneous"
|
1454 |
msgstr ""
|
1455 |
|
|
|
|
|
|
|
|
|
1456 |
#: classes/admin/settings/sf-options.php:177
|
1457 |
msgid "Featured"
|
1458 |
msgstr ""
|
1459 |
|
|
|
|
|
|
|
|
|
1460 |
#: classes/admin/settings/sf-options.php:185
|
1461 |
msgid "Stylesheet"
|
1462 |
msgstr ""
|
1465 |
msgid "You can add CSS in this textarea, which will be loaded on the product add/edit page for vendors."
|
1466 |
msgstr ""
|
1467 |
|
|
|
|
|
|
|
|
|
1468 |
#: classes/admin/settings/sf-options.php:193
|
1469 |
msgid "General permissions used around the shop"
|
1470 |
msgstr ""
|
1510 |
msgstr ""
|
1511 |
|
1512 |
#: classes/admin/settings/sf-options.php:237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1513 |
msgid "View Frontend sales reports"
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: classes/admin/settings/sf-options.php:238
|
1517 |
msgid "Sales table on the frontend on the Vendor Dashboard page. The table will only display sales data that pertain to their products, and only for orders that are processing or completed."
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: classes/admin/settings/sf-options.php:246
|
1521 |
msgid "Submit products"
|
1522 |
msgstr ""
|
1523 |
|
1524 |
+
#: classes/admin/settings/sf-options.php:247
|
1525 |
msgid "Check to allow vendors to list new products. Admin must approve new products by editing the product, and clicking Publish."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
+
#: classes/admin/settings/sf-options.php:254
|
1529 |
msgid "Edit live products"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
+
#: classes/admin/settings/sf-options.php:255
|
1533 |
msgid "Vendors could edit an approved product after it has already gone live. There is no approval or review after editing a live product. This could be dangerous with malicious vendors, so take caution."
|
1534 |
msgstr ""
|
1535 |
|
1536 |
+
#: classes/admin/settings/sf-options.php:262
|
1537 |
msgid "Submit products live without requiring approval"
|
1538 |
msgstr ""
|
1539 |
|
1540 |
+
#: classes/admin/settings/sf-options.php:263
|
1541 |
msgid "Vendors can submit products without review or approval from a shop admin. This could be dangerous with malicious vendors, so take caution."
|
1542 |
msgstr ""
|
1543 |
|
1544 |
+
#: classes/admin/settings/sf-options.php:270
|
|
|
|
|
|
|
|
|
1545 |
msgid "Page configuration"
|
1546 |
msgstr ""
|
1547 |
|
1548 |
+
#: classes/admin/settings/sf-options.php:273
|
1549 |
msgid "Vendor dashboard"
|
1550 |
msgstr ""
|
1551 |
|
1552 |
+
#: classes/admin/settings/sf-options.php:274
|
1553 |
msgid "Choose the page that has the shortcode <code>[wcv_vendor_dashboard]</code><br/>. If this page is not set, you will break your site. If you upgrade to Pro, keep this page unchanged as both Pro Dashboard and this Dashboard page must be set."
|
1554 |
msgstr ""
|
1555 |
|
1556 |
+
#: classes/admin/settings/sf-options.php:281
|
1557 |
msgid "Shop settings"
|
1558 |
msgstr ""
|
1559 |
|
1560 |
+
#: classes/admin/settings/sf-options.php:282
|
1561 |
msgid "Choose the page that has the shortcode <code>[wcv_shop_settings]</code><br/>These are the shop settings a vendor can configure. By default, Vendor Dashboard > Shop Settings should have this shortcode."
|
1562 |
msgstr ""
|
1563 |
|
1564 |
+
#: classes/admin/settings/sf-options.php:289
|
1565 |
msgid "Orders page"
|
1566 |
msgstr ""
|
1567 |
|
1568 |
+
#: classes/admin/settings/sf-options.php:290
|
1569 |
msgid "Choose the page that has the shortcode <code>[wcv_orders]</code><br/>By default, Vendor Dashboard > Orders should have the shortcode."
|
1570 |
msgstr ""
|
1571 |
|
1572 |
+
#: classes/admin/settings/sf-options.php:297
|
1573 |
msgid "Vendor terms"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
+
#: classes/admin/settings/sf-options.php:298
|
1577 |
msgid "These terms are shown to a user when submitting an application to become a vendor.<br/>If left blank, no terms will be shown to the applicant. Vendor must accept terms in order to register, if set."
|
1578 |
msgstr ""
|
1579 |
|
1580 |
+
#: classes/admin/settings/sf-options.php:305
|
1581 |
msgid "payments"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
+
#: classes/admin/settings/sf-options.php:318
|
1585 |
+
msgid "PayPal Adaptive Payments Scheduling - PayPal MassPay has been depreciated by PayPal as of September 2017"
|
|
|
|
|
|
|
|
|
1586 |
msgstr ""
|
1587 |
|
1588 |
+
#: classes/admin/settings/sf-options.php:319
|
1589 |
msgid "Total commission currently due: %s. <a href=\"%s\">View details</a>."
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: classes/admin/settings/sf-options.php:320
|
1593 |
+
msgid "Make sure you update your PayPal Adaptive Payments settings <a href=\"%s\">here</a>. <br><br>To instantly pay with Adaptive Payments you must activate the PayPal AP gateway in your Checkout settings. <br><a href=\"https://www.wcvendors.com/kb/configuring-paypal-adaptive-payments/\" target=\"top\">PayPal AP Application Help</a>. <br><br>Another gateway that offers instant payments to vendors that also accepts credit cards directly on your checkout page is Stripe. <br><a href=\"https://www.wcvendors.com/product/stripe-commissions-gateway/\" target=\"top\">Stripe Commissions & Gateway plugin</a> is specifically coded for WC Vendors and <a href=\"https://www.wcvendors.com/product/wc-vendors-pro/\" target=\"top\">WC Vendors Pro</a>."
|
1594 |
msgstr ""
|
1595 |
|
1596 |
+
#: classes/admin/settings/sf-options.php:324
|
1597 |
msgid "Instant pay"
|
1598 |
msgstr ""
|
1599 |
|
1600 |
+
#: classes/admin/settings/sf-options.php:325
|
1601 |
msgid "Instantly pay vendors their commission when an order is made, and if a vendor has a valid PayPal email added on their Shop Settings page."
|
1602 |
msgstr ""
|
1603 |
|
1604 |
+
#: classes/admin/settings/sf-options.php:326
|
1605 |
msgid "For this to work, customers must checkout with the PayPal Adaptive Payments gateway. Using any other gateways will not pay vendors instantly"
|
1606 |
msgstr ""
|
1607 |
|
1608 |
+
#: classes/admin/settings/sf-options.php:333
|
1609 |
msgid "Payment schedule"
|
1610 |
msgstr ""
|
1611 |
|
1612 |
+
#: classes/admin/settings/sf-options.php:334
|
1613 |
msgid "Note: Schedule will only work if instant pay is unchecked"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
+
#: classes/admin/settings/sf-options.php:339
|
1617 |
msgid "Daily"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
+
#: classes/admin/settings/sf-options.php:340
|
1621 |
msgid "Weekly"
|
1622 |
msgstr ""
|
1623 |
|
1624 |
+
#: classes/admin/settings/sf-options.php:341
|
1625 |
msgid "Biweekly"
|
1626 |
msgstr ""
|
1627 |
|
1628 |
+
#: classes/admin/settings/sf-options.php:342
|
1629 |
msgid "Monthly"
|
1630 |
msgstr ""
|
1631 |
|
1632 |
+
#: classes/admin/settings/sf-options.php:343
|
1633 |
msgid "Manual"
|
1634 |
msgstr ""
|
1635 |
|
1636 |
+
#: classes/admin/settings/sf-options.php:344
|
1637 |
msgid "Now"
|
1638 |
msgstr ""
|
1639 |
|
1640 |
+
#: classes/admin/settings/sf-options.php:349
|
1641 |
msgid "Email notification"
|
1642 |
msgstr ""
|
1643 |
|
1644 |
+
#: classes/admin/settings/sf-options.php:350
|
1645 |
msgid "Send the WooCommerce admin an email each time a payment has been made via the payment schedule options above"
|
1646 |
msgstr ""
|
1647 |
|
1673 |
msgid "Save Shop Settings"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: classes/admin/views/notices/html-notice-custom.php:12, classes/admin/views/notices/html-notice-template-check.php:13, classes/admin/views/notices/html-notice-updated.php:12
|
1677 |
+
msgid "Dismiss"
|
1678 |
+
msgstr ""
|
1679 |
+
|
1680 |
+
#: classes/admin/views/notices/html-notice-install.php:12, classes/includes/views/html-notice-install.php:12
|
1681 |
+
msgid "<strong>Welcome to WC Vendors</strong> – You‘re almost ready to start your marketplace"
|
1682 |
+
msgstr ""
|
1683 |
+
|
1684 |
+
#: classes/admin/views/notices/html-notice-install.php:13, classes/includes/views/html-notice-install.php:13
|
1685 |
+
msgid "Run the Setup Wizard"
|
1686 |
+
msgstr ""
|
1687 |
+
|
1688 |
+
#: classes/admin/views/notices/html-notice-install.php:13, classes/includes/views/html-notice-install.php:13
|
1689 |
+
msgid "Skip setup"
|
1690 |
+
msgstr ""
|
1691 |
+
|
1692 |
+
#: classes/admin/views/notices/html-notice-template-check.php:15
|
1693 |
+
msgid "<strong>Your theme (%1$s) contains outdated copies of some WC Vendors template files.</strong> These files may need updating to ensure they are compatible with the current version of WC Vendors. You can see which files are affected from the <a href=\"%2$s\">system status page</a>. If in doubt, check with the author of the theme."
|
1694 |
+
msgstr ""
|
1695 |
+
|
1696 |
+
#: classes/admin/views/notices/html-notice-template-check.php:16
|
1697 |
+
msgid "Learn more about templates"
|
1698 |
+
msgstr ""
|
1699 |
+
|
1700 |
+
#: classes/admin/views/notices/html-notice-update.php:12, classes/includes/views/html-notice-update.php:12
|
1701 |
+
msgid "<strong>WC Vendors Update Required.</strong> – We need to upgrade your configuration to the latest version."
|
1702 |
+
msgstr ""
|
1703 |
+
|
1704 |
+
#: classes/admin/views/notices/html-notice-update.php:13, classes/includes/views/html-notice-update.php:13
|
1705 |
+
msgid "Run the update"
|
1706 |
+
msgstr ""
|
1707 |
+
|
1708 |
+
#: classes/admin/views/notices/html-notice-update.php:17, classes/includes/views/html-notice-update.php:17
|
1709 |
+
msgid "It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?"
|
1710 |
+
msgstr ""
|
1711 |
+
|
1712 |
+
#: classes/admin/views/notices/html-notice-updated.php:13
|
1713 |
+
msgid "WC Vendors data update complete. Thank you for updating to the latest version!"
|
1714 |
+
msgstr ""
|
1715 |
+
|
1716 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
1717 |
+
msgid "WC Vendors data update"
|
1718 |
+
msgstr ""
|
1719 |
+
|
1720 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
1721 |
+
msgid "Your database is being updated in the background."
|
1722 |
+
msgstr ""
|
1723 |
+
|
1724 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
1725 |
+
msgid "Taking a while? Click here to run it now."
|
1726 |
+
msgstr ""
|
1727 |
+
|
1728 |
+
#: classes/admin/views/setup/capabilities.php:14
|
1729 |
+
msgid "Enable and disable capabilites of the %s"
|
1730 |
+
msgstr ""
|
1731 |
+
|
1732 |
+
#: classes/admin/views/setup/capabilities.php:51
|
1733 |
+
msgid "Allow %s to publish products without requiring approval."
|
1734 |
+
msgstr ""
|
1735 |
+
|
1736 |
+
#: classes/admin/views/setup/capabilities.php:132, classes/admin/views/setup/capabilities.php:132, classes/admin/views/setup/general.php:97, classes/admin/views/setup/general.php:97, classes/admin/views/setup/pages.php:85, classes/admin/views/setup/pages.php:85
|
1737 |
+
msgid "Next"
|
1738 |
+
msgstr ""
|
1739 |
+
|
1740 |
+
#: classes/admin/views/setup/footer.php:13
|
1741 |
+
msgid "Exit Wizard"
|
1742 |
+
msgstr ""
|
1743 |
+
|
1744 |
+
#: classes/admin/views/setup/footer.php:15
|
1745 |
+
msgid "Return to your dashboard"
|
1746 |
+
msgstr ""
|
1747 |
+
|
1748 |
+
#: classes/admin/views/setup/footer.php:17
|
1749 |
+
msgid "Skip this step"
|
1750 |
+
msgstr ""
|
1751 |
+
|
1752 |
+
#: classes/admin/views/setup/general.php:14
|
1753 |
+
msgid "The following wizard will help you configure your marketplace and get your vendors onboard quickly."
|
1754 |
+
msgstr ""
|
1755 |
+
|
1756 |
+
#: classes/admin/views/setup/general.php:38
|
1757 |
+
msgid "Manually approve %s applications"
|
1758 |
+
msgstr ""
|
1759 |
+
|
1760 |
+
#: classes/admin/views/setup/general.php:51
|
1761 |
+
msgid "Give any taxes to %s"
|
1762 |
+
msgstr ""
|
1763 |
+
|
1764 |
+
#: classes/admin/views/setup/general.php:64
|
1765 |
+
msgid "Give any shipping to %s"
|
1766 |
+
msgstr ""
|
1767 |
+
|
1768 |
+
#: classes/admin/views/setup/general.php:81
|
1769 |
+
msgid "Commissions are calculated per product. The commission rate can be set globally, at a vendor level or at a product level."
|
1770 |
+
msgstr ""
|
1771 |
+
|
1772 |
+
#: classes/admin/views/setup/general.php:86
|
1773 |
+
msgid "Global Commission Rate %"
|
1774 |
+
msgstr ""
|
1775 |
+
|
1776 |
+
#: classes/admin/views/setup/header.php:16
|
1777 |
+
msgid "WC Vendors › Setup Wizard"
|
1778 |
+
msgstr ""
|
1779 |
+
|
1780 |
+
#: classes/admin/views/setup/pages.php:14
|
1781 |
+
msgid "Select the pages for relevant frontend features for %s"
|
1782 |
+
msgstr ""
|
1783 |
+
|
1784 |
+
#: classes/admin/views/setup/pages.php:25
|
1785 |
+
msgid "Vendor Dashboard"
|
1786 |
+
msgstr ""
|
1787 |
+
|
1788 |
+
#: classes/admin/views/setup/pages.php:34
|
1789 |
+
msgid "This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>"
|
1790 |
+
msgstr ""
|
1791 |
+
|
1792 |
+
#: classes/admin/views/setup/pages.php:38
|
1793 |
+
msgid "%s Shop Settings"
|
1794 |
+
msgstr ""
|
1795 |
+
|
1796 |
+
#: classes/admin/views/setup/pages.php:45
|
1797 |
+
msgid "This page should contain the following shortcode. <code>[wcv_shop_settings]</code>"
|
1798 |
+
msgstr ""
|
1799 |
+
|
1800 |
+
#: classes/admin/views/setup/pages.php:49
|
1801 |
+
msgid "Orders Page"
|
1802 |
+
msgstr ""
|
1803 |
+
|
1804 |
+
#: classes/admin/views/setup/pages.php:56
|
1805 |
+
msgid "This page should contain the following shortcode. <code>[wcv_orders]</code>"
|
1806 |
+
msgstr ""
|
1807 |
+
|
1808 |
+
#: classes/admin/views/setup/pages.php:60
|
1809 |
+
msgid "%s List Page"
|
1810 |
+
msgstr ""
|
1811 |
+
|
1812 |
+
#: classes/admin/views/setup/pages.php:67
|
1813 |
+
msgid "This page should contain the following shortcode. <code>[wcv_vendorslist]</code>"
|
1814 |
+
msgstr ""
|
1815 |
+
|
1816 |
+
#: classes/admin/views/setup/pages.php:71
|
1817 |
+
msgid "%s Terms Page"
|
1818 |
+
msgstr ""
|
1819 |
+
|
1820 |
+
#: classes/admin/views/setup/pages.php:78
|
1821 |
+
msgid "This optional page allows you to define terms and conidtions %s need to agree to before applying to your marketplace. "
|
1822 |
+
msgstr ""
|
1823 |
+
|
1824 |
+
#: classes/admin/views/setup/ready.php:12
|
1825 |
+
msgid "Your marketplace is ready!"
|
1826 |
+
msgstr ""
|
1827 |
+
|
1828 |
+
#: classes/admin/views/setup/ready.php:15
|
1829 |
+
msgid "Subscribe to our newsletter! Get product updates, marketplace tips, information and more."
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: classes/admin/views/setup/ready.php:23, classes/front/orders/class-orders.php:256
|
1833 |
+
msgid "Email address"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: classes/admin/views/setup/ready.php:29, classes/admin/views/setup/ready.php:33
|
1837 |
+
msgid "Subscribe me"
|
1838 |
+
msgstr ""
|
1839 |
+
|
1840 |
+
#: classes/admin/views/setup/ready.php:42
|
1841 |
+
msgid "Next step"
|
1842 |
+
msgstr ""
|
1843 |
+
|
1844 |
+
#: classes/admin/views/setup/ready.php:43
|
1845 |
+
msgid "Upgrade to Pro!"
|
1846 |
+
msgstr ""
|
1847 |
+
|
1848 |
+
#: classes/admin/views/setup/ready.php:44
|
1849 |
+
msgid "Upgrade today to extend the features of your marketplace."
|
1850 |
+
msgstr ""
|
1851 |
+
|
1852 |
+
#: classes/admin/views/setup/ready.php:45
|
1853 |
+
msgid "Features"
|
1854 |
+
msgstr ""
|
1855 |
+
|
1856 |
+
#: classes/admin/views/setup/ready.php:47
|
1857 |
+
msgid "Complete frontend dashboard for vendors"
|
1858 |
+
msgstr ""
|
1859 |
+
|
1860 |
+
#: classes/admin/views/setup/ready.php:48
|
1861 |
+
msgid "Flat rate & table rate shipping module"
|
1862 |
+
msgstr ""
|
1863 |
+
|
1864 |
+
#: classes/admin/views/setup/ready.php:49
|
1865 |
+
msgid "Coupons, ratings, reports, orders and more."
|
1866 |
+
msgstr ""
|
1867 |
+
|
1868 |
+
#: classes/admin/views/setup/ready.php:50
|
1869 |
+
msgid "Advanced commissions"
|
1870 |
+
msgstr ""
|
1871 |
+
|
1872 |
+
#: classes/admin/views/setup/ready.php:51
|
1873 |
+
msgid "Premium support & updates"
|
1874 |
+
msgstr ""
|
1875 |
+
|
1876 |
+
#: classes/admin/views/setup/ready.php:57
|
1877 |
+
msgid "Upgrade Now"
|
1878 |
+
msgstr ""
|
1879 |
+
|
1880 |
+
#: classes/admin/views/setup/ready.php:64
|
1881 |
+
msgid "Extend your marketplace"
|
1882 |
+
msgstr ""
|
1883 |
+
|
1884 |
+
#: classes/admin/views/setup/ready.php:66
|
1885 |
+
msgid "Extend your marketplace today with a variety of extensions from us and 3rd party developers."
|
1886 |
+
msgstr ""
|
1887 |
+
|
1888 |
+
#: classes/admin/views/setup/ready.php:71
|
1889 |
+
msgid "View Extensions"
|
1890 |
+
msgstr ""
|
1891 |
+
|
1892 |
+
#: classes/admin/views/setup/ready.php:77
|
1893 |
+
msgid "Need Help?"
|
1894 |
+
msgstr ""
|
1895 |
+
|
1896 |
#: classes/class-cron.php:87
|
1897 |
msgid "Payment total: %s"
|
1898 |
msgstr ""
|
1899 |
|
1900 |
+
#: classes/class-install.php:171
|
1901 |
+
msgctxt "Page slug"
|
1902 |
+
msgid "vendor_dashboard"
|
1903 |
+
msgstr ""
|
1904 |
+
|
1905 |
+
#: classes/class-install.php:173
|
1906 |
+
msgctxt "Page title"
|
1907 |
+
msgid "%s Dashboard"
|
1908 |
+
msgstr ""
|
1909 |
+
|
1910 |
+
#: classes/class-install.php:179
|
1911 |
+
msgctxt "Page slug"
|
1912 |
+
msgid "vendors"
|
1913 |
+
msgstr ""
|
1914 |
+
|
1915 |
+
#: classes/class-install.php:181
|
1916 |
+
msgctxt "Page title"
|
1917 |
+
msgid "%s"
|
1918 |
+
msgstr ""
|
1919 |
+
|
1920 |
+
#: classes/class-install.php:189
|
1921 |
+
msgctxt "Page slug"
|
1922 |
+
msgid "shop_settings"
|
1923 |
+
msgstr ""
|
1924 |
+
|
1925 |
+
#: classes/class-install.php:190
|
1926 |
+
msgctxt "Page title"
|
1927 |
+
msgid "Shop Settings"
|
1928 |
+
msgstr ""
|
1929 |
+
|
1930 |
+
#: classes/class-install.php:195
|
1931 |
+
msgctxt "Page slug"
|
1932 |
+
msgid "product_orders"
|
1933 |
+
msgstr ""
|
1934 |
+
|
1935 |
+
#: classes/class-install.php:196
|
1936 |
+
msgctxt "Page title"
|
1937 |
+
msgid "Orders"
|
1938 |
+
msgstr ""
|
1939 |
+
|
1940 |
+
#: classes/class-install.php:400
|
1941 |
+
msgid "View WC Vendors settings"
|
1942 |
+
msgstr ""
|
1943 |
+
|
1944 |
+
#: classes/class-install.php:416
|
1945 |
+
msgid "View WC Vendors documentation"
|
1946 |
+
msgstr ""
|
1947 |
+
|
1948 |
+
#: classes/class-install.php:416
|
1949 |
+
msgid "Docs"
|
1950 |
+
msgstr ""
|
1951 |
+
|
1952 |
+
#: classes/class-install.php:417
|
1953 |
+
msgid "Visit community forums"
|
1954 |
+
msgstr ""
|
1955 |
+
|
1956 |
+
#: classes/class-install.php:417
|
1957 |
+
msgid "Free support"
|
1958 |
+
msgstr ""
|
1959 |
+
|
1960 |
+
#: classes/class-install.php:418
|
1961 |
+
msgid "Visit premium customer support"
|
1962 |
+
msgstr ""
|
1963 |
+
|
1964 |
+
#: classes/class-install.php:418
|
1965 |
+
msgid "Premium support"
|
1966 |
+
msgstr ""
|
1967 |
+
|
1968 |
+
#: classes/class-vendor-post-types.php:34
|
1969 |
+
msgid "Vendor Orders"
|
1970 |
msgstr ""
|
1971 |
|
1972 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:56
|
1973 |
msgid "Order marked shipped."
|
1974 |
msgstr ""
|
1975 |
|
1976 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:59
|
1977 |
msgid "%s has marked as shipped. "
|
1978 |
msgstr ""
|
1979 |
|
1980 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:88, classes/front/dashboard/class-vendor-dashboard.php:89
|
1981 |
msgid "Tracking number"
|
1982 |
msgstr ""
|
1983 |
|
1984 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:91
|
1985 |
msgid "Success. Your tracking number has been updated."
|
1986 |
msgstr ""
|
1987 |
|
2025 |
msgid "Zip"
|
2026 |
msgstr ""
|
2027 |
|
|
|
|
|
|
|
|
|
2028 |
#: classes/front/orders/class-submit-comment.php:41
|
2029 |
msgid "You've left the comment field empty!"
|
2030 |
msgstr ""
|
2033 |
msgid "Success. The customer has been notified of your comment."
|
2034 |
msgstr ""
|
2035 |
|
2036 |
+
#: classes/front/signup/class-vendor-signup.php:81
|
2037 |
+
msgid "ERROR"
|
2038 |
+
msgstr ""
|
2039 |
+
|
2040 |
+
#: classes/front/signup/class-vendor-signup.php:100
|
2041 |
msgid "Application denied. You are an administrator."
|
2042 |
msgstr ""
|
2043 |
|
2044 |
+
#: classes/front/signup/class-vendor-signup.php:102
|
2045 |
msgid "Your application has been submitted."
|
2046 |
msgstr ""
|
2047 |
|
2048 |
+
#: classes/front/signup/class-vendor-signup.php:149, classes/front/signup/class-vendor-signup.php:186, classes/front/signup/class-vendor-signup.php:198
|
2049 |
msgid "You must accept the terms and conditions to become a vendor."
|
2050 |
msgstr ""
|
2051 |
|
2052 |
+
#: classes/front/signup/views/html-vendor-signup.php:22, templates/dashboard/denied.php:22
|
2053 |
msgid "Apply to become a vendor? "
|
2054 |
msgstr ""
|
2055 |
|
2056 |
+
#: classes/front/signup/views/html-vendor-signup.php:36
|
2057 |
+
msgid "I have read and accepted the <a target=\"top\" href=\"%s\">terms and conditions</a>."
|
2058 |
msgstr ""
|
2059 |
|
2060 |
+
#: classes/front/signup/views/html-vendor-signup.php:45
|
2061 |
msgid "Please agree to the terms and conditions"
|
2062 |
msgstr ""
|
2063 |
|
2081 |
msgid "Method Title"
|
2082 |
msgstr ""
|
2083 |
|
2084 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:153, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:70
|
2085 |
msgid "This controls the title which the user sees during checkout."
|
2086 |
msgstr ""
|
2087 |
|
2089 |
msgid "PayPal"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:159, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:75
|
2093 |
msgid "Description"
|
2094 |
msgstr ""
|
2095 |
|
2161 |
msgid "The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled)."
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:270
|
2165 |
+
msgid "Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function."
|
2166 |
+
msgstr ""
|
2167 |
+
|
2168 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2169 |
msgid "Gateway Disabled"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2173 |
msgid "%s does not support your store currency."
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:390, classes/gateways/PayPal_AdvPayments/paypal_ap.php:506, classes/gateways/PayPal_Masspay/class-paypal-masspay.php:153
|
2177 |
msgid "Error: %s"
|
2178 |
msgstr ""
|
2179 |
|
2180 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:399, classes/gateways/PayPal_AdvPayments/paypal_ap.php:400
|
2181 |
msgid "Error ID: %s. %s"
|
2182 |
msgstr ""
|
2183 |
|
2184 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:514, classes/gateways/PayPal_AdvPayments/paypal_ap.php:515
|
2185 |
+
msgid "Error ID: %d. %s"
|
2186 |
msgstr ""
|
2187 |
|
2188 |
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:115
|
2217 |
msgid "Payment total: %s."
|
2218 |
msgstr ""
|
2219 |
|
2220 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:35, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:71
|
2221 |
+
msgid "WC Vendors Test Gateway"
|
2222 |
+
msgstr ""
|
2223 |
+
|
2224 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:36
|
2225 |
+
msgid "This gateway will set orders to processing upon receipt allowing you to test transactions in your store. Some WooCommerce included gateways have problems with this - you should use this gateway for all of your non-PayPal testing."
|
2226 |
+
msgstr ""
|
2227 |
+
|
2228 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:64
|
2229 |
+
msgid "Enable WC Vendors Test Gateway Payment"
|
2230 |
+
msgstr ""
|
2231 |
+
|
2232 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:68
|
2233 |
+
msgid "Title"
|
2234 |
+
msgstr ""
|
2235 |
+
|
2236 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:77
|
2237 |
+
msgid "Payment method description that the customer will see on your checkout."
|
2238 |
+
msgstr ""
|
2239 |
+
|
2240 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:78
|
2241 |
+
msgid "This is a test gateway -- not to be used on live sites for live transactions. <a href=\"http://www.wcvendors.com/\" target=\"top\">Click here to visit WCVendors.com</a>."
|
2242 |
+
msgstr ""
|
2243 |
+
|
2244 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:82
|
2245 |
+
msgid "Instructions"
|
2246 |
+
msgstr ""
|
2247 |
+
|
2248 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:84
|
2249 |
+
msgid "Success! Your test order is now marked as processing and any vendors will be sent an email as long as you have the Notify Vendors email enabled under WooCommerce--Settings--Emails."
|
2250 |
+
msgstr ""
|
2251 |
+
|
2252 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:127
|
2253 |
+
msgid "Test gateway transation complete. Order processing."
|
2254 |
+
msgstr ""
|
2255 |
+
|
2256 |
+
#: classes/includes/class-functions.php:57
|
2257 |
+
msgid "Vendors"
|
2258 |
+
msgstr ""
|
2259 |
+
|
2260 |
+
#: classes/includes/class-functions.php:75
|
2261 |
+
msgid "Select a page…"
|
2262 |
+
msgstr ""
|
2263 |
+
|
2264 |
+
#: classes/includes/views/html-notice-install.php:18
|
2265 |
+
msgid "Skipping the setup will require to configure your marketplace settings manually. Your marketplace is not ready for use until you do this."
|
2266 |
+
msgstr ""
|
2267 |
+
|
2268 |
#: templates/dashboard/denied.php:8
|
2269 |
msgid "Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!"
|
2270 |
msgstr ""
|
2285 |
msgid "View Your Store"
|
2286 |
msgstr ""
|
2287 |
|
|
|
|
|
|
|
|
|
2288 |
#: templates/dashboard/links.php:7
|
2289 |
msgid "Add New Product"
|
2290 |
msgstr ""
|
2341 |
msgid "Save"
|
2342 |
msgstr ""
|
2343 |
|
|
|
|
|
|
|
|
|
2344 |
#: templates/emails/application-status.php:8
|
2345 |
msgid "Application status: %s"
|
2346 |
msgstr ""
|
2347 |
|
2348 |
+
#: templates/emails/application-status.php:9, templates/emails/plain/vendor-notify-application.php:23, templates/emails/vendor-notify-application.php:24, templates/emails/vendor-notify-approved.php:24, templates/emails/vendor-notify-denied.php:26
|
2349 |
msgid "Applicant username: %s"
|
2350 |
msgstr ""
|
2351 |
|
2393 |
msgid "You have received an order from %s. Their order is as follows:"
|
2394 |
msgstr ""
|
2395 |
|
2396 |
+
#: templates/emails/vendor-notify-application.php:23
|
2397 |
+
msgid "Your application is currently: %s"
|
2398 |
+
msgstr ""
|
2399 |
+
|
2400 |
#: templates/orders/comments/add-new-comment.php:11
|
2401 |
msgid "Add comment"
|
2402 |
msgstr ""
|
2417 |
msgid "No customer note."
|
2418 |
msgstr ""
|
2419 |
|
2420 |
+
#: templates/orders/orders.php:82
|
2421 |
msgid "Comments (%s)"
|
2422 |
msgstr ""
|
2423 |
|
languages/wc-vendors-pt_BR.mo
ADDED
Binary file
|
languages/wc-vendors-pt_BR.po
ADDED
@@ -0,0 +1,2445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2018 wc-vendors
|
2 |
+
# This file is distributed under the same license as the wc-vendors package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: WC Vendors\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://www.wcvendors.com\n"
|
7 |
+
"POT-Creation-Date: \n"
|
8 |
+
"PO-Revision-Date: 2018-03-09 01:35-0300\n"
|
9 |
+
"Last-Translator: Luis Eduardo Casper Braschi <luis.eduardo.braschi@outlook."
|
10 |
+
"com>\n"
|
11 |
+
"Language-Team: WC Vendors <support@wcvendors.com>\n"
|
12 |
+
"Language: pt_BR\n"
|
13 |
+
"MIME-Version: 1.0\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"POT-Revision-Date: Sun May 24 2015 08:31:40 GMT-0300 (BRT)\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
"X-Generator: Poedit 1.8.7.1\n"
|
20 |
+
"X-Poedit-Basepath: .\n"
|
21 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
22 |
+
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
23 |
+
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
24 |
+
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
25 |
+
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
26 |
+
"X-Poedit-SearchPath-0: .\n"
|
27 |
+
"X-Poedit-SearchPath-1: ..\n"
|
28 |
+
|
29 |
+
#: class-wc-vendors.php:105
|
30 |
+
msgid ""
|
31 |
+
"WC Vendors requires WooCommerce to run. Please install WooCommerce and "
|
32 |
+
"activate before attempting to activate again."
|
33 |
+
msgstr ""
|
34 |
+
"WC Vendors requer que o WooCommerce esteja rodando. Por favor, instale e "
|
35 |
+
"ative o WooCommerce antes de tentar ativar novamente."
|
36 |
+
|
37 |
+
#: class-wc-vendors.php:205, classes/admin/class-admin-menus.php:37,
|
38 |
+
#: classes/admin/class-admin-reports.php:41,
|
39 |
+
#: classes/admin/class-admin-users.php:384
|
40 |
+
msgid "WC Vendors"
|
41 |
+
msgstr "WC Vendors"
|
42 |
+
|
43 |
+
#: class-wc-vendors.php:265
|
44 |
+
msgid ""
|
45 |
+
"<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce "
|
46 |
+
"v2.7.0."
|
47 |
+
msgstr ""
|
48 |
+
"<b>WC Vendors está desabilitado</b>. WC Vendors requer no mínimo WooCommerce "
|
49 |
+
"v2.7.0."
|
50 |
+
|
51 |
+
#: class-wc-vendors.php:601, classes/admin/class-setup-wizard.php:92,
|
52 |
+
#: classes/admin/settings/sf-options.php:192
|
53 |
+
msgid "Capabilities"
|
54 |
+
msgstr "Privilégios"
|
55 |
+
|
56 |
+
#: class-wc-vendors.php:645, classes/admin/class-admin-page.php:147,
|
57 |
+
#: classes/admin/class-admin-page.php:442,
|
58 |
+
#: classes/admin/class-admin-reports.php:178,
|
59 |
+
#: classes/admin/class-admin-reports.php:461,
|
60 |
+
#: classes/admin/class-product-meta.php:46,
|
61 |
+
#: classes/admin/class-product-meta.php:187,
|
62 |
+
#: classes/admin/class-product-meta.php:223,
|
63 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:43,
|
64 |
+
#: classes/class-install.php:59, classes/includes/class-functions.php:55
|
65 |
+
msgid "Vendor"
|
66 |
+
msgstr "Vendedor"
|
67 |
+
|
68 |
+
#: class-wc-vendors.php:649, classes/admin/settings/sf-options.php:4,
|
69 |
+
#: classes/admin/views/setup/general.php:19
|
70 |
+
msgid "General"
|
71 |
+
msgstr "Geral"
|
72 |
+
|
73 |
+
#: class-wc-vendors.php:727
|
74 |
+
msgid "Documentation"
|
75 |
+
msgstr "Documentação"
|
76 |
+
|
77 |
+
#: class-wc-vendors.php:729, class-wc-vendors.php:867
|
78 |
+
msgid "Upgrade to Pro"
|
79 |
+
msgstr "Fazer upgrade para versão Pro"
|
80 |
+
|
81 |
+
#: class-wc-vendors.php:877
|
82 |
+
msgid ""
|
83 |
+
"WC Vendors Pro extends your marketplace to include some of the following enhanced features\n"
|
84 |
+
" <ul>"
|
85 |
+
" <li>Complete front end dashboard for your vendors</li>"
|
86 |
+
" <li>Vendor Coupons</li>"
|
87 |
+
" <li>Vendor product management</li>"
|
88 |
+
" <li>Vendor Order management</li>"
|
89 |
+
" <li>Vendor ratings</li>"
|
90 |
+
" <li>Vendors can upload their own store banners</li>"
|
91 |
+
" <li>A comprehensive shipping system for your vendors including two systems. Flat rate and Table rate shipping.</li>"
|
92 |
+
" <li>All default product types supported on the front end</li>"
|
93 |
+
" <li>Custom product-edit templates</li>"
|
94 |
+
" <li>Complete vendor signup form</li>"
|
95 |
+
" </ul>"
|
96 |
+
" <a href=\"http://www.wcvendors.com/home/comparison/?utm_source=plugin\">See the complete comparison list here.</a>"
|
97 |
+
" <h1><a href=\"https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo\">Buy Pro Today</a></h1>"
|
98 |
+
msgstr ""
|
99 |
+
"WC Vendors Pro extends your marketplace to include some of the following enhanced features"
|
100 |
+
" <ul>"
|
101 |
+
" <li>Painel de frontend completo para seus vendedores</li>"
|
102 |
+
" <li>Cupons de Vendedor</li>"
|
103 |
+
" <li>Gerenciamento de produto pelo vendedor</li>"
|
104 |
+
" <li>Gerenciamento de pedidos pelo vendedor</li>"
|
105 |
+
" <li>Avaliações de vendedor</li>"
|
106 |
+
" <li>Vendedores podem fazer upload dos banners de suas lojas</li>"
|
107 |
+
" <li>Um sistema de entrega abrangente para seues vendedores incluindo dois métodos: taxa fixa e tabela fixa</li>"
|
108 |
+
" <li>Todos os tipos padrão são suportados no front end</li>"
|
109 |
+
" <li>Templates de edição de produto personalizados</li>"
|
110 |
+
" <li>Complete vendor signup form</li><li>Formulário completo de registro</li>"
|
111 |
+
" </ul>"
|
112 |
+
" <a href=\"http://www.wcvendors.com/home/comparison/?utm_source=plugin\">Veja a lista comparativa completa aqui.</a>"
|
113 |
+
" <h1><a href=\"https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=plugin&utm_campaign=upgrade_promo\">Compre a Versão Pro Hoje</a></h1>"
|
114 |
+
|
115 |
+
#: class-wc-vendors.php:731
|
116 |
+
msgid "Contact Us"
|
117 |
+
msgstr "Entre em Contato"
|
118 |
+
|
119 |
+
#: class-wc-vendors.php:873
|
120 |
+
msgid "Upgrade to WC Vendors Pro!"
|
121 |
+
msgstr "Fazer upgrade para versão Pro!"
|
122 |
+
|
123 |
+
#: classes/admin/class-admin-menus.php:46,
|
124 |
+
#: classes/admin/views/setup/ready.php:65
|
125 |
+
msgid "Extensions"
|
126 |
+
msgstr "Extensões"
|
127 |
+
|
128 |
+
#: classes/admin/class-admin-page.php:32
|
129 |
+
msgid "Vendors shipped"
|
130 |
+
msgstr "Enviado pelos vendedores"
|
131 |
+
|
132 |
+
#: classes/admin/class-admin-page.php:57
|
133 |
+
msgid "Vendors Shipped"
|
134 |
+
msgstr "Enviado pelos Vendedores"
|
135 |
+
|
136 |
+
#: classes/admin/class-admin-page.php:81, classes/admin/class-admin-page.php:81
|
137 |
+
msgid "Commissions"
|
138 |
+
msgstr "Comissões"
|
139 |
+
|
140 |
+
#: classes/admin/class-admin-page.php:101
|
141 |
+
msgid "Reset WC Vendors roles "
|
142 |
+
msgstr "Reinicializar funções do WC Vendor"
|
143 |
+
|
144 |
+
#: classes/admin/class-admin-page.php:102
|
145 |
+
msgid "Reset WC Vendor Roles"
|
146 |
+
msgstr "Reinicializar Funções do WC Vendor"
|
147 |
+
|
148 |
+
#: classes/admin/class-admin-page.php:103
|
149 |
+
msgid ""
|
150 |
+
"This will reset the wcvendors roles ( vendor & pending_vendor ), back to the "
|
151 |
+
"default capabilities."
|
152 |
+
msgstr ""
|
153 |
+
"Isso irá reajustar as funções de wcvendors (vendedor & vendedor pendente) "
|
154 |
+
"para as autorizações padrão. "
|
155 |
+
|
156 |
+
#: classes/admin/class-admin-page.php:108
|
157 |
+
msgid "Reset WC Vendors "
|
158 |
+
msgstr "Reinicializar WC Vendors"
|
159 |
+
|
160 |
+
#: classes/admin/class-admin-page.php:109
|
161 |
+
msgid "Reset WC Vendors Settings"
|
162 |
+
msgstr "Reinicializar Configurações do WC Vendor"
|
163 |
+
|
164 |
+
#: classes/admin/class-admin-page.php:110
|
165 |
+
msgid ""
|
166 |
+
"This will reset wcvendors back to defaults. This DELETES ALL YOUR Settings."
|
167 |
+
msgstr ""
|
168 |
+
"Isso irá reajustar wcvendors para o padrão. Isso REMOVERÁ TODOS AS SUAS "
|
169 |
+
"CONFIGURAÇÕES"
|
170 |
+
|
171 |
+
#: classes/admin/class-admin-page.php:150, classes/class-install.php:52
|
172 |
+
msgid "Pending Vendor"
|
173 |
+
msgstr "Vendedor pendente"
|
174 |
+
|
175 |
+
#: classes/admin/class-admin-page.php:156
|
176 |
+
msgid "WC Vendor roles successfully reset."
|
177 |
+
msgstr "Funções do WC Vendor reinicializadas com sucesso."
|
178 |
+
|
179 |
+
#: classes/admin/class-admin-page.php:170
|
180 |
+
msgid "WC Vendors was successfully reset. All settings have been reset."
|
181 |
+
msgstr ""
|
182 |
+
"WC Vendors foi reinicializado com sucesso. Todas as configurações foram "
|
183 |
+
"reinicializadas."
|
184 |
+
|
185 |
+
#: classes/admin/class-admin-page.php:184
|
186 |
+
msgid "Select a Vendor"
|
187 |
+
msgstr "Selecione um Vendedor"
|
188 |
+
|
189 |
+
#: classes/admin/class-admin-page.php:268,
|
190 |
+
#: classes/admin/class-admin-page.php:443,
|
191 |
+
#: classes/admin/class-product-meta.php:151,
|
192 |
+
#: classes/admin/class-product-meta.php:167,
|
193 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:44,
|
194 |
+
#: classes/admin/views/setup/general.php:79, templates/dashboard/reports.php:19
|
195 |
+
msgid "Commission"
|
196 |
+
msgstr "Comissão"
|
197 |
+
|
198 |
+
#: classes/admin/class-admin-page.php:440,
|
199 |
+
#: classes/admin/class-admin-reports.php:177,
|
200 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:41,
|
201 |
+
#: templates/dashboard/reports.php:17,
|
202 |
+
#: templates/emails/notify-vendor-shipped.php:26,
|
203 |
+
#: templates/emails/vendor-new-order.php:30
|
204 |
+
msgid "Product"
|
205 |
+
msgstr "Produto"
|
206 |
+
|
207 |
+
#: classes/admin/class-admin-page.php:441,
|
208 |
+
#: classes/admin/class-vendor-admin-dashboard.php:322,
|
209 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:42
|
210 |
+
msgid "Order ID"
|
211 |
+
msgstr "ID do Pedido "
|
212 |
+
|
213 |
+
#: classes/admin/class-admin-page.php:444,
|
214 |
+
#: classes/admin/class-admin-reports.php:350,
|
215 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:45,
|
216 |
+
#: classes/admin/settings/sf-options.php:52,
|
217 |
+
#: classes/admin/settings/sf-options.php:136,
|
218 |
+
#: templates/dashboard/orders.php:45, templates/orders/orders.php:113
|
219 |
+
msgid "Shipping"
|
220 |
+
msgstr "Frete"
|
221 |
+
|
222 |
+
#: classes/admin/class-admin-page.php:445,
|
223 |
+
#: classes/admin/class-admin-reports.php:349,
|
224 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:46
|
225 |
+
msgid "Tax"
|
226 |
+
msgstr "Imposto"
|
227 |
+
|
228 |
+
#: classes/admin/class-admin-page.php:446,
|
229 |
+
#: classes/admin/class-admin-reports.php:179,
|
230 |
+
#: classes/admin/class-admin-reports.php:377,
|
231 |
+
#: classes/admin/class-vendor-admin-dashboard.php:325,
|
232 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:47,
|
233 |
+
#: templates/dashboard/orders.php:46
|
234 |
+
msgid "Total"
|
235 |
+
msgstr "Total"
|
236 |
+
|
237 |
+
#: classes/admin/class-admin-page.php:447,
|
238 |
+
#: classes/admin/class-admin-reports.php:181,
|
239 |
+
#: classes/admin/class-admin-reports.php:464,
|
240 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:48
|
241 |
+
msgid "Status"
|
242 |
+
msgstr "Status"
|
243 |
+
|
244 |
+
#: classes/admin/class-admin-page.php:448,
|
245 |
+
#: classes/admin/class-vendor-admin-dashboard.php:327,
|
246 |
+
#: classes/admin/class-wcv-commissions-csv-exporter.php:49,
|
247 |
+
#: classes/front/orders/class-orders.php:257, templates/dashboard/orders.php:47
|
248 |
+
msgid "Date"
|
249 |
+
msgstr "Data"
|
250 |
+
|
251 |
+
#: classes/admin/class-admin-page.php:492
|
252 |
+
msgid "Mark paid"
|
253 |
+
msgstr "Marcar como pago"
|
254 |
+
|
255 |
+
#: classes/admin/class-admin-page.php:493
|
256 |
+
msgid "Mark due"
|
257 |
+
msgstr "Marcar como a pagar"
|
258 |
+
|
259 |
+
#: classes/admin/class-admin-page.php:494
|
260 |
+
msgid "Mark reversed"
|
261 |
+
msgstr "Marcar como revertido"
|
262 |
+
|
263 |
+
#: classes/admin/class-admin-page.php:495
|
264 |
+
msgid "Delete"
|
265 |
+
msgstr "Deletar"
|
266 |
+
|
267 |
+
#: classes/admin/class-admin-page.php:567
|
268 |
+
msgid "Show all dates"
|
269 |
+
msgstr "Mostrar todas as datas"
|
270 |
+
|
271 |
+
#: classes/admin/class-admin-page.php:602
|
272 |
+
msgid "Show all Statuses"
|
273 |
+
msgstr "Mostrar todos os Status"
|
274 |
+
|
275 |
+
#: classes/admin/class-admin-page.php:603,
|
276 |
+
#: classes/admin/class-admin-page.php:865,
|
277 |
+
#: classes/admin/class-admin-reports.php:353,
|
278 |
+
#: classes/admin/class-admin-reports.php:446, classes/class-commission.php:55
|
279 |
+
msgid "Due"
|
280 |
+
msgstr "A pagar"
|
281 |
+
|
282 |
+
#: classes/admin/class-admin-page.php:604,
|
283 |
+
#: classes/admin/class-admin-page.php:866,
|
284 |
+
#: classes/admin/class-admin-reports.php:352,
|
285 |
+
#: classes/admin/class-admin-reports.php:447, classes/class-commission.php:56
|
286 |
+
msgid "Paid"
|
287 |
+
msgstr "Pago"
|
288 |
+
|
289 |
+
#: classes/admin/class-admin-page.php:605,
|
290 |
+
#: classes/admin/class-admin-reports.php:351,
|
291 |
+
#: classes/admin/class-admin-reports.php:448, classes/class-commission.php:57
|
292 |
+
msgid "Reversed"
|
293 |
+
msgstr "Revertido"
|
294 |
+
|
295 |
+
#: classes/admin/class-admin-page.php:658
|
296 |
+
msgid "Commission marked paid."
|
297 |
+
msgstr "Comissão marcada como paga."
|
298 |
+
|
299 |
+
#: classes/admin/class-admin-page.php:665
|
300 |
+
msgid "Commission marked due."
|
301 |
+
msgstr "Comissão marcada como a pagar."
|
302 |
+
|
303 |
+
#: classes/admin/class-admin-page.php:672
|
304 |
+
msgid "Commission marked reversed."
|
305 |
+
msgstr "Comissão marcada como revertida."
|
306 |
+
|
307 |
+
#: classes/admin/class-admin-page.php:864
|
308 |
+
msgid "All"
|
309 |
+
msgstr "Todos"
|
310 |
+
|
311 |
+
#: classes/admin/class-admin-page.php:867
|
312 |
+
msgid "Void"
|
313 |
+
msgstr "Nulo"
|
314 |
+
|
315 |
+
#: classes/admin/class-admin-reports.php:44
|
316 |
+
msgid "Overview"
|
317 |
+
msgstr "Visão Geral"
|
318 |
+
|
319 |
+
#: classes/admin/class-admin-reports.php:50
|
320 |
+
msgid "Commission by vendor"
|
321 |
+
msgstr "Comissão por vendedor"
|
322 |
+
|
323 |
+
#: classes/admin/class-admin-reports.php:56
|
324 |
+
msgid "Commission by product"
|
325 |
+
msgstr "Comissão por produto"
|
326 |
+
|
327 |
+
#: classes/admin/class-admin-reports.php:62,
|
328 |
+
#: classes/admin/class-admin-reports.php:348
|
329 |
+
msgid "Commission Totals"
|
330 |
+
msgstr "Totais de Comissão"
|
331 |
+
|
332 |
+
#: classes/admin/class-admin-reports.php:63
|
333 |
+
msgid ""
|
334 |
+
"Commission totals for all vendors includes shipping and taxes. By default no "
|
335 |
+
"date range is used and all due commissions are returned. Use the date range "
|
336 |
+
"to filter."
|
337 |
+
msgstr ""
|
338 |
+
"Totais de comissão para todos os vendedores incluem envio e taxas. Por "
|
339 |
+
"padrão não é usado nenhum intervalo de tempo e todas as comissões a pagar "
|
340 |
+
"são devolvidas. Use o filtro de intervalo de datas."
|
341 |
+
|
342 |
+
#: classes/admin/class-admin-reports.php:124,
|
343 |
+
#: classes/admin/class-admin-reports.php:440,
|
344 |
+
#: templates/dashboard/date-picker.php:3
|
345 |
+
msgid "From:"
|
346 |
+
msgstr "De:"
|
347 |
+
|
348 |
+
#: classes/admin/class-admin-reports.php:126,
|
349 |
+
#: classes/admin/class-admin-reports.php:442,
|
350 |
+
#: templates/dashboard/date-picker.php:7
|
351 |
+
msgid "To:"
|
352 |
+
msgstr "Até:"
|
353 |
+
|
354 |
+
#: classes/admin/class-admin-reports.php:128,
|
355 |
+
#: classes/admin/class-admin-reports.php:286,
|
356 |
+
#: classes/admin/class-admin-reports.php:451,
|
357 |
+
#: templates/dashboard/date-picker.php:12
|
358 |
+
msgid "Show"
|
359 |
+
msgstr "Mostrar"
|
360 |
+
|
361 |
+
#: classes/admin/class-admin-reports.php:134
|
362 |
+
msgid "Total paid in range"
|
363 |
+
msgstr "Total pago no intervalo de tempo"
|
364 |
+
|
365 |
+
#: classes/admin/class-admin-reports.php:137,
|
366 |
+
#: classes/admin/class-admin-reports.php:144,
|
367 |
+
#: classes/admin/class-admin-reports.php:151
|
368 |
+
msgid "n/a"
|
369 |
+
msgstr "n/a"
|
370 |
+
|
371 |
+
#: classes/admin/class-admin-reports.php:141
|
372 |
+
msgid "Total due in range"
|
373 |
+
msgstr "Total a pagar no intervalo de tempo"
|
374 |
+
|
375 |
+
#: classes/admin/class-admin-reports.php:148
|
376 |
+
msgid "Total reversed in range"
|
377 |
+
msgstr "Total revertido no intervalo de tempo"
|
378 |
+
|
379 |
+
#: classes/admin/class-admin-reports.php:158
|
380 |
+
msgid "Recent Commission"
|
381 |
+
msgstr "Comissão recente"
|
382 |
+
|
383 |
+
#: classes/admin/class-admin-reports.php:176,
|
384 |
+
#: classes/front/orders/class-orders.php:249, templates/dashboard/orders.php:44
|
385 |
+
msgid "Order"
|
386 |
+
msgstr "Pedido"
|
387 |
+
|
388 |
+
#: classes/admin/class-admin-reports.php:180
|
389 |
+
msgid "Date & Time"
|
390 |
+
msgstr "Data & Hora"
|
391 |
+
|
392 |
+
#: classes/admin/class-admin-reports.php:189
|
393 |
+
msgid "N/A"
|
394 |
+
msgstr "N/A"
|
395 |
+
|
396 |
+
#: classes/admin/class-admin-reports.php:194
|
397 |
+
msgid "D j M Y at h:ia"
|
398 |
+
msgstr "D j M Y à\\s h:ia"
|
399 |
+
|
400 |
+
#: classes/admin/class-admin-reports.php:203
|
401 |
+
msgid "No commission yet"
|
402 |
+
msgstr "Sem comissão no momento"
|
403 |
+
|
404 |
+
#: classes/admin/class-admin-reports.php:237
|
405 |
+
msgid "Show:"
|
406 |
+
msgstr "Mostrar:"
|
407 |
+
|
408 |
+
#: classes/admin/class-admin-reports.php:249
|
409 |
+
msgid "Type in a product name to start searching..."
|
410 |
+
msgstr "Digite o nome de um produto para iniciar a busca..."
|
411 |
+
|
412 |
+
#: classes/admin/class-admin-reports.php:281
|
413 |
+
msgid "Select a vendor…"
|
414 |
+
msgstr "Selecionar um vendedor…"
|
415 |
+
|
416 |
+
#: classes/admin/class-admin-reports.php:347
|
417 |
+
msgid "Month"
|
418 |
+
msgstr "Mês"
|
419 |
+
|
420 |
+
#: classes/admin/class-admin-reports.php:462
|
421 |
+
msgid "Tax Total"
|
422 |
+
msgstr "Total de Imposto"
|
423 |
+
|
424 |
+
#: classes/admin/class-admin-reports.php:463
|
425 |
+
msgid "Shipping Total"
|
426 |
+
msgstr "Total de Envio"
|
427 |
+
|
428 |
+
#: classes/admin/class-admin-reports.php:465
|
429 |
+
msgid "Commission Total"
|
430 |
+
msgstr "Total de Commissão"
|
431 |
+
|
432 |
+
#: classes/admin/class-admin-reports.php:487
|
433 |
+
msgid "No commissions found."
|
434 |
+
msgstr "Nenhuma comissão foi encontrada."
|
435 |
+
|
436 |
+
#: classes/admin/class-admin-users.php:394
|
437 |
+
msgid "Enable HTML for the shop description"
|
438 |
+
msgstr "Permitir HTML na descrição da loja"
|
439 |
+
|
440 |
+
#: classes/admin/class-admin-users.php:400
|
441 |
+
msgid "Shop name"
|
442 |
+
msgstr "Nome da loja"
|
443 |
+
|
444 |
+
#: classes/admin/class-admin-users.php:407
|
445 |
+
msgid "PayPal E-mail"
|
446 |
+
msgstr "E-mail do PayPal"
|
447 |
+
|
448 |
+
#: classes/admin/class-admin-users.php:408
|
449 |
+
msgid "required"
|
450 |
+
msgstr "requerido"
|
451 |
+
|
452 |
+
#: classes/admin/class-admin-users.php:415
|
453 |
+
msgid "Commission rate"
|
454 |
+
msgstr "Taxa de comissão"
|
455 |
+
|
456 |
+
#: classes/admin/class-admin-users.php:416,
|
457 |
+
#: classes/admin/class-product-meta.php:174
|
458 |
+
msgid "Leave blank for default"
|
459 |
+
msgstr "Deixe em branco para o padrão"
|
460 |
+
|
461 |
+
#: classes/admin/class-admin-users.php:422
|
462 |
+
msgid "Give Tax"
|
463 |
+
msgstr "Repassar Imposto"
|
464 |
+
|
465 |
+
#: classes/admin/class-admin-users.php:427
|
466 |
+
msgid "Tax override for vendor"
|
467 |
+
msgstr "Sobrescrever taxa para o vendedor"
|
468 |
+
|
469 |
+
#: classes/admin/class-admin-users.php:433
|
470 |
+
msgid "Give Shipping"
|
471 |
+
msgstr "Repassar Frete"
|
472 |
+
|
473 |
+
#: classes/admin/class-admin-users.php:438
|
474 |
+
msgid "Shipping override for vendor"
|
475 |
+
msgstr "Sobrescrever frete de vendedor"
|
476 |
+
|
477 |
+
#: classes/admin/class-admin-users.php:444,
|
478 |
+
#: classes/admin/views/html-vendor-settings-page.php:30,
|
479 |
+
#: templates/dashboard/settings/seller-info.php:3
|
480 |
+
msgid "Seller info"
|
481 |
+
msgstr "Informação sobre o vendedor"
|
482 |
+
|
483 |
+
#: classes/admin/class-admin-users.php:449
|
484 |
+
msgid "Shop description"
|
485 |
+
msgstr "Descrição da Loja"
|
486 |
+
|
487 |
+
#: classes/admin/class-setup-wizard.php:87
|
488 |
+
msgid "Start"
|
489 |
+
msgstr "Iniciar"
|
490 |
+
|
491 |
+
#: classes/admin/class-setup-wizard.php:97,
|
492 |
+
#: classes/admin/settings/sf-options.php:269,
|
493 |
+
#: classes/admin/views/setup/pages.php:19
|
494 |
+
msgid "Pages"
|
495 |
+
msgstr "Páginas"
|
496 |
+
|
497 |
+
#: classes/admin/class-setup-wizard.php:102
|
498 |
+
msgid "Ready!"
|
499 |
+
msgstr "Pronto!"
|
500 |
+
|
501 |
+
#: classes/admin/class-setup-wizard.php:117
|
502 |
+
msgctxt "enhanced select"
|
503 |
+
msgid "No matches found"
|
504 |
+
msgstr "Nenhum resultado encontrado"
|
505 |
+
|
506 |
+
#: classes/admin/class-setup-wizard.php:118
|
507 |
+
msgctxt "enhanced select"
|
508 |
+
msgid "Loading failed"
|
509 |
+
msgstr "Carregamento falhou"
|
510 |
+
|
511 |
+
#: classes/admin/class-setup-wizard.php:119
|
512 |
+
msgctxt "enhanced select"
|
513 |
+
msgid "Please enter 1 or more characters"
|
514 |
+
msgstr "Por favor digite 1 ou mas caracteres"
|
515 |
+
|
516 |
+
#: classes/admin/class-setup-wizard.php:120
|
517 |
+
msgctxt "enhanced select"
|
518 |
+
msgid "Please enter %qty% or more characters"
|
519 |
+
msgstr "Por favor digite %qty% caracteres"
|
520 |
+
|
521 |
+
#: classes/admin/class-setup-wizard.php:121
|
522 |
+
msgctxt "enhanced select"
|
523 |
+
msgid "Please delete 1 character"
|
524 |
+
msgstr "Por favor apague 1 caractere"
|
525 |
+
|
526 |
+
#: classes/admin/class-setup-wizard.php:122
|
527 |
+
msgctxt "enhanced select"
|
528 |
+
msgid "Please delete %qty% characters"
|
529 |
+
msgstr "Por favor apague %qty% caracteres"
|
530 |
+
|
531 |
+
#: classes/admin/class-setup-wizard.php:123
|
532 |
+
msgctxt "enhanced select"
|
533 |
+
msgid "You can only select 1 item"
|
534 |
+
msgstr "Você só pode selecionar 1 item"
|
535 |
+
|
536 |
+
#: classes/admin/class-setup-wizard.php:124
|
537 |
+
msgctxt "enhanced select"
|
538 |
+
msgid "You can only select %qty% items"
|
539 |
+
msgstr "Você só pode selecionar %qty% items"
|
540 |
+
|
541 |
+
#: classes/admin/class-setup-wizard.php:125
|
542 |
+
msgctxt "enhanced select"
|
543 |
+
msgid "Loading more results…"
|
544 |
+
msgstr "Carregando mais resultados…"
|
545 |
+
|
546 |
+
#: classes/admin/class-setup-wizard.php:126
|
547 |
+
msgctxt "enhanced select"
|
548 |
+
msgid "Searching…"
|
549 |
+
msgstr "Buscando…"
|
550 |
+
|
551 |
+
#: classes/admin/class-setup-wizard.php:362
|
552 |
+
msgid ""
|
553 |
+
"Don't forget to check our <a href=\"%1$s\" target=\"_blank\">documentation</"
|
554 |
+
"a> to learn more about setting up WC Vendors and if you need help, be sure "
|
555 |
+
"to visit our <a href=\"%2$s\" target=\"_blank\">free support forums</a>."
|
556 |
+
msgstr ""
|
557 |
+
"Não esqueça de conferir nossa <a href=\"%1$s\" target=\"_blank"
|
558 |
+
"\">documentação</a> para saber mais sobre como configurar o WC Vendors e se "
|
559 |
+
"precisar de ajudar, certifique-se de visitar nossos <a href=\"%2$s\" target="
|
560 |
+
"\"_blank\">fóruns gratuitos de ajuda</a>."
|
561 |
+
|
562 |
+
#: classes/admin/class-vendor-admin-dashboard.php:22,
|
563 |
+
#: classes/admin/views/setup/pages.php:38, classes/class-install.php:160
|
564 |
+
msgid "Shop Settings"
|
565 |
+
msgstr "Ajustes da Loja"
|
566 |
+
|
567 |
+
#: classes/admin/class-vendor-admin-dashboard.php:23,
|
568 |
+
#: classes/admin/class-vendor-admin-dashboard.php:183,
|
569 |
+
#: classes/admin/settings/sf-options.php:196,
|
570 |
+
#: classes/admin/views/setup/capabilities.php:70,
|
571 |
+
#: classes/class-install.php:159, templates/dashboard/orders.php:35
|
572 |
+
msgid "Orders"
|
573 |
+
msgstr "Pedidos"
|
574 |
+
|
575 |
+
#: classes/admin/class-vendor-admin-dashboard.php:70,
|
576 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:117
|
577 |
+
msgid "Your PayPal address is not a valid email address."
|
578 |
+
msgstr "Seu endereço do PayPal não é um endereço de email válido"
|
579 |
+
|
580 |
+
#: classes/admin/class-vendor-admin-dashboard.php:79,
|
581 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:126
|
582 |
+
msgid "That shop name is already taken. Your shop name must be unique."
|
583 |
+
msgstr "Este nome de loja já existe. O nome da sua loja deve ser único."
|
584 |
+
|
585 |
+
#: classes/admin/class-vendor-admin-dashboard.php:115,
|
586 |
+
#: classes/admin/settings/classes/sf-class-settings.php:371,
|
587 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:144
|
588 |
+
msgid "Settings saved."
|
589 |
+
msgstr "Ajustes salvos."
|
590 |
+
|
591 |
+
#: classes/admin/class-vendor-admin-dashboard.php:246
|
592 |
+
msgid "order"
|
593 |
+
msgstr "pedido"
|
594 |
+
|
595 |
+
#: classes/admin/class-vendor-admin-dashboard.php:247
|
596 |
+
msgid "orders"
|
597 |
+
msgstr "pedidos"
|
598 |
+
|
599 |
+
#: classes/admin/class-vendor-admin-dashboard.php:323
|
600 |
+
msgid "Customer"
|
601 |
+
msgstr "Cliente"
|
602 |
+
|
603 |
+
#: classes/admin/class-vendor-admin-dashboard.php:324,
|
604 |
+
#: classes/admin/settings/sf-options.php:127,
|
605 |
+
#: classes/admin/settings/sf-options.php:245,
|
606 |
+
#: classes/admin/views/setup/capabilities.php:19
|
607 |
+
msgid "Products"
|
608 |
+
msgstr "Produtos"
|
609 |
+
|
610 |
+
#: classes/admin/class-vendor-admin-dashboard.php:326
|
611 |
+
msgid "Comments to Customer"
|
612 |
+
msgstr "Comentários para o Cliente"
|
613 |
+
|
614 |
+
#: classes/admin/class-vendor-admin-dashboard.php:328,
|
615 |
+
#: templates/dashboard/orders.php:106
|
616 |
+
msgid "Shipped"
|
617 |
+
msgstr "Enviado"
|
618 |
+
|
619 |
+
#: classes/admin/class-vendor-admin-dashboard.php:364,
|
620 |
+
#: templates/dashboard/orders.php:99
|
621 |
+
msgid "Mark shipped"
|
622 |
+
msgstr "Marcar como enviado"
|
623 |
+
|
624 |
+
#: classes/admin/class-vendor-admin-dashboard.php:390
|
625 |
+
msgid "Orders marked shipped."
|
626 |
+
msgstr "Pedidos marcados como enviados."
|
627 |
+
|
628 |
+
#: classes/admin/class-vendor-admin-dashboard.php:554
|
629 |
+
msgid "Yes"
|
630 |
+
msgstr "Sim"
|
631 |
+
|
632 |
+
#: classes/admin/class-vendor-admin-dashboard.php:554
|
633 |
+
msgid "No"
|
634 |
+
msgstr "Não"
|
635 |
+
|
636 |
+
#: classes/admin/class-vendor-applicants.php:74
|
637 |
+
msgid "Vendor has been <b>denied</b>."
|
638 |
+
msgstr "Vendedor foi <b>negado</b>."
|
639 |
+
|
640 |
+
#: classes/admin/class-vendor-applicants.php:85
|
641 |
+
msgid "Vendor has been <b>approved</b>."
|
642 |
+
msgstr "Vendedor foi <b>aprovado</b>."
|
643 |
+
|
644 |
+
#: classes/admin/class-vendor-applicants.php:99
|
645 |
+
msgid "Pending Vendors"
|
646 |
+
msgstr "Vendedores Pendentes"
|
647 |
+
|
648 |
+
#: classes/admin/emails/class-emails.php:68,
|
649 |
+
#: classes/admin/emails/class-emails.php:199,
|
650 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:70
|
651 |
+
msgid "pending"
|
652 |
+
msgstr "pendente"
|
653 |
+
|
654 |
+
#: classes/admin/emails/class-emails.php:70
|
655 |
+
msgid "approved"
|
656 |
+
msgstr "aprovado"
|
657 |
+
|
658 |
+
#: classes/admin/emails/class-emails.php:72
|
659 |
+
msgid "denied"
|
660 |
+
msgstr "negado"
|
661 |
+
|
662 |
+
#: classes/admin/emails/class-emails.php:173
|
663 |
+
msgid "Resend vendor new order notification"
|
664 |
+
msgstr "Reenviar notificação de novo pedido ao vendedor"
|
665 |
+
|
666 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:28
|
667 |
+
msgid "Vendor Application"
|
668 |
+
msgstr "Pedido de Vendedor"
|
669 |
+
|
670 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:29
|
671 |
+
msgid "Vendor application will either be approved, denied, or pending."
|
672 |
+
msgstr "Pedido de Vendedor será aprovado, negado, ou deixada como pendente."
|
673 |
+
|
674 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:31
|
675 |
+
msgid "Application {status}"
|
676 |
+
msgstr "Solicitação {status}"
|
677 |
+
|
678 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:32
|
679 |
+
msgid "[{blogname}] Your vendor application has been {status}"
|
680 |
+
msgstr "[{blogname}] Sua solicitação de vendedor foi {status} "
|
681 |
+
|
682 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:123,
|
683 |
+
#: classes/admin/emails/class-wc-notify-admin.php:134,
|
684 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:166,
|
685 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:268,
|
686 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:135,
|
687 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:130,
|
688 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:138,
|
689 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:148
|
690 |
+
msgid "Enable/Disable"
|
691 |
+
msgstr "Permitir/Não Permitir"
|
692 |
+
|
693 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:125,
|
694 |
+
#: classes/admin/emails/class-wc-notify-admin.php:136,
|
695 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:168,
|
696 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:270,
|
697 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:137,
|
698 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:132,
|
699 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:140,
|
700 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:150
|
701 |
+
msgid "Enable this email notification"
|
702 |
+
msgstr "Permitir este email para notificação"
|
703 |
+
|
704 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:131
|
705 |
+
msgid ""
|
706 |
+
"Enter recipients (comma separated) for this email. Defaults to <code>%s</"
|
707 |
+
"code>."
|
708 |
+
msgstr ""
|
709 |
+
"Coloque destinatários (separados por vírgulas) para este email. Padrão para "
|
710 |
+
"<code>%s</code>."
|
711 |
+
|
712 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:136,
|
713 |
+
#: classes/admin/emails/class-wc-notify-admin.php:147,
|
714 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:172,
|
715 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:274,
|
716 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:149,
|
717 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:136,
|
718 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:144,
|
719 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:154
|
720 |
+
msgid "Subject"
|
721 |
+
msgstr "Assunto"
|
722 |
+
|
723 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:138,
|
724 |
+
#: classes/admin/emails/class-wc-notify-admin.php:149,
|
725 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:174,
|
726 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:276
|
727 |
+
msgid ""
|
728 |
+
"This controls the email subject line. Leave blank to use the default "
|
729 |
+
"subject: <code>%s</code>."
|
730 |
+
msgstr ""
|
731 |
+
"Isto controla a linha de assunto do email. Deixe em branco para usar o "
|
732 |
+
"assunto padrão: <code>%s</code>."
|
733 |
+
|
734 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:143,
|
735 |
+
#: classes/admin/emails/class-wc-notify-admin.php:154,
|
736 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:179,
|
737 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:281
|
738 |
+
msgid "Email Heading"
|
739 |
+
msgstr "Cabeçalho do Email"
|
740 |
+
|
741 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:145,
|
742 |
+
#: classes/admin/emails/class-wc-notify-admin.php:156,
|
743 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:181,
|
744 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:283
|
745 |
+
msgid ""
|
746 |
+
"This controls the main heading contained within the email notification. "
|
747 |
+
"Leave blank to use the default heading: <code>%s</code>."
|
748 |
+
msgstr ""
|
749 |
+
"Isto controla o cabeçalho principal dentro do email de notificação. Deixe em "
|
750 |
+
"branco para usar o cabeçalho padrão: <code>%s</code>."
|
751 |
+
|
752 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:150,
|
753 |
+
#: classes/admin/emails/class-wc-notify-admin.php:161,
|
754 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:186,
|
755 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:294,
|
756 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:167,
|
757 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:154,
|
758 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:171,
|
759 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:189
|
760 |
+
msgid "Email type"
|
761 |
+
msgstr "Tipo de email"
|
762 |
+
|
763 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:152,
|
764 |
+
#: classes/admin/emails/class-wc-notify-admin.php:163,
|
765 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:188,
|
766 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:296,
|
767 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:169,
|
768 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:156,
|
769 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:173,
|
770 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:191
|
771 |
+
msgid "Choose which format of email to send."
|
772 |
+
msgstr "Escolha qual formato de email para enviar."
|
773 |
+
|
774 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:156,
|
775 |
+
#: classes/admin/emails/class-wc-notify-admin.php:167,
|
776 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:192,
|
777 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:300
|
778 |
+
msgid "Plain text"
|
779 |
+
msgstr "Texto simples"
|
780 |
+
|
781 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:157,
|
782 |
+
#: classes/admin/emails/class-wc-notify-admin.php:168,
|
783 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:193,
|
784 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:301
|
785 |
+
msgid "HTML"
|
786 |
+
msgstr "HTML"
|
787 |
+
|
788 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:158,
|
789 |
+
#: classes/admin/emails/class-wc-notify-admin.php:169,
|
790 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:194,
|
791 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:302
|
792 |
+
msgid "Multipart"
|
793 |
+
msgstr "Multipart"
|
794 |
+
|
795 |
+
#: classes/admin/emails/class-wc-notify-admin.php:28
|
796 |
+
msgid "New Vendor Product"
|
797 |
+
msgstr "Novo produto Vendor"
|
798 |
+
|
799 |
+
#: classes/admin/emails/class-wc-notify-admin.php:29
|
800 |
+
msgid "New order emails are sent when a new product is submitted by a vendor"
|
801 |
+
msgstr ""
|
802 |
+
"Novos emails de pedido são enviados quando um novo produto for adicionado "
|
803 |
+
"por um vendedor"
|
804 |
+
|
805 |
+
#: classes/admin/emails/class-wc-notify-admin.php:31
|
806 |
+
msgid "New product submitted: {product_name}"
|
807 |
+
msgstr "Novo produto enviado: {product_name}"
|
808 |
+
|
809 |
+
#: classes/admin/emails/class-wc-notify-admin.php:32
|
810 |
+
msgid "[{blogname}] New product submitted by {vendor_name} - {product_name}"
|
811 |
+
msgstr "[{blogname}] Novo produto enviado por {vendor_name} - {product_name}"
|
812 |
+
|
813 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:28,
|
814 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:62
|
815 |
+
msgid "Vendor has shipped"
|
816 |
+
msgstr "Vendedor já enviou"
|
817 |
+
|
818 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:29
|
819 |
+
msgid ""
|
820 |
+
"An email is sent when a vendor has marked one of their orders as shipped."
|
821 |
+
msgstr ""
|
822 |
+
"Um email é enviado quando um vendedor tiver marcado um de seus pedidos como "
|
823 |
+
"enviado."
|
824 |
+
|
825 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:31
|
826 |
+
msgid "Your order has been shipped"
|
827 |
+
msgstr "Seu pedido já foi enviado"
|
828 |
+
|
829 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:32
|
830 |
+
msgid ""
|
831 |
+
"[{blogname}] Your order has been shipped ({order_number}) - {order_date}"
|
832 |
+
msgstr "[{blogname}] Seu pedido já foi enviado ({order_number}) - {order_date}"
|
833 |
+
|
834 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:115
|
835 |
+
msgid "Subtotal:"
|
836 |
+
msgstr "Subtotal:"
|
837 |
+
|
838 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:27
|
839 |
+
msgid "Notify vendors"
|
840 |
+
msgstr "Notificar vendedores"
|
841 |
+
|
842 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:28
|
843 |
+
msgid "New order emails are sent when an order is received/paid by a customer."
|
844 |
+
msgstr ""
|
845 |
+
"Emails de novo pedido são enviados quando um pedido é recebido/pago por um "
|
846 |
+
"cliente."
|
847 |
+
|
848 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:30
|
849 |
+
msgid "New customer order"
|
850 |
+
msgstr "Novo pedido de cliente"
|
851 |
+
|
852 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:31
|
853 |
+
msgid "[{blogname}] New customer order ({order_number}) - {order_date}"
|
854 |
+
msgstr "[{blogname}] Novo pedido de cliente ({order_number}) - {order_date}"
|
855 |
+
|
856 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:107
|
857 |
+
msgid "Commission Subtotal:"
|
858 |
+
msgstr "Subtotal de Comissão:"
|
859 |
+
|
860 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:113
|
861 |
+
msgid "Tax Subtotal:"
|
862 |
+
msgstr "Subtotal de Imposto:"
|
863 |
+
|
864 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:121
|
865 |
+
msgid "Shipping Subtotal:"
|
866 |
+
msgstr "Subtotal de Envio:"
|
867 |
+
|
868 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:288
|
869 |
+
msgid "Product Totals"
|
870 |
+
msgstr "Totais do Produto"
|
871 |
+
|
872 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:290
|
873 |
+
msgid ""
|
874 |
+
"Show the commission due/paid as the product totals instead of the product "
|
875 |
+
"prices."
|
876 |
+
msgstr ""
|
877 |
+
"Mostrar \"comissão a pagar/paga\" como os totais do produto em vez de seus "
|
878 |
+
"preços."
|
879 |
+
|
880 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:27
|
881 |
+
msgid "Admin notify vendor shipped"
|
882 |
+
msgstr "Notificar vendedores sobre envio pelo admin"
|
883 |
+
|
884 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:28
|
885 |
+
msgid ""
|
886 |
+
"Notification is sent to chosen recipient(s) when a vendor marks an order "
|
887 |
+
"shipped."
|
888 |
+
msgstr ""
|
889 |
+
"A notificação é enviada para o(s) destinatário(s) quando um vendedor marca "
|
890 |
+
"um pedido como enviado."
|
891 |
+
|
892 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:52
|
893 |
+
msgid ""
|
894 |
+
"[{site_title}] Vendor has marked shipped ({order_number}) - {order_date}"
|
895 |
+
msgstr "[{blogname}] Seu pedido já foi enviado ({order_number}) - {order_date}"
|
896 |
+
|
897 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:141
|
898 |
+
msgid "Recipient(s)"
|
899 |
+
msgstr ""
|
900 |
+
|
901 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:143
|
902 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to %s."
|
903 |
+
msgstr ""
|
904 |
+
"Coloque destinatários (separados por vírgulas) para este e-mail. Padrão para "
|
905 |
+
"%s"
|
906 |
+
|
907 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:153,
|
908 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:162,
|
909 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:140,
|
910 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:149,
|
911 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:148,
|
912 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:166,
|
913 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:158,
|
914 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:167,
|
915 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:184
|
916 |
+
msgid "Available placeholders: %s"
|
917 |
+
msgstr "Placeholders disponíveis"
|
918 |
+
|
919 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:158,
|
920 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:145,
|
921 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:162,
|
922 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:180
|
923 |
+
msgid "Email heading"
|
924 |
+
msgstr "Cabeçalho do email"
|
925 |
+
|
926 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:27
|
927 |
+
msgid "Vendor notify application"
|
928 |
+
msgstr "Notificação ao vendedor: solicitada"
|
929 |
+
|
930 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:28
|
931 |
+
msgid ""
|
932 |
+
"Notification is sent to the vendor that their application has been received"
|
933 |
+
msgstr ""
|
934 |
+
"A notificação é enviada para o vendedor quando sua solicitação for recebida"
|
935 |
+
|
936 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:48
|
937 |
+
msgid "[{site_title}] Your vendor application has been received"
|
938 |
+
msgstr "[{blogname}] Sua solicitação de vendedor foi recebida"
|
939 |
+
|
940 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:58
|
941 |
+
msgid "Vendor application received"
|
942 |
+
msgstr "Solicitação para vendedor recebida"
|
943 |
+
|
944 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:62,
|
945 |
+
#: templates/emails/application-status.php:5,
|
946 |
+
#: templates/emails/plain/vendor-notify-application.php:21,
|
947 |
+
#: templates/emails/vendor-notify-application.php:22
|
948 |
+
msgid "Hi there. This is a notification about a vendor application on %s."
|
949 |
+
msgstr "Olá. Isto é uma notificação sobre uma solicitação para vendedor na %s."
|
950 |
+
|
951 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:27
|
952 |
+
msgid "Vendor notify approved"
|
953 |
+
msgstr "Notificação ao vendedor: aprovado"
|
954 |
+
|
955 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:28
|
956 |
+
msgid ""
|
957 |
+
"Notification is sent to the vendor that their application has been approved"
|
958 |
+
msgstr ""
|
959 |
+
"A notificação é enviada para o vendedor quando sua solicitação for aprovada"
|
960 |
+
|
961 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:48
|
962 |
+
msgid "[{site_title}] Your vendor application has been approved"
|
963 |
+
msgstr "[{blogname}] Sua solicitação de vendedor foi aprovada"
|
964 |
+
|
965 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:58
|
966 |
+
msgid "Vendor Application Approved"
|
967 |
+
msgstr "Solicitação para Vendedor Aprovada"
|
968 |
+
|
969 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:68
|
970 |
+
msgid "Your application to become a vendor on has been approved."
|
971 |
+
msgstr "Sua solicitação para se tornar vendedor foi aprovada"
|
972 |
+
|
973 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:153,
|
974 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:163
|
975 |
+
msgid "Content"
|
976 |
+
msgstr "Conteúdo"
|
977 |
+
|
978 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:27
|
979 |
+
msgid "Vendor notify denied"
|
980 |
+
msgstr "Notificação ao vendedor: negado"
|
981 |
+
|
982 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:28
|
983 |
+
msgid ""
|
984 |
+
"Notification is sent to the vendor that their application has been denied"
|
985 |
+
msgstr ""
|
986 |
+
"A notificação é enviada para o vendedor quando sua solicitação for negada"
|
987 |
+
|
988 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:48
|
989 |
+
msgid "[{site_title}] Your vendor application has been denied"
|
990 |
+
msgstr "[{blogname}] Sua solicitação de vendedor foi negada"
|
991 |
+
|
992 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:58
|
993 |
+
msgid "Vendor Application Denied"
|
994 |
+
msgstr "Solicitação para Vendedor Negada"
|
995 |
+
|
996 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:68
|
997 |
+
msgid "Your application to become a vendor has been denied."
|
998 |
+
msgstr "Sua solicitação para se tornar vendedor foi negada"
|
999 |
+
|
1000 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:78
|
1001 |
+
msgid "We are not taking any new applications at this time."
|
1002 |
+
msgstr "Não estamos recebendo solicitações no momento."
|
1003 |
+
|
1004 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:172
|
1005 |
+
msgid "Reason"
|
1006 |
+
msgstr "Motivo"
|
1007 |
+
|
1008 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:175
|
1009 |
+
msgid "Provide a reason for denying the vendor application"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: classes/admin/settings/classes/sf-class-format-options.php:211,
|
1013 |
+
#: classes/admin/settings/classes/sf-class-settings.php:796,
|
1014 |
+
#: classes/admin/settings/classes/sf-class-settings.php:830
|
1015 |
+
msgid "Select a page..."
|
1016 |
+
msgstr "Selecione um página…"
|
1017 |
+
|
1018 |
+
#: classes/admin/settings/classes/sf-class-settings.php:153,
|
1019 |
+
#: classes/admin/settings/classes/sf-class-settings.php:251,
|
1020 |
+
#: templates/dashboard/settings/settings.php:1
|
1021 |
+
msgid "Settings"
|
1022 |
+
msgstr "Configurações"
|
1023 |
+
|
1024 |
+
#: classes/admin/settings/classes/sf-class-settings.php:251
|
1025 |
+
msgid "WC Vendors Settings"
|
1026 |
+
msgstr "Configurações do WC Vendors"
|
1027 |
+
|
1028 |
+
#: classes/admin/settings/classes/sf-class-settings.php:305
|
1029 |
+
msgid "Could not load settings at: "
|
1030 |
+
msgstr "Não puderam ser carregados os ajustes na:"
|
1031 |
+
|
1032 |
+
#: classes/admin/settings/classes/sf-class-settings.php:305
|
1033 |
+
msgid "Error - WP Settings Framework"
|
1034 |
+
msgstr "Erro - WP Framework de ajustes"
|
1035 |
+
|
1036 |
+
#: classes/admin/settings/classes/sf-class-settings.php:489
|
1037 |
+
msgid "Save %s changes"
|
1038 |
+
msgstr "Salvar %s modificações"
|
1039 |
+
|
1040 |
+
#: classes/admin/settings/classes/sf-class-settings.php:502
|
1041 |
+
msgid ""
|
1042 |
+
"Please help with a <a href=\"https://wordpress.org/support/view/plugin-"
|
1043 |
+
"reviews/wc-vendors?rate=5#postform\" target=\"top\">High Five!</a> | <a href="
|
1044 |
+
"\"https://www.wcvendors.com/product/wc-vendors-pro/?"
|
1045 |
+
"utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top\">WC Vendors "
|
1046 |
+
"Pro</a> | <a href=\"https://www.wcvendors.com/product/stripe-commissions-"
|
1047 |
+
"gateway/?utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top"
|
1048 |
+
"\">Stripe Commissions & Gateway</a> | <a href=\"https://docs.wcvendors.com/"
|
1049 |
+
"\" target=\"top\">Documentation</a> | <a href=\"https://wordpress.org/"
|
1050 |
+
"support/plugin/wc-vendors/\" target=\"top\">Free Support Forums</a>"
|
1051 |
+
msgstr ""
|
1052 |
+
"Por favor nos ajude com um <a href=\"https://wordpress.org/support/view/"
|
1053 |
+
"plugin-reviews/wc-vendors?rate=5#postform\" target=\"top\">Joinha!</a> | <a "
|
1054 |
+
"href=\"https://www.wcvendors.com/product/wc-vendors-pro/?"
|
1055 |
+
"utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top\">WC Vendors "
|
1056 |
+
"Pro</a> | <a href=\"https://www.wcvendors.com/product/stripe-commissions-"
|
1057 |
+
"gateway/?utm_source=plugin&utm_campaign=upgrade_promo\" target=\"top"
|
1058 |
+
"\">Stripe Commissions & Gateway</a> | <a href=\"https://docs.wcvendors.com/"
|
1059 |
+
"\" target=\"top\">Documentação</a> | <a href=\"https://wordpress.org/support/"
|
1060 |
+
"plugin/wc-vendors/\" target=\"top\">Fóruns de Suporte</a>"
|
1061 |
+
|
1062 |
+
#: classes/admin/settings/classes/sf-class-settings.php:789,
|
1063 |
+
#: classes/admin/settings/classes/sf-class-settings.php:823
|
1064 |
+
msgid "Edit Page"
|
1065 |
+
msgstr "Editar Página"
|
1066 |
+
|
1067 |
+
#: classes/admin/settings/classes/sf-class-settings.php:790,
|
1068 |
+
#: classes/admin/settings/classes/sf-class-settings.php:824
|
1069 |
+
msgid "View Page"
|
1070 |
+
msgstr "Ver Página"
|
1071 |
+
|
1072 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888
|
1073 |
+
msgid "Update %s"
|
1074 |
+
msgstr "Atualizar %s"
|
1075 |
+
|
1076 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888,
|
1077 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888
|
1078 |
+
msgid "Add %s"
|
1079 |
+
msgstr "Adicionar %s"
|
1080 |
+
|
1081 |
+
#: classes/admin/settings/classes/sf-class-settings.php:888
|
1082 |
+
msgid "Upload an image for the %s"
|
1083 |
+
msgstr "Carregue uma imagem para %s"
|
1084 |
+
|
1085 |
+
#: classes/admin/settings/sf-options.php:5
|
1086 |
+
msgid "General options"
|
1087 |
+
msgstr "Opções gerais"
|
1088 |
+
|
1089 |
+
#: classes/admin/settings/sf-options.php:8
|
1090 |
+
msgid "Default commission (%)"
|
1091 |
+
msgstr "Comissão padrão (%)"
|
1092 |
+
|
1093 |
+
#: classes/admin/settings/sf-options.php:9
|
1094 |
+
msgid ""
|
1095 |
+
"The default rate you pay each vendor for a product sale. <br>You can also "
|
1096 |
+
"give vendors their own individual commission rates by editing the vendors "
|
1097 |
+
"user account.<br>Also, you can edit an individual products commission to "
|
1098 |
+
"override both of these settings on a per product basis."
|
1099 |
+
msgstr ""
|
1100 |
+
"A taxa padrão que você paga a cada vendedor pela venda de um produto. <br> "
|
1101 |
+
"Você também pode repassar aos vendedores suas próprias comissões "
|
1102 |
+
"individuais, editando a conta de usuário dos vendedores.<br>Além disso, você "
|
1103 |
+
"pode editar uma comissão para cada produto para substituir ambas as "
|
1104 |
+
"configurações baseado no produto."
|
1105 |
+
|
1106 |
+
#: classes/admin/settings/sf-options.php:20,
|
1107 |
+
#: classes/admin/settings/sf-options.php:27
|
1108 |
+
msgid "Allow users or guests to apply to become a vendor"
|
1109 |
+
msgstr "Permitir que usuários ou convidados solicitem se tornarem vendedores"
|
1110 |
+
|
1111 |
+
#: classes/admin/settings/sf-options.php:22
|
1112 |
+
msgid ""
|
1113 |
+
"Allow users or guests to apply to become a vendor. <br><br><strong>WARNING:"
|
1114 |
+
"</strong> You MUST \"<strong>Enable registration on the \"My Account\" "
|
1115 |
+
"page</strong>\" in your <strong>WooCommerce > Settings > Accounts</strong> "
|
1116 |
+
"page for this option to work. Currently, you have registration disabled."
|
1117 |
+
msgstr ""
|
1118 |
+
"Permitir que usuários ou convidados solicitem se tornarem vendedores. "
|
1119 |
+
"<br><br><strong>AVISO:</strong> Você DEVE \"<strong>Habilitar registro na "
|
1120 |
+
"página \"Minha Conta\"</strong>\" na sua página <strong>WooCommerce > "
|
1121 |
+
"Configurações > Contas</strong> para que esta opção funcione. O registro no "
|
1122 |
+
"momento está desabilitado."
|
1123 |
+
|
1124 |
+
#: classes/admin/settings/sf-options.php:26
|
1125 |
+
msgid "Registration"
|
1126 |
+
msgstr "Registro"
|
1127 |
+
|
1128 |
+
#: classes/admin/settings/sf-options.php:28
|
1129 |
+
msgid ""
|
1130 |
+
"This will show a checkbox on the My Account page's registration form asking "
|
1131 |
+
"if the user would like to apply to be a vendor. Also, on the Vendor "
|
1132 |
+
"Dashboard, users can still apply to become a vendor even if this is disabled."
|
1133 |
+
msgstr ""
|
1134 |
+
"Isto mostrará uma caixa de seleção no formulário de inscrição da página "
|
1135 |
+
"Minha Conta perguntando se o usuário gostaria de se candidatar a ser um "
|
1136 |
+
"vendedor. Além disso, no Painel do Vendedor, os usuários ainda podem pedir "
|
1137 |
+
"para se tornar um vendedor, mesmo se esta caixa de seleção estiver "
|
1138 |
+
"desativado."
|
1139 |
+
|
1140 |
+
# Application to BECOME a vendor
|
1141 |
+
#: classes/admin/settings/sf-options.php:35
|
1142 |
+
msgid "Approve vendor applications manually"
|
1143 |
+
msgstr "Aprovar solicitações para vendedor manualmente"
|
1144 |
+
|
1145 |
+
#: classes/admin/settings/sf-options.php:36
|
1146 |
+
msgid ""
|
1147 |
+
"With this unchecked, all vendor applications are automatically accepted. "
|
1148 |
+
"Otherwise, you must approve each manually."
|
1149 |
+
msgstr ""
|
1150 |
+
"Com esta opção desligada, todos os pedidos de vendedor serão automaticamente "
|
1151 |
+
"aceitos. Caso contrário, você deve aprovar cada um manualmente."
|
1152 |
+
|
1153 |
+
#: classes/admin/settings/sf-options.php:43,
|
1154 |
+
#: classes/admin/settings/sf-options.php:175
|
1155 |
+
msgid "Taxes"
|
1156 |
+
msgstr "Impostos "
|
1157 |
+
|
1158 |
+
#: classes/admin/settings/sf-options.php:44
|
1159 |
+
msgid "Give vendors any tax collected per-product"
|
1160 |
+
msgstr "Repasse aos vendedores qualquer imposto cobrado por produto"
|
1161 |
+
|
1162 |
+
#: classes/admin/settings/sf-options.php:45
|
1163 |
+
msgid "The tax collected on a vendor's product will be given in its entirety"
|
1164 |
+
msgstr ""
|
1165 |
+
"O imposto cobrado sobre o produto de um vendedor será repassado em sua "
|
1166 |
+
"totalidade"
|
1167 |
+
|
1168 |
+
#: classes/admin/settings/sf-options.php:53
|
1169 |
+
msgid "Give vendors any shipping collected per-product"
|
1170 |
+
msgstr "Repasse aos vendedores qualquer taxa de envio recolhida por produto"
|
1171 |
+
|
1172 |
+
#: classes/admin/settings/sf-options.php:54
|
1173 |
+
msgid ""
|
1174 |
+
"WC Vendors Free - Give vendors shipping if using Per Product Shipping "
|
1175 |
+
"gateway. WC Vendors Pro - Give vendors shipping when using Vendor "
|
1176 |
+
"Shipping. No other shipping module is compatible with this option."
|
1177 |
+
msgstr ""
|
1178 |
+
"WC Vendors Free - Repassar frete aos vendedores caso use o gateway Per "
|
1179 |
+
"Product Shipping. WC Vendors Pro - Repassar frete aos vendedores caso use "
|
1180 |
+
"Vendor Shipping. Nenhum outro módulo de frete é compatível com esta opção."
|
1181 |
+
|
1182 |
+
#: classes/admin/settings/sf-options.php:60
|
1183 |
+
msgid "Shop options"
|
1184 |
+
msgstr "Opções da Loja"
|
1185 |
+
|
1186 |
+
#: classes/admin/settings/sf-options.php:63
|
1187 |
+
msgid "Shop HTML"
|
1188 |
+
msgstr "HTML da Loja "
|
1189 |
+
|
1190 |
+
#: classes/admin/settings/sf-options.php:64
|
1191 |
+
msgid ""
|
1192 |
+
"Enable HTML for a vendor's shop description by default. You can enable or "
|
1193 |
+
"disable this per vendor by editing the vendors user account."
|
1194 |
+
msgstr ""
|
1195 |
+
"Permitir HTML para a descrição da loja por padrão. Você pode habilitar ou "
|
1196 |
+
"desabilitar por usuário editando a conta de usuário do vendedor."
|
1197 |
+
|
1198 |
+
#: classes/admin/settings/sf-options.php:71
|
1199 |
+
msgid "Vendor Shop Page"
|
1200 |
+
msgstr "Página da Loja do Vendedor"
|
1201 |
+
|
1202 |
+
#: classes/admin/settings/sf-options.php:72
|
1203 |
+
msgid ""
|
1204 |
+
"Enter one word for the URI. If you enter \"<strong>vendors</strong>\" your "
|
1205 |
+
"vendors store will be <code>yourdomain.com/vendors/store-name/</code>"
|
1206 |
+
msgstr ""
|
1207 |
+
"Escreva uma palavra para a URI. Se você escrever \"<strong>vendedores</"
|
1208 |
+
"strong>\", sua loja ficará como <code>seudominio.com/vendedores/nome-da-loja/"
|
1209 |
+
"</code>"
|
1210 |
+
|
1211 |
+
#: classes/admin/settings/sf-options.php:79
|
1212 |
+
msgid "Shop Headers"
|
1213 |
+
msgstr "Cabeçalhos da Loja"
|
1214 |
+
|
1215 |
+
#: classes/admin/settings/sf-options.php:80
|
1216 |
+
msgid "Enable vendor shop headers"
|
1217 |
+
msgstr "Permitir cabeçalho da loja do vendedor"
|
1218 |
+
|
1219 |
+
#: classes/admin/settings/sf-options.php:81
|
1220 |
+
msgid ""
|
1221 |
+
"This will override the HTML Shop description output on product-archive "
|
1222 |
+
"pages. In order to customize the shop headers visit wcvendors.com and read "
|
1223 |
+
"the article in the Knowledgebase titled Changing the Vendor Templates."
|
1224 |
+
msgstr ""
|
1225 |
+
"Isto irá substituir a saída do HTML com a descrição da loja nas páginas "
|
1226 |
+
"produto-arquivo. A fim de personalizar os cabeçalhos das lojas visite o "
|
1227 |
+
"wcvendors.com e leia o artigo intitulado Changing the Vendor Templates."
|
1228 |
+
|
1229 |
+
#: classes/admin/settings/sf-options.php:88
|
1230 |
+
msgid "Vendor Display Name"
|
1231 |
+
msgstr "Nome de exibição do Vendedor"
|
1232 |
+
|
1233 |
+
#: classes/admin/settings/sf-options.php:89
|
1234 |
+
msgid ""
|
1235 |
+
"Select what will be displayed for the sold by text throughout the store."
|
1236 |
+
msgstr "Selecione o que será exibido no texto de vendido por em toda loja."
|
1237 |
+
|
1238 |
+
#: classes/admin/settings/sf-options.php:93
|
1239 |
+
msgid "Display Name"
|
1240 |
+
msgstr "Nome de Exibição"
|
1241 |
+
|
1242 |
+
#: classes/admin/settings/sf-options.php:94,
|
1243 |
+
#: classes/admin/views/html-vendor-settings-page.php:22,
|
1244 |
+
#: templates/dashboard/settings/shop-name.php:2
|
1245 |
+
msgid "Shop Name"
|
1246 |
+
msgstr "Nome da Loja"
|
1247 |
+
|
1248 |
+
#: classes/admin/settings/sf-options.php:95
|
1249 |
+
msgid "User Login"
|
1250 |
+
msgstr "Login do Usuário"
|
1251 |
+
|
1252 |
+
#: classes/admin/settings/sf-options.php:96
|
1253 |
+
msgid "User Email"
|
1254 |
+
msgstr "E-mail do Usuário"
|
1255 |
+
|
1256 |
+
#: classes/admin/settings/sf-options.php:103,
|
1257 |
+
#: classes/admin/settings/sf-options.php:116
|
1258 |
+
msgid "Sold By"
|
1259 |
+
msgstr "Vendido Por"
|
1260 |
+
|
1261 |
+
#: classes/admin/settings/sf-options.php:104
|
1262 |
+
msgid "Enable sold by labels"
|
1263 |
+
msgstr "Habilitar etiquetas de \"vendido por\""
|
1264 |
+
|
1265 |
+
#: classes/admin/settings/sf-options.php:105
|
1266 |
+
msgid "This will enable or disable the sold by labels."
|
1267 |
+
msgstr "Isto habilitará as etiquetas de \"vendido por\"."
|
1268 |
+
|
1269 |
+
#: classes/admin/settings/sf-options.php:112
|
1270 |
+
msgid "Sold By Label"
|
1271 |
+
msgstr "Etiqueta de \"Vendido Por\""
|
1272 |
+
|
1273 |
+
#: classes/admin/settings/sf-options.php:113
|
1274 |
+
msgid "The sold by label used on the site and emails."
|
1275 |
+
msgstr "A etiqueta de \"vendido por\" usada no site e em emails."
|
1276 |
+
|
1277 |
+
#: classes/admin/settings/sf-options.php:120
|
1278 |
+
msgid "Seller Info Label"
|
1279 |
+
msgstr "Etiqueta de Informações do Vendedor"
|
1280 |
+
|
1281 |
+
#: classes/admin/settings/sf-options.php:121
|
1282 |
+
msgid "The seller info tab title on the single product page."
|
1283 |
+
msgstr "A aba de informação do vendedor na página de produto simples."
|
1284 |
+
|
1285 |
+
#: classes/admin/settings/sf-options.php:124
|
1286 |
+
msgid "Seller Info"
|
1287 |
+
msgstr "Informações do Vendedor"
|
1288 |
+
|
1289 |
+
#: classes/admin/settings/sf-options.php:128
|
1290 |
+
msgid "Product Add Page"
|
1291 |
+
msgstr "Página Adicionar Produto"
|
1292 |
+
|
1293 |
+
#: classes/admin/settings/sf-options.php:128
|
1294 |
+
msgid "Configure what to hide from all vendors when adding a product"
|
1295 |
+
msgstr ""
|
1296 |
+
"Configurar o que estará oculto de todos os vendedores quando adicionarem um "
|
1297 |
+
"produto"
|
1298 |
+
|
1299 |
+
#: classes/admin/settings/sf-options.php:131
|
1300 |
+
msgid "Left side panel"
|
1301 |
+
msgstr "Painel do lado esquerdo"
|
1302 |
+
|
1303 |
+
#: classes/admin/settings/sf-options.php:132
|
1304 |
+
msgid ""
|
1305 |
+
"CHECKING these boxes will **HIDE** these areas of the add product page for "
|
1306 |
+
"vendors"
|
1307 |
+
msgstr ""
|
1308 |
+
"MARCAR estas caixas irá **OCULTAR ** para o vendedor estas áreas de inserção "
|
1309 |
+
"de produto"
|
1310 |
+
|
1311 |
+
#: classes/admin/settings/sf-options.php:135
|
1312 |
+
msgid "Inventory"
|
1313 |
+
msgstr "Balança"
|
1314 |
+
|
1315 |
+
#: classes/admin/settings/sf-options.php:137
|
1316 |
+
msgid "Linked Products"
|
1317 |
+
msgstr "Produtos Relacionados"
|
1318 |
+
|
1319 |
+
#: classes/admin/settings/sf-options.php:138
|
1320 |
+
msgid "Attributes"
|
1321 |
+
msgstr "Atributos"
|
1322 |
+
|
1323 |
+
#: classes/admin/settings/sf-options.php:139
|
1324 |
+
msgid "Advanced"
|
1325 |
+
msgstr "Avançado"
|
1326 |
+
|
1327 |
+
#: classes/admin/settings/sf-options.php:146
|
1328 |
+
msgid "Types"
|
1329 |
+
msgstr "Tipos"
|
1330 |
+
|
1331 |
+
#: classes/admin/settings/sf-options.php:147
|
1332 |
+
msgid "CHECKING these boxes will HIDE these product types from the vendor"
|
1333 |
+
msgstr ""
|
1334 |
+
"MARCAR estas caixas irá OCULTAR para o vendedor estes tipos de produtos"
|
1335 |
+
|
1336 |
+
#: classes/admin/settings/sf-options.php:150
|
1337 |
+
msgid "Simple"
|
1338 |
+
msgstr "Simples"
|
1339 |
+
|
1340 |
+
#: classes/admin/settings/sf-options.php:151
|
1341 |
+
msgid "Variable"
|
1342 |
+
msgstr "Variável"
|
1343 |
+
|
1344 |
+
#: classes/admin/settings/sf-options.php:152
|
1345 |
+
msgid "Grouped"
|
1346 |
+
msgstr "Agrupado"
|
1347 |
+
|
1348 |
+
#: classes/admin/settings/sf-options.php:153
|
1349 |
+
msgid "External / affiliate"
|
1350 |
+
msgstr "Externo / afiliado"
|
1351 |
+
|
1352 |
+
#: classes/admin/settings/sf-options.php:160
|
1353 |
+
msgid "Type options"
|
1354 |
+
msgstr "Opções de tipo"
|
1355 |
+
|
1356 |
+
#: classes/admin/settings/sf-options.php:161
|
1357 |
+
msgid ""
|
1358 |
+
"CHECKING these boxes will **HIDE** these product options from the vendor"
|
1359 |
+
msgstr ""
|
1360 |
+
"MARCAR estas caixas irá **OCULTAR ** para o vendedor estes tipos de produtos"
|
1361 |
+
|
1362 |
+
#: classes/admin/settings/sf-options.php:164
|
1363 |
+
msgid "Virtual"
|
1364 |
+
msgstr "Virtual"
|
1365 |
+
|
1366 |
+
#: classes/admin/settings/sf-options.php:165
|
1367 |
+
msgid "Downloadable"
|
1368 |
+
msgstr "Baixável"
|
1369 |
+
|
1370 |
+
#: classes/admin/settings/sf-options.php:172
|
1371 |
+
msgid "Miscellaneous"
|
1372 |
+
msgstr "Gerais"
|
1373 |
+
|
1374 |
+
#: classes/admin/settings/sf-options.php:176
|
1375 |
+
msgid "SKU"
|
1376 |
+
msgstr "Ref."
|
1377 |
+
|
1378 |
+
#: classes/admin/settings/sf-options.php:177
|
1379 |
+
msgid "Featured"
|
1380 |
+
msgstr "Em Destaque"
|
1381 |
+
|
1382 |
+
#: classes/admin/settings/sf-options.php:178
|
1383 |
+
msgid "Duplicate Product"
|
1384 |
+
msgstr "Produto Duplicado"
|
1385 |
+
|
1386 |
+
#: classes/admin/settings/sf-options.php:185
|
1387 |
+
msgid "Stylesheet"
|
1388 |
+
msgstr "CSS"
|
1389 |
+
|
1390 |
+
#: classes/admin/settings/sf-options.php:186
|
1391 |
+
msgid ""
|
1392 |
+
"You can add CSS in this textarea, which will be loaded on the product add/"
|
1393 |
+
"edit page for vendors."
|
1394 |
+
msgstr ""
|
1395 |
+
"Você pode adicionar CSS nesta área de texto que será carregado na página de "
|
1396 |
+
"adicionar/editar produto para vendedores."
|
1397 |
+
|
1398 |
+
#: classes/admin/settings/sf-options.php:193
|
1399 |
+
msgid "Permissions"
|
1400 |
+
msgstr "Permissões"
|
1401 |
+
|
1402 |
+
#: classes/admin/settings/sf-options.php:193
|
1403 |
+
msgid "General permissions used around the shop"
|
1404 |
+
msgstr "Permissões gerais usadas pela loja"
|
1405 |
+
|
1406 |
+
#: classes/admin/settings/sf-options.php:197
|
1407 |
+
msgid "View orders"
|
1408 |
+
msgstr "Ver pedidos"
|
1409 |
+
|
1410 |
+
#: classes/admin/settings/sf-options.php:198
|
1411 |
+
msgid "Show customer details such as email, address, name, etc, for each order"
|
1412 |
+
msgstr ""
|
1413 |
+
"Mostrar detalhes do cliente como email, endereço, nome, etc, em cada pedido"
|
1414 |
+
|
1415 |
+
#: classes/admin/settings/sf-options.php:205
|
1416 |
+
msgid "View comments"
|
1417 |
+
msgstr "Ver comentários"
|
1418 |
+
|
1419 |
+
#: classes/admin/settings/sf-options.php:206
|
1420 |
+
msgid "View all vendor comments for an order on the frontend"
|
1421 |
+
msgstr "Ver todos comentários do vendedor para um pedido no frontend"
|
1422 |
+
|
1423 |
+
#: classes/admin/settings/sf-options.php:213
|
1424 |
+
msgid "Submit comments"
|
1425 |
+
msgstr "Enviar comentários"
|
1426 |
+
|
1427 |
+
#: classes/admin/settings/sf-options.php:214
|
1428 |
+
msgid ""
|
1429 |
+
"Submit comments for an order on the frontend. Eg, tracking ID for a product"
|
1430 |
+
msgstr ""
|
1431 |
+
"Enviar comentários para um pedido no frontend. Ex, ID de rastreamento de um "
|
1432 |
+
"produto"
|
1433 |
+
|
1434 |
+
#: classes/admin/settings/sf-options.php:221
|
1435 |
+
msgid "View email addresses"
|
1436 |
+
msgstr "Ver endereços de email"
|
1437 |
+
|
1438 |
+
#: classes/admin/settings/sf-options.php:222
|
1439 |
+
msgid ""
|
1440 |
+
"While viewing order details on the frontend, you can disable or enable email "
|
1441 |
+
"addresses"
|
1442 |
+
msgstr ""
|
1443 |
+
"Quando estiver vendo os detalhes de um pedido no frontend, você poderá "
|
1444 |
+
"desativar ou ativar endereços de email"
|
1445 |
+
|
1446 |
+
#: classes/admin/settings/sf-options.php:229
|
1447 |
+
msgid "Export a CSV file of orders for a product"
|
1448 |
+
msgstr "Exportar um arquivo CSV de pedidos para um produto"
|
1449 |
+
|
1450 |
+
#: classes/admin/settings/sf-options.php:230
|
1451 |
+
msgid "Vendors could export orders for a product on the frontend"
|
1452 |
+
msgstr "Vendedores poderiam exportar pedidos para um produto no frontend"
|
1453 |
+
|
1454 |
+
#: classes/admin/settings/sf-options.php:237
|
1455 |
+
msgid "View Frontend sales reports"
|
1456 |
+
msgstr "Ver relatórios de venda no frontend"
|
1457 |
+
|
1458 |
+
#: classes/admin/settings/sf-options.php:238
|
1459 |
+
msgid ""
|
1460 |
+
"Sales table on the frontend on the Vendor Dashboard page. The table will "
|
1461 |
+
"only display sales data that pertain to their products, and only for orders "
|
1462 |
+
"that are processing or completed."
|
1463 |
+
msgstr ""
|
1464 |
+
"Tabela de vendas no front-end na página do Painel de Vendedor. A tabela irá "
|
1465 |
+
"exibir dados de vendas que pertencem aos seus produtos e somente para "
|
1466 |
+
"pedidos que estão sendo processados ou completos."
|
1467 |
+
|
1468 |
+
#: classes/admin/settings/sf-options.php:246
|
1469 |
+
msgid "Submit products"
|
1470 |
+
msgstr "Enviar produtos"
|
1471 |
+
|
1472 |
+
#: classes/admin/settings/sf-options.php:247
|
1473 |
+
msgid ""
|
1474 |
+
"Check to allow vendors to list new products. Admin must approve new "
|
1475 |
+
"products by editing the product, and clicking Publish."
|
1476 |
+
msgstr ""
|
1477 |
+
"Marque para permitir que vendedores listem novos produtos. A administração "
|
1478 |
+
"deve aprovar novos produtos editando-os e clicando em \"Publicar\"."
|
1479 |
+
|
1480 |
+
#: classes/admin/settings/sf-options.php:254
|
1481 |
+
msgid "Edit live products"
|
1482 |
+
msgstr "Editar produtos ao vivo"
|
1483 |
+
|
1484 |
+
#: classes/admin/settings/sf-options.php:255
|
1485 |
+
msgid ""
|
1486 |
+
"Vendors could edit an approved product after it has already gone live. There "
|
1487 |
+
"is no approval or review after editing a live product. This could be "
|
1488 |
+
"dangerous with malicious vendors, so take caution."
|
1489 |
+
msgstr ""
|
1490 |
+
"Vendedores poderiam editar um produto aprovado depois de já ter ido ao vivo. "
|
1491 |
+
"Não há aprovação ou revisão após a edição de um produto ao vivo. Isso pode "
|
1492 |
+
"ser perigoso com os vendedores mal intencionados, por isso tome cuidado."
|
1493 |
+
|
1494 |
+
#: classes/admin/settings/sf-options.php:262
|
1495 |
+
msgid "Submit products live without requiring approval"
|
1496 |
+
msgstr "Enviar produtos ao vivo sem pedir aprovação"
|
1497 |
+
|
1498 |
+
#: classes/admin/settings/sf-options.php:263
|
1499 |
+
msgid ""
|
1500 |
+
"Vendors can submit products without review or approval from a shop admin. "
|
1501 |
+
"This could be dangerous with malicious vendors, so take caution."
|
1502 |
+
msgstr ""
|
1503 |
+
"Os vendedores podem enviar produtos sem revisão ou aprovação de um "
|
1504 |
+
"administrador de loja. Isso pode ser perigoso com os vendedores mal "
|
1505 |
+
"intencionados, por isso tome cuidado."
|
1506 |
+
|
1507 |
+
#: classes/admin/settings/sf-options.php:270
|
1508 |
+
msgid "Page configuration"
|
1509 |
+
msgstr "Configuração de página"
|
1510 |
+
|
1511 |
+
#: classes/admin/settings/sf-options.php:273
|
1512 |
+
msgid "Vendor dashboard"
|
1513 |
+
msgstr "Painel do vendedor"
|
1514 |
+
|
1515 |
+
#: classes/admin/settings/sf-options.php:274
|
1516 |
+
msgid ""
|
1517 |
+
"Choose the page that has the shortcode <code>[wcv_vendor_dashboard]</"
|
1518 |
+
"code><br/>. If this page is not set, you will break your site. If you "
|
1519 |
+
"upgrade to Pro, keep this page unchanged as both Pro Dashboard and this "
|
1520 |
+
"Dashboard page must be set."
|
1521 |
+
msgstr ""
|
1522 |
+
"Escolha a página que terá o shortcode <code>[wcv_vendor_dashboard]</code><br/"
|
1523 |
+
"> Se a página não for definida, seu site irá quebrar. Se você fizer upgrade "
|
1524 |
+
"para a versão Pro, mantenha esta página inalterada já que tanto as páginas "
|
1525 |
+
"de Painel Pro e de Painel devem estar definidas."
|
1526 |
+
|
1527 |
+
#: classes/admin/settings/sf-options.php:281
|
1528 |
+
msgid "Shop settings"
|
1529 |
+
msgstr "Ajustes da Loja"
|
1530 |
+
|
1531 |
+
#: classes/admin/settings/sf-options.php:282
|
1532 |
+
msgid ""
|
1533 |
+
"Choose the page that has the shortcode <code>[wcv_shop_settings]</code><br/"
|
1534 |
+
">These are the shop settings a vendor can configure. By default, Vendor "
|
1535 |
+
"Dashboard > Shop Settings should have this shortcode."
|
1536 |
+
msgstr ""
|
1537 |
+
"Escolha a página que terá o shortcode <code>[wcv_shop_settings]</code><br/> "
|
1538 |
+
"Estas são as configurações que o vendedor pode definit. Por padrão, Painel "
|
1539 |
+
"do Vendedor > Configurações de Loja deve conter o shortcode."
|
1540 |
+
|
1541 |
+
#: classes/admin/settings/sf-options.php:289
|
1542 |
+
msgid "Orders page"
|
1543 |
+
msgstr "Página de pedidos"
|
1544 |
+
|
1545 |
+
#: classes/admin/settings/sf-options.php:290
|
1546 |
+
msgid ""
|
1547 |
+
"Choose the page that has the shortcode <code>[wcv_orders]</code><br/>By "
|
1548 |
+
"default, Vendor Dashboard > Orders should have the shortcode."
|
1549 |
+
msgstr ""
|
1550 |
+
"Escolha a página que terá o shortcode <code>[wcv_orders]</code><br/>Por "
|
1551 |
+
"padrão, Painel do Vendedor > Pedidos deve conter o shortcode."
|
1552 |
+
|
1553 |
+
#: classes/admin/settings/sf-options.php:297
|
1554 |
+
msgid "Vendor terms"
|
1555 |
+
msgstr "Termos do vendedor"
|
1556 |
+
|
1557 |
+
#: classes/admin/settings/sf-options.php:298
|
1558 |
+
msgid ""
|
1559 |
+
"These terms are shown to a user when submitting an application to become a "
|
1560 |
+
"vendor.<br/>If left blank, no terms will be shown to the applicant. Vendor "
|
1561 |
+
"must accept terms in order to register, if set."
|
1562 |
+
msgstr ""
|
1563 |
+
"Estes termos são mostrados quando um usuário envia um pedido para se tornar "
|
1564 |
+
"vendedor.<br/>Se deixado em branco, nenhum termo será mostrado ao candidato. "
|
1565 |
+
"O vendedor deve aceitar os termos, quando definidos, para se registrar."
|
1566 |
+
|
1567 |
+
#: classes/admin/settings/sf-options.php:305
|
1568 |
+
msgid "payments"
|
1569 |
+
msgstr "Pagamentos"
|
1570 |
+
|
1571 |
+
#: classes/admin/settings/sf-options.php:316
|
1572 |
+
msgid "Payments"
|
1573 |
+
msgstr "Pagamentos"
|
1574 |
+
|
1575 |
+
#: classes/admin/settings/sf-options.php:318
|
1576 |
+
msgid ""
|
1577 |
+
"PayPal Adaptive Payments Scheduling - PayPal MassPay has been depreciated by "
|
1578 |
+
"PayPal as of September 2017"
|
1579 |
+
msgstr ""
|
1580 |
+
"Agendamento do Adaptive Payments do PayPal - PayPal MassPay se tornou "
|
1581 |
+
"obsoleto em setembro de 2017"
|
1582 |
+
|
1583 |
+
#: classes/admin/settings/sf-options.php:319
|
1584 |
+
msgid "Total commission currently due: %s. <a href=\"%s\">View details</a>."
|
1585 |
+
msgstr "Comissão atual total devida: %s. <a href=\"%s\">Ver detalhes</a>."
|
1586 |
+
|
1587 |
+
#: classes/admin/settings/sf-options.php:320
|
1588 |
+
msgid ""
|
1589 |
+
"Make sure you update your PayPal Adaptive Payments settings <a href=\"%s"
|
1590 |
+
"\">here</a>. <br><br>To instantly pay with Adaptive Payments you must "
|
1591 |
+
"activate the PayPal AP gateway in your Checkout settings. <br><a href="
|
1592 |
+
"\"https://www.wcvendors.com/kb/configuring-paypal-adaptive-payments/\" "
|
1593 |
+
"target=\"top\">PayPal AP Application Help</a>. <br><br>Another gateway that "
|
1594 |
+
"offers instant payments to vendors that also accepts credit cards directly "
|
1595 |
+
"on your checkout page is Stripe. <br><a href=\"https://www.wcvendors.com/"
|
1596 |
+
"product/stripe-commissions-gateway/\" target=\"top\">Stripe Commissions & "
|
1597 |
+
"Gateway plugin</a> is specifically coded for WC Vendors and <a href="
|
1598 |
+
"\"https://www.wcvendors.com/product/wc-vendors-pro/\" target=\"top\">WC "
|
1599 |
+
"Vendors Pro</a>."
|
1600 |
+
msgstr ""
|
1601 |
+
"Certifique-se de atualizar suas configurações do PayPal Adaptive Payments <a "
|
1602 |
+
"href=\"%s\">aqui</a>. <br><br>Para pagar instantaneamente com Adaptive "
|
1603 |
+
"Payments você deve ativar o gateway PayPal AP nas suas configurações de "
|
1604 |
+
"Checkout. <br><a href=\"https://www.wcvendors.com/kb/configuring-paypal-"
|
1605 |
+
"adaptive-payments/\" target=\"top\">PayPal AP Application Help</a>. "
|
1606 |
+
"<br><br>Outro gateway que oferece pagamentos instantâneos a vendedores que "
|
1607 |
+
"também aceita cartões de crédito diretamente na sua página de chekout é o "
|
1608 |
+
"Stripe. <br><a href=\"https://www.wcvendors.com/product/stripe-commissions-"
|
1609 |
+
"gateway/\" target=\"top\">O plugin Stripe Commissions & Gateway</a> custa "
|
1610 |
+
"$49 e é especialmente programado para o WC Vendors e o <a href=\"https://www."
|
1611 |
+
"wcvendors.com/product/wc-vendors-pro/\" target=\"top\">WC Vendors Pro</a>."
|
1612 |
+
|
1613 |
+
#: classes/admin/settings/sf-options.php:324
|
1614 |
+
msgid "Instant pay"
|
1615 |
+
msgstr "Pagamento instantâneo"
|
1616 |
+
|
1617 |
+
#: classes/admin/settings/sf-options.php:325
|
1618 |
+
msgid ""
|
1619 |
+
"Instantly pay vendors their commission when an order is made, and if a "
|
1620 |
+
"vendor has a valid PayPal email added on their Shop Settings page."
|
1621 |
+
msgstr ""
|
1622 |
+
"Pagar os seus vendedores instantaneamente quando um pedido for feito se o "
|
1623 |
+
"vendedor tiver um email do PayPal válido adicionado à página de "
|
1624 |
+
"Configurações de Loja."
|
1625 |
+
|
1626 |
+
#: classes/admin/settings/sf-options.php:326
|
1627 |
+
msgid ""
|
1628 |
+
"For this to work, customers must checkout with the PayPal Adaptive Payments "
|
1629 |
+
"gateway. Using any other gateways will not pay vendors instantly"
|
1630 |
+
msgstr ""
|
1631 |
+
"Para que isso funcione, os clientes devem finalizar suas compras com o "
|
1632 |
+
"gateway do PayPal Adaptive Payments. Usando quaisquer outros gateways o "
|
1633 |
+
"pagamento dos vendedores não será instantaneo"
|
1634 |
+
|
1635 |
+
#: classes/admin/settings/sf-options.php:333
|
1636 |
+
msgid "Payment schedule"
|
1637 |
+
msgstr "Programação de pagamentos"
|
1638 |
+
|
1639 |
+
#: classes/admin/settings/sf-options.php:334
|
1640 |
+
msgid "Note: Schedule will only work if instant pay is unchecked"
|
1641 |
+
msgstr ""
|
1642 |
+
"Nota: Programação só vai funcionar se a opção de pagamento imediato for "
|
1643 |
+
"desmarcada"
|
1644 |
+
|
1645 |
+
#: classes/admin/settings/sf-options.php:339
|
1646 |
+
msgid "Daily"
|
1647 |
+
msgstr "Diariamente"
|
1648 |
+
|
1649 |
+
#: classes/admin/settings/sf-options.php:340
|
1650 |
+
msgid "Weekly"
|
1651 |
+
msgstr "Semanal"
|
1652 |
+
|
1653 |
+
#: classes/admin/settings/sf-options.php:341
|
1654 |
+
msgid "Biweekly"
|
1655 |
+
msgstr "Quinzenal"
|
1656 |
+
|
1657 |
+
#: classes/admin/settings/sf-options.php:342
|
1658 |
+
msgid "Monthly"
|
1659 |
+
msgstr "Mensal"
|
1660 |
+
|
1661 |
+
#: classes/admin/settings/sf-options.php:343
|
1662 |
+
msgid "Manual"
|
1663 |
+
msgstr "Manual"
|
1664 |
+
|
1665 |
+
#: classes/admin/settings/sf-options.php:344
|
1666 |
+
msgid "Now"
|
1667 |
+
msgstr "Agora"
|
1668 |
+
|
1669 |
+
#: classes/admin/settings/sf-options.php:349
|
1670 |
+
msgid "Email notification"
|
1671 |
+
msgstr "Notificação de email"
|
1672 |
+
|
1673 |
+
#: classes/admin/settings/sf-options.php:350
|
1674 |
+
msgid ""
|
1675 |
+
"Send the WooCommerce admin an email each time a payment has been made via "
|
1676 |
+
"the payment schedule options above"
|
1677 |
+
msgstr ""
|
1678 |
+
"Mandar um email para o administrador do Woocommerce cada vez que um "
|
1679 |
+
"pagamento foi feito por uma das opções de agendamento de pagamento acima"
|
1680 |
+
|
1681 |
+
#: classes/admin/views/html-vendor-settings-page.php:11,
|
1682 |
+
#: templates/dashboard/settings/paypal-email-form.php:2
|
1683 |
+
msgid "PayPal Address"
|
1684 |
+
msgstr "Endereço do PayPal"
|
1685 |
+
|
1686 |
+
#: classes/admin/views/html-vendor-settings-page.php:15,
|
1687 |
+
#: templates/dashboard/settings/paypal-email-form.php:3
|
1688 |
+
msgid "Your PayPal address is used to send you your commission."
|
1689 |
+
msgstr "Seu endereço do PayPal é usado para mandá-lo a sua comissão."
|
1690 |
+
|
1691 |
+
#: classes/admin/views/html-vendor-settings-page.php:24,
|
1692 |
+
#: templates/dashboard/settings/shop-name.php:3
|
1693 |
+
msgid "Your shop name is public and must be unique."
|
1694 |
+
msgstr "O nome de sua loja é público e deverá ser único."
|
1695 |
+
|
1696 |
+
#: classes/admin/views/html-vendor-settings-page.php:43,
|
1697 |
+
#: templates/dashboard/settings/seller-info.php:4
|
1698 |
+
msgid "This is displayed on each of your products."
|
1699 |
+
msgstr "Isto será mostrado em cada produto seu."
|
1700 |
+
|
1701 |
+
#: classes/admin/views/html-vendor-settings-page.php:49,
|
1702 |
+
#: templates/dashboard/settings/shop-description.php:2
|
1703 |
+
msgid "Shop Description"
|
1704 |
+
msgstr "Descrição da Loja"
|
1705 |
+
|
1706 |
+
#: classes/admin/views/html-vendor-settings-page.php:61,
|
1707 |
+
#: templates/dashboard/settings/shop-description.php:3
|
1708 |
+
msgid "This is displayed on your <a href=\"%s\">shop page</a>."
|
1709 |
+
msgstr "Isto será mostrado na sua <a href=\"%s\">shop page</a>."
|
1710 |
+
|
1711 |
+
#: classes/admin/views/html-vendor-settings-page.php:70
|
1712 |
+
msgid "Save Shop Settings"
|
1713 |
+
msgstr "Salvar Ajustes da Loja"
|
1714 |
+
|
1715 |
+
#: classes/admin/views/setup/capabilities.php:14
|
1716 |
+
msgid "Enable and disable capabilites of the %s"
|
1717 |
+
msgstr "Habilitar e desabilitar privilégios de %s"
|
1718 |
+
|
1719 |
+
#: classes/admin/views/setup/capabilities.php:25
|
1720 |
+
msgid "Allow %s to add/edit products"
|
1721 |
+
msgstr "Permitir que %s adicione/edite produtos"
|
1722 |
+
|
1723 |
+
#: classes/admin/views/setup/capabilities.php:38
|
1724 |
+
msgid "Allow %s to edit published (live) products"
|
1725 |
+
msgstr "Permitir que %s edite produtos publicados"
|
1726 |
+
|
1727 |
+
#: classes/admin/views/setup/capabilities.php:51
|
1728 |
+
msgid "Allow %s to publish products without requiring approval."
|
1729 |
+
msgstr "Permitir que %s publique produtos sem pedir aprovação."
|
1730 |
+
|
1731 |
+
#: classes/admin/views/setup/capabilities.php:76
|
1732 |
+
msgid "Allow %s to manage orders"
|
1733 |
+
msgstr "Permir que %s gerencie pedidos"
|
1734 |
+
|
1735 |
+
#: classes/admin/views/setup/capabilities.php:89
|
1736 |
+
msgid "Allow %s to export their orders to a CSV file"
|
1737 |
+
msgstr "Permitir que %s export pedidos para um arquivo CSV"
|
1738 |
+
|
1739 |
+
#: classes/admin/views/setup/capabilities.php:102
|
1740 |
+
msgid "Allow %s to view order notes"
|
1741 |
+
msgstr "Permitir que %s visualize notas de pedidos"
|
1742 |
+
|
1743 |
+
#: classes/admin/views/setup/capabilities.php:115
|
1744 |
+
msgid "Allow %s to add order notes."
|
1745 |
+
msgstr "Permitir que %s adicione notas de pedidos."
|
1746 |
+
|
1747 |
+
#: classes/admin/views/setup/capabilities.php:132,
|
1748 |
+
#: classes/admin/views/setup/general.php:97,
|
1749 |
+
#: classes/admin/views/setup/pages.php:62,
|
1750 |
+
#: classes/admin/views/setup/pages.php:62
|
1751 |
+
msgid "Next"
|
1752 |
+
msgstr "Próximo"
|
1753 |
+
|
1754 |
+
#: classes/admin/views/setup/footer.php:13
|
1755 |
+
msgid "Exit Wizard"
|
1756 |
+
msgstr "Fechar Assistente"
|
1757 |
+
|
1758 |
+
#: classes/admin/views/setup/footer.php:15
|
1759 |
+
msgid "Return to your dashboard"
|
1760 |
+
msgstr "Voltar ao seu painel"
|
1761 |
+
|
1762 |
+
#: classes/admin/views/setup/footer.php:17
|
1763 |
+
msgid "Skip this step"
|
1764 |
+
msgstr "Pular este passo"
|
1765 |
+
|
1766 |
+
#: classes/admin/views/setup/general.php:14
|
1767 |
+
msgid ""
|
1768 |
+
"The following wizard will help you configure your marketplace and get your "
|
1769 |
+
"vendors onboard quickly."
|
1770 |
+
msgstr "O "
|
1771 |
+
|
1772 |
+
#: classes/admin/views/setup/general.php:25
|
1773 |
+
msgid "Allow users to apply to become a %s"
|
1774 |
+
msgstr "Permitir que usuários solicitem se tornarem %s"
|
1775 |
+
|
1776 |
+
#: classes/admin/views/setup/general.php:38
|
1777 |
+
msgid "Manually approve %s applications"
|
1778 |
+
msgstr "Aprovar pedidos de %s manualmente"
|
1779 |
+
|
1780 |
+
#: classes/admin/views/setup/general.php:51
|
1781 |
+
msgid "Give any taxes to %s"
|
1782 |
+
msgstr "Repassar quaisquer taxas para %s"
|
1783 |
+
|
1784 |
+
#: classes/admin/views/setup/general.php:64
|
1785 |
+
msgid "Give any shipping to %s"
|
1786 |
+
msgstr "Repassar qualquer frete para %s"
|
1787 |
+
|
1788 |
+
#: classes/admin/views/setup/general.php:81
|
1789 |
+
msgid ""
|
1790 |
+
"Commissions are calculated per product. The commission rate can be set "
|
1791 |
+
"globally, at a vendor level or at a product level."
|
1792 |
+
msgstr ""
|
1793 |
+
"Comissões são calculadas por produto. A taxa de comissão pode ser definida "
|
1794 |
+
"globalmente, ao nível do vendedor ou do produto."
|
1795 |
+
|
1796 |
+
#: classes/admin/views/setup/general.php:86
|
1797 |
+
msgid "Global Commission Rate %"
|
1798 |
+
msgstr "% da Taxa de Comissão Global "
|
1799 |
+
|
1800 |
+
#: classes/admin/views/setup/header.php:16
|
1801 |
+
msgid "WC Vendors › Setup Wizard"
|
1802 |
+
msgstr "WC Vendors › Assistente de Configuração"
|
1803 |
+
|
1804 |
+
#: classes/admin/views/setup/pages.php:14
|
1805 |
+
msgid "Select the pages for relevant frontend features for %s"
|
1806 |
+
msgstr "Selecionar as páginas com funcionalidades relevantes para %s"
|
1807 |
+
|
1808 |
+
#: classes/admin/views/setup/pages.php:25, classes/class-install.php:158
|
1809 |
+
msgid "Vendor Dashboard"
|
1810 |
+
msgstr "Painel do Vendedor"
|
1811 |
+
|
1812 |
+
#: classes/admin/views/setup/pages.php:34
|
1813 |
+
msgid ""
|
1814 |
+
"This page should contain the following shortcode. "
|
1815 |
+
"<code>[wcv_vendor_dashboard]</code>"
|
1816 |
+
msgstr ""
|
1817 |
+
"Esta página deve conter o shortcode <code>[wcv_vendor_dashboard]</code>"
|
1818 |
+
|
1819 |
+
#: classes/admin/views/setup/pages.php:45
|
1820 |
+
msgid ""
|
1821 |
+
"This page should contain the following shortcode. <code>[wcv_shop_settings]</"
|
1822 |
+
"code>"
|
1823 |
+
msgstr "Esta página deve conter o shortcode <code>[wcv_shop_settings]</code>"
|
1824 |
+
|
1825 |
+
#: classes/admin/views/setup/pages.php:49
|
1826 |
+
msgid "Orders Page"
|
1827 |
+
msgstr "Página de Pedidos"
|
1828 |
+
|
1829 |
+
#: classes/admin/views/setup/pages.php:56
|
1830 |
+
msgid ""
|
1831 |
+
"This page should contain the following shortcode. <code>[wcv_orders]</code>"
|
1832 |
+
msgstr "Esta página deve conter o shortcode <code>[wcv_orders]</code>"
|
1833 |
+
|
1834 |
+
#: classes/admin/views/setup/ready.php:12
|
1835 |
+
msgid "Your marketplace is ready!"
|
1836 |
+
msgstr "Seu marketplace está pronto!"
|
1837 |
+
|
1838 |
+
#: classes/admin/views/setup/ready.php:15
|
1839 |
+
msgid ""
|
1840 |
+
"Subscribe to our newsletter! Get product updates, marketplace tips, "
|
1841 |
+
"information and more."
|
1842 |
+
msgstr ""
|
1843 |
+
"Increva-se na nossa newsletter! Receba atualizações sobre produtos, dicas de "
|
1844 |
+
"marketplace, informações e mais."
|
1845 |
+
|
1846 |
+
#: classes/admin/views/setup/ready.php:23,
|
1847 |
+
#: classes/front/orders/class-orders.php:256
|
1848 |
+
msgid "Email address"
|
1849 |
+
msgstr "Endereço de email"
|
1850 |
+
|
1851 |
+
#: classes/admin/views/setup/ready.php:29,
|
1852 |
+
#: classes/admin/views/setup/ready.php:33
|
1853 |
+
msgid "Subscribe me"
|
1854 |
+
msgstr "Inscreva-me"
|
1855 |
+
|
1856 |
+
#: classes/admin/views/setup/ready.php:42
|
1857 |
+
msgid "Next step"
|
1858 |
+
msgstr "Próximo passo"
|
1859 |
+
|
1860 |
+
#: classes/admin/views/setup/ready.php:43
|
1861 |
+
msgid "Upgrade to Pro!"
|
1862 |
+
msgstr "Fazer upgrade para versão Pro!"
|
1863 |
+
|
1864 |
+
#: classes/admin/views/setup/ready.php:44
|
1865 |
+
msgid "Upgrade today to extend the features of your marketplace."
|
1866 |
+
msgstr "Faça upgrade hoje para estender as funcionalidades do seu marketplace."
|
1867 |
+
|
1868 |
+
#: classes/admin/views/setup/ready.php:45
|
1869 |
+
msgid "Features"
|
1870 |
+
msgstr "Recursos"
|
1871 |
+
|
1872 |
+
#: classes/admin/views/setup/ready.php:47
|
1873 |
+
msgid "Complete frontend dashboard for vendors"
|
1874 |
+
msgstr "Painel completo no frontend para vendedores"
|
1875 |
+
|
1876 |
+
#: classes/admin/views/setup/ready.php:48
|
1877 |
+
msgid "Flat rate & table rate shipping module"
|
1878 |
+
msgstr "Módulos de taxa fixa & frete de tabela fixa"
|
1879 |
+
|
1880 |
+
#: classes/admin/views/setup/ready.php:49
|
1881 |
+
msgid "Coupons, ratings, reports, orders and more."
|
1882 |
+
msgstr "Cupons, classificações, "
|
1883 |
+
|
1884 |
+
#: classes/admin/views/setup/ready.php:50
|
1885 |
+
msgid "Advanced commissions"
|
1886 |
+
msgstr "Comissões avançadas"
|
1887 |
+
|
1888 |
+
#: classes/admin/views/setup/ready.php:51
|
1889 |
+
msgid "Premium support & updates"
|
1890 |
+
msgstr "Suporte premium & atualizações"
|
1891 |
+
|
1892 |
+
#: classes/admin/views/setup/ready.php:57
|
1893 |
+
msgid "Upgrade Now"
|
1894 |
+
msgstr "Fazer Upgrade Agora"
|
1895 |
+
|
1896 |
+
#: classes/admin/views/setup/ready.php:64
|
1897 |
+
msgid "Extend your marketplace"
|
1898 |
+
msgstr "Estenda seu marketplace"
|
1899 |
+
|
1900 |
+
#: classes/admin/views/setup/ready.php:66
|
1901 |
+
msgid ""
|
1902 |
+
"Extend your marketplace today with a variety of extensions from us and 3rd "
|
1903 |
+
"party developers."
|
1904 |
+
msgstr ""
|
1905 |
+
"Estenda seu marketplace hoje com uma variedade de extensões nossas e de "
|
1906 |
+
"terceiros."
|
1907 |
+
|
1908 |
+
#: classes/admin/views/setup/ready.php:71
|
1909 |
+
msgid "View Extensions"
|
1910 |
+
msgstr "Ver Extensões"
|
1911 |
+
|
1912 |
+
#: classes/admin/views/setup/ready.php:77
|
1913 |
+
msgid "Need Help?"
|
1914 |
+
msgstr "Precisa de Ajuda?"
|
1915 |
+
|
1916 |
+
#: classes/class-cron.php:87
|
1917 |
+
msgid "Payment total: %s"
|
1918 |
+
msgstr "Total de Pagamento: %s"
|
1919 |
+
|
1920 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:56
|
1921 |
+
msgid "Order marked shipped."
|
1922 |
+
msgstr "Pedido marcado como enviado."
|
1923 |
+
|
1924 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:59
|
1925 |
+
msgid "%s has marked as shipped. "
|
1926 |
+
msgstr "%s marcou como enviado."
|
1927 |
+
|
1928 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:88,
|
1929 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:89
|
1930 |
+
msgid "Tracking number"
|
1931 |
+
msgstr "Número de rastreamento"
|
1932 |
+
|
1933 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:91
|
1934 |
+
msgid "Success. Your tracking number has been updated."
|
1935 |
+
msgstr "Sucesso. Seu número de rastreamento foi atualizado."
|
1936 |
+
|
1937 |
+
#: classes/front/orders/class-export-csv.php:19,
|
1938 |
+
#: templates/dashboard/reports.php:18,
|
1939 |
+
#: templates/emails/notify-vendor-shipped.php:27,
|
1940 |
+
#: templates/emails/vendor-new-order.php:31
|
1941 |
+
msgid "Quantity"
|
1942 |
+
msgstr "Quantidade"
|
1943 |
+
|
1944 |
+
#: classes/front/orders/class-export-csv.php:20
|
1945 |
+
msgid "Item Meta"
|
1946 |
+
msgstr "Metadado do Item"
|
1947 |
+
|
1948 |
+
#: classes/front/orders/class-orders.php:100,
|
1949 |
+
#: classes/front/orders/class-orders.php:166
|
1950 |
+
msgid ""
|
1951 |
+
"You haven't selected a product's orders to view! Please go back to the "
|
1952 |
+
"Vendor Dashboard and click Show Orders on the product you'd like to view."
|
1953 |
+
msgstr ""
|
1954 |
+
"Você não selecionou um pedido de um produto para ver! Por favor, volte ao "
|
1955 |
+
"Painel do Vendedor e clique em Mostrar Pedidos no produto que você gostaria "
|
1956 |
+
"de ver."
|
1957 |
+
|
1958 |
+
#: classes/front/orders/class-orders.php:123,
|
1959 |
+
#: classes/front/orders/class-orders.php:189
|
1960 |
+
msgid "No orders."
|
1961 |
+
msgstr "Sem pedidos."
|
1962 |
+
|
1963 |
+
#: classes/front/orders/class-orders.php:250
|
1964 |
+
msgid "Product Title"
|
1965 |
+
msgstr "Título do Produto"
|
1966 |
+
|
1967 |
+
#: classes/front/orders/class-orders.php:251
|
1968 |
+
msgid "Full name"
|
1969 |
+
msgstr "Nome completo"
|
1970 |
+
|
1971 |
+
#: classes/front/orders/class-orders.php:252
|
1972 |
+
msgid "Address"
|
1973 |
+
msgstr "Endereço"
|
1974 |
+
|
1975 |
+
#: classes/front/orders/class-orders.php:253
|
1976 |
+
msgid "City"
|
1977 |
+
msgstr "Cidade"
|
1978 |
+
|
1979 |
+
#: classes/front/orders/class-orders.php:254
|
1980 |
+
msgid "State"
|
1981 |
+
msgstr "Estado"
|
1982 |
+
|
1983 |
+
#: classes/front/orders/class-orders.php:255
|
1984 |
+
msgid "Zip"
|
1985 |
+
msgstr "CEP"
|
1986 |
+
|
1987 |
+
#: classes/front/orders/class-submit-comment.php:41
|
1988 |
+
msgid "You've left the comment field empty!"
|
1989 |
+
msgstr "Você deixou o campo de comentário vazio!"
|
1990 |
+
|
1991 |
+
#: classes/front/orders/class-submit-comment.php:63
|
1992 |
+
msgid "Success. The customer has been notified of your comment."
|
1993 |
+
msgstr "Sucesso. O cliente foi notificado de seu comentário."
|
1994 |
+
|
1995 |
+
#: classes/front/signup/class-vendor-signup.php:81
|
1996 |
+
msgid "ERROR"
|
1997 |
+
msgstr "ERRO"
|
1998 |
+
|
1999 |
+
#: classes/front/signup/class-vendor-signup.php:100
|
2000 |
+
msgid "Application denied. You are an administrator."
|
2001 |
+
msgstr "Solicitação negada. Você é um administrador."
|
2002 |
+
|
2003 |
+
#: classes/front/signup/class-vendor-signup.php:102
|
2004 |
+
msgid "Your application has been submitted."
|
2005 |
+
msgstr "O seu pedido foi enviado."
|
2006 |
+
|
2007 |
+
#: classes/front/signup/class-vendor-signup.php:149,
|
2008 |
+
#: classes/front/signup/class-vendor-signup.php:186,
|
2009 |
+
#: classes/front/signup/class-vendor-signup.php:198
|
2010 |
+
msgid "You must accept the terms and conditions to become a vendor."
|
2011 |
+
msgstr "Você deve aceitar os termos e as condições para se tornar um vendedor."
|
2012 |
+
|
2013 |
+
#: classes/front/signup/views/html-vendor-signup.php:22,
|
2014 |
+
#: templates/dashboard/denied.php:22
|
2015 |
+
msgid "Apply to become a vendor? "
|
2016 |
+
msgstr "Pedir para se tornar um vendedor?"
|
2017 |
+
|
2018 |
+
#: classes/front/signup/views/html-vendor-signup.php:36
|
2019 |
+
msgid ""
|
2020 |
+
"I have read and accepted the <a target=\"top\" href=\"%s\">terms and "
|
2021 |
+
"conditions</a>."
|
2022 |
+
msgstr "Eu li e aceito os <a target=\"top\" href=\"%s\">termos e condições</a>"
|
2023 |
+
|
2024 |
+
#: classes/front/signup/views/html-vendor-signup.php:45
|
2025 |
+
msgid "Please agree to the terms and conditions"
|
2026 |
+
msgstr "Por favor, aceite os termos e condições"
|
2027 |
+
|
2028 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:43
|
2029 |
+
msgid "PayPal Adaptive Payments"
|
2030 |
+
msgstr "PayPal Adaptive Payments"
|
2031 |
+
|
2032 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:119
|
2033 |
+
msgid ""
|
2034 |
+
"Something went wrong. Response from PayPal invalidated this order. Status: "
|
2035 |
+
"%s."
|
2036 |
+
msgstr ""
|
2037 |
+
"Algo deu errado. Resposta do PayPal invalidou este pedido. Condição: %s."
|
2038 |
+
|
2039 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:124
|
2040 |
+
msgid "IPN payment completed"
|
2041 |
+
msgstr "pagamento IPN concluido"
|
2042 |
+
|
2043 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:146
|
2044 |
+
msgid "Enable PayPal Adaptive Payments"
|
2045 |
+
msgstr "Permitir PayPal Adaptive Payments"
|
2046 |
+
|
2047 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:152
|
2048 |
+
msgid "Method Title"
|
2049 |
+
msgstr "Título do Método"
|
2050 |
+
|
2051 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:153
|
2052 |
+
msgid "This controls the title which the user sees during checkout."
|
2053 |
+
msgstr ""
|
2054 |
+
"Isto controla o título que o usuário verá durante a finalização da compra."
|
2055 |
+
|
2056 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:154
|
2057 |
+
msgid "PayPal"
|
2058 |
+
msgstr "PayPal"
|
2059 |
+
|
2060 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:159
|
2061 |
+
msgid "Description"
|
2062 |
+
msgstr "Descrição"
|
2063 |
+
|
2064 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:160
|
2065 |
+
msgid "This controls the description which the user sees during checkout."
|
2066 |
+
msgstr ""
|
2067 |
+
"Isto controla a descrição que o usuário verá durante a finalização da compra."
|
2068 |
+
|
2069 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:161
|
2070 |
+
msgid "Pay via PayPal!"
|
2071 |
+
msgstr "Pagar via PayPal!"
|
2072 |
+
|
2073 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:172
|
2074 |
+
msgid "Live Credentials"
|
2075 |
+
msgstr "Credenciais ao vivo"
|
2076 |
+
|
2077 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:174
|
2078 |
+
msgid ""
|
2079 |
+
"You must have an <a href=\"%s\">Application ID</a> to process live "
|
2080 |
+
"transactions. You do not need one for testing in Sandbox mode."
|
2081 |
+
msgstr ""
|
2082 |
+
"Você deve ter um <a href=\"%s\">Pedido ID</a> para processar as transações "
|
2083 |
+
"ao vivo. Você não precisa de um Pedido ID para testar no modo Sandbox."
|
2084 |
+
|
2085 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:179,
|
2086 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:213
|
2087 |
+
msgid "PayPal Email"
|
2088 |
+
msgstr "Email do PayPal"
|
2089 |
+
|
2090 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:180,
|
2091 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:214
|
2092 |
+
msgid "The email address main payments should go to."
|
2093 |
+
msgstr "Endereço de email para onde os pagamentos principais devem ir."
|
2094 |
+
|
2095 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:185,
|
2096 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:219
|
2097 |
+
msgid "API Username"
|
2098 |
+
msgstr "Nome de usuário da API "
|
2099 |
+
|
2100 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:190,
|
2101 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:224
|
2102 |
+
msgid "API Password"
|
2103 |
+
msgstr "Senha da API "
|
2104 |
+
|
2105 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:195,
|
2106 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:229
|
2107 |
+
msgid "API Signature"
|
2108 |
+
msgstr "Assinatura da API "
|
2109 |
+
|
2110 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:200
|
2111 |
+
msgid "Application ID"
|
2112 |
+
msgstr "ID da solicitação"
|
2113 |
+
|
2114 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:202
|
2115 |
+
msgid "Only required when doing live transactions."
|
2116 |
+
msgstr "Só exigido ao fazer transações ao vivo."
|
2117 |
+
|
2118 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:206
|
2119 |
+
msgid "Sandbox Credentials"
|
2120 |
+
msgstr "Credenciais sandbox"
|
2121 |
+
|
2122 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:208
|
2123 |
+
msgid ""
|
2124 |
+
"You can signup for a sandbox developer account <a href=\"%s\">here</a>. You "
|
2125 |
+
"need a developer account if you want to enable Sandbox mode for testing."
|
2126 |
+
msgstr ""
|
2127 |
+
"Você pode se inscrever para uma conta de desenvolvedor sandbox <a href=\"%s"
|
2128 |
+
"\">aqui</a>. Você precisa de uma conta de desenvolvedor para ativar o modo "
|
2129 |
+
"Sandbox para testes."
|
2130 |
+
|
2131 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:240
|
2132 |
+
msgid "Misc. Settings"
|
2133 |
+
msgstr "Ajustes Variados"
|
2134 |
+
|
2135 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:245
|
2136 |
+
msgid "Enable PayPal Sandbox mode"
|
2137 |
+
msgstr "Permitir modo PayPal Sandbox"
|
2138 |
+
|
2139 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:251
|
2140 |
+
msgid "Enable logging"
|
2141 |
+
msgstr "Permitir log"
|
2142 |
+
|
2143 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:269
|
2144 |
+
msgid ""
|
2145 |
+
"The PayPal Adaptive Payments gateway can instantly pay your vendors their "
|
2146 |
+
"due commission (if enabled). Also used to mass pay vendors on a schedule / "
|
2147 |
+
"manual method (if enabled)."
|
2148 |
+
msgstr ""
|
2149 |
+
"O PayPal Adaptive Payments gateway pode pagar imediatamente as comissões "
|
2150 |
+
"devidas de seus vendedores (se ativado). Também é usado para pagar vários "
|
2151 |
+
"vendedores no método agendar / manual (se ativado)."
|
2152 |
+
|
2153 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:270
|
2154 |
+
msgid ""
|
2155 |
+
"Please Note: PayPal has depreciated Adaptive Payments. This will soon cease "
|
2156 |
+
"to function. We are currently working on a new extension to allow scheduled "
|
2157 |
+
"payments but there is no solution for instant payments with paypal moving "
|
2158 |
+
"forward at this time."
|
2159 |
+
msgstr ""
|
2160 |
+
"Favor Observar: O PayPal tornou o Adaptivate Paymets obsoleto e logo não "
|
2161 |
+
"funcionará mais. Nós estamos atualmente trabalhando em uma nova extensão "
|
2162 |
+
"para permitir pagamentos agendados porém ainda não há solução para "
|
2163 |
+
"pagamentos instantâneos pelo PayPal a caminho no momento."
|
2164 |
+
|
2165 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2166 |
+
msgid "Gateway Disabled"
|
2167 |
+
msgstr "Gateway Desabilitado"
|
2168 |
+
|
2169 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2170 |
+
msgid "%s does not support your store currency."
|
2171 |
+
msgstr "%s não suporta a moeda de sua loja."
|
2172 |
+
|
2173 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:390,
|
2174 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:506,
|
2175 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:153
|
2176 |
+
msgid "Error: %s"
|
2177 |
+
msgstr "Erro: %s"
|
2178 |
+
|
2179 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:399,
|
2180 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:400
|
2181 |
+
msgid "Error ID: %s. %s"
|
2182 |
+
msgstr "ID do Erro: %s. %s"
|
2183 |
+
|
2184 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:514,
|
2185 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:515
|
2186 |
+
msgid "Error ID: %d. %s"
|
2187 |
+
msgstr "ID do Erro: %s. %s"
|
2188 |
+
|
2189 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:115
|
2190 |
+
msgid "No vendors found to pay. Maybe they haven't set a PayPal address?"
|
2191 |
+
msgstr ""
|
2192 |
+
"Nenhum vendedor foi encontrado para ser pago. Talvez eles não tenha definido "
|
2193 |
+
"um endereço PayPal?"
|
2194 |
+
|
2195 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:167
|
2196 |
+
msgid "All due commission has been paid for."
|
2197 |
+
msgstr "Todas as comissões devidas já foram pagas."
|
2198 |
+
|
2199 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:173
|
2200 |
+
msgid ""
|
2201 |
+
"All due commission has been paid for, but I could not clear it from their "
|
2202 |
+
"profiles due to an internal error. Commission will still be listed as due. "
|
2203 |
+
"Please manually mark the commission as paid from the Commissions page."
|
2204 |
+
msgstr ""
|
2205 |
+
"Todas as comissões devidas já foram pagas, mas eu não pude limpar seus "
|
2206 |
+
"perfis devido a um erro interno. A comissão ainda estará marcada como "
|
2207 |
+
"devida. Por favor, marque manualmente a comissão como paga a partir da "
|
2208 |
+
"página de Comissões."
|
2209 |
+
|
2210 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:208
|
2211 |
+
msgid "WooCommerce: Mass payments for vendors update"
|
2212 |
+
msgstr "WooCommerce: Pagamentos em massa para atualização de vendedores"
|
2213 |
+
|
2214 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:210
|
2215 |
+
msgid ""
|
2216 |
+
"Hello! A payment was just triggered to mass pay all vendors their due "
|
2217 |
+
"commission."
|
2218 |
+
msgstr ""
|
2219 |
+
"Olá! Um pagamento acabou de ser acionado para o pagamento em massa das "
|
2220 |
+
"comissões devidas a todos os vendedores."
|
2221 |
+
|
2222 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:211
|
2223 |
+
msgid "Payment status: %s."
|
2224 |
+
msgstr "Condição do pagamento: %s."
|
2225 |
+
|
2226 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:212
|
2227 |
+
msgid "Payment message: %s."
|
2228 |
+
msgstr "Mensagem do pagamento: %s."
|
2229 |
+
|
2230 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:215
|
2231 |
+
msgid "Payment total: %s."
|
2232 |
+
msgstr "Total oe pagamento: %s"
|
2233 |
+
|
2234 |
+
#: classes/includes/class-functions.php:57
|
2235 |
+
msgid "Vendors"
|
2236 |
+
msgstr "Vendedores"
|
2237 |
+
|
2238 |
+
#: classes/includes/class-functions.php:75
|
2239 |
+
msgid "Select a page…"
|
2240 |
+
msgstr "Selecionar uma página…"
|
2241 |
+
|
2242 |
+
#: classes/includes/views/html-notice-install.php:12
|
2243 |
+
msgid ""
|
2244 |
+
"<strong>Welcome to WC Vendors</strong> – You‘re almost ready to "
|
2245 |
+
"start your marketplace"
|
2246 |
+
msgstr ""
|
2247 |
+
"<strong>Bem-vinda(o) ao WC Vendors</strong> – Você está quase pronto "
|
2248 |
+
"para começar o seu marketplace"
|
2249 |
+
|
2250 |
+
#: classes/includes/views/html-notice-install.php:13
|
2251 |
+
msgid "Run the Setup Wizard"
|
2252 |
+
msgstr "Rodar assistente de configuração"
|
2253 |
+
|
2254 |
+
#: classes/includes/views/html-notice-install.php:13
|
2255 |
+
msgid "Skip setup"
|
2256 |
+
msgstr "Pular configuração"
|
2257 |
+
|
2258 |
+
#: templates/dashboard/denied.php:8
|
2259 |
+
msgid ""
|
2260 |
+
"Your account has not yet been approved to become a vendor. When it is, you "
|
2261 |
+
"will receive an email telling you that your account is approved!"
|
2262 |
+
msgstr ""
|
2263 |
+
"Sua conta ainda não foi aprovada para se tornar um vendedor. Quando for "
|
2264 |
+
"aprovada, você receberá um email dizendo que sua conta está aprovada!"
|
2265 |
+
|
2266 |
+
#: templates/dashboard/denied.php:12
|
2267 |
+
msgid "Your account is not setup as a vendor."
|
2268 |
+
msgstr "Sua conta não é cadastrada como vendedor."
|
2269 |
+
|
2270 |
+
#: templates/dashboard/denied.php:33
|
2271 |
+
msgid "I have read and accepted the <a href=\"%s\">terms and conditions</a>"
|
2272 |
+
msgstr "Eu li e aceito os <a href=\"%s\">terms and conditions</a>"
|
2273 |
+
|
2274 |
+
#: templates/dashboard/denied.php:53
|
2275 |
+
msgid "Submit"
|
2276 |
+
msgstr "Enviar"
|
2277 |
+
|
2278 |
+
#: templates/dashboard/links.php:3
|
2279 |
+
msgid "View Your Store"
|
2280 |
+
msgstr "Ver sua Loja"
|
2281 |
+
|
2282 |
+
#: templates/dashboard/links.php:4
|
2283 |
+
msgid "Store Settings"
|
2284 |
+
msgstr "Configurações de Loja"
|
2285 |
+
|
2286 |
+
#: templates/dashboard/links.php:7
|
2287 |
+
msgid "Add New Product"
|
2288 |
+
msgstr "Adicionar Novo Produto"
|
2289 |
+
|
2290 |
+
#: templates/dashboard/links.php:8
|
2291 |
+
msgid "Edit Products"
|
2292 |
+
msgstr "Editar Produtos "
|
2293 |
+
|
2294 |
+
#: templates/dashboard/orders.php:18, templates/dashboard/orders.php:21
|
2295 |
+
msgid "Hide items"
|
2296 |
+
msgstr "Esconder itens"
|
2297 |
+
|
2298 |
+
#: templates/dashboard/orders.php:19, templates/dashboard/orders.php:93
|
2299 |
+
msgid "View items"
|
2300 |
+
msgstr "Ver itens"
|
2301 |
+
|
2302 |
+
#: templates/dashboard/orders.php:48
|
2303 |
+
msgid "Links"
|
2304 |
+
msgstr "Links"
|
2305 |
+
|
2306 |
+
#: templates/dashboard/orders.php:114
|
2307 |
+
msgid "Tracking"
|
2308 |
+
msgstr "Rastreamento"
|
2309 |
+
|
2310 |
+
#: templates/dashboard/orders.php:188
|
2311 |
+
msgid "You have no orders during this period."
|
2312 |
+
msgstr "Você não tem nenhum pedido durante este período"
|
2313 |
+
|
2314 |
+
#: templates/dashboard/reports.php:1
|
2315 |
+
msgid "Sales Report"
|
2316 |
+
msgstr "Relatório de Vendas"
|
2317 |
+
|
2318 |
+
#: templates/dashboard/reports.php:20
|
2319 |
+
msgid "Rate"
|
2320 |
+
msgstr "Taxa"
|
2321 |
+
|
2322 |
+
#: templates/dashboard/reports.php:47
|
2323 |
+
msgid "Show Orders"
|
2324 |
+
msgstr "Mostrar Pedidos"
|
2325 |
+
|
2326 |
+
#: templates/dashboard/reports.php:56
|
2327 |
+
msgid "Totals"
|
2328 |
+
msgstr "Totais"
|
2329 |
+
|
2330 |
+
#: templates/dashboard/reports.php:71
|
2331 |
+
msgid "You have no sales during this period."
|
2332 |
+
msgstr "Você não tem nenhuma venda durante este período."
|
2333 |
+
|
2334 |
+
#: templates/dashboard/reports.php:82
|
2335 |
+
msgid "You haven't made any sales yet."
|
2336 |
+
msgstr "Você não fez nenhuma venda ainda."
|
2337 |
+
|
2338 |
+
#: templates/dashboard/settings/settings.php:47
|
2339 |
+
msgid "Save"
|
2340 |
+
msgstr "Salvar"
|
2341 |
+
|
2342 |
+
#: templates/emails/application-status.php:8
|
2343 |
+
msgid "Application status: %s"
|
2344 |
+
msgstr "Status da solicitação: %s"
|
2345 |
+
|
2346 |
+
#: templates/emails/application-status.php:9,
|
2347 |
+
#: templates/emails/plain/vendor-notify-application.php:23,
|
2348 |
+
#: templates/emails/vendor-notify-application.php:24,
|
2349 |
+
#: templates/emails/vendor-notify-approved.php:24,
|
2350 |
+
#: templates/emails/vendor-notify-denied.php:26
|
2351 |
+
msgid "Applicant username: %s"
|
2352 |
+
msgstr "Nome de usuário do requerente: %s"
|
2353 |
+
|
2354 |
+
#: templates/emails/new-product.php:5
|
2355 |
+
msgid "Hi there. This is a notification about a new product on %s."
|
2356 |
+
msgstr "Olá. Isto é uma notificação sobre um novo produto na %s."
|
2357 |
+
|
2358 |
+
#: templates/emails/new-product.php:8
|
2359 |
+
msgid "Product title: %s"
|
2360 |
+
msgstr "Título do produto: %s"
|
2361 |
+
|
2362 |
+
#: templates/emails/new-product.php:9
|
2363 |
+
msgid "Submitted by: %s"
|
2364 |
+
msgstr "Enviado por: %s"
|
2365 |
+
|
2366 |
+
#: templates/emails/new-product.php:10
|
2367 |
+
msgid "Edit product: %s"
|
2368 |
+
msgstr "Editar produto: %s"
|
2369 |
+
|
2370 |
+
#: templates/emails/notify-vendor-shipped.php:17
|
2371 |
+
msgid ""
|
2372 |
+
"A vendor has marked part of your order as shipped. The items that are "
|
2373 |
+
"shipped are as follows:"
|
2374 |
+
msgstr ""
|
2375 |
+
"Um vendedor marcou parte de seu pedido como enviado. Os itens que foram "
|
2376 |
+
"enviados são:"
|
2377 |
+
|
2378 |
+
#: templates/emails/notify-vendor-shipped.php:21,
|
2379 |
+
#: templates/emails/vendor-new-order.php:25
|
2380 |
+
msgid "Order: %s"
|
2381 |
+
msgstr "Pedido: %s"
|
2382 |
+
|
2383 |
+
#: templates/emails/notify-vendor-shipped.php:28,
|
2384 |
+
#: templates/emails/vendor-new-order.php:32
|
2385 |
+
msgid "Price"
|
2386 |
+
msgstr "Preço"
|
2387 |
+
|
2388 |
+
#: templates/emails/notify-vendor-shipped.php:60,
|
2389 |
+
#: templates/emails/vendor-new-order.php:80
|
2390 |
+
msgid "Customer details"
|
2391 |
+
msgstr "Detalhes do cliente"
|
2392 |
+
|
2393 |
+
#: templates/emails/notify-vendor-shipped.php:63,
|
2394 |
+
#: templates/emails/vendor-new-order.php:83
|
2395 |
+
msgid "Email:"
|
2396 |
+
msgstr "Email:"
|
2397 |
+
|
2398 |
+
#: templates/emails/notify-vendor-shipped.php:66,
|
2399 |
+
#: templates/emails/vendor-new-order.php:86
|
2400 |
+
msgid "Tel:"
|
2401 |
+
msgstr "Tel:"
|
2402 |
+
|
2403 |
+
#: templates/emails/vendor-new-order.php:21
|
2404 |
+
msgid "You have received an order from %s. Their order is as follows:"
|
2405 |
+
msgstr "Você recebeu um pedido de %s. Seus pedidos são:"
|
2406 |
+
|
2407 |
+
#: templates/emails/vendor-notify-application.php:23
|
2408 |
+
msgid "Your application is currently: %s"
|
2409 |
+
msgstr "Sua solicitação está atualmente: %s"
|
2410 |
+
|
2411 |
+
#: templates/orders/comments/add-new-comment.php:11
|
2412 |
+
msgid "Add comment"
|
2413 |
+
msgstr "Adicionar comentário"
|
2414 |
+
|
2415 |
+
#: templates/orders/comments/existing-comments.php:9
|
2416 |
+
msgid "added %s ago"
|
2417 |
+
msgstr "adicionado %s atrás"
|
2418 |
+
|
2419 |
+
#: templates/orders/csv-export.php:6
|
2420 |
+
msgid "Export orders"
|
2421 |
+
msgstr "Exportar pedidos"
|
2422 |
+
|
2423 |
+
#: templates/orders/customer-note/customer-note.php:4
|
2424 |
+
msgid "Customer note"
|
2425 |
+
msgstr "Nota do cliente"
|
2426 |
+
|
2427 |
+
#: templates/orders/customer-note/customer-note.php:8
|
2428 |
+
msgid "No customer note."
|
2429 |
+
msgstr "Sem nota do cliente."
|
2430 |
+
|
2431 |
+
#: templates/orders/orders.php:82
|
2432 |
+
msgid "Comments (%s)"
|
2433 |
+
msgstr "Comentários (%s)"
|
2434 |
+
|
2435 |
+
#: templates/orders/shipping/shipping-form.php:75
|
2436 |
+
msgid "Update tracking number"
|
2437 |
+
msgstr "Atualizar número de rastreamento"
|
2438 |
+
|
2439 |
+
#: templates/orders/shipping/shipping-form.php:77
|
2440 |
+
msgid "Mark as shipped"
|
2441 |
+
msgstr "Marcar como enviado"
|
2442 |
+
|
2443 |
+
#: templates/orders/table-body.php:25
|
2444 |
+
msgid "Quantity: %d"
|
2445 |
+
msgstr "Quantidade: %d"
|
languages/wc-vendors.pot
ADDED
@@ -0,0 +1,2462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2018 wc-vendors
|
2 |
+
# This file is distributed under the same license as the wc-vendors package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: wc-vendors\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Language-Team: WC Vendors <translate@wcvendors.com>\n"
|
10 |
+
"Last-Translator: Jamie Madden <translate@wcvendors.com>\n"
|
11 |
+
"Report-Msgid-Bugs-To: https://www.wcvendors.com\n"
|
12 |
+
"X-Poedit-Basepath: ..\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
14 |
+
"X-Poedit-SearchPath-0: .\n"
|
15 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
+
|
19 |
+
#: class-wc-vendors.php:53
|
20 |
+
msgid "WC Vendors requires WooCommerce to run. Please install WooCommerce and activate before attempting to activate again."
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: class-wc-vendors.php:101, classes/admin/class-admin-menus.php:45, classes/admin/class-admin-menus.php:45, classes/admin/class-admin-reports.php:41, classes/admin/class-wcv-admin-setup.php:235, classes/admin/views/html-vendor-meta.php:1
|
24 |
+
msgid "WC Vendors"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: class-wc-vendors.php:136
|
28 |
+
msgid "<b>WC Vendors is inactive</b>. WC Vendors requires a minimum of WooCommerce 3.0.0 to operate."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: class-wc-vendors.php:396
|
32 |
+
msgid "WC Vendors 2.0 is a major update. This is not compatible with any of our existing extensions. You should test this update on a staging server before updating. Backup your site and update your theme and extensions, and <a href=\"%s\">review update details here</a> before upgrading."
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: class-wc-vendors.php:409
|
36 |
+
msgid "WC Vendors Pro 1.5.0 is required to run WC Vendors 2.0.0. Your current version %s will be deactivated. Please upgrade to the latest version."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: classes/class-commission.php:55, classes/admin/class-admin-reports.php:348, classes/admin/class-admin-reports.php:441, classes/admin/class-wcv-commissions-page.php:277, classes/admin/class-wcv-commissions-page.php:543
|
40 |
+
msgid "Due"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: classes/class-commission.php:56, classes/admin/class-admin-reports.php:347, classes/admin/class-admin-reports.php:442, classes/admin/class-wcv-commissions-page.php:278, classes/admin/class-wcv-commissions-page.php:544
|
44 |
+
msgid "Paid"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: classes/class-commission.php:57, classes/admin/class-admin-reports.php:346, classes/admin/class-admin-reports.php:443, classes/admin/class-wcv-commissions-page.php:279, classes/admin/class-wcv-commissions-page.php:545
|
48 |
+
msgid "Reversed"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: classes/class-cron.php:87
|
52 |
+
msgid "Payment total: %s"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: classes/class-install.php:139, classes/admin/class-wcv-admin-setup.php:142
|
56 |
+
msgid "Pending Vendor"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: classes/class-install.php:146, classes/admin/class-admin-reports.php:173, classes/admin/class-admin-reports.php:456, classes/admin/class-product-meta.php:46, classes/admin/class-product-meta.php:187, classes/admin/class-product-meta.php:223, classes/admin/class-wcv-admin-setup.php:139, classes/admin/class-wcv-admin-setup.php:270, classes/admin/class-wcv-commissions-csv-exporter.php:43, classes/admin/class-wcv-commissions-page.php:118, classes/includes/class-functions.php:35
|
60 |
+
msgid "Vendor"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: classes/class-install.php:193
|
64 |
+
msgctxt "Page slug"
|
65 |
+
msgid "vendor_dashboard"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: classes/class-install.php:195
|
69 |
+
msgctxt "Page title"
|
70 |
+
msgid "%s Dashboard"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: classes/class-install.php:201
|
74 |
+
msgctxt "Page slug"
|
75 |
+
msgid "vendors"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: classes/class-install.php:203
|
79 |
+
msgctxt "Page title"
|
80 |
+
msgid "%s"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: classes/class-install.php:211
|
84 |
+
msgctxt "Page slug"
|
85 |
+
msgid "shop_settings"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: classes/class-install.php:212
|
89 |
+
msgctxt "Page title"
|
90 |
+
msgid "Shop Settings"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: classes/class-install.php:217
|
94 |
+
msgctxt "Page slug"
|
95 |
+
msgid "product_orders"
|
96 |
+
msgstr ""
|
97 |
+
|
98 |
+
#: classes/class-install.php:218
|
99 |
+
msgctxt "Page title"
|
100 |
+
msgid "Orders"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: classes/class-install.php:401
|
104 |
+
msgid "View WC Vendors settings"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: classes/class-install.php:401, templates/dashboard/settings/settings.php:1
|
108 |
+
msgid "Settings"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: classes/class-install.php:418
|
112 |
+
msgid "View WC Vendors documentation"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: classes/class-install.php:418
|
116 |
+
msgid "Docs"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: classes/class-install.php:419
|
120 |
+
msgid "Visit community forums"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: classes/class-install.php:419
|
124 |
+
msgid "Free support"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: classes/class-install.php:420
|
128 |
+
msgid "Visit premium customer support"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: classes/class-install.php:420
|
132 |
+
msgid "Premium support"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: classes/class-vendor-post-types.php:34
|
136 |
+
msgid "Vendor Orders"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: classes/admin/class-admin-menus.php:52
|
140 |
+
msgid "WC Vendors Extensions"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: classes/admin/class-admin-menus.php:52, classes/admin/views/setup/ready.php:65
|
144 |
+
msgid "Extensions"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: classes/admin/class-admin-menus.php:72, classes/admin/class-admin-menus.php:72
|
148 |
+
msgid "Commissions"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: classes/admin/class-admin-reports.php:44
|
152 |
+
msgid "Overview"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: classes/admin/class-admin-reports.php:50
|
156 |
+
msgid "Commission by vendor"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: classes/admin/class-admin-reports.php:56
|
160 |
+
msgid "Commission by product"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: classes/admin/class-admin-reports.php:62, classes/admin/class-admin-reports.php:343
|
164 |
+
msgid "Commission Totals"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: classes/admin/class-admin-reports.php:63
|
168 |
+
msgid "Commission totals for all vendors includes shipping and taxes. By default no date range is used and all due commissions are returned. Use the date range to filter."
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: classes/admin/class-admin-reports.php:119, classes/admin/class-admin-reports.php:435, templates/dashboard/date-picker.php:3
|
172 |
+
msgid "From:"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: classes/admin/class-admin-reports.php:121, classes/admin/class-admin-reports.php:437, templates/dashboard/date-picker.php:7
|
176 |
+
msgid "To:"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: classes/admin/class-admin-reports.php:123, classes/admin/class-admin-reports.php:281, classes/admin/class-admin-reports.php:446, templates/dashboard/date-picker.php:12
|
180 |
+
msgid "Show"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: classes/admin/class-admin-reports.php:129
|
184 |
+
msgid "Total paid in range"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: classes/admin/class-admin-reports.php:132, classes/admin/class-admin-reports.php:139, classes/admin/class-admin-reports.php:146
|
188 |
+
msgid "n/a"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: classes/admin/class-admin-reports.php:136
|
192 |
+
msgid "Total due in range"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: classes/admin/class-admin-reports.php:143
|
196 |
+
msgid "Total reversed in range"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: classes/admin/class-admin-reports.php:153
|
200 |
+
msgid "Recent Commission"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: classes/admin/class-admin-reports.php:171, templates/dashboard/orders.php:44, classes/front/orders/class-orders.php:204
|
204 |
+
msgid "Order"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: classes/admin/class-admin-reports.php:172, classes/admin/class-wcv-commissions-csv-exporter.php:41, classes/admin/class-wcv-commissions-page.php:116, templates/dashboard/reports.php:17, templates/emails/notify-vendor-shipped.php:27, templates/emails/vendor-new-order.php:31, templates/emails/vendor-order-details.php:36, classes/admin/emails/class-wcv-vendor-notify-order.php:187
|
208 |
+
msgid "Product"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: classes/admin/class-admin-reports.php:174, classes/admin/class-admin-reports.php:372, classes/admin/class-vendor-admin-dashboard.php:351, classes/admin/class-wcv-commissions-csv-exporter.php:47, classes/admin/class-wcv-commissions-page.php:122, templates/dashboard/orders.php:46
|
212 |
+
msgid "Total"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: classes/admin/class-admin-reports.php:175
|
216 |
+
msgid "Date & Time"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: classes/admin/class-admin-reports.php:176, classes/admin/class-admin-reports.php:459, classes/admin/class-wcv-commissions-csv-exporter.php:48, classes/admin/class-wcv-commissions-page.php:123
|
220 |
+
msgid "Status"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: classes/admin/class-admin-reports.php:184
|
224 |
+
msgid "N/A"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: classes/admin/class-admin-reports.php:189
|
228 |
+
msgid "D j M Y \a h:ia"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: classes/admin/class-admin-reports.php:198
|
232 |
+
msgid "No commission yet"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: classes/admin/class-admin-reports.php:232
|
236 |
+
msgid "Show:"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: classes/admin/class-admin-reports.php:244
|
240 |
+
msgid "Type in a product name to start searching..."
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: classes/admin/class-admin-reports.php:276
|
244 |
+
msgid "Select a vendor…"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: classes/admin/class-admin-reports.php:342
|
248 |
+
msgid "Month"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: classes/admin/class-admin-reports.php:344, classes/admin/class-wcv-commissions-csv-exporter.php:46, classes/admin/class-wcv-commissions-page.php:121
|
252 |
+
msgid "Tax"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: classes/admin/class-admin-reports.php:345, classes/admin/class-wcv-commissions-csv-exporter.php:45, classes/admin/class-wcv-commissions-page.php:120, templates/dashboard/orders.php:45, templates/orders/orders.php:113, classes/admin/settings/class-wcv-settings-capabilities.php:107
|
256 |
+
msgid "Shipping"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: classes/admin/class-admin-reports.php:457
|
260 |
+
msgid "Tax Total"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: classes/admin/class-admin-reports.php:458
|
264 |
+
msgid "Shipping Total"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: classes/admin/class-admin-reports.php:460
|
268 |
+
msgid "Commission Total"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: classes/admin/class-admin-reports.php:482
|
272 |
+
msgid "No commissions found."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: classes/admin/class-product-meta.php:151, classes/admin/class-product-meta.php:167, classes/admin/class-wcv-commissions-csv-exporter.php:44, classes/admin/class-wcv-commissions-page.php:119, templates/dashboard/reports.php:19, templates/emails/vendor-order-details.php:39, classes/admin/emails/class-wcv-vendor-notify-order.php:186, classes/admin/settings/class-wcv-settings-commission.php:31, classes/admin/views/html-admin-commission-page.php:23, classes/admin/views/setup/general.php:79
|
276 |
+
msgid "Commission"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: classes/admin/class-product-meta.php:174, classes/admin/views/html-vendor-meta.php:89
|
280 |
+
msgid "Leave blank for default"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: classes/admin/class-setup-wizard.php:69
|
284 |
+
msgid "Start"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: classes/admin/class-setup-wizard.php:74, classes/admin/settings/class-wcv-settings-capabilities.php:31
|
288 |
+
msgid "Capabilities"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: classes/admin/class-setup-wizard.php:79, classes/admin/settings/class-wcv-settings-display.php:138, classes/admin/views/setup/pages.php:19
|
292 |
+
msgid "Pages"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: classes/admin/class-setup-wizard.php:84
|
296 |
+
msgid "Ready!"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: classes/admin/class-setup-wizard.php:339
|
300 |
+
msgid "Don't forget to check our <a href=\"%1$s\" target=\"_blank\">documentation</a> to learn more about setting up WC Vendors and if you need help, be sure to visit our <a href=\"%2$s\" target=\"_blank\">free support forums</a>."
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: classes/admin/class-vendor-admin-dashboard.php:22, classes/admin/class-vendor-admin-dashboard.php:22, classes/admin/settings/class-wcv-settings-display.php:153
|
304 |
+
msgid "Shop Settings"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: classes/admin/class-vendor-admin-dashboard.php:23, classes/admin/class-vendor-admin-dashboard.php:23, classes/admin/class-vendor-admin-dashboard.php:209, templates/dashboard/orders.php:35, classes/admin/settings/class-wcv-settings-capabilities.php:45, classes/admin/settings/class-wcv-settings-capabilities.php:271, classes/admin/settings/class-wcv-settings-display.php:162, classes/admin/views/setup/capabilities.php:70
|
308 |
+
msgid "Orders"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: classes/admin/class-vendor-admin-dashboard.php:71, classes/front/dashboard/class-vendor-dashboard.php:117
|
312 |
+
msgid "Your PayPal address is not a valid email address."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: classes/admin/class-vendor-admin-dashboard.php:83, classes/front/dashboard/class-vendor-dashboard.php:128
|
316 |
+
msgid "That shop name is already taken. Your shop name must be unique."
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: classes/admin/class-vendor-admin-dashboard.php:141, classes/front/dashboard/class-vendor-dashboard.php:169
|
320 |
+
msgid "Settings saved."
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: classes/admin/class-vendor-admin-dashboard.php:272
|
324 |
+
msgid "order"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: classes/admin/class-vendor-admin-dashboard.php:273
|
328 |
+
msgid "orders"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: classes/admin/class-vendor-admin-dashboard.php:348, classes/admin/class-wcv-commissions-csv-exporter.php:42, classes/admin/class-wcv-commissions-page.php:117
|
332 |
+
msgid "Order ID"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: classes/admin/class-vendor-admin-dashboard.php:349
|
336 |
+
msgid "Customer"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: classes/admin/class-vendor-admin-dashboard.php:350, classes/admin/settings/class-wcv-settings-capabilities.php:44, classes/admin/settings/class-wcv-settings-capabilities.php:238, classes/admin/views/setup/capabilities.php:19
|
340 |
+
msgid "Products"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: classes/admin/class-vendor-admin-dashboard.php:353, classes/admin/class-wcv-commissions-csv-exporter.php:49, classes/admin/class-wcv-commissions-page.php:124, templates/dashboard/orders.php:47, classes/front/orders/class-orders.php:212
|
344 |
+
msgid "Date"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: classes/admin/class-vendor-admin-dashboard.php:354, templates/dashboard/orders.php:106
|
348 |
+
msgid "Shipped"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: classes/admin/class-vendor-admin-dashboard.php:390, templates/dashboard/orders.php:99
|
352 |
+
msgid "Mark shipped"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: classes/admin/class-vendor-admin-dashboard.php:416
|
356 |
+
msgid "Orders marked shipped."
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: classes/admin/class-vendor-admin-dashboard.php:573
|
360 |
+
msgid "Yes"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: classes/admin/class-vendor-admin-dashboard.php:573
|
364 |
+
msgid "No"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: classes/admin/class-vendor-applicants.php:74
|
368 |
+
msgid "Vendor has been <b>denied</b>."
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: classes/admin/class-vendor-applicants.php:85
|
372 |
+
msgid "Vendor has been <b>approved</b>."
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: classes/admin/class-vendor-applicants.php:99
|
376 |
+
msgid "Pending Vendors"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: classes/admin/class-wcv-admin-help.php:48
|
380 |
+
msgid "Help & Support"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: classes/admin/class-wcv-admin-help.php:50
|
384 |
+
msgid "Welcome to WC Vendors Help & Support"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: classes/admin/class-wcv-admin-help.php:53
|
388 |
+
msgid "Should you need any help with using or extending WC Vendors, <a href=\"%s\">please read our documentation</a>. You will find all kinds of resources including code snippets, guides and much more."
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: classes/admin/class-wcv-admin-help.php:58
|
392 |
+
msgid "Do you have a question about WC Vendors? For assistance please see our <a href=\"%1$s\">community forum</a>. If you need help with premium extensions sold by WC Vendors, please <a href=\"%2$s\">submit a ticket</a>."
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: classes/admin/class-wcv-admin-help.php:62
|
396 |
+
msgid "Before asking for help we recommend checking the system status page to identify any problems with your configuration. <strong>Anything showing red should be fixed before contacting us.</strong>"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: classes/admin/class-wcv-admin-help.php:63
|
400 |
+
msgid "Please follow our <a href=\"%s\">debuggin guide</a> to ensure that you have narrowed down the issue. "
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: classes/admin/class-wcv-admin-help.php:64, classes/admin/class-wcv-admin-help.php:82
|
404 |
+
msgid "System status"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: classes/admin/class-wcv-admin-help.php:64
|
408 |
+
msgid "Community forum"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: classes/admin/class-wcv-admin-help.php:64
|
412 |
+
msgid "WC Vendors Premium Support"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: classes/admin/class-wcv-admin-help.php:69, classes/admin/class-wcv-admin-help.php:71
|
416 |
+
msgid "Getting Started"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: classes/admin/class-wcv-admin-help.php:72
|
420 |
+
msgid "If you are new to WC Vendors then we highly recommend that you go through our <a href=\"%s\">getting started guides</a>."
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: classes/admin/class-wcv-admin-help.php:77, classes/admin/class-wcv-admin-help.php:79
|
424 |
+
msgid "Found a bug?"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: classes/admin/class-wcv-admin-help.php:81
|
428 |
+
msgid "If you think you have found a bug in WC Vendors you can create a ticket via <a href=\"%1$s\">Github issues</a>. To help us solve your issue, please be as descriptive as possible and include your <a href=\"%2$s\">system status report</a>."
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: classes/admin/class-wcv-admin-help.php:82
|
432 |
+
msgid "Report a bug"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: classes/admin/class-wcv-admin-help.php:90, classes/admin/class-wcv-admin-help.php:92, classes/admin/class-wcv-admin-help.php:94
|
436 |
+
msgid "Setup wizard"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: classes/admin/class-wcv-admin-help.php:93
|
440 |
+
msgid "If you need to access the setup wizard again, please click on the button below."
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: classes/admin/class-wcv-admin-help.php:100
|
444 |
+
msgid "Update"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: classes/admin/class-wcv-admin-help.php:102
|
448 |
+
msgid "Upgrade"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: classes/admin/class-wcv-admin-help.php:103
|
452 |
+
msgid "If you need to manually run the updates, please click on the button below."
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: classes/admin/class-wcv-admin-help.php:104
|
456 |
+
msgid "Run the updater"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: classes/admin/class-wcv-admin-help.php:109
|
460 |
+
msgid "For more information:"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: classes/admin/class-wcv-admin-help.php:110
|
464 |
+
msgid "Upgrade to Pro"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: classes/admin/class-wcv-admin-help.php:111
|
468 |
+
msgid "Buy extensions"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: classes/admin/class-wcv-admin-help.php:112
|
472 |
+
msgid "About WC Vendors"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: classes/admin/class-wcv-admin-help.php:113
|
476 |
+
msgid "WC Vendors on WordPress.org"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: classes/admin/class-wcv-admin-help.php:114
|
480 |
+
msgid "WC Vendors Github"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: classes/admin/class-wcv-admin-settings.php:68
|
484 |
+
msgid "Action failed. Please refresh the page and retry."
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: classes/admin/class-wcv-admin-settings.php:76
|
488 |
+
msgid "Your settings have been saved."
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: classes/admin/class-wcv-admin-settings.php:96
|
492 |
+
msgid "The changes you made will be lost if you navigate away from this page."
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: classes/admin/class-wcv-admin-settings.php:432, classes/includes/class-functions.php:55
|
496 |
+
msgid "Select a page…"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: classes/admin/class-wcv-admin-settings.php:454
|
500 |
+
msgid "Choose a country…"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: classes/admin/class-wcv-admin-settings.php:454, classes/admin/class-wcv-admin-settings.php:479
|
504 |
+
msgid "Country"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: classes/admin/class-wcv-admin-settings.php:479
|
508 |
+
msgid "Choose countries…"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: classes/admin/class-wcv-admin-settings.php:487
|
512 |
+
msgid "Select all"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: classes/admin/class-wcv-admin-settings.php:487
|
516 |
+
msgid "Select none"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: classes/admin/class-wcv-admin-settings.php:504
|
520 |
+
msgid "Update %s"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: classes/admin/class-wcv-admin-settings.php:504, classes/admin/class-wcv-admin-settings.php:504
|
524 |
+
msgid "Add %s"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: classes/admin/class-wcv-admin-settings.php:504
|
528 |
+
msgid "Upload an image for the %s"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: classes/admin/class-wcv-admin-setup.php:42
|
532 |
+
msgid "Vendors shipped"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: classes/admin/class-wcv-admin-setup.php:67
|
536 |
+
msgid "Vendors Shipped"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: classes/admin/class-wcv-admin-setup.php:93
|
540 |
+
msgid "Reset WC Vendors roles "
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: classes/admin/class-wcv-admin-setup.php:94
|
544 |
+
msgid "Reset WC Vendor Roles"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: classes/admin/class-wcv-admin-setup.php:95
|
548 |
+
msgid "This will reset the wcvendors roles ( vendor & pending_vendor ), back to the default capabilities."
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: classes/admin/class-wcv-admin-setup.php:100
|
552 |
+
msgid "Reset WC Vendors "
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: classes/admin/class-wcv-admin-setup.php:101
|
556 |
+
msgid "Reset WC Vendors Settings"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: classes/admin/class-wcv-admin-setup.php:102
|
560 |
+
msgid "This will reset wcvendors back to defaults. This DELETES ALL YOUR Settings."
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: classes/admin/class-wcv-admin-setup.php:148
|
564 |
+
msgid "WC Vendor roles successfully reset."
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: classes/admin/class-wcv-admin-setup.php:162
|
568 |
+
msgid "WC Vendors was successfully reset. All settings have been reset."
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: classes/admin/class-wcv-admin-setup.php:234
|
572 |
+
msgid "If you like %1$s please leave us a %2$s rating. A huge thanks in advance!"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: classes/admin/class-wcv-admin-setup.php:236
|
576 |
+
msgid "Thanks :)"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: classes/admin/class-wcv-commissions-page.php:166
|
580 |
+
msgid "Mark paid"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: classes/admin/class-wcv-commissions-page.php:167
|
584 |
+
msgid "Mark due"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: classes/admin/class-wcv-commissions-page.php:168
|
588 |
+
msgid "Mark reversed"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: classes/admin/class-wcv-commissions-page.php:203
|
592 |
+
msgid "Filter"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: classes/admin/class-wcv-commissions-page.php:204
|
596 |
+
msgid "Clear"
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: classes/admin/class-wcv-commissions-page.php:241
|
600 |
+
msgid "Show all dates"
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: classes/admin/class-wcv-commissions-page.php:276
|
604 |
+
msgid "Show all Statuses"
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: classes/admin/class-wcv-commissions-page.php:332
|
608 |
+
msgid "Commission marked paid."
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: classes/admin/class-wcv-commissions-page.php:339
|
612 |
+
msgid "Commission marked due."
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: classes/admin/class-wcv-commissions-page.php:346
|
616 |
+
msgid "Commission marked reversed."
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: classes/admin/class-wcv-commissions-page.php:542
|
620 |
+
msgid "All"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: classes/includes/class-functions.php:37
|
624 |
+
msgid "Vendors"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: classes/includes/wcv-template-functions.php:102
|
628 |
+
msgid "Commission subtotal:"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: classes/includes/wcv-template-functions.php:115
|
632 |
+
msgid "Product subtotal:"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: classes/includes/wcv-template-functions.php:123, classes/includes/wcv-template-functions.php:131
|
636 |
+
msgid "Shipping:"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: classes/includes/wcv-template-functions.php:139
|
640 |
+
msgid "Payment method:"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: classes/includes/wcv-template-functions.php:148
|
644 |
+
msgid "Commission total:"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: classes/includes/wcv-template-functions.php:158
|
648 |
+
msgid "Product total:"
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: classes/includes/wcv-update-functions.php:104
|
652 |
+
msgid "WC Vendors legacy emails are enabled. Please migrate your email templates to the new system. <a href=\"%s\">Click here to view your email settings.</a>"
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: templates/dashboard/denied.php:5
|
656 |
+
msgid "Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: templates/dashboard/denied.php:9
|
660 |
+
msgid "Your account is not setup as a vendor."
|
661 |
+
msgstr ""
|
662 |
+
|
663 |
+
#: templates/dashboard/denied.php:19, classes/front/signup/views/html-vendor-signup.php:22
|
664 |
+
msgid "Apply to become a vendor? "
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: templates/dashboard/denied.php:30
|
668 |
+
msgid "I have read and accepted the <a href=\"%s\">terms and conditions</a>"
|
669 |
+
msgstr ""
|
670 |
+
|
671 |
+
#: templates/dashboard/denied.php:50
|
672 |
+
msgid "Submit"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: templates/dashboard/links.php:3
|
676 |
+
msgid "View Your Store"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: templates/dashboard/links.php:4, classes/admin/settings/class-wcv-settings-display.php:193
|
680 |
+
msgid "Store Settings"
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: templates/dashboard/links.php:7
|
684 |
+
msgid "Add New Product"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: templates/dashboard/links.php:8
|
688 |
+
msgid "Edit Products"
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: templates/dashboard/orders.php:18, templates/dashboard/orders.php:21
|
692 |
+
msgid "Hide items"
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: templates/dashboard/orders.php:19, templates/dashboard/orders.php:93
|
696 |
+
msgid "View items"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: templates/dashboard/orders.php:48
|
700 |
+
msgid "Links"
|
701 |
+
msgstr ""
|
702 |
+
|
703 |
+
#: templates/dashboard/orders.php:114
|
704 |
+
msgid "Tracking"
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: templates/dashboard/orders.php:188
|
708 |
+
msgid "You have no orders during this period."
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: templates/dashboard/reports.php:1
|
712 |
+
msgid "Sales Report"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: templates/dashboard/reports.php:18, templates/emails/notify-vendor-shipped.php:28, templates/emails/vendor-new-order.php:32, templates/emails/vendor-order-details.php:37, classes/front/orders/class-export-csv.php:19
|
716 |
+
msgid "Quantity"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: templates/dashboard/reports.php:20
|
720 |
+
msgid "Rate"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: templates/dashboard/reports.php:47
|
724 |
+
msgid "Show Orders"
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: templates/dashboard/reports.php:56
|
728 |
+
msgid "Totals"
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: templates/dashboard/reports.php:71
|
732 |
+
msgid "You have no sales during this period."
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: templates/dashboard/reports.php:82
|
736 |
+
msgid "You haven't made any sales yet."
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: templates/emails/admin-notify-application.php:19, templates/emails/application-status.php:8, templates/emails/vendor-notify-application.php:22, templates/emails/plain/admin-notify-application.php:19, templates/emails/plain/vendor-notify-application.php:19
|
740 |
+
msgid "Hi there. This is a notification about a vendor application on %s."
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: templates/emails/admin-notify-application.php:21
|
744 |
+
msgid "The application is currently: %s"
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: templates/emails/admin-notify-application.php:22, templates/emails/application-status.php:12, templates/emails/vendor-notify-application.php:24, templates/emails/vendor-notify-approved.php:24, templates/emails/vendor-notify-denied.php:24, templates/emails/plain/admin-notify-application.php:20, templates/emails/plain/vendor-notify-application.php:21
|
748 |
+
msgid "Applicant username: %s"
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: templates/emails/admin-notify-application.php:26, templates/emails/plain/admin-notify-application.php:23
|
752 |
+
msgid "You can approve or deny the application at the following link %s"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: templates/emails/admin-notify-product.php:19, templates/emails/plain/admin-notify-product.php:21
|
756 |
+
msgid "This is a notification about a new product on %s."
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: templates/emails/admin-notify-product.php:22, templates/emails/new-product.php:11, templates/emails/plain/admin-notify-product.php:23
|
760 |
+
msgid "Product title: %s"
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: templates/emails/admin-notify-product.php:23, templates/emails/new-product.php:12, templates/emails/plain/admin-notify-product.php:24
|
764 |
+
msgid "Submitted by: %s"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: templates/emails/admin-notify-product.php:24, templates/emails/new-product.php:13, templates/emails/plain/admin-notify-product.php:25
|
768 |
+
msgid "Edit product: %s"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: templates/emails/application-status.php:11
|
772 |
+
msgid "Application status: %s"
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: templates/emails/new-product.php:8
|
776 |
+
msgid "Hi there. This is a notification about a new product on %s."
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: templates/emails/notify-vendor-shipped.php:18
|
780 |
+
msgid "A vendor has marked part of your order as shipped. The items that are shipped are as follows:"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: templates/emails/notify-vendor-shipped.php:22, templates/emails/vendor-new-order.php:26
|
784 |
+
msgid "Order: %s"
|
785 |
+
msgstr ""
|
786 |
+
|
787 |
+
#: templates/emails/notify-vendor-shipped.php:29, templates/emails/vendor-new-order.php:33, templates/emails/vendor-order-details.php:42
|
788 |
+
msgid "Price"
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: templates/emails/notify-vendor-shipped.php:61, templates/emails/vendor-new-order.php:81
|
792 |
+
msgid "Customer details"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: templates/emails/notify-vendor-shipped.php:64, templates/emails/vendor-new-order.php:84
|
796 |
+
msgid "Email:"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: templates/emails/notify-vendor-shipped.php:67, templates/emails/vendor-new-order.php:87
|
800 |
+
msgid "Tel:"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: templates/emails/vendor-new-order.php:22
|
804 |
+
msgid "You have received an order from %s. Their order is as follows:"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: templates/emails/vendor-notify-application.php:23
|
808 |
+
msgid "Your application is currently: %s"
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#. translators: %s: Order ID.
|
812 |
+
#: templates/emails/vendor-order-details.php:28
|
813 |
+
msgid "Order #%s"
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: templates/emails/vendor-order-details.php:81, templates/emails/plain/vendor-order-details.php:45
|
817 |
+
msgid "Note:"
|
818 |
+
msgstr ""
|
819 |
+
|
820 |
+
#: templates/emails/vendor-order-items.php:30
|
821 |
+
msgid "Product image"
|
822 |
+
msgstr ""
|
823 |
+
|
824 |
+
#: templates/orders/csv-export.php:6
|
825 |
+
msgid "Export orders"
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: templates/orders/orders.php:82
|
829 |
+
msgid "Comments (%s)"
|
830 |
+
msgstr ""
|
831 |
+
|
832 |
+
#: templates/orders/table-body.php:37
|
833 |
+
msgid "Quantity: %d"
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: classes/admin/emails/class-emails.php:73, classes/admin/emails/class-emails.php:197, classes/admin/emails/class-wc-approve-vendor.php:70
|
837 |
+
msgid "pending"
|
838 |
+
msgstr ""
|
839 |
+
|
840 |
+
#: classes/admin/emails/class-emails.php:75
|
841 |
+
msgid "approved"
|
842 |
+
msgstr ""
|
843 |
+
|
844 |
+
#: classes/admin/emails/class-emails.php:77
|
845 |
+
msgid "denied"
|
846 |
+
msgstr ""
|
847 |
+
|
848 |
+
#: classes/admin/emails/class-emails.php:147
|
849 |
+
msgid "Resend %s new order notification"
|
850 |
+
msgstr ""
|
851 |
+
|
852 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:28
|
853 |
+
msgid "Vendor Application"
|
854 |
+
msgstr ""
|
855 |
+
|
856 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:29
|
857 |
+
msgid "Vendor application will either be approved, denied, or pending. <strong>This email has been depreciated.</strong>"
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:31
|
861 |
+
msgid "Application {status}"
|
862 |
+
msgstr ""
|
863 |
+
|
864 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:32
|
865 |
+
msgid "[{blogname}] Your vendor application has been {status}"
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:123, classes/admin/emails/class-wc-notify-admin.php:134, classes/admin/emails/class-wc-notify-shipped.php:166, classes/admin/emails/class-wc-notify-vendor.php:268, classes/admin/emails/class-wcv-admin-notify-application.php:127, classes/admin/emails/class-wcv-admin-notify-product.php:146, classes/admin/emails/class-wcv-admin-notify-shipped.php:135, classes/admin/emails/class-wcv-customer-notify-shipped.php:142, classes/admin/emails/class-wcv-vendor-notify-application.php:129, classes/admin/emails/class-wcv-vendor-notify-approved.php:138, classes/admin/emails/class-wcv-vendor-notify-denied.php:148, classes/admin/emails/class-wcv-vendor-notify-order.php:155, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:62
|
869 |
+
msgid "Enable/Disable"
|
870 |
+
msgstr ""
|
871 |
+
|
872 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:125, classes/admin/emails/class-wc-notify-admin.php:136, classes/admin/emails/class-wc-notify-shipped.php:168, classes/admin/emails/class-wc-notify-vendor.php:270, classes/admin/emails/class-wcv-admin-notify-application.php:129, classes/admin/emails/class-wcv-admin-notify-product.php:148, classes/admin/emails/class-wcv-admin-notify-shipped.php:137, classes/admin/emails/class-wcv-customer-notify-shipped.php:144, classes/admin/emails/class-wcv-vendor-notify-application.php:131, classes/admin/emails/class-wcv-vendor-notify-approved.php:140, classes/admin/emails/class-wcv-vendor-notify-denied.php:150, classes/admin/emails/class-wcv-vendor-notify-order.php:157
|
873 |
+
msgid "Enable this email notification"
|
874 |
+
msgstr ""
|
875 |
+
|
876 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:131
|
877 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to <code>%s</code>."
|
878 |
+
msgstr ""
|
879 |
+
|
880 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:136, classes/admin/emails/class-wc-notify-admin.php:147, classes/admin/emails/class-wc-notify-shipped.php:172, classes/admin/emails/class-wc-notify-vendor.php:274, classes/admin/emails/class-wcv-admin-notify-application.php:141, classes/admin/emails/class-wcv-admin-notify-product.php:160, classes/admin/emails/class-wcv-admin-notify-shipped.php:149, classes/admin/emails/class-wcv-customer-notify-shipped.php:148, classes/admin/emails/class-wcv-vendor-notify-application.php:135, classes/admin/emails/class-wcv-vendor-notify-approved.php:144, classes/admin/emails/class-wcv-vendor-notify-denied.php:154, classes/admin/emails/class-wcv-vendor-notify-order.php:161
|
881 |
+
msgid "Subject"
|
882 |
+
msgstr ""
|
883 |
+
|
884 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:138, classes/admin/emails/class-wc-notify-admin.php:149, classes/admin/emails/class-wc-notify-shipped.php:174, classes/admin/emails/class-wc-notify-vendor.php:276
|
885 |
+
msgid "This controls the email subject line. Leave blank to use the default subject: <code>%s</code>."
|
886 |
+
msgstr ""
|
887 |
+
|
888 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:143, classes/admin/emails/class-wc-notify-admin.php:154, classes/admin/emails/class-wc-notify-shipped.php:179, classes/admin/emails/class-wc-notify-vendor.php:281
|
889 |
+
msgid "Email Heading"
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:145, classes/admin/emails/class-wc-notify-admin.php:156, classes/admin/emails/class-wc-notify-shipped.php:181, classes/admin/emails/class-wc-notify-vendor.php:283
|
893 |
+
msgid "This controls the main heading contained within the email notification. Leave blank to use the default heading: <code>%s</code>."
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:150, classes/admin/emails/class-wc-notify-admin.php:161, classes/admin/emails/class-wc-notify-shipped.php:186, classes/admin/emails/class-wc-notify-vendor.php:294, classes/admin/emails/class-wcv-admin-notify-application.php:171, classes/admin/emails/class-wcv-admin-notify-product.php:178, classes/admin/emails/class-wcv-admin-notify-shipped.php:167, classes/admin/emails/class-wcv-customer-notify-shipped.php:166, classes/admin/emails/class-wcv-vendor-notify-application.php:153, classes/admin/emails/class-wcv-vendor-notify-approved.php:171, classes/admin/emails/class-wcv-vendor-notify-denied.php:189, classes/admin/emails/class-wcv-vendor-notify-order.php:199
|
897 |
+
msgid "Email type"
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:152, classes/admin/emails/class-wc-notify-admin.php:163, classes/admin/emails/class-wc-notify-shipped.php:188, classes/admin/emails/class-wc-notify-vendor.php:296, classes/admin/emails/class-wcv-admin-notify-application.php:173, classes/admin/emails/class-wcv-admin-notify-product.php:180, classes/admin/emails/class-wcv-admin-notify-shipped.php:169, classes/admin/emails/class-wcv-customer-notify-shipped.php:168, classes/admin/emails/class-wcv-vendor-notify-application.php:155, classes/admin/emails/class-wcv-vendor-notify-approved.php:173, classes/admin/emails/class-wcv-vendor-notify-denied.php:191, classes/admin/emails/class-wcv-vendor-notify-order.php:201
|
901 |
+
msgid "Choose which format of email to send."
|
902 |
+
msgstr ""
|
903 |
+
|
904 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:156, classes/admin/emails/class-wc-notify-admin.php:167, classes/admin/emails/class-wc-notify-shipped.php:192, classes/admin/emails/class-wc-notify-vendor.php:300
|
905 |
+
msgid "Plain text"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:157, classes/admin/emails/class-wc-notify-admin.php:168, classes/admin/emails/class-wc-notify-shipped.php:193, classes/admin/emails/class-wc-notify-vendor.php:301
|
909 |
+
msgid "HTML"
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: classes/admin/emails/class-wc-approve-vendor.php:158, classes/admin/emails/class-wc-notify-admin.php:169, classes/admin/emails/class-wc-notify-shipped.php:194, classes/admin/emails/class-wc-notify-vendor.php:302
|
913 |
+
msgid "Multipart"
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: classes/admin/emails/class-wc-notify-admin.php:28
|
917 |
+
msgid "New Vendor Product"
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: classes/admin/emails/class-wc-notify-admin.php:29
|
921 |
+
msgid "New order emails are sent when a new product is submitted by a vendor. <strong>This email has been depreciated.</strong>"
|
922 |
+
msgstr ""
|
923 |
+
|
924 |
+
#: classes/admin/emails/class-wc-notify-admin.php:31
|
925 |
+
msgid "New product submitted: {product_name}"
|
926 |
+
msgstr ""
|
927 |
+
|
928 |
+
#: classes/admin/emails/class-wc-notify-admin.php:32
|
929 |
+
msgid "[{blogname}] New product submitted by {vendor_name} - {product_name}"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:28
|
933 |
+
msgid "Vendor has shipped"
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:29
|
937 |
+
msgid "An email is sent when a vendor has marked one of their orders as shipped. <strong>This email has been depreciated.</strong>"
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:31
|
941 |
+
msgid "Your order has been shipped"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:32
|
945 |
+
msgid "[{blogname}] Your order has been shipped ({order_number}) - {order_date}"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: classes/admin/emails/class-wc-notify-shipped.php:115
|
949 |
+
msgid "Subtotal:"
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:27
|
953 |
+
msgid "Notify vendors"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:28
|
957 |
+
msgid "New order emails are sent when an order is received/paid by a customer. <strong>This email has been depreciated.</strong>"
|
958 |
+
msgstr ""
|
959 |
+
|
960 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:30
|
961 |
+
msgid "New customer order"
|
962 |
+
msgstr ""
|
963 |
+
|
964 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:31
|
965 |
+
msgid "[{blogname}] New customer order ({order_number}) - {order_date}"
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:107
|
969 |
+
msgid "Commission Subtotal:"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:113
|
973 |
+
msgid "Tax Subtotal:"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:121
|
977 |
+
msgid "Shipping Subtotal:"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:288
|
981 |
+
msgid "Product Totals"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: classes/admin/emails/class-wc-notify-vendor.php:290
|
985 |
+
msgid "Show the commission due/paid as the product totals instead of the product prices."
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:27
|
989 |
+
msgid "Admin notify vendor application"
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:28
|
993 |
+
msgid "Notification is sent to chosen recipient(s) when a user applies to be a %s"
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:51
|
997 |
+
msgid "[{site_title}] {user_name} has applied to be a %s"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:61
|
1001 |
+
msgid "%s application received"
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:133, classes/admin/emails/class-wcv-admin-notify-product.php:152, classes/admin/emails/class-wcv-admin-notify-shipped.php:141
|
1005 |
+
msgid "Recipient(s)"
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:135, classes/admin/emails/class-wcv-admin-notify-product.php:154, classes/admin/emails/class-wcv-admin-notify-shipped.php:143
|
1009 |
+
msgid "Enter recipients (comma separated) for this email. Defaults to %s."
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:145, classes/admin/emails/class-wcv-admin-notify-application.php:154, classes/admin/emails/class-wcv-admin-notify-product.php:164, classes/admin/emails/class-wcv-admin-notify-product.php:173, classes/admin/emails/class-wcv-admin-notify-shipped.php:153, classes/admin/emails/class-wcv-admin-notify-shipped.php:162, classes/admin/emails/class-wcv-customer-notify-shipped.php:152, classes/admin/emails/class-wcv-customer-notify-shipped.php:161, classes/admin/emails/class-wcv-vendor-notify-application.php:139, classes/admin/emails/class-wcv-vendor-notify-application.php:148, classes/admin/emails/class-wcv-vendor-notify-approved.php:148, classes/admin/emails/class-wcv-vendor-notify-approved.php:166, classes/admin/emails/class-wcv-vendor-notify-denied.php:158, classes/admin/emails/class-wcv-vendor-notify-denied.php:167, classes/admin/emails/class-wcv-vendor-notify-denied.php:184, classes/admin/emails/class-wcv-vendor-notify-order.php:165, classes/admin/emails/class-wcv-vendor-notify-order.php:174
|
1013 |
+
msgid "Available placeholders: %s"
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:150, classes/admin/emails/class-wcv-admin-notify-product.php:169, classes/admin/emails/class-wcv-admin-notify-shipped.php:158, classes/admin/emails/class-wcv-customer-notify-shipped.php:157, classes/admin/emails/class-wcv-vendor-notify-application.php:144, classes/admin/emails/class-wcv-vendor-notify-approved.php:162, classes/admin/emails/class-wcv-vendor-notify-denied.php:180, classes/admin/emails/class-wcv-vendor-notify-order.php:170
|
1017 |
+
msgid "Email heading"
|
1018 |
+
msgstr ""
|
1019 |
+
|
1020 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:159
|
1021 |
+
msgid "Notification"
|
1022 |
+
msgstr ""
|
1023 |
+
|
1024 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:161
|
1025 |
+
msgid "Choose when to be notified of an application."
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:165
|
1029 |
+
msgid "All Applications"
|
1030 |
+
msgstr ""
|
1031 |
+
|
1032 |
+
#: classes/admin/emails/class-wcv-admin-notify-application.php:166
|
1033 |
+
msgid "Pending Applications"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: classes/admin/emails/class-wcv-admin-notify-product.php:27
|
1037 |
+
msgid "Admin new %s product"
|
1038 |
+
msgstr ""
|
1039 |
+
|
1040 |
+
#: classes/admin/emails/class-wcv-admin-notify-product.php:28
|
1041 |
+
msgid "Notification is sent to chosen recipient(s) when a %s submits a product for approval."
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: classes/admin/emails/class-wcv-admin-notify-product.php:57
|
1045 |
+
msgid "[{site_title}] New %s product submitted by {vendor_name} - {product_name}"
|
1046 |
+
msgstr ""
|
1047 |
+
|
1048 |
+
#: classes/admin/emails/class-wcv-admin-notify-product.php:67
|
1049 |
+
msgid "New %s product submitted: {product_name}"
|
1050 |
+
msgstr ""
|
1051 |
+
|
1052 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:27
|
1053 |
+
msgid "Admin notify %s shipped"
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:28
|
1057 |
+
msgid "Notification is sent to chosen recipient(s) when a %s marks an order shipped."
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:52, classes/admin/emails/class-wcv-customer-notify-shipped.php:51
|
1061 |
+
msgid "[{site_title}] %s has marked shipped ({order_number}) - {order_date}"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: classes/admin/emails/class-wcv-admin-notify-shipped.php:62, classes/admin/emails/class-wcv-customer-notify-shipped.php:61
|
1065 |
+
msgid "%s has shipped"
|
1066 |
+
msgstr ""
|
1067 |
+
|
1068 |
+
#: classes/admin/emails/class-wcv-customer-notify-shipped.php:28
|
1069 |
+
msgid "Customer %s shipped"
|
1070 |
+
msgstr ""
|
1071 |
+
|
1072 |
+
#: classes/admin/emails/class-wcv-customer-notify-shipped.php:29
|
1073 |
+
msgid "Email is sent to the customer when a %s marks an order received/paid by a customer."
|
1074 |
+
msgstr ""
|
1075 |
+
|
1076 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:27
|
1077 |
+
msgid "Vendor notify application"
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:28
|
1081 |
+
msgid "Notification is sent to the vendor that their application has been received"
|
1082 |
+
msgstr ""
|
1083 |
+
|
1084 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:48
|
1085 |
+
msgid "[{site_title}] Your vendor application has been received"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:58
|
1089 |
+
msgid "Vendor application received"
|
1090 |
+
msgstr ""
|
1091 |
+
|
1092 |
+
#: classes/admin/emails/class-wcv-vendor-notify-application.php:62
|
1093 |
+
msgid "Hi there. This is a notification about a %s application on %s."
|
1094 |
+
msgstr ""
|
1095 |
+
|
1096 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:27
|
1097 |
+
msgid "%s notify approved"
|
1098 |
+
msgstr ""
|
1099 |
+
|
1100 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:28
|
1101 |
+
msgid "Notification is sent to the %s that their application has been approved"
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:48
|
1105 |
+
msgid "[{site_title}] Your vendor application has been approved"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:58
|
1109 |
+
msgid "%s Application Approved"
|
1110 |
+
msgstr ""
|
1111 |
+
|
1112 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:68
|
1113 |
+
msgid "Your application to become a %s has been approved."
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: classes/admin/emails/class-wcv-vendor-notify-approved.php:153, classes/admin/emails/class-wcv-vendor-notify-denied.php:163
|
1117 |
+
msgid "Content"
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:27
|
1121 |
+
msgid "%s notify denied"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:28
|
1125 |
+
msgid "Notification is sent to the %s that their application has been denied"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:48
|
1129 |
+
msgid "[{site_title}] Your %s application has been denied"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:58
|
1133 |
+
msgid "%s Application Denied"
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:68
|
1137 |
+
msgid "Your application to become a %s has been denied."
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:78
|
1141 |
+
msgid "We are not taking any new applications at this time."
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:172
|
1145 |
+
msgid "Reason"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: classes/admin/emails/class-wcv-vendor-notify-denied.php:175
|
1149 |
+
msgid "Provide a reason for denying the %s application"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:27
|
1153 |
+
msgid "%s notify order"
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:28
|
1157 |
+
msgid "Notification is sent to %s when an order is paid."
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:57
|
1161 |
+
msgid "[{site_title}] New Customer Order ({order_number}) - {order_date}"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:67
|
1165 |
+
msgid "New Customer Order"
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:179
|
1169 |
+
msgid "Totals Display"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:181
|
1173 |
+
msgid "Choose how to display the product totals. Including commission or without or no totals at all."
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:185
|
1177 |
+
msgid "Both"
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:188
|
1181 |
+
msgid "None"
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:193
|
1185 |
+
msgid "Payment method"
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: classes/admin/emails/class-wcv-vendor-notify-order.php:195
|
1189 |
+
msgid "Include the payment method in the email"
|
1190 |
+
msgstr ""
|
1191 |
+
|
1192 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:43, classes/admin/settings/class-wcv-settings-capabilities.php:105, classes/admin/settings/class-wcv-settings-commission.php:43, classes/admin/settings/class-wcv-settings-display.php:43, classes/admin/settings/class-wcv-settings-general.php:31, classes/admin/settings/class-wcv-settings-general.php:43, classes/admin/settings/class-wcv-settings-payments.php:44, classes/admin/views/setup/general.php:19
|
1193 |
+
msgid "General"
|
1194 |
+
msgstr ""
|
1195 |
+
|
1196 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:63
|
1197 |
+
msgid "Add / Edit Product"
|
1198 |
+
msgstr ""
|
1199 |
+
|
1200 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:65
|
1201 |
+
msgid "Configure what product information to hide from a %s when creating or editing a product"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:70
|
1205 |
+
msgid "Product Types"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:71
|
1209 |
+
msgid "This controls what product types a %s can create"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:82
|
1213 |
+
msgid "Product Type Options"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:83
|
1217 |
+
msgid "This controls what product type options a %s can use"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:90
|
1221 |
+
msgid "Virtual"
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:91
|
1225 |
+
msgid "Downloadable"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:97
|
1229 |
+
msgid "Product Data Tabs"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:98
|
1233 |
+
msgid "This controls what product data tabs a %s can use"
|
1234 |
+
msgstr ""
|
1235 |
+
|
1236 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:106
|
1237 |
+
msgid "Inventory"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:108
|
1241 |
+
msgid "Linked Products"
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:109
|
1245 |
+
msgid "Attributes"
|
1246 |
+
msgstr ""
|
1247 |
+
|
1248 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:110
|
1249 |
+
msgid "Variations"
|
1250 |
+
msgstr ""
|
1251 |
+
|
1252 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:111, classes/admin/settings/class-wcv-settings-display.php:45
|
1253 |
+
msgid "Advanced"
|
1254 |
+
msgstr ""
|
1255 |
+
|
1256 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:118
|
1257 |
+
msgid "Featured Product"
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:119
|
1261 |
+
msgid "Allow %s to use the featured product option"
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:126
|
1265 |
+
msgid "Duplicate Product"
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:127
|
1269 |
+
msgid "Allow %s to duplicate products"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:134
|
1273 |
+
msgid "SKU"
|
1274 |
+
msgstr ""
|
1275 |
+
|
1276 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:135
|
1277 |
+
msgid "Hide sku field from %s"
|
1278 |
+
msgstr ""
|
1279 |
+
|
1280 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:142
|
1281 |
+
msgid "Taxes"
|
1282 |
+
msgstr ""
|
1283 |
+
|
1284 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:143
|
1285 |
+
msgid "Hide tax fields from %s"
|
1286 |
+
msgstr ""
|
1287 |
+
|
1288 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:159
|
1289 |
+
msgid "Configure what order information a %s can view from an order"
|
1290 |
+
msgstr ""
|
1291 |
+
|
1292 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:164
|
1293 |
+
msgid "View Order Notes"
|
1294 |
+
msgstr ""
|
1295 |
+
|
1296 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:165, classes/admin/views/setup/capabilities.php:102
|
1297 |
+
msgid "Allow %s to view order notes"
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:172
|
1301 |
+
msgid "Add Order notes"
|
1302 |
+
msgstr ""
|
1303 |
+
|
1304 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:173, classes/admin/views/setup/capabilities.php:115
|
1305 |
+
msgid "Allow %s to add order notes."
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:180
|
1309 |
+
msgid "Customer Name"
|
1310 |
+
msgstr ""
|
1311 |
+
|
1312 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:181
|
1313 |
+
msgid "Allow %s to view customer name fields"
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:188
|
1317 |
+
msgid "Customer Billing Address"
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:189
|
1321 |
+
msgid "Allow %s to view customer billing address fields"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:196
|
1325 |
+
msgid "Customer Shipping Address"
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:197
|
1329 |
+
msgid "Allow %s to view the customer shipping fields"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:204
|
1333 |
+
msgid "Customer Email"
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:205
|
1337 |
+
msgid "Allow %s to view the customer email address"
|
1338 |
+
msgstr ""
|
1339 |
+
|
1340 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:212
|
1341 |
+
msgid "Customer Phone"
|
1342 |
+
msgstr ""
|
1343 |
+
|
1344 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:213
|
1345 |
+
msgid "Allow %s to view the customer phone number"
|
1346 |
+
msgstr ""
|
1347 |
+
|
1348 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:228
|
1349 |
+
msgid "Permissions"
|
1350 |
+
msgstr ""
|
1351 |
+
|
1352 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:230
|
1353 |
+
msgid "Enable or disable functionality for your %s"
|
1354 |
+
msgstr ""
|
1355 |
+
|
1356 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:244
|
1357 |
+
msgid "Submit Products"
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:245, classes/admin/views/setup/capabilities.php:25
|
1361 |
+
msgid "Allow %s to add/edit products"
|
1362 |
+
msgstr ""
|
1363 |
+
|
1364 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:252
|
1365 |
+
msgid "Edit Live Products"
|
1366 |
+
msgstr ""
|
1367 |
+
|
1368 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:253, classes/admin/views/setup/capabilities.php:38
|
1369 |
+
msgid "Allow %s to edit published (live) products"
|
1370 |
+
msgstr ""
|
1371 |
+
|
1372 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:260
|
1373 |
+
msgid "Publish Approval"
|
1374 |
+
msgstr ""
|
1375 |
+
|
1376 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:261
|
1377 |
+
msgid "Allow %s to publish products directly to the marketplace without requiring approval."
|
1378 |
+
msgstr ""
|
1379 |
+
|
1380 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:277
|
1381 |
+
msgid "View Orders"
|
1382 |
+
msgstr ""
|
1383 |
+
|
1384 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:278, classes/admin/views/setup/capabilities.php:76
|
1385 |
+
msgid "Allow %s to view orders"
|
1386 |
+
msgstr ""
|
1387 |
+
|
1388 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:285
|
1389 |
+
msgid "Export Orders"
|
1390 |
+
msgstr ""
|
1391 |
+
|
1392 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:286, classes/admin/views/setup/capabilities.php:89
|
1393 |
+
msgid "Allow %s to export their orders to a CSV file"
|
1394 |
+
msgstr ""
|
1395 |
+
|
1396 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:293
|
1397 |
+
msgid "Front End Sales Reports"
|
1398 |
+
msgstr ""
|
1399 |
+
|
1400 |
+
#: classes/admin/settings/class-wcv-settings-capabilities.php:294
|
1401 |
+
msgid "Allow %s to view sales table on the frontend on the %s dashboard page."
|
1402 |
+
msgstr ""
|
1403 |
+
|
1404 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:65
|
1405 |
+
msgid "These are the commission settings for your marketplace"
|
1406 |
+
msgstr ""
|
1407 |
+
|
1408 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:69
|
1409 |
+
msgid "%s Commission %%"
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: classes/admin/settings/class-wcv-settings-commission.php:70
|
1413 |
+
msgid "The global commission rate for your %s"
|
1414 |
+
msgstr ""
|
1415 |
+
|
1416 |
+
#: classes/admin/settings/class-wcv-settings-display.php:31
|
1417 |
+
msgid "Display"
|
1418 |
+
msgstr ""
|
1419 |
+
|
1420 |
+
#: classes/admin/settings/class-wcv-settings-display.php:44
|
1421 |
+
msgid "Labels"
|
1422 |
+
msgstr ""
|
1423 |
+
|
1424 |
+
#: classes/admin/settings/class-wcv-settings-display.php:64, classes/admin/settings/class-wcv-settings-display.php:89, classes/admin/settings/class-wcv-settings-payments.php:65, classes/admin/settings/class-wcv-settings-payments.php:73, classes/admin/settings/class-wcv-settings-payments.php:123
|
1425 |
+
msgstr ""
|
1426 |
+
|
1427 |
+
#: classes/admin/settings/class-wcv-settings-display.php:66
|
1428 |
+
msgid "Advanced options provide extra display options"
|
1429 |
+
msgstr ""
|
1430 |
+
|
1431 |
+
#: classes/admin/settings/class-wcv-settings-display.php:70
|
1432 |
+
msgid "Product Page Stylesheet"
|
1433 |
+
msgstr ""
|
1434 |
+
|
1435 |
+
#: classes/admin/settings/class-wcv-settings-display.php:71
|
1436 |
+
msgid "You can add CSS in this textarea, which will be loaded on the product add/edit page for vendors"
|
1437 |
+
msgstr ""
|
1438 |
+
|
1439 |
+
#: classes/admin/settings/class-wcv-settings-display.php:72, classes/admin/settings/class-wcv-settings-display.php:98
|
1440 |
+
msgid "This enables the sold by labels used to show which %s shop the product belongs to"
|
1441 |
+
msgstr ""
|
1442 |
+
|
1443 |
+
#: classes/admin/settings/class-wcv-settings-display.php:91
|
1444 |
+
msgid "Labels are shown on the front end, in orders or emails."
|
1445 |
+
msgstr ""
|
1446 |
+
|
1447 |
+
#: classes/admin/settings/class-wcv-settings-display.php:96
|
1448 |
+
msgid "Sold by"
|
1449 |
+
msgstr ""
|
1450 |
+
|
1451 |
+
#: classes/admin/settings/class-wcv-settings-display.php:97
|
1452 |
+
msgid "Enable sold by labels"
|
1453 |
+
msgstr ""
|
1454 |
+
|
1455 |
+
#: classes/admin/settings/class-wcv-settings-display.php:105
|
1456 |
+
msgid "Sold by label"
|
1457 |
+
msgstr ""
|
1458 |
+
|
1459 |
+
#: classes/admin/settings/class-wcv-settings-display.php:106
|
1460 |
+
msgid "The sold by label"
|
1461 |
+
msgstr ""
|
1462 |
+
|
1463 |
+
#: classes/admin/settings/class-wcv-settings-display.php:109
|
1464 |
+
msgid "Sold By"
|
1465 |
+
msgstr ""
|
1466 |
+
|
1467 |
+
#: classes/admin/settings/class-wcv-settings-display.php:113
|
1468 |
+
msgid "%s Store Info"
|
1469 |
+
msgstr ""
|
1470 |
+
|
1471 |
+
#: classes/admin/settings/class-wcv-settings-display.php:114
|
1472 |
+
msgid "Enable %s store info tab on the single product page"
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: classes/admin/settings/class-wcv-settings-display.php:121
|
1476 |
+
msgid "%s store Info label"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: classes/admin/settings/class-wcv-settings-display.php:122
|
1480 |
+
msgid "The %s store info label"
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: classes/admin/settings/class-wcv-settings-display.php:125
|
1484 |
+
msgid "Store Info"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: classes/admin/settings/class-wcv-settings-display.php:140
|
1488 |
+
msgid "These pages used on the front end by %s."
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
+
#: classes/admin/settings/class-wcv-settings-display.php:144
|
1492 |
+
msgid "Dashboard"
|
1493 |
+
msgstr ""
|
1494 |
+
|
1495 |
+
#: classes/admin/settings/class-wcv-settings-display.php:150
|
1496 |
+
msgid "<br />This sets the page used to display the front end %s dashboard. This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>"
|
1497 |
+
msgstr ""
|
1498 |
+
|
1499 |
+
#: classes/admin/settings/class-wcv-settings-display.php:159
|
1500 |
+
msgid "<br />This sets the page used to display the %s shop settings page. This page should contain the following shortcode. <code>[wcv_shop_settings]</code>"
|
1501 |
+
msgstr ""
|
1502 |
+
|
1503 |
+
#: classes/admin/settings/class-wcv-settings-display.php:168
|
1504 |
+
msgid "<br />This sets the page used to display the %s orders page. This page should contain the following shortcode. <code>[wcv_orders]</code>"
|
1505 |
+
msgstr ""
|
1506 |
+
|
1507 |
+
#: classes/admin/settings/class-wcv-settings-display.php:171
|
1508 |
+
msgid "%s"
|
1509 |
+
msgstr ""
|
1510 |
+
|
1511 |
+
#: classes/admin/settings/class-wcv-settings-display.php:177
|
1512 |
+
msgid "<br />This sets the page used to display a paginated list of all %1$s stores. Your %1$s stores will be available at <code>%2$s/page-slug/store-name/</code><br />This page should contain the following shortcode. <code>[wcv_vendorslist]</code>"
|
1513 |
+
msgstr ""
|
1514 |
+
|
1515 |
+
#: classes/admin/settings/class-wcv-settings-display.php:180
|
1516 |
+
msgid "Terms and Conditions"
|
1517 |
+
msgstr ""
|
1518 |
+
|
1519 |
+
#: classes/admin/settings/class-wcv-settings-display.php:186
|
1520 |
+
msgid "<br />This sets the page used to display the terms and conditions when a %s signs up."
|
1521 |
+
msgstr ""
|
1522 |
+
|
1523 |
+
#: classes/admin/settings/class-wcv-settings-display.php:195
|
1524 |
+
msgid "These are the settings for the individual vendor stores."
|
1525 |
+
msgstr ""
|
1526 |
+
|
1527 |
+
#: classes/admin/settings/class-wcv-settings-display.php:200
|
1528 |
+
msgid "%s Store URL"
|
1529 |
+
msgstr ""
|
1530 |
+
|
1531 |
+
#: classes/admin/settings/class-wcv-settings-display.php:201
|
1532 |
+
msgid "If you enter \"vendors\" your %s store will be %s/vendors/store-name/"
|
1533 |
+
msgstr ""
|
1534 |
+
|
1535 |
+
#: classes/admin/settings/class-wcv-settings-display.php:208
|
1536 |
+
msgid "Shop Header"
|
1537 |
+
msgstr ""
|
1538 |
+
|
1539 |
+
#: classes/admin/settings/class-wcv-settings-display.php:209
|
1540 |
+
msgid "Enable %s shop headers"
|
1541 |
+
msgstr ""
|
1542 |
+
|
1543 |
+
#: classes/admin/settings/class-wcv-settings-display.php:210
|
1544 |
+
msgid "This enables the %s shop header template and disables the shop description text."
|
1545 |
+
msgstr ""
|
1546 |
+
|
1547 |
+
#: classes/admin/settings/class-wcv-settings-display.php:217
|
1548 |
+
msgid "Shop HTML"
|
1549 |
+
msgstr ""
|
1550 |
+
|
1551 |
+
#: classes/admin/settings/class-wcv-settings-display.php:218
|
1552 |
+
msgid "Allow HTML in %s shop desription"
|
1553 |
+
msgstr ""
|
1554 |
+
|
1555 |
+
#: classes/admin/settings/class-wcv-settings-display.php:219
|
1556 |
+
msgid "Enable HTML for a %s shop description. You can enable or disable this per vendor by editing the vendors user account."
|
1557 |
+
msgstr ""
|
1558 |
+
|
1559 |
+
#: classes/admin/settings/class-wcv-settings-display.php:226
|
1560 |
+
msgid "Display Name"
|
1561 |
+
msgstr ""
|
1562 |
+
|
1563 |
+
#: classes/admin/settings/class-wcv-settings-display.php:228
|
1564 |
+
msgid "Select what will be used to display the %s name throughout the marketplace."
|
1565 |
+
msgstr ""
|
1566 |
+
|
1567 |
+
#: classes/admin/settings/class-wcv-settings-display.php:233
|
1568 |
+
msgid "Display name"
|
1569 |
+
msgstr ""
|
1570 |
+
|
1571 |
+
#: classes/admin/settings/class-wcv-settings-display.php:234, classes/admin/views/html-vendor-meta.php:26
|
1572 |
+
msgid "Shop name"
|
1573 |
+
msgstr ""
|
1574 |
+
|
1575 |
+
#: classes/admin/settings/class-wcv-settings-display.php:235
|
1576 |
+
msgid "%s Username"
|
1577 |
+
msgstr ""
|
1578 |
+
|
1579 |
+
#: classes/admin/settings/class-wcv-settings-display.php:236
|
1580 |
+
msgid "%s Email"
|
1581 |
+
msgstr ""
|
1582 |
+
|
1583 |
+
#: classes/admin/settings/class-wcv-settings-general.php:64
|
1584 |
+
msgid "Marketplace Options"
|
1585 |
+
msgstr ""
|
1586 |
+
|
1587 |
+
#: classes/admin/settings/class-wcv-settings-general.php:66
|
1588 |
+
msgid "These are the general settings for your marketplace"
|
1589 |
+
msgstr ""
|
1590 |
+
|
1591 |
+
#: classes/admin/settings/class-wcv-settings-general.php:70
|
1592 |
+
msgid "%s Registration"
|
1593 |
+
msgstr ""
|
1594 |
+
|
1595 |
+
#: classes/admin/settings/class-wcv-settings-general.php:71, classes/admin/views/setup/general.php:25
|
1596 |
+
msgid "Allow users to apply to become a %s"
|
1597 |
+
msgstr ""
|
1598 |
+
|
1599 |
+
#: classes/admin/settings/class-wcv-settings-general.php:77
|
1600 |
+
msgid "%s Approval"
|
1601 |
+
msgstr ""
|
1602 |
+
|
1603 |
+
#: classes/admin/settings/class-wcv-settings-general.php:78
|
1604 |
+
msgid "Manually approve all %s applications"
|
1605 |
+
msgstr ""
|
1606 |
+
|
1607 |
+
#: classes/admin/settings/class-wcv-settings-general.php:84
|
1608 |
+
msgid "%s Taxes"
|
1609 |
+
msgstr ""
|
1610 |
+
|
1611 |
+
#: classes/admin/settings/class-wcv-settings-general.php:85
|
1612 |
+
msgid "Give any taxes to the %s"
|
1613 |
+
msgstr ""
|
1614 |
+
|
1615 |
+
#: classes/admin/settings/class-wcv-settings-general.php:91
|
1616 |
+
msgid "%s Shipping"
|
1617 |
+
msgstr ""
|
1618 |
+
|
1619 |
+
#: classes/admin/settings/class-wcv-settings-general.php:92
|
1620 |
+
msgid "Give any shipping to the %s"
|
1621 |
+
msgstr ""
|
1622 |
+
|
1623 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:31
|
1624 |
+
msgid "Payments"
|
1625 |
+
msgstr ""
|
1626 |
+
|
1627 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:45, classes/gateways/PayPal_AdvPayments/paypal_ap.php:43
|
1628 |
+
msgid "PayPal Adaptive Payments"
|
1629 |
+
msgstr ""
|
1630 |
+
|
1631 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:67
|
1632 |
+
msgid "<h3>PayPal Adaptive Payments - Please Note: PayPal Adaptive Payments has been depreciated by PayPal as of September 2017. These options are for existing users only. This will be completely removed in a future version.</h3>"
|
1633 |
+
msgstr ""
|
1634 |
+
|
1635 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:75
|
1636 |
+
msgid "Total Commission due: %s"
|
1637 |
+
msgstr ""
|
1638 |
+
|
1639 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:80
|
1640 |
+
msgid "Instant Pay"
|
1641 |
+
msgstr ""
|
1642 |
+
|
1643 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:81
|
1644 |
+
msgid "Enable instantpay"
|
1645 |
+
msgstr ""
|
1646 |
+
|
1647 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:82
|
1648 |
+
msgid "Instantly pay %s their commission when an order is made, and if a %s has a valid PayPal email added on their Shop Settings page."
|
1649 |
+
msgstr ""
|
1650 |
+
|
1651 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:89
|
1652 |
+
msgid "Payment schedule"
|
1653 |
+
msgstr ""
|
1654 |
+
|
1655 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:90
|
1656 |
+
msgid "Note: Schedule will only work if instant pay is unchecked"
|
1657 |
+
msgstr ""
|
1658 |
+
|
1659 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:94
|
1660 |
+
msgid "Daily"
|
1661 |
+
msgstr ""
|
1662 |
+
|
1663 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:95
|
1664 |
+
msgid "Weekly"
|
1665 |
+
msgstr ""
|
1666 |
+
|
1667 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:96
|
1668 |
+
msgid "Biweekly"
|
1669 |
+
msgstr ""
|
1670 |
+
|
1671 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:97
|
1672 |
+
msgid "Monthly"
|
1673 |
+
msgstr ""
|
1674 |
+
|
1675 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:98
|
1676 |
+
msgid "Manual"
|
1677 |
+
msgstr ""
|
1678 |
+
|
1679 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:99
|
1680 |
+
msgid "Now"
|
1681 |
+
msgstr ""
|
1682 |
+
|
1683 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:104
|
1684 |
+
msgid "Email notification"
|
1685 |
+
msgstr ""
|
1686 |
+
|
1687 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:105
|
1688 |
+
msgid "Enable notify the admin"
|
1689 |
+
msgstr ""
|
1690 |
+
|
1691 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:106
|
1692 |
+
msgid "Send the marketplace admin an email each time a payment has been made via the payment schedule options above"
|
1693 |
+
msgstr ""
|
1694 |
+
|
1695 |
+
#: classes/admin/settings/class-wcv-settings-payments.php:125
|
1696 |
+
msgid "<strong>Payments controls how your %s commission is paid out. These settings only function if you are using a supported gateway.</strong> "
|
1697 |
+
msgstr ""
|
1698 |
+
|
1699 |
+
#: classes/admin/views/html-admin-page-extensions.php:15
|
1700 |
+
msgid "Upgrade your marketplace today!"
|
1701 |
+
msgstr ""
|
1702 |
+
|
1703 |
+
#: classes/admin/views/html-admin-page-extensions.php:25
|
1704 |
+
msgid "WC Vendors Pro"
|
1705 |
+
msgstr ""
|
1706 |
+
|
1707 |
+
#: classes/admin/views/html-admin-page-extensions.php:27
|
1708 |
+
msgid "Enhanced your marketplace with pro features and capabilities. Move all your vendors tasks to the frontend. They no longer need or see the WordPress admin. Shipping system included."
|
1709 |
+
msgstr ""
|
1710 |
+
|
1711 |
+
#: classes/admin/views/html-admin-page-extensions.php:32
|
1712 |
+
msgid "Vendors have a main dashboard showing sales reports and recent orders and products."
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
+
#: classes/admin/views/html-admin-page-extensions.php:33
|
1716 |
+
msgid "Vendors have complete front end product management"
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: classes/admin/views/html-admin-page-extensions.php:34
|
1720 |
+
msgid "Vendors can add their own coupons that only apply to their products"
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: classes/admin/views/html-admin-page-extensions.php:35
|
1724 |
+
msgid "Vendors have advanced shipment tracking including shipping providers"
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: classes/admin/views/html-admin-page-extensions.php:36
|
1728 |
+
msgid "Vendors have the ability to print a shipping label with a picking list"
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: classes/admin/views/html-admin-page-extensions.php:37
|
1732 |
+
msgid "Vendors can add all their own social media profile links"
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: classes/admin/views/html-admin-page-extensions.php:38
|
1736 |
+
msgid "Vendors can add SEO to their store and products"
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: classes/admin/views/html-admin-page-extensions.php:39
|
1740 |
+
msgid "Vendors can add their own banner and store icon"
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: classes/admin/views/html-admin-page-extensions.php:40
|
1744 |
+
msgid "Vendors have a comprehensive shipping system available. Either flat rate or table rate based."
|
1745 |
+
msgstr ""
|
1746 |
+
|
1747 |
+
#: classes/admin/views/html-admin-page-extensions.php:41
|
1748 |
+
msgid "Vendor stores templates are more advanced"
|
1749 |
+
msgstr ""
|
1750 |
+
|
1751 |
+
#: classes/admin/views/html-admin-page-extensions.php:42
|
1752 |
+
msgid "Vendors have more control over their order notes"
|
1753 |
+
msgstr ""
|
1754 |
+
|
1755 |
+
#: classes/admin/views/html-admin-page-extensions.php:43
|
1756 |
+
msgid "Vendors vacation module is included as part of pro not an extra addon"
|
1757 |
+
msgstr ""
|
1758 |
+
|
1759 |
+
#: classes/admin/views/html-admin-page-extensions.php:44
|
1760 |
+
msgid "Admins have multiple commission rate options including percentage, percentage + fee, fixed, fixed + fee."
|
1761 |
+
msgstr ""
|
1762 |
+
|
1763 |
+
#: classes/admin/views/html-admin-page-extensions.php:45
|
1764 |
+
msgid "Admins can set global shipping rates as well as allow different shipping modules per vendor. Setting one as flat rate, while another can be table rate"
|
1765 |
+
msgstr ""
|
1766 |
+
|
1767 |
+
#: classes/admin/views/html-admin-page-extensions.php:46
|
1768 |
+
msgid "Ebay style feedback allows customers to rate the products from the vendors"
|
1769 |
+
msgstr ""
|
1770 |
+
|
1771 |
+
#: classes/admin/views/html-admin-page-extensions.php:47
|
1772 |
+
msgid "Premium ticket based support for all pro users. Annual and lifetime support licenses available."
|
1773 |
+
msgstr ""
|
1774 |
+
|
1775 |
+
#: classes/admin/views/html-admin-page-extensions.php:58
|
1776 |
+
msgid "WC Vendors Stripe Commissions & Gateway"
|
1777 |
+
msgstr ""
|
1778 |
+
|
1779 |
+
#: classes/admin/views/html-admin-page-extensions.php:59
|
1780 |
+
msgid "Pay your vendors their commissions instantly when the customer purchases. No need to manually pay your vendors."
|
1781 |
+
msgstr ""
|
1782 |
+
|
1783 |
+
#: classes/admin/views/html-admin-page-extensions.php:60, classes/admin/views/html-admin-page-extensions.php:68, classes/admin/views/html-admin-page-extensions.php:75
|
1784 |
+
msgid "From $69"
|
1785 |
+
msgstr ""
|
1786 |
+
|
1787 |
+
#: classes/admin/views/html-admin-page-extensions.php:65
|
1788 |
+
msgid "WooCommerce Bookings Integration<"
|
1789 |
+
msgstr ""
|
1790 |
+
|
1791 |
+
#: classes/admin/views/html-admin-page-extensions.php:66
|
1792 |
+
msgid "From $69.00"
|
1793 |
+
msgstr ""
|
1794 |
+
|
1795 |
+
#: classes/admin/views/html-admin-page-extensions.php:67
|
1796 |
+
msgid "Allow vendors to create bookings. Integrate WooCommerce bookings into the WC Vendors Pro Dashboard."
|
1797 |
+
msgstr ""
|
1798 |
+
|
1799 |
+
#: classes/admin/views/html-admin-page-extensions.php:73
|
1800 |
+
msgid "WooCommerce Simple Auctions"
|
1801 |
+
msgstr ""
|
1802 |
+
|
1803 |
+
#: classes/admin/views/html-admin-page-extensions.php:74
|
1804 |
+
msgid "Integreate WooCommerce Simple Auctions into the WC Vendors Pro dashboard."
|
1805 |
+
msgstr ""
|
1806 |
+
|
1807 |
+
#: classes/admin/views/html-admin-page-extensions.php:80
|
1808 |
+
msgid "3rd Party Extensions"
|
1809 |
+
msgstr ""
|
1810 |
+
|
1811 |
+
#: classes/admin/views/html-admin-page-extensions.php:81
|
1812 |
+
msgid "We have a list of 3rd party developer extensions that inetegrate with WC Vendors and WC Vendors Pro on our website."
|
1813 |
+
msgstr ""
|
1814 |
+
|
1815 |
+
#: classes/admin/views/html-admin-page-extensions.php:82
|
1816 |
+
msgid "View extensions"
|
1817 |
+
msgstr ""
|
1818 |
+
|
1819 |
+
#: classes/admin/views/html-admin-page-extensions.php:89
|
1820 |
+
msgid "Our list of extensions for WC Vendors can be found on our website. <a href=\"%s\">Click here to view our extensions list.</a>"
|
1821 |
+
msgstr ""
|
1822 |
+
|
1823 |
+
#: classes/admin/views/html-vendor-meta.php:14
|
1824 |
+
msgid "Enable HTML for the shop description"
|
1825 |
+
msgstr ""
|
1826 |
+
|
1827 |
+
#: classes/admin/views/html-vendor-meta.php:38
|
1828 |
+
msgid "PayPal E-mail"
|
1829 |
+
msgstr ""
|
1830 |
+
|
1831 |
+
#: classes/admin/views/html-vendor-meta.php:50, classes/admin/views/html-vendor-settings-page.php:26
|
1832 |
+
msgid "Bank Account Name"
|
1833 |
+
msgstr ""
|
1834 |
+
|
1835 |
+
#: classes/admin/views/html-vendor-meta.php:55, classes/admin/views/html-vendor-settings-page.php:31
|
1836 |
+
msgid "Bank Account Number"
|
1837 |
+
msgstr ""
|
1838 |
+
|
1839 |
+
#: classes/admin/views/html-vendor-meta.php:60, classes/admin/views/html-vendor-settings-page.php:36, templates/dashboard/settings/settings.php:27
|
1840 |
+
msgid "Bank Name"
|
1841 |
+
msgstr ""
|
1842 |
+
|
1843 |
+
#: classes/admin/views/html-vendor-meta.php:65, classes/admin/views/html-vendor-settings-page.php:41, templates/dashboard/settings/settings.php:30
|
1844 |
+
msgid "Routing Number"
|
1845 |
+
msgstr ""
|
1846 |
+
|
1847 |
+
#: classes/admin/views/html-vendor-meta.php:70, classes/admin/views/html-vendor-settings-page.php:46, templates/dashboard/settings/settings.php:31
|
1848 |
+
msgid "IBAN"
|
1849 |
+
msgstr ""
|
1850 |
+
|
1851 |
+
#: classes/admin/views/html-vendor-meta.php:75, classes/admin/views/html-vendor-settings-page.php:51
|
1852 |
+
msgid "BIC/SWIFT"
|
1853 |
+
msgstr ""
|
1854 |
+
|
1855 |
+
#: classes/admin/views/html-vendor-meta.php:88
|
1856 |
+
msgid "Commission rate"
|
1857 |
+
msgstr ""
|
1858 |
+
|
1859 |
+
#: classes/admin/views/html-vendor-meta.php:101
|
1860 |
+
msgid "Give Tax"
|
1861 |
+
msgstr ""
|
1862 |
+
|
1863 |
+
#: classes/admin/views/html-vendor-meta.php:105
|
1864 |
+
msgid "Tax override for vendor"
|
1865 |
+
msgstr ""
|
1866 |
+
|
1867 |
+
#: classes/admin/views/html-vendor-meta.php:117
|
1868 |
+
msgid "Give Shipping"
|
1869 |
+
msgstr ""
|
1870 |
+
|
1871 |
+
#: classes/admin/views/html-vendor-meta.php:121
|
1872 |
+
msgid "Shipping override for vendor"
|
1873 |
+
msgstr ""
|
1874 |
+
|
1875 |
+
#: classes/admin/views/html-vendor-meta.php:133, classes/admin/views/html-vendor-settings-page.php:69, templates/dashboard/settings/seller-info.php:3
|
1876 |
+
msgid "Seller info"
|
1877 |
+
msgstr ""
|
1878 |
+
|
1879 |
+
#: classes/admin/views/html-vendor-meta.php:144
|
1880 |
+
msgid "Shop description"
|
1881 |
+
msgstr ""
|
1882 |
+
|
1883 |
+
#: classes/admin/views/html-vendor-settings-page.php:11, templates/dashboard/settings/paypal-email-form.php:2
|
1884 |
+
msgid "PayPal Address"
|
1885 |
+
msgstr ""
|
1886 |
+
|
1887 |
+
#: classes/admin/views/html-vendor-settings-page.php:14
|
1888 |
+
msgid "Your PayPal address can be used to send you your commission."
|
1889 |
+
msgstr ""
|
1890 |
+
|
1891 |
+
#: classes/admin/views/html-vendor-settings-page.php:61, templates/dashboard/settings/shop-name.php:2
|
1892 |
+
msgid "Shop Name"
|
1893 |
+
msgstr ""
|
1894 |
+
|
1895 |
+
#: classes/admin/views/html-vendor-settings-page.php:63, templates/dashboard/settings/shop-name.php:3
|
1896 |
+
msgid "Your shop name is public and must be unique."
|
1897 |
+
msgstr ""
|
1898 |
+
|
1899 |
+
#: classes/admin/views/html-vendor-settings-page.php:82, templates/dashboard/settings/seller-info.php:4
|
1900 |
+
msgid "This is displayed on each of your products."
|
1901 |
+
msgstr ""
|
1902 |
+
|
1903 |
+
#: classes/admin/views/html-vendor-settings-page.php:88, templates/dashboard/settings/shop-description.php:2
|
1904 |
+
msgid "Shop Description"
|
1905 |
+
msgstr ""
|
1906 |
+
|
1907 |
+
#: classes/admin/views/html-vendor-settings-page.php:100, templates/dashboard/settings/shop-description.php:3
|
1908 |
+
msgid "This is displayed on your <a href=\"%s\">shop page</a>."
|
1909 |
+
msgstr ""
|
1910 |
+
|
1911 |
+
#: classes/admin/views/html-vendor-settings-page.php:109
|
1912 |
+
msgid "Save Shop Settings"
|
1913 |
+
msgstr ""
|
1914 |
+
|
1915 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:56
|
1916 |
+
msgid "Order marked shipped."
|
1917 |
+
msgstr ""
|
1918 |
+
|
1919 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:59
|
1920 |
+
msgid "%s has marked as shipped. "
|
1921 |
+
msgstr ""
|
1922 |
+
|
1923 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:88, classes/front/dashboard/class-vendor-dashboard.php:89
|
1924 |
+
msgid "Tracking number"
|
1925 |
+
msgstr ""
|
1926 |
+
|
1927 |
+
#: classes/front/dashboard/class-vendor-dashboard.php:91
|
1928 |
+
msgid "Success. Your tracking number has been updated."
|
1929 |
+
msgstr ""
|
1930 |
+
|
1931 |
+
#: classes/front/orders/class-export-csv.php:20
|
1932 |
+
msgid "Item Meta"
|
1933 |
+
msgstr ""
|
1934 |
+
|
1935 |
+
#: classes/front/orders/class-orders.php:55, classes/front/orders/class-orders.php:121
|
1936 |
+
msgid "You haven't selected a product's orders to view! Please go back to the Vendor Dashboard and click Show Orders on the product you'd like to view."
|
1937 |
+
msgstr ""
|
1938 |
+
|
1939 |
+
#: classes/front/orders/class-orders.php:78, classes/front/orders/class-orders.php:144
|
1940 |
+
msgid "No orders."
|
1941 |
+
msgstr ""
|
1942 |
+
|
1943 |
+
#: classes/front/orders/class-orders.php:205
|
1944 |
+
msgid "Product Title"
|
1945 |
+
msgstr ""
|
1946 |
+
|
1947 |
+
#: classes/front/orders/class-orders.php:206
|
1948 |
+
msgid "Full name"
|
1949 |
+
msgstr ""
|
1950 |
+
|
1951 |
+
#: classes/front/orders/class-orders.php:207
|
1952 |
+
msgid "Address"
|
1953 |
+
msgstr ""
|
1954 |
+
|
1955 |
+
#: classes/front/orders/class-orders.php:208
|
1956 |
+
msgid "City"
|
1957 |
+
msgstr ""
|
1958 |
+
|
1959 |
+
#: classes/front/orders/class-orders.php:209
|
1960 |
+
msgid "State"
|
1961 |
+
msgstr ""
|
1962 |
+
|
1963 |
+
#: classes/front/orders/class-orders.php:210
|
1964 |
+
msgid "Zip"
|
1965 |
+
msgstr ""
|
1966 |
+
|
1967 |
+
#: classes/front/orders/class-orders.php:211, classes/admin/views/setup/ready.php:23
|
1968 |
+
msgid "Email address"
|
1969 |
+
msgstr ""
|
1970 |
+
|
1971 |
+
#: classes/front/orders/class-submit-comment.php:41
|
1972 |
+
msgid "You've left the comment field empty!"
|
1973 |
+
msgstr ""
|
1974 |
+
|
1975 |
+
#: classes/front/orders/class-submit-comment.php:63
|
1976 |
+
msgid "Success. The customer has been notified of your comment."
|
1977 |
+
msgstr ""
|
1978 |
+
|
1979 |
+
#: classes/front/signup/class-vendor-signup.php:81
|
1980 |
+
msgid "ERROR"
|
1981 |
+
msgstr ""
|
1982 |
+
|
1983 |
+
#: classes/front/signup/class-vendor-signup.php:100
|
1984 |
+
msgid "Application denied. You are an administrator."
|
1985 |
+
msgstr ""
|
1986 |
+
|
1987 |
+
#: classes/front/signup/class-vendor-signup.php:102
|
1988 |
+
msgid "Your application has been submitted."
|
1989 |
+
msgstr ""
|
1990 |
+
|
1991 |
+
#: classes/front/signup/class-vendor-signup.php:149, classes/front/signup/class-vendor-signup.php:186, classes/front/signup/class-vendor-signup.php:198
|
1992 |
+
msgid "You must accept the terms and conditions to become a vendor."
|
1993 |
+
msgstr ""
|
1994 |
+
|
1995 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:119
|
1996 |
+
msgid "Something went wrong. Response from PayPal invalidated this order. Status: %s."
|
1997 |
+
msgstr ""
|
1998 |
+
|
1999 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:124
|
2000 |
+
msgid "IPN payment completed"
|
2001 |
+
msgstr ""
|
2002 |
+
|
2003 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:146
|
2004 |
+
msgid "Enable PayPal Adaptive Payments"
|
2005 |
+
msgstr ""
|
2006 |
+
|
2007 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:152
|
2008 |
+
msgid "Method Title"
|
2009 |
+
msgstr ""
|
2010 |
+
|
2011 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:153, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:70
|
2012 |
+
msgid "This controls the title which the user sees during checkout."
|
2013 |
+
msgstr ""
|
2014 |
+
|
2015 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:154
|
2016 |
+
msgid "PayPal"
|
2017 |
+
msgstr ""
|
2018 |
+
|
2019 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:159, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:75
|
2020 |
+
msgid "Description"
|
2021 |
+
msgstr ""
|
2022 |
+
|
2023 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:160
|
2024 |
+
msgid "This controls the description which the user sees during checkout."
|
2025 |
+
msgstr ""
|
2026 |
+
|
2027 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:161
|
2028 |
+
msgid "Pay via PayPal!"
|
2029 |
+
msgstr ""
|
2030 |
+
|
2031 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:172
|
2032 |
+
msgid "Live Credentials"
|
2033 |
+
msgstr ""
|
2034 |
+
|
2035 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:174
|
2036 |
+
msgid "You must have an <a href=\"%s\">Application ID</a> to process live transactions. You do not need one for testing in Sandbox mode."
|
2037 |
+
msgstr ""
|
2038 |
+
|
2039 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:179, classes/gateways/PayPal_AdvPayments/paypal_ap.php:213
|
2040 |
+
msgid "PayPal Email"
|
2041 |
+
msgstr ""
|
2042 |
+
|
2043 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:180, classes/gateways/PayPal_AdvPayments/paypal_ap.php:214
|
2044 |
+
msgid "The email address main payments should go to."
|
2045 |
+
msgstr ""
|
2046 |
+
|
2047 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:185, classes/gateways/PayPal_AdvPayments/paypal_ap.php:219
|
2048 |
+
msgid "API Username"
|
2049 |
+
msgstr ""
|
2050 |
+
|
2051 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:190, classes/gateways/PayPal_AdvPayments/paypal_ap.php:224
|
2052 |
+
msgid "API Password"
|
2053 |
+
msgstr ""
|
2054 |
+
|
2055 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:195, classes/gateways/PayPal_AdvPayments/paypal_ap.php:229
|
2056 |
+
msgid "API Signature"
|
2057 |
+
msgstr ""
|
2058 |
+
|
2059 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:200
|
2060 |
+
msgid "Application ID"
|
2061 |
+
msgstr ""
|
2062 |
+
|
2063 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:202
|
2064 |
+
msgid "Only required when doing live transactions."
|
2065 |
+
msgstr ""
|
2066 |
+
|
2067 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:206
|
2068 |
+
msgid "Sandbox Credentials"
|
2069 |
+
msgstr ""
|
2070 |
+
|
2071 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:208
|
2072 |
+
msgid "You can signup for a sandbox developer account <a href=\"%s\">here</a>. You need a developer account if you want to enable Sandbox mode for testing."
|
2073 |
+
msgstr ""
|
2074 |
+
|
2075 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:240
|
2076 |
+
msgid "Misc. Settings"
|
2077 |
+
msgstr ""
|
2078 |
+
|
2079 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:245
|
2080 |
+
msgid "Enable PayPal Sandbox mode"
|
2081 |
+
msgstr ""
|
2082 |
+
|
2083 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:251
|
2084 |
+
msgid "Enable logging"
|
2085 |
+
msgstr ""
|
2086 |
+
|
2087 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:269
|
2088 |
+
msgid "The PayPal Adaptive Payments gateway can instantly pay your vendors their due commission (if enabled). Also used to mass pay vendors on a schedule / manual method (if enabled)."
|
2089 |
+
msgstr ""
|
2090 |
+
|
2091 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:270
|
2092 |
+
msgid "Please Note: PayPal has depreciated Adaptive Payments. This will soon cease to function."
|
2093 |
+
msgstr ""
|
2094 |
+
|
2095 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2096 |
+
msgid "Gateway Disabled"
|
2097 |
+
msgstr ""
|
2098 |
+
|
2099 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:281
|
2100 |
+
msgid "%s does not support your store currency."
|
2101 |
+
msgstr ""
|
2102 |
+
|
2103 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:390, classes/gateways/PayPal_AdvPayments/paypal_ap.php:506, classes/gateways/PayPal_Masspay/class-paypal-masspay.php:153
|
2104 |
+
msgid "Error: %s"
|
2105 |
+
msgstr ""
|
2106 |
+
|
2107 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:399, classes/gateways/PayPal_AdvPayments/paypal_ap.php:400
|
2108 |
+
msgid "Error ID: %s. %s"
|
2109 |
+
msgstr ""
|
2110 |
+
|
2111 |
+
#: classes/gateways/PayPal_AdvPayments/paypal_ap.php:514, classes/gateways/PayPal_AdvPayments/paypal_ap.php:515
|
2112 |
+
msgid "Error ID: %d. %s"
|
2113 |
+
msgstr ""
|
2114 |
+
|
2115 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:115
|
2116 |
+
msgid "No vendors found to pay. Maybe they haven't set a PayPal address?"
|
2117 |
+
msgstr ""
|
2118 |
+
|
2119 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:167
|
2120 |
+
msgid "All due commission has been paid for."
|
2121 |
+
msgstr ""
|
2122 |
+
|
2123 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:173
|
2124 |
+
msgid "All due commission has been paid for, but I could not clear it from their profiles due to an internal error. Commission will still be listed as due. Please manually mark the commission as paid from the Commissions page."
|
2125 |
+
msgstr ""
|
2126 |
+
|
2127 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:208
|
2128 |
+
msgid "WooCommerce: Mass payments for vendors update"
|
2129 |
+
msgstr ""
|
2130 |
+
|
2131 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:210
|
2132 |
+
msgid "Hello! A payment was just triggered to mass pay all vendors their due commission."
|
2133 |
+
msgstr ""
|
2134 |
+
|
2135 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:211
|
2136 |
+
msgid "Payment status: %s."
|
2137 |
+
msgstr ""
|
2138 |
+
|
2139 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:212
|
2140 |
+
msgid "Payment message: %s."
|
2141 |
+
msgstr ""
|
2142 |
+
|
2143 |
+
#: classes/gateways/PayPal_Masspay/class-paypal-masspay.php:215
|
2144 |
+
msgid "Payment total: %s."
|
2145 |
+
msgstr ""
|
2146 |
+
|
2147 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:35, classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:71
|
2148 |
+
msgid "WC Vendors Test Gateway"
|
2149 |
+
msgstr ""
|
2150 |
+
|
2151 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:36
|
2152 |
+
msgid "This gateway will set orders to processing upon receipt allowing you to test transactions in your store. Some WooCommerce included gateways have problems with this - you should use this gateway for all of your non-PayPal testing."
|
2153 |
+
msgstr ""
|
2154 |
+
|
2155 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:64
|
2156 |
+
msgid "Enable WC Vendors Test Gateway Payment"
|
2157 |
+
msgstr ""
|
2158 |
+
|
2159 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:68
|
2160 |
+
msgid "Title"
|
2161 |
+
msgstr ""
|
2162 |
+
|
2163 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:77
|
2164 |
+
msgid "Payment method description that the customer will see on your checkout."
|
2165 |
+
msgstr ""
|
2166 |
+
|
2167 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:78
|
2168 |
+
msgid "This is a test gateway -- not to be used on live sites for live transactions. <a href=\"http://www.wcvendors.com/\" target=\"top\">Click here to visit WCVendors.com</a>."
|
2169 |
+
msgstr ""
|
2170 |
+
|
2171 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:82
|
2172 |
+
msgid "Instructions"
|
2173 |
+
msgstr ""
|
2174 |
+
|
2175 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:84
|
2176 |
+
msgid "Success! Your test order is now marked as processing and any vendors will be sent an email as long as you have the Notify Vendors email enabled under WooCommerce--Settings--Emails."
|
2177 |
+
msgstr ""
|
2178 |
+
|
2179 |
+
#: classes/gateways/WCV_Gateway_Test/class-wcv-gateway-test.php:127
|
2180 |
+
msgid "Test gateway transation complete. Order processing."
|
2181 |
+
msgstr ""
|
2182 |
+
|
2183 |
+
#: templates/dashboard/settings/paypal-email-form.php:3
|
2184 |
+
msgid "Your PayPal address can be used to manually send you your commission."
|
2185 |
+
msgstr ""
|
2186 |
+
|
2187 |
+
#: templates/dashboard/settings/settings.php:22
|
2188 |
+
msgid "Bank Details"
|
2189 |
+
msgstr ""
|
2190 |
+
|
2191 |
+
#: templates/dashboard/settings/settings.php:25
|
2192 |
+
msgid "Account Name"
|
2193 |
+
msgstr ""
|
2194 |
+
|
2195 |
+
#: templates/dashboard/settings/settings.php:26
|
2196 |
+
msgid "Account Number"
|
2197 |
+
msgstr ""
|
2198 |
+
|
2199 |
+
#: templates/dashboard/settings/settings.php:32
|
2200 |
+
msgid "BIC / Swift"
|
2201 |
+
msgstr ""
|
2202 |
+
|
2203 |
+
#: templates/dashboard/settings/settings.php:69
|
2204 |
+
msgid "Save"
|
2205 |
+
msgstr ""
|
2206 |
+
|
2207 |
+
#: templates/emails/plain/vendor-notify-order.php:19
|
2208 |
+
msgid "You have received an order from %s."
|
2209 |
+
msgstr ""
|
2210 |
+
|
2211 |
+
#. translators: %s: Order ID.
|
2212 |
+
#: templates/emails/plain/vendor-order-details.php:20
|
2213 |
+
msgid "Order number: %s"
|
2214 |
+
msgstr ""
|
2215 |
+
|
2216 |
+
#: templates/orders/comments/add-new-comment.php:11
|
2217 |
+
msgid "Add comment"
|
2218 |
+
msgstr ""
|
2219 |
+
|
2220 |
+
#: templates/orders/comments/existing-comments.php:9
|
2221 |
+
msgid "added %s ago"
|
2222 |
+
msgstr ""
|
2223 |
+
|
2224 |
+
#: templates/orders/customer-note/customer-note.php:4
|
2225 |
+
msgid "Customer note"
|
2226 |
+
msgstr ""
|
2227 |
+
|
2228 |
+
#: templates/orders/customer-note/customer-note.php:8
|
2229 |
+
msgid "No customer note."
|
2230 |
+
msgstr ""
|
2231 |
+
|
2232 |
+
#: templates/orders/shipping/shipping-form.php:75
|
2233 |
+
msgid "Update tracking number"
|
2234 |
+
msgstr ""
|
2235 |
+
|
2236 |
+
#: templates/orders/shipping/shipping-form.php:77
|
2237 |
+
msgid "Mark as shipped"
|
2238 |
+
msgstr ""
|
2239 |
+
|
2240 |
+
#: classes/admin/views/notices/html-notice-custom.php:12, classes/admin/views/notices/html-notice-template-check.php:13, classes/admin/views/notices/html-notice-updated.php:12
|
2241 |
+
msgid "Dismiss"
|
2242 |
+
msgstr ""
|
2243 |
+
|
2244 |
+
#: classes/admin/views/notices/html-notice-install.php:12
|
2245 |
+
msgid "<strong>Welcome to WC Vendors</strong> – You‘re almost ready to start your marketplace"
|
2246 |
+
msgstr ""
|
2247 |
+
|
2248 |
+
#: classes/admin/views/notices/html-notice-install.php:13
|
2249 |
+
msgid "Run the Setup Wizard"
|
2250 |
+
msgstr ""
|
2251 |
+
|
2252 |
+
#: classes/admin/views/notices/html-notice-install.php:13
|
2253 |
+
msgid "Skip setup"
|
2254 |
+
msgstr ""
|
2255 |
+
|
2256 |
+
#: classes/admin/views/notices/html-notice-template-check.php:15
|
2257 |
+
msgid "<strong>Your theme (%1$s) contains outdated copies of some WC Vendors template files.</strong> These files may need updating to ensure they are compatible with the current version of WC Vendors. You can see which files are affected from the <a href=\"%2$s\">system status page</a>. If in doubt, check with the author of the theme."
|
2258 |
+
msgstr ""
|
2259 |
+
|
2260 |
+
#: classes/admin/views/notices/html-notice-template-check.php:16
|
2261 |
+
msgid "Learn more about templates"
|
2262 |
+
msgstr ""
|
2263 |
+
|
2264 |
+
#: classes/admin/views/notices/html-notice-update.php:12
|
2265 |
+
msgid "<strong>WC Vendors Update Required.</strong> – We need to upgrade your configuration to the latest version."
|
2266 |
+
msgstr ""
|
2267 |
+
|
2268 |
+
#: classes/admin/views/notices/html-notice-update.php:13
|
2269 |
+
msgid "Run the update"
|
2270 |
+
msgstr ""
|
2271 |
+
|
2272 |
+
#: classes/admin/views/notices/html-notice-update.php:17
|
2273 |
+
msgid "It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?"
|
2274 |
+
msgstr ""
|
2275 |
+
|
2276 |
+
#: classes/admin/views/notices/html-notice-updated.php:13
|
2277 |
+
msgid "WC Vendors data update complete. Thank you for updating to the latest version!"
|
2278 |
+
msgstr ""
|
2279 |
+
|
2280 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
2281 |
+
msgid "WC Vendors data update"
|
2282 |
+
msgstr ""
|
2283 |
+
|
2284 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
2285 |
+
msgid "Your database is being updated in the background."
|
2286 |
+
msgstr ""
|
2287 |
+
|
2288 |
+
#: classes/admin/views/notices/html-notice-updating.php:12
|
2289 |
+
msgid "Taking a while? Click here to run it now."
|
2290 |
+
msgstr ""
|
2291 |
+
|
2292 |
+
#: classes/admin/views/setup/capabilities.php:14
|
2293 |
+
msgid "Enable and disable capabilites of the %s"
|
2294 |
+
msgstr ""
|
2295 |
+
|
2296 |
+
#: classes/admin/views/setup/capabilities.php:51
|
2297 |
+
msgid "Allow %s to publish products without requiring approval."
|
2298 |
+
msgstr ""
|
2299 |
+
|
2300 |
+
#: classes/admin/views/setup/capabilities.php:132, classes/admin/views/setup/capabilities.php:132, classes/admin/views/setup/general.php:97, classes/admin/views/setup/general.php:97, classes/admin/views/setup/pages.php:85, classes/admin/views/setup/pages.php:85
|
2301 |
+
msgid "Next"
|
2302 |
+
msgstr ""
|
2303 |
+
|
2304 |
+
#: classes/admin/views/setup/footer.php:13
|
2305 |
+
msgid "Exit Wizard"
|
2306 |
+
msgstr ""
|
2307 |
+
|
2308 |
+
#: classes/admin/views/setup/footer.php:15
|
2309 |
+
msgid "Return to your dashboard"
|
2310 |
+
msgstr ""
|
2311 |
+
|
2312 |
+
#: classes/admin/views/setup/footer.php:17
|
2313 |
+
msgid "Skip this step"
|
2314 |
+
msgstr ""
|
2315 |
+
|
2316 |
+
#: classes/admin/views/setup/general.php:14
|
2317 |
+
msgid "The following wizard will help you configure your marketplace and get your vendors onboard quickly."
|
2318 |
+
msgstr ""
|
2319 |
+
|
2320 |
+
#: classes/admin/views/setup/general.php:38
|
2321 |
+
msgid "Manually approve %s applications"
|
2322 |
+
msgstr ""
|
2323 |
+
|
2324 |
+
#: classes/admin/views/setup/general.php:51
|
2325 |
+
msgid "Give any taxes to %s"
|
2326 |
+
msgstr ""
|
2327 |
+
|
2328 |
+
#: classes/admin/views/setup/general.php:64
|
2329 |
+
msgid "Give any shipping to %s"
|
2330 |
+
msgstr ""
|
2331 |
+
|
2332 |
+
#: classes/admin/views/setup/general.php:81
|
2333 |
+
msgid "Commissions are calculated per product. The commission rate can be set globally, at a vendor level or at a product level."
|
2334 |
+
msgstr ""
|
2335 |
+
|
2336 |
+
#: classes/admin/views/setup/general.php:86
|
2337 |
+
msgid "Global Commission Rate %"
|
2338 |
+
msgstr ""
|
2339 |
+
|
2340 |
+
#: classes/admin/views/setup/header.php:16
|
2341 |
+
msgid "WC Vendors › Setup Wizard"
|
2342 |
+
msgstr ""
|
2343 |
+
|
2344 |
+
#: classes/admin/views/setup/pages.php:14
|
2345 |
+
msgid "Select the pages for relevant frontend features for %s"
|
2346 |
+
msgstr ""
|
2347 |
+
|
2348 |
+
#: classes/admin/views/setup/pages.php:25
|
2349 |
+
msgid "Vendor Dashboard"
|
2350 |
+
msgstr ""
|
2351 |
+
|
2352 |
+
#: classes/admin/views/setup/pages.php:34
|
2353 |
+
msgid "This page should contain the following shortcode. <code>[wcv_vendor_dashboard]</code>"
|
2354 |
+
msgstr ""
|
2355 |
+
|
2356 |
+
#: classes/admin/views/setup/pages.php:38
|
2357 |
+
msgid "%s Shop Settings"
|
2358 |
+
msgstr ""
|
2359 |
+
|
2360 |
+
#: classes/admin/views/setup/pages.php:45
|
2361 |
+
msgid "This page should contain the following shortcode. <code>[wcv_shop_settings]</code>"
|
2362 |
+
msgstr ""
|
2363 |
+
|
2364 |
+
#: classes/admin/views/setup/pages.php:49
|
2365 |
+
msgid "Orders Page"
|
2366 |
+
msgstr ""
|
2367 |
+
|
2368 |
+
#: classes/admin/views/setup/pages.php:56
|
2369 |
+
msgid "This page should contain the following shortcode. <code>[wcv_orders]</code>"
|
2370 |
+
msgstr ""
|
2371 |
+
|
2372 |
+
#: classes/admin/views/setup/pages.php:60
|
2373 |
+
msgid "%s List Page"
|
2374 |
+
msgstr ""
|
2375 |
+
|
2376 |
+
#: classes/admin/views/setup/pages.php:67
|
2377 |
+
msgid "This page should contain the following shortcode. <code>[wcv_vendorslist]</code>"
|
2378 |
+
msgstr ""
|
2379 |
+
|
2380 |
+
#: classes/admin/views/setup/pages.php:71
|
2381 |
+
msgid "%s Terms Page"
|
2382 |
+
msgstr ""
|
2383 |
+
|
2384 |
+
#: classes/admin/views/setup/pages.php:78
|
2385 |
+
msgid "This optional page allows you to define terms and conidtions %s need to agree to before applying to your marketplace. "
|
2386 |
+
msgstr ""
|
2387 |
+
|
2388 |
+
#: classes/admin/views/setup/ready.php:12
|
2389 |
+
msgid "Your marketplace is ready!"
|
2390 |
+
msgstr ""
|
2391 |
+
|
2392 |
+
#: classes/admin/views/setup/ready.php:15
|
2393 |
+
msgid "Subscribe to our newsletter! Get product updates, marketplace tips, information and more."
|
2394 |
+
msgstr ""
|
2395 |
+
|
2396 |
+
#: classes/admin/views/setup/ready.php:29, classes/admin/views/setup/ready.php:33
|
2397 |
+
msgid "Subscribe me"
|
2398 |
+
msgstr ""
|
2399 |
+
|
2400 |
+
#: classes/admin/views/setup/ready.php:42
|
2401 |
+
msgid "Next step"
|
2402 |
+
msgstr ""
|
2403 |
+
|
2404 |
+
#: classes/admin/views/setup/ready.php:43
|
2405 |
+
msgid "Upgrade to Pro!"
|
2406 |
+
msgstr ""
|
2407 |
+
|
2408 |
+
#: classes/admin/views/setup/ready.php:44
|
2409 |
+
msgid "Upgrade today to extend the features of your marketplace."
|
2410 |
+
msgstr ""
|
2411 |
+
|
2412 |
+
#: classes/admin/views/setup/ready.php:45
|
2413 |
+
msgid "Features"
|
2414 |
+
msgstr ""
|
2415 |
+
|
2416 |
+
#: classes/admin/views/setup/ready.php:47
|
2417 |
+
msgid "Complete frontend dashboard for vendors"
|
2418 |
+
msgstr ""
|
2419 |
+
|
2420 |
+
#: classes/admin/views/setup/ready.php:48
|
2421 |
+
msgid "Flat rate & table rate shipping module"
|
2422 |
+
msgstr ""
|
2423 |
+
|
2424 |
+
#: classes/admin/views/setup/ready.php:49
|
2425 |
+
msgid "Coupons, ratings, reports, orders and more."
|
2426 |
+
msgstr ""
|
2427 |
+
|
2428 |
+
#: classes/admin/views/setup/ready.php:50
|
2429 |
+
msgid "Advanced commissions"
|
2430 |
+
msgstr ""
|
2431 |
+
|
2432 |
+
#: classes/admin/views/setup/ready.php:51
|
2433 |
+
msgid "Premium support & updates"
|
2434 |
+
msgstr ""
|
2435 |
+
|
2436 |
+
#: classes/admin/views/setup/ready.php:57
|
2437 |
+
msgid "Upgrade Now"
|
2438 |
+
msgstr ""
|
2439 |
+
|
2440 |
+
#: classes/admin/views/setup/ready.php:64
|
2441 |
+
msgid "Extend your marketplace"
|
2442 |
+
msgstr ""
|
2443 |
+
|
2444 |
+
#: classes/admin/views/setup/ready.php:66
|
2445 |
+
msgid "Extend your marketplace today with a variety of extensions from us and 3rd party developers."
|
2446 |
+
msgstr ""
|
2447 |
+
|
2448 |
+
#: classes/admin/views/setup/ready.php:71
|
2449 |
+
msgid "View Extensions"
|
2450 |
+
msgstr ""
|
2451 |
+
|
2452 |
+
#: classes/admin/views/setup/ready.php:77
|
2453 |
+
msgid "Need Help?"
|
2454 |
+
msgstr ""
|
2455 |
+
|
2456 |
+
#: classes/front/signup/views/html-vendor-signup.php:36
|
2457 |
+
msgid "I have read and accepted the <a target=\"top\" href=\"%s\">terms and conditions</a>."
|
2458 |
+
msgstr ""
|
2459 |
+
|
2460 |
+
#: classes/front/signup/views/html-vendor-signup.php:45
|
2461 |
+
msgid "Please agree to the terms and conditions"
|
2462 |
+
msgstr ""
|
package.json
CHANGED
@@ -1,26 +1,28 @@
|
|
1 |
{
|
2 |
-
"name": "
|
3 |
-
"version": "
|
4 |
"private": true,
|
5 |
"dependencies": {},
|
6 |
"devDependencies": {
|
|
|
7 |
"gulp": "latest",
|
8 |
"gulp-autoprefixer": "latest",
|
9 |
"gulp-cache": "latest",
|
|
|
10 |
"gulp-concat": "latest",
|
11 |
-
"gulp-imagemin": "latest",
|
12 |
-
"gulp-jshint": "latest",
|
13 |
"gulp-ignore": "latest",
|
|
|
14 |
"gulp-livereload": "latest",
|
15 |
"gulp-load-plugins": "latest",
|
16 |
-
"gulp-clean-css": "latest",
|
17 |
"gulp-notify": "latest",
|
18 |
"gulp-rename": "latest",
|
19 |
"gulp-ruby-sass": "latest",
|
|
|
20 |
"gulp-sort": "latest",
|
21 |
"gulp-uglify": "latest",
|
22 |
-
"gulp-wp-pot"
|
23 |
-
"
|
24 |
-
"
|
|
|
25 |
}
|
26 |
}
|
1 |
{
|
2 |
+
"name": "wc-vendors",
|
3 |
+
"version": "2.0.0",
|
4 |
"private": true,
|
5 |
"dependencies": {},
|
6 |
"devDependencies": {
|
7 |
+
"del": "latest",
|
8 |
"gulp": "latest",
|
9 |
"gulp-autoprefixer": "latest",
|
10 |
"gulp-cache": "latest",
|
11 |
+
"gulp-clean-css": "latest",
|
12 |
"gulp-concat": "latest",
|
|
|
|
|
13 |
"gulp-ignore": "latest",
|
14 |
+
"gulp-jshint": "latest",
|
15 |
"gulp-livereload": "latest",
|
16 |
"gulp-load-plugins": "latest",
|
|
|
17 |
"gulp-notify": "latest",
|
18 |
"gulp-rename": "latest",
|
19 |
"gulp-ruby-sass": "latest",
|
20 |
+
"gulp-sass": "latest",
|
21 |
"gulp-sort": "latest",
|
22 |
"gulp-uglify": "latest",
|
23 |
+
"gulp-wp-pot": "latest",
|
24 |
+
"jshint": "latest",
|
25 |
+
"pump": "latest",
|
26 |
+
"tiny-lr": "latest"
|
27 |
}
|
28 |
}
|
readme.txt
CHANGED
@@ -1,74 +1,81 @@
|
|
1 |
=== WC Vendors ===
|
2 |
Contributors: digitalchild, benwcv, annawcvendors
|
3 |
-
Tags: commission rate, e-commerce, ecommerce, ebay, free, marketplace, multi seller, multi store, multi vendor, multistore, multivendor, multivendors, product vendor, product vendors, seller, shops, store, vendor, vendor shop, vendor system, vendors, wc multivendor, wc vendors, wc marketplace, wc market, woo vendors, woocommerce, woocommerce marketplace, woocommerce multi vendor, WooCommerce multivendor, woocommerce product vendors,
|
4 |
-
Donate link:
|
5 |
-
Author URI:
|
6 |
-
Plugin URI:
|
7 |
-
Text Domain: wcvendors
|
8 |
Requires at least: 4.4.0
|
9 |
Tested up to: 4.9.5
|
10 |
-
Stable tag:
|
11 |
License: GPLv2 or later
|
12 |
|
13 |
-
The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your site!
|
14 |
|
15 |
== Description ==
|
16 |
Create your own marketplace and allow vendors to sell just like etsy, Envato, eBay, or Amazon type sites! This allows other sellers/vendors to sell tangible products, virtual products, or downloads on your site. With this plugin, your vendors receive commissions you set on products they sell from your store.
|
17 |
|
18 |
-
WC Vendors was released to the market in October of 2014 having gotten its roots from Product Vendors by Matt Gates dating back to 2011. We are the number one multi vendor marketplace plugin for WordPress and WooCommerce. It is the most feature packed free plugin available for operating a WooCommerce based multi vendor store.
|
19 |
|
20 |
== Announcements ==
|
21 |
|
22 |
-
*
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
* Vendors can submit products for admin review, or send new products live to the site immediately.
|
28 |
-
* Vendors can view live sales
|
29 |
* Vendors can comment on their orders (eg, to inform customers of a tracking number)
|
30 |
* Vendors can export their orders to a CSV file
|
31 |
-
* PayPal Adaptive Payments gateway included for free ( Parallel & MassPay ) NOTE (September 2017): PayPal Adaptive Payments has been deprecated by PayPal; we are working to implement a replacement.
|
32 |
-
* WPML Compatible
|
33 |
* Vendors can sell all product types
|
34 |
* Vendors manage their own media gallery/library
|
35 |
-
*
|
36 |
-
*
|
37 |
-
*
|
38 |
-
*
|
39 |
-
*
|
40 |
-
*
|
41 |
-
*
|
42 |
-
*
|
43 |
-
*
|
44 |
-
*
|
45 |
-
*
|
46 |
-
*
|
47 |
-
*
|
48 |
-
*
|
|
|
|
|
|
|
49 |
* Documentation with great articles on all the hooks, actions, filters, shortcodes, neat tricks, etc can be found on our documentation site here <a href="http://docs.wcvendors.com/">http://docs.wcvendors.com/</a>
|
50 |
|
51 |
= WC Vendors Pro =
|
52 |
-
* The following features are part of <a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=wporg">WC Vendors Pro</a>
|
53 |
-
* <strong>Pro Dashboard</strong> making your vendors sales reports a piece of cake
|
54 |
-
* <strong>Fully featured front-end product add/edit capabilities</strong>
|
55 |
-
* <strong>eBay style feedback</strong> system for Vendor Ratings
|
56 |
-
* <strong>Shipment Tracking</strong> for Vendors to enter tracking numbers
|
57 |
-
* <strong>Vendor Shipping</strong> so vendors can enter flat rates for national/shipping, or country/state table rate shipping and receive the shipping fees from each sale.
|
58 |
-
* <strong>Multiple commission types</strong> such as percentage, percentage + fee, fixed fee, and even fixed fee + fee.
|
59 |
-
* <strong>Vendor-Only coupons</strong> that vendors can create to make their own coupons for only their products
|
60 |
-
* <strong>Vendor Stores</strong>, which give Vendors their own true actual store
|
61 |
-
* Vendor <strong>store banners, avatars/icons</strong> and extra information fully customizable
|
62 |
-
* <strong>Social module</strong> for adding facebook/twitter/google+ and many more
|
63 |
-
* Vacation Mode - So your vendors can go away for a while and not worry about losing sales
|
64 |
-
* Extended <strong>Order Notes</strong>
|
65 |
-
* <strong>Insanely customizable template system</strong> to configure, tweak and style your store and dashboard any way you see fit.
|
66 |
-
* <strong>Support Tickets for assistance and one-on-one support for our paid plugins.</strong>
|
67 |
-
* MUCH MORE TO COME including <strong>WooCommerce Subscriptions</strong> support, integration with even more Woo plugins, and good features that you, the customer, ask us to code! <strong>Pro will always be continually updated with new features</strong>, just as you have grown to expect from WC Vendors Free
|
68 |
-
* There's more features to Pro than listed here!
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
See our full comparison of free vs pro here <a href="https://www.wcvendors.com/home/comparison/?utm_source=wporg">Compare free and pro</a>
|
72 |
|
73 |
= Translations =
|
74 |
|
@@ -86,14 +93,14 @@ We currently ship WC Vendors free with the following language translations. If y
|
|
86 |
* Persian
|
87 |
* French
|
88 |
* Swedish
|
89 |
-
* ...and more
|
90 |
|
91 |
== Installation ==
|
92 |
1. Download and install from WordPress.org.
|
93 |
-
2.
|
94 |
-
3.
|
95 |
-
4.
|
96 |
-
|
|
|
97 |
|
98 |
== Frequently Asked Questions ==
|
99 |
|
@@ -115,26 +122,77 @@ Also be sure to visit our documentation http://docs.wcvendors.com/
|
|
115 |
|
116 |
WC Vendors does not work with multisite WordPress. There are no plans to support this.
|
117 |
|
118 |
-
|
119 |
== Screenshots ==
|
120 |
|
121 |
-
1. General
|
122 |
-
2.
|
123 |
-
3. Capabilities
|
124 |
-
4.
|
125 |
-
5.
|
126 |
-
6.
|
127 |
-
7.
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
== Upgrade Notice ==
|
130 |
-
|
|
|
|
|
|
|
131 |
|
132 |
== Changelog ==
|
133 |
-
=Version 1.9.15 - 9th May 2018
|
134 |
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
-
=Version 1.9.14 - 18th
|
138 |
|
139 |
* Added: Export commissions via CSV
|
140 |
* Added: Commission Table Links #166
|
1 |
=== WC Vendors ===
|
2 |
Contributors: digitalchild, benwcv, annawcvendors
|
3 |
+
Tags: commission rate, e-commerce, ecommerce, ebay, free, marketplace, multi seller, multi store, multi vendor, multistore, multivendor, multivendors, product vendor, product vendors, seller, shops, store, vendor, vendor shop, vendor system, vendors, wc multivendor, wc vendors, wc marketplace, wc market, woo vendors, woocommerce, woocommerce marketplace, woocommerce multi vendor, WooCommerce multivendor, woocommerce product vendors, woocommerce vendors, yit, yith, yithemes, dokan
|
4 |
+
Donate link: https://www.wcvendors.com/
|
5 |
+
Author URI: https://www.wcvendors.com/
|
6 |
+
Plugin URI: https://www.wcvendors.com/
|
|
|
7 |
Requires at least: 4.4.0
|
8 |
Tested up to: 4.9.5
|
9 |
+
Stable tag: 2.0.0
|
10 |
License: GPLv2 or later
|
11 |
|
12 |
+
The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your WooCommerce site!
|
13 |
|
14 |
== Description ==
|
15 |
Create your own marketplace and allow vendors to sell just like etsy, Envato, eBay, or Amazon type sites! This allows other sellers/vendors to sell tangible products, virtual products, or downloads on your site. With this plugin, your vendors receive commissions you set on products they sell from your store.
|
16 |
|
17 |
+
WC Vendors was released to the market in October of 2014 having gotten its roots from Product Vendors by Matt Gates dating back to 2011. We are the number one multi vendor marketplace plugin for WordPress and WooCommerce. It is the most feature packed free plugin available for operating a WooCommerce based multi vendor store.
|
18 |
|
19 |
== Announcements ==
|
20 |
|
21 |
+
* WC Vendors 2.0 is a major update, this will affect some stores using other WC Vendors integrations.
|
22 |
+
* PayPal has depreciated Adaptive Payments as of September 1st 2017. This will soon cease to function. We provide an instant payment solution via our <a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=sport&utm_medium=pluginpage&utm_campaign=description?utm_source=wporg">Stripe Gateway</a> however there are 3rd party extensions from MangoPay and Escrow that also provide vendor commission payouts.
|
23 |
|
24 |
+
== Features ==
|
25 |
+
|
26 |
+
= WC Vendors =
|
27 |
+
|
28 |
+
The following features are available as a part of the free WC Vendors plugin.
|
29 |
+
|
30 |
+
* Vendors can add / edit products from within the WordPress dashboard.
|
31 |
* Vendors can submit products for admin review, or send new products live to the site immediately.
|
32 |
+
* Vendors can view live sales for their products from their front end dashboard
|
33 |
* Vendors can comment on their orders (eg, to inform customers of a tracking number)
|
34 |
* Vendors can export their orders to a CSV file
|
|
|
|
|
35 |
* Vendors can sell all product types
|
36 |
* Vendors manage their own media gallery/library
|
37 |
+
* Vendors can add bank details to their profile to be paid out via bank transfer
|
38 |
+
* Vendor stores have limited customization via templates
|
39 |
+
* Vendors can be notified of new customer orders via email
|
40 |
+
* Vendors have a store front which shows only their products. Their products are also listed in the main catalog for the marketplace.
|
41 |
+
* Vendor registration is available from the WooCommerce login screen.
|
42 |
+
* Vendors have their own user accounts
|
43 |
+
* Commission rates can be set globally, Per Vendor or Per product this is limited to percentage commissions only.
|
44 |
+
* Commissions can be exported to CSV for payment via other methods such as bank transfer
|
45 |
+
* Commissions can be manually marked as paid or automatic using our Stripe gateway
|
46 |
+
* Setup wizard makes configuring your marketplace a breeze
|
47 |
+
* Admins have a range of vendor specific shortcodes are available
|
48 |
+
* Admins can manually approve vendor applications or allow all applications to be accepted
|
49 |
+
* Shipping is limited to free shipping or via 3rd party plugins. Shipping zones are not supported.
|
50 |
+
* Allow tax collected to be given directly to the vendor during commission calculations.
|
51 |
+
* Test Payment Gateway included for testing your store before it goes live
|
52 |
+
* WPML Compatible
|
53 |
+
* <strong>Not compatible with WordPress Multisite</strong>
|
54 |
* Documentation with great articles on all the hooks, actions, filters, shortcodes, neat tricks, etc can be found on our documentation site here <a href="http://docs.wcvendors.com/">http://docs.wcvendors.com/</a>
|
55 |
|
56 |
= WC Vendors Pro =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
The following features are part of <a href="https://www.wcvendors.com/product/wc-vendors-pro/?utm_source=sport&utm_medium=pluginpage&utm_campaign=description?utm_source=wporg">WC Vendors Pro</a> our feature rich addition to your marketplace. Move all your vendors tasks to the frontend. They no longer need or see the WordPress admin.
|
59 |
+
|
60 |
+
* Vendors have a main dashboard showing sales reports and recent orders and products.
|
61 |
+
* Vendors have complete front end product management
|
62 |
+
* Vendors can add their own coupons that only apply to their products
|
63 |
+
* Vendors have advanced shipment tracking including shipping providers
|
64 |
+
* Vendors have the ability to print a shipping label with a picking list
|
65 |
+
* Vendors can add all their own social media profile links
|
66 |
+
* Vendors can add SEO to their store and products
|
67 |
+
* Vendors can add their own banner and store icon
|
68 |
+
* Vendors have a comprehensive shipping system available. Either flat rate or table rate based.
|
69 |
+
* Vendor stores templates are more advanced
|
70 |
+
* Vendors have more control over their order notes
|
71 |
+
* Vendors vacation module is included as part of pro not an extra addon
|
72 |
+
* Admins have multiple commission rate options including percentage, percentage + fee, fixed, fixed + fee.
|
73 |
+
* Admins can set global shipping rates as well as allow different shipping modules per vendor. Setting one as flat rate, while another can be table rate
|
74 |
+
* Ebay style feedback allows customers to rate the products from the vendors
|
75 |
+
* Premium ticket based support for all pro users. Annual and lifetime support licenses available.
|
76 |
+
* There's more features to Pro than listed here!
|
77 |
|
78 |
+
See our full comparison of free vs pro here <a href="https://www.wcvendors.com/home/comparison/?utm_source=sport&utm_medium=pluginpage&utm_campaign=description?utm_source=wporg">Compare free and pro</a>
|
79 |
|
80 |
= Translations =
|
81 |
|
93 |
* Persian
|
94 |
* French
|
95 |
* Swedish
|
|
|
96 |
|
97 |
== Installation ==
|
98 |
1. Download and install from WordPress.org.
|
99 |
+
2. Launch the setup wizard and follow the setup screens.
|
100 |
+
3. All settings are available under the WordPress Admin / WC Vendors / Settings screen
|
101 |
+
4. Configure your email notifications under WooCommerce / Settings / Emails screen
|
102 |
+
5. View Commissions under WC Vendors / Commissions and WooCommerce / Reports / WC Vendors screen
|
103 |
+
6. Vendors and pending vendors are available on the WordPress / Users screen
|
104 |
|
105 |
== Frequently Asked Questions ==
|
106 |
|
122 |
|
123 |
WC Vendors does not work with multisite WordPress. There are no plans to support this.
|
124 |
|
|
|
125 |
== Screenshots ==
|
126 |
|
127 |
+
1. General Options - Configure your general marketplace settings here
|
128 |
+
2. Commission Option - Set your percentage commission here
|
129 |
+
3. Capabilities General - Product and order functionality
|
130 |
+
4. Capabilities Product - Configure what to hide from the vendor on the product edit screen
|
131 |
+
5. Capabilities Order - Configure what the vendors can do with their orders
|
132 |
+
6. Display Options - Set the pages used for WC Vendors
|
133 |
+
7. Vendor dashboard
|
134 |
+
8. Setup Wizard General options
|
135 |
+
9. Setup Wizard Capabilities
|
136 |
+
10. Setup Wizard Pages
|
137 |
+
11. Setup Wizard complete
|
138 |
+
12. Email notifications for admins, customers and vendors
|
139 |
|
140 |
== Upgrade Notice ==
|
141 |
+
|
142 |
+
= 2.0 =
|
143 |
+
|
144 |
+
WC Vendors 2.0 is a major update. This is not compatible with ANY of our existing extensions. You should test this update on a staging server before updating. update your theme and extensions, and [review update details here](https://docs.wcvendors.com/knowledge-base/upgrading-to-wc-vendors-2-0/) before upgrading.
|
145 |
|
146 |
== Changelog ==
|
|
|
147 |
|
148 |
+
= Version 2.0.0 - 15th March 2018
|
149 |
+
|
150 |
+
* Added: New WC Vendors Admin menu
|
151 |
+
* Added: Bank details fields for vendors
|
152 |
+
* Added: New all new email system and templates
|
153 |
+
* Added: New contextual help menus on settings pages
|
154 |
+
* Added: New settings system and admin notice system
|
155 |
+
* Added: Setup Wizard
|
156 |
+
* Added: Support for PHP 7.1+
|
157 |
+
* Updated: styles and script build script
|
158 |
+
* Updated: language file cleanup
|
159 |
+
* Updated: Brazilian Portuguese translation thanks CasperBraske
|
160 |
+
* Fixed: Permalinks not flushing on settings save
|
161 |
+
* Fixed: Terms & Conditions Checkbox for Vendor Registration does not show #392
|
162 |
+
* Fixed: Depreciated calls on orders screen
|
163 |
+
* Fixed: Vendor role capabilities updated when new settings updated.
|
164 |
+
* Fixed: Vendors can delete media they uploaded
|
165 |
+
* Fixed: Added check for woocommerce shipping tax class setting
|
166 |
+
* Fixed: Tax classes not being used in shipping tax calculations
|
167 |
+
* Fixed: Make compatible with translate.wordpress.org #396
|
168 |
+
* Fixed: undefined index notice for reports that have been removed
|
169 |
+
* Fixed: Removed focus from select on vendor drop down on product edit screen
|
170 |
+
|
171 |
+
Templates Added:
|
172 |
+
templates/emails/plain/admin-notify-product.php
|
173 |
+
templates/emails/plain/admin-notify-shipped.php
|
174 |
+
templates/emails/plain/customer-notify-shipped.php
|
175 |
+
templates/emails/plain/vendor-notify-application.php
|
176 |
+
templates/emails/plain/vendor-notify-approved.php
|
177 |
+
templates/emails/plain/vendor-notify-denied.php
|
178 |
+
templates/emails/plain/vendor-notify-order.php
|
179 |
+
templates/emails/plain/vendor-order-details.php
|
180 |
+
templates/emails/plain/vendor-order-items.php
|
181 |
+
templates/emails/admin-notify-product.php
|
182 |
+
templates/emails/admin-notify-shipped.php
|
183 |
+
templates/emails/customer-notify-shipped.php
|
184 |
+
templates/emails/vendor-notify-application.php
|
185 |
+
templates/emails/vendor-notify-approved.php
|
186 |
+
templates/emails/vendor-notify-denied.php
|
187 |
+
templates/emails/vendor-notify-order.php
|
188 |
+
templates/emails/vendor-order-details.php
|
189 |
+
templates/emails/vendor-order-items.php
|
190 |
+
|
191 |
+
Templates Updated:
|
192 |
+
templates/dashboard/settings/settings.php
|
193 |
+
templates/order/table-body.php
|
194 |
|
195 |
+
=Version 1.9.14 - 18th February 2018
|
196 |
|
197 |
* Added: Export commissions via CSV
|
198 |
* Added: Commission Table Links #166
|
templates/dashboard/date-picker.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<form method="post">
|
2 |
<p>
|
3 |
-
<label style="display:inline;" for="from"><?php _e( 'From:', '
|
4 |
<input class="date-pick" type="date" name="start_date" id="from"
|
5 |
value="<?php echo esc_attr( date( 'Y-m-d', $start_date ) ); ?>"/>
|
6 |
|
7 |
-
<label style="display:inline;" for="to"><?php _e( 'To:', '
|
8 |
<input type="date" class="date-pick" name="end_date" id="to"
|
9 |
value="<?php echo esc_attr( date( 'Y-m-d', $end_date ) ); ?>"/>
|
10 |
|
11 |
<input type="submit" class="btn btn-inverse btn-small" style="float:none;"
|
12 |
-
value="<?php _e( 'Show', '
|
13 |
</p>
|
14 |
-
</form>
|
1 |
<form method="post">
|
2 |
<p>
|
3 |
+
<label style="display:inline;" for="from"><?php _e( 'From:', 'wc-vendors' ); ?></label>
|
4 |
<input class="date-pick" type="date" name="start_date" id="from"
|
5 |
value="<?php echo esc_attr( date( 'Y-m-d', $start_date ) ); ?>"/>
|
6 |
|
7 |
+
<label style="display:inline;" for="to"><?php _e( 'To:', 'wc-vendors' ); ?></label>
|
8 |
<input type="date" class="date-pick" name="end_date" id="to"
|
9 |
value="<?php echo esc_attr( date( 'Y-m-d', $end_date ) ); ?>"/>
|
10 |
|
11 |
<input type="submit" class="btn btn-inverse btn-small" style="float:none;"
|
12 |
+
value="<?php _e( 'Show', 'wc-vendors' ); ?>"/>
|
13 |
</p>
|
14 |
+
</form>
|
templates/dashboard/denied.php
CHANGED
@@ -1,17 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
global $woocommerce;
|
3 |
-
wc_print_notices();
|
4 |
-
} ?>
|
5 |
|
6 |
<?php if ( WCV_Vendors::is_pending( get_current_user_id() ) ) { ?>
|
7 |
|
8 |
-
<p><?php _e( 'Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!', '
|
9 |
|
10 |
<?php } else { ?>
|
11 |
|
12 |
-
<p><?php _e( 'Your account is not setup as a vendor.', '
|
13 |
|
14 |
-
<?php if (
|
15 |
<form method="POST" action="">
|
16 |
<div class="clear"></div>
|
17 |
<p class="form-row">
|
@@ -19,18 +16,18 @@
|
|
19 |
id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?>
|
20 |
type="checkbox" name="apply_for_vendor" value="1"/>
|
21 |
<label for="apply_for_vendor"
|
22 |
-
class="checkbox"><?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', '
|
23 |
</p>
|
24 |
|
25 |
<div class="clear"></div>
|
26 |
|
27 |
-
<?php if ( $terms_page =
|
28 |
<p class="form-row agree-to-terms-container" style="display:none">
|
29 |
<input class="input-checkbox"
|
30 |
id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?>
|
31 |
type="checkbox" name="agree_to_terms" value="1"/>
|
32 |
<label for="agree_to_terms"
|
33 |
-
class="checkbox"><?php printf( __( 'I have read and accepted the <a href="%s">terms and conditions</a>', '
|
34 |
</p>
|
35 |
|
36 |
<script type="text/javascript">
|
@@ -50,7 +47,7 @@
|
|
50 |
|
51 |
<p class="form-row">
|
52 |
<input type="submit" class="button" name="apply_for_vendor_submit"
|
53 |
-
value="<?php _e( 'Submit', '
|
54 |
</p>
|
55 |
</form>
|
56 |
<?php } ?>
|
1 |
+
<?php wc_print_notices(); ?>
|
|
|
|
|
|
|
2 |
|
3 |
<?php if ( WCV_Vendors::is_pending( get_current_user_id() ) ) { ?>
|
4 |
|
5 |
+
<p><?php _e( 'Your account has not yet been approved to become a vendor. When it is, you will receive an email telling you that your account is approved!', 'wc-vendors' ); ?></p>
|
6 |
|
7 |
<?php } else { ?>
|
8 |
|
9 |
+
<p><?php _e( 'Your account is not setup as a vendor.', 'wc-vendors' ); ?></p>
|
10 |
|
11 |
+
<?php if ( get_option( 'wcvendors_vendor_allow_registration' ) ) { ?>
|
12 |
<form method="POST" action="">
|
13 |
<div class="clear"></div>
|
14 |
<p class="form-row">
|
16 |
id="apply_for_vendor" <?php checked( isset( $_POST[ 'apply_for_vendor' ] ), true ) ?>
|
17 |
type="checkbox" name="apply_for_vendor" value="1"/>
|
18 |
<label for="apply_for_vendor"
|
19 |
+
class="checkbox"><?php echo apply_filters('wcvendors_vendor_registration_checkbox', __( 'Apply to become a vendor? ', 'wc-vendors' )); ?></label>
|
20 |
</p>
|
21 |
|
22 |
<div class="clear"></div>
|
23 |
|
24 |
+
<?php if ( $terms_page = get_option( 'terms_to_apply_page' ) ) { ?>
|
25 |
<p class="form-row agree-to-terms-container" style="display:none">
|
26 |
<input class="input-checkbox"
|
27 |
id="agree_to_terms" <?php checked( isset( $_POST[ 'agree_to_terms' ] ), true ) ?>
|
28 |
type="checkbox" name="agree_to_terms" value="1"/>
|
29 |
<label for="agree_to_terms"
|
30 |
+
class="checkbox"><?php printf( __( 'I have read and accepted the <a href="%s">terms and conditions</a>', 'wc-vendors' ), get_permalink( $terms_page ) ); ?></label>
|
31 |
</p>
|
32 |
|
33 |
<script type="text/javascript">
|
47 |
|
48 |
<p class="form-row">
|
49 |
<input type="submit" class="button" name="apply_for_vendor_submit"
|
50 |
+
value="<?php _e( 'Submit', 'wc-vendors' ); ?>"/>
|
51 |
</p>
|
52 |
</form>
|
53 |
<?php } ?>
|
templates/dashboard/links.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<center>
|
2 |
<p>
|
3 |
-
<a href="<?php echo $shop_page; ?>" class="button"><?php echo _e( 'View Your Store', '
|
4 |
-
<a href="<?php echo $settings_page; ?>" class="button"><?php echo _e( 'Store Settings', '
|
5 |
|
6 |
<?php if ( $can_submit ) { ?>
|
7 |
-
<a target="_TOP" href="<?php echo $submit_link; ?>" class="button"><?php echo _e( 'Add New Product', '
|
8 |
-
<a target="_TOP" href="<?php echo $edit_link; ?>" class="button"><?php echo _e( 'Edit Products', '
|
9 |
-
<?php }
|
10 |
do_action( 'wcvendors_after_links' );
|
11 |
?>
|
12 |
</center>
|
13 |
|
14 |
-
<hr>
|
1 |
<center>
|
2 |
<p>
|
3 |
+
<a href="<?php echo $shop_page; ?>" class="button"><?php echo _e( 'View Your Store', 'wc-vendors' ); ?></a>
|
4 |
+
<a href="<?php echo $settings_page; ?>" class="button"><?php echo _e( 'Store Settings', 'wc-vendors' ); ?></a>
|
5 |
|
6 |
<?php if ( $can_submit ) { ?>
|
7 |
+
<a target="_TOP" href="<?php echo $submit_link; ?>" class="button"><?php echo _e( 'Add New Product', 'wc-vendors' ); ?></a>
|
8 |
+
<a target="_TOP" href="<?php echo $edit_link; ?>" class="button"><?php echo _e( 'Edit Products', 'wc-vendors' ); ?></a>
|
9 |
+
<?php }
|
10 |
do_action( 'wcvendors_after_links' );
|
11 |
?>
|
12 |
</center>
|
13 |
|
14 |
+
<hr>
|
templates/dashboard/orders.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* @package WCVendors
|
8 |
* @version 1.9.4
|
9 |
*/
|
10 |
-
?>
|
11 |
|
12 |
<script type="text/javascript">
|
13 |
jQuery(function () {
|
@@ -15,10 +15,10 @@ jQuery(function () {
|
|
15 |
e.preventDefault();
|
16 |
var id = jQuery(this).closest('tr').data('order-id');
|
17 |
|
18 |
-
if ( jQuery(this).text() == "<?php _e('Hide items', '
|
19 |
-
jQuery(this).text("<?php _e('View items', '
|
20 |
} else {
|
21 |
-
jQuery(this).text("<?php _e('Hide items', '
|
22 |
}
|
23 |
|
24 |
jQuery("#view-items-" + id).fadeToggle();
|
@@ -27,12 +27,12 @@ jQuery(function () {
|
|
27 |
jQuery('a.view-order-tracking').on('click', function (e) {
|
28 |
e.preventDefault();
|
29 |
var id = jQuery(this).closest('tr').data('order-id');
|
30 |
-
jQuery("#view-tracking-" + id).fadeToggle();
|
31 |
});
|
32 |
});
|
33 |
</script>
|
34 |
|
35 |
-
<h2><?php _e( 'Orders', '
|
36 |
|
37 |
<?php global $woocommerce; ?>
|
38 |
|
@@ -41,11 +41,11 @@ jQuery(function () {
|
|
41 |
<table class="table table-condensed table-vendor-sales-report">
|
42 |
<thead>
|
43 |
<tr>
|
44 |
-
<th class="product-header"><?php _e( 'Order', '
|
45 |
-
<th class="quantity-header"><?php _e( 'Shipping', '
|
46 |
-
<th class="commission-header"><?php _e( 'Total', '
|
47 |
-
<th class="rate-header"><?php _e( 'Date', '
|
48 |
-
<th class="rate-header"><?php _e( 'Links', '
|
49 |
</thead>
|
50 |
<tbody>
|
51 |
|
@@ -56,10 +56,10 @@ jQuery(function () {
|
|
56 |
<?php foreach ( $order_summary as $order ) :
|
57 |
|
58 |
$order = wc_get_order( $order->order_id );
|
59 |
-
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
60 |
$valid_items = WCV_Queries::get_products_for_order( $order_id );
|
61 |
$valid = array();
|
62 |
-
$needs_shipping = false;
|
63 |
|
64 |
$items = $order->get_items();
|
65 |
|
@@ -67,17 +67,17 @@ jQuery(function () {
|
|
67 |
if ( in_array( $value['variation_id'], $valid_items) || in_array( $value['product_id'], $valid_items ) ) {
|
68 |
$valid[] = $value;
|
69 |
}
|
70 |
-
// See if product needs shipping
|
71 |
-
$product = new WC_Product($value['product_id'] );
|
72 |
-
$needs_shipping = ( !$product->needs_shipping() || $product->is_downloadable('yes') ) ? false : true;
|
73 |
|
74 |
}
|
75 |
|
76 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
77 |
$shipped = in_array($user_id, $shippers);
|
78 |
|
79 |
-
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
80 |
-
|
81 |
?>
|
82 |
|
83 |
<tr id="order-<?php echo $order_id; ?>" data-order-id="<?php echo $order_id; ?>">
|
@@ -90,33 +90,33 @@ jQuery(function () {
|
|
90 |
$order_actions = array(
|
91 |
'view' => array(
|
92 |
'class' => 'view-items',
|
93 |
-
'content' => __('View items', '
|
94 |
)
|
95 |
);
|
96 |
if ( $needs_shipping ) {
|
97 |
$order_actions['shipped'] = array(
|
98 |
'class' => 'mark-shipped',
|
99 |
-
'content' => __('Mark shipped', '
|
100 |
'url' => '?wc_pv_mark_shipped=' . $order_id
|
101 |
);
|
102 |
-
}
|
103 |
-
if ( $shipped ) {
|
104 |
$order_actions[ 'shipped' ] = array(
|
105 |
'class' => 'mark-shipped',
|
106 |
-
'content' => __('Shipped', '
|
107 |
'url' => '#'
|
108 |
);
|
109 |
-
}
|
110 |
|
111 |
if ( $providers && $needs_shipping && class_exists( 'WC_Shipment_Tracking' ) ) {
|
112 |
$order_actions['tracking'] = array(
|
113 |
'class' => 'view-order-tracking',
|
114 |
-
'content' => __( 'Tracking', '
|
115 |
);
|
116 |
}
|
117 |
-
|
118 |
-
$order_actions = apply_filters( 'wcvendors_order_actions', $order_actions, $order );
|
119 |
-
|
120 |
if ($order_actions) {
|
121 |
$output = array();
|
122 |
foreach ($order_actions as $key => $data) {
|
@@ -136,13 +136,13 @@ jQuery(function () {
|
|
136 |
|
137 |
<tr id="view-items-<?php echo $order_id; ?>" style="display:none;">
|
138 |
<td colspan="5">
|
139 |
-
<?php
|
140 |
$product_id = '';
|
141 |
foreach ($valid as $key => $item):
|
142 |
-
|
143 |
-
// Get variation data if there is any.
|
144 |
-
$variation_detail = !empty( $item['variation_id'] ) ? WCV_Orders::get_variation_data( $item[ 'variation_id' ] ) : '';
|
145 |
-
|
146 |
?>
|
147 |
<?php echo $item['qty'] . 'x ' . $item['name']; ?>
|
148 |
<?php if ( !empty( $variation_detail ) ) echo '<br />' . $variation_detail; ?>
|
@@ -154,9 +154,9 @@ jQuery(function () {
|
|
154 |
</tr>
|
155 |
|
156 |
<?php if ( class_exists( 'WC_Shipment_Tracking' ) ) : ?>
|
157 |
-
|
158 |
<?php if ( is_array( $providers ) ) : ?>
|
159 |
-
<tr id="view-tracking-<?php echo $order_id; ?>" style="display:none;">
|
160 |
<td colspan="5">
|
161 |
<div class="order-tracking">
|
162 |
<?php
|
@@ -171,7 +171,7 @@ jQuery(function () {
|
|
171 |
</td>
|
172 |
</tr>
|
173 |
<?php endif; ?>
|
174 |
-
|
175 |
<?php endif; ?>
|
176 |
|
177 |
<?php endforeach; ?>
|
@@ -185,10 +185,10 @@ jQuery(function () {
|
|
185 |
|
186 |
<tr>
|
187 |
<td colspan="4"
|
188 |
-
style="text-align:center;"><?php _e( 'You have no orders during this period.', '
|
189 |
</tr>
|
190 |
|
191 |
<?php endif; ?>
|
192 |
|
193 |
</tbody>
|
194 |
-
</table>
|
7 |
* @package WCVendors
|
8 |
* @version 1.9.4
|
9 |
*/
|
10 |
+
?>
|
11 |
|
12 |
<script type="text/javascript">
|
13 |
jQuery(function () {
|
15 |
e.preventDefault();
|
16 |
var id = jQuery(this).closest('tr').data('order-id');
|
17 |
|
18 |
+
if ( jQuery(this).text() == "<?php _e('Hide items', 'wc-vendors'); ?>" ) {
|
19 |
+
jQuery(this).text("<?php _e('View items', 'wc-vendors'); ?>");
|
20 |
} else {
|
21 |
+
jQuery(this).text("<?php _e('Hide items', 'wc-vendors'); ?>");
|
22 |
}
|
23 |
|
24 |
jQuery("#view-items-" + id).fadeToggle();
|
27 |
jQuery('a.view-order-tracking').on('click', function (e) {
|
28 |
e.preventDefault();
|
29 |
var id = jQuery(this).closest('tr').data('order-id');
|
30 |
+
jQuery("#view-tracking-" + id).fadeToggle();
|
31 |
});
|
32 |
});
|
33 |
</script>
|
34 |
|
35 |
+
<h2><?php _e( 'Orders', 'wc-vendors' ); ?></h2>
|
36 |
|
37 |
<?php global $woocommerce; ?>
|
38 |
|
41 |
<table class="table table-condensed table-vendor-sales-report">
|
42 |
<thead>
|
43 |
<tr>
|
44 |
+
<th class="product-header"><?php _e( 'Order', 'wc-vendors' ); ?></th>
|
45 |
+
<th class="quantity-header"><?php _e( 'Shipping', 'wc-vendors' ) ?></th>
|
46 |
+
<th class="commission-header"><?php _e( 'Total', 'wc-vendors' ) ?></th>
|
47 |
+
<th class="rate-header"><?php _e( 'Date', 'wc-vendors' ) ?></th>
|
48 |
+
<th class="rate-header"><?php _e( 'Links', 'wc-vendors' ) ?></th>
|
49 |
</thead>
|
50 |
<tbody>
|
51 |
|
56 |
<?php foreach ( $order_summary as $order ) :
|
57 |
|
58 |
$order = wc_get_order( $order->order_id );
|
59 |
+
$order_id = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->id : $order->get_id();
|
60 |
$valid_items = WCV_Queries::get_products_for_order( $order_id );
|
61 |
$valid = array();
|
62 |
+
$needs_shipping = false;
|
63 |
|
64 |
$items = $order->get_items();
|
65 |
|
67 |
if ( in_array( $value['variation_id'], $valid_items) || in_array( $value['product_id'], $valid_items ) ) {
|
68 |
$valid[] = $value;
|
69 |
}
|
70 |
+
// See if product needs shipping
|
71 |
+
$product = new WC_Product($value['product_id'] );
|
72 |
+
$needs_shipping = ( !$product->needs_shipping() || $product->is_downloadable('yes') ) ? false : true;
|
73 |
|
74 |
}
|
75 |
|
76 |
$shippers = (array) get_post_meta( $order_id, 'wc_pv_shipped', true );
|
77 |
$shipped = in_array($user_id, $shippers);
|
78 |
|
79 |
+
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
80 |
+
|
81 |
?>
|
82 |
|
83 |
<tr id="order-<?php echo $order_id; ?>" data-order-id="<?php echo $order_id; ?>">
|
90 |
$order_actions = array(
|
91 |
'view' => array(
|
92 |
'class' => 'view-items',
|
93 |
+
'content' => __('View items', 'wc-vendors'),
|
94 |
)
|
95 |
);
|
96 |
if ( $needs_shipping ) {
|
97 |
$order_actions['shipped'] = array(
|
98 |
'class' => 'mark-shipped',
|
99 |
+
'content' => __('Mark shipped', 'wc-vendors'),
|
100 |
'url' => '?wc_pv_mark_shipped=' . $order_id
|
101 |
);
|
102 |
+
}
|
103 |
+
if ( $shipped ) {
|
104 |
$order_actions[ 'shipped' ] = array(
|
105 |
'class' => 'mark-shipped',
|
106 |
+
'content' => __('Shipped', 'wc-vendors'),
|
107 |
'url' => '#'
|
108 |
);
|
109 |
+
}
|
110 |
|
111 |
if ( $providers && $needs_shipping && class_exists( 'WC_Shipment_Tracking' ) ) {
|
112 |
$order_actions['tracking'] = array(
|
113 |
'class' => 'view-order-tracking',
|
114 |
+
'content' => __( 'Tracking', 'wc-vendors' )
|
115 |
);
|
116 |
}
|
117 |
+
|
118 |
+
$order_actions = apply_filters( 'wcvendors_order_actions', $order_actions, $order );
|
119 |
+
|
120 |
if ($order_actions) {
|
121 |
$output = array();
|
122 |
foreach ($order_actions as $key => $data) {
|
136 |
|
137 |
<tr id="view-items-<?php echo $order_id; ?>" style="display:none;">
|
138 |
<td colspan="5">
|
139 |
+
<?php
|
140 |
$product_id = '';
|
141 |
foreach ($valid as $key => $item):
|
142 |
+
|
143 |
+
// Get variation data if there is any.
|
144 |
+
$variation_detail = !empty( $item['variation_id'] ) ? WCV_Orders::get_variation_data( $item[ 'variation_id' ] ) : '';
|
145 |
+
|
146 |
?>
|
147 |
<?php echo $item['qty'] . 'x ' . $item['name']; ?>
|
148 |
<?php if ( !empty( $variation_detail ) ) echo '<br />' . $variation_detail; ?>
|
154 |
</tr>
|
155 |
|
156 |
<?php if ( class_exists( 'WC_Shipment_Tracking' ) ) : ?>
|
157 |
+
|
158 |
<?php if ( is_array( $providers ) ) : ?>
|
159 |
+
<tr id="view-tracking-<?php echo $order_id; ?>" style="display:none;">
|
160 |
<td colspan="5">
|
161 |
<div class="order-tracking">
|
162 |
<?php
|
171 |
</td>
|
172 |
</tr>
|
173 |
<?php endif; ?>
|
174 |
+
|
175 |
<?php endif; ?>
|
176 |
|
177 |
<?php endforeach; ?>
|
185 |
|
186 |
<tr>
|
187 |
<td colspan="4"
|
188 |
+
style="text-align:center;"><?php _e( 'You have no orders during this period.', 'wc-vendors' ); ?></td>
|
189 |
</tr>
|
190 |
|
191 |
<?php endif; ?>
|
192 |
|
193 |
</tbody>
|
194 |
+
</table>
|
templates/dashboard/reports.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<h2><?php _e( 'Sales Report', '
|
2 |
|
3 |
<?php
|
4 |
|
@@ -14,10 +14,10 @@ if ( $datepicker !== 'false' ) {
|
|
14 |
<table class="table table-condensed table-vendor-sales-report">
|
15 |
<thead>
|
16 |
<tr>
|
17 |
-
<th class="product-header"><?php _e( 'Product', '
|
18 |
-
<th class="quantity-header"><?php _e( 'Quantity', '
|
19 |
-
<th class="commission-header"><?php _e( 'Commission', '
|
20 |
-
<th class="rate-header"><?php _e( 'Rate', '
|
21 |
<th></th>
|
22 |
</thead>
|
23 |
<tbody>
|
@@ -44,7 +44,7 @@ if ( $datepicker !== 'false' ) {
|
|
44 |
|
45 |
<?php if ( $can_view_orders ) : ?>
|
46 |
<td>
|
47 |
-
<a href="<?php echo $product[ 'view_orders_url' ]; ?>"><?php _e( 'Show Orders', '
|
48 |
</td>
|
49 |
<?php endif; ?>
|
50 |
|
@@ -53,7 +53,7 @@ if ( $datepicker !== 'false' ) {
|
|
53 |
<?php endforeach; ?>
|
54 |
|
55 |
<tr>
|
56 |
-
<td><strong><?php _e( 'Totals', '
|
57 |
<td><?php echo $vendor_summary[ 'total_qty' ]; ?></td>
|
58 |
<td><?php echo wc_price( $vendor_summary[ 'total_cost' ] ); ?></td>
|
59 |
<td></td>
|
@@ -68,7 +68,7 @@ if ( $datepicker !== 'false' ) {
|
|
68 |
|
69 |
<tr>
|
70 |
<td colspan="4"
|
71 |
-
style="text-align:center;"><?php _e( 'You have no sales during this period.', '
|
72 |
</tr>
|
73 |
|
74 |
<?php endif; ?>
|
@@ -79,7 +79,7 @@ if ( $datepicker !== 'false' ) {
|
|
79 |
|
80 |
<tr>
|
81 |
<td colspan="4"
|
82 |
-
style="text-align:center;"><?php _e( 'You haven\'t made any sales yet.', '
|
83 |
</tr>
|
84 |
|
85 |
<?php endif; ?>
|
1 |
+
<h2><?php _e( 'Sales Report', 'wc-vendors' ); ?></h2>
|
2 |
|
3 |
<?php
|
4 |
|
14 |
<table class="table table-condensed table-vendor-sales-report">
|
15 |
<thead>
|
16 |
<tr>
|
17 |
+
<th class="product-header"><?php _e( 'Product', 'wc-vendors' ); ?></th>
|
18 |
+
<th class="quantity-header"><?php _e( 'Quantity', 'wc-vendors' ) ?></th>
|
19 |
+
<th class="commission-header"><?php _e( 'Commission', 'wc-vendors' ) ?></th>
|
20 |
+
<th class="rate-header"><?php _e( 'Rate', 'wc-vendors' ) ?></th>
|
21 |
<th></th>
|
22 |
</thead>
|
23 |
<tbody>
|
44 |
|
45 |
<?php if ( $can_view_orders ) : ?>
|
46 |
<td>
|
47 |
+
<a href="<?php echo $product[ 'view_orders_url' ]; ?>"><?php _e( 'Show Orders', 'wc-vendors' ); ?></a>
|
48 |
</td>
|
49 |
<?php endif; ?>
|
50 |
|
53 |
<?php endforeach; ?>
|
54 |
|
55 |
<tr>
|
56 |
+
<td><strong><?php _e( 'Totals', 'wc-vendors' ); ?></strong></td>
|
57 |
<td><?php echo $vendor_summary[ 'total_qty' ]; ?></td>
|
58 |
<td><?php echo wc_price( $vendor_summary[ 'total_cost' ] ); ?></td>
|
59 |
<td></td>
|
68 |
|
69 |
<tr>
|
70 |
<td colspan="4"
|
71 |
+
style="text-align:center;"><?php _e( 'You have no sales during this period.', 'wc-vendors' ); ?></td>
|
72 |
</tr>
|
73 |
|
74 |
<?php endif; ?>
|
79 |
|
80 |
<tr>
|
81 |
<td colspan="4"
|
82 |
+
style="text-align:center;"><?php _e( 'You haven\'t made any sales yet.', 'wc-vendors' ); ?></td>
|
83 |
</tr>
|
84 |
|
85 |
<?php endif; ?>
|
templates/dashboard/settings/paypal-email-form.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="pv_paypal_container">
|
2 |
-
<p><b><?php _e( 'PayPal Address', '
|
3 |
-
<?php _e( 'Your PayPal address
|
4 |
|
5 |
<input type="email" name="pv_paypal" id="pv_paypal" placeholder="some@email.com"
|
6 |
value="<?php echo get_user_meta( $user_id, 'pv_paypal', true ); ?>"/>
|
1 |
<div class="pv_paypal_container">
|
2 |
+
<p><b><?php _e( 'PayPal Address', 'wc-vendors' ); ?></b><br/>
|
3 |
+
<?php _e( 'Your PayPal address can be used to manually send you your commission.', 'wc-vendors' ); ?><br/>
|
4 |
|
5 |
<input type="email" name="pv_paypal" id="pv_paypal" placeholder="some@email.com"
|
6 |
value="<?php echo get_user_meta( $user_id, 'pv_paypal', true ); ?>"/>
|
templates/dashboard/settings/seller-info.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div id="pv_seller_info_container">
|
2 |
<p>
|
3 |
-
<b><?php echo apply_filters( 'wcvendors_seller_info_label', __( 'Seller info', '
|
4 |
-
<?php _e( 'This is displayed on each of your products.', '
|
5 |
|
6 |
<p>
|
7 |
<?php
|
1 |
<div id="pv_seller_info_container">
|
2 |
<p>
|
3 |
+
<b><?php echo apply_filters( 'wcvendors_seller_info_label', __( 'Seller info', 'wc-vendors' ) ); ?></b><br/>
|
4 |
+
<?php _e( 'This is displayed on each of your products.', 'wc-vendors' ); ?></p>
|
5 |
|
6 |
<p>
|
7 |
<?php
|
templates/dashboard/settings/settings.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<h2><?php _e( 'Settings', '
|
2 |
|
3 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
4 |
|
@@ -15,6 +15,28 @@
|
|
15 |
|
16 |
do_action( 'wcvendors_settings_after_paypal' );
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
wc_get_template( 'shop-name.php', array(
|
19 |
'user_id' => $user_id,
|
20 |
), 'wc-vendors/dashboard/settings/', wcv_plugin_dir . 'templates/dashboard/settings/' );
|
@@ -44,5 +66,5 @@
|
|
44 |
|
45 |
<?php wp_nonce_field( 'save-shop-settings', 'wc-product-vendor-nonce' ); ?>
|
46 |
<input type="submit" class="btn btn-inverse btn-small" style="float:none;" name="vendor_application_submit"
|
47 |
-
value="<?php _e( 'Save', '
|
48 |
</form>
|
1 |
+
<h2><?php _e( 'Settings', 'wc-vendors' ); ?></h2>
|
2 |
|
3 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
4 |
|
15 |
|
16 |
do_action( 'wcvendors_settings_after_paypal' );
|
17 |
|
18 |
+
?>
|
19 |
+
|
20 |
+
<?php if ( apply_filters( 'wcvendors_vendor_dashboard_bank_details_enable', true ) ) : ?>
|
21 |
+
|
22 |
+
<h3><?php _e( 'Bank Details', 'wc-vendors' ); ?></h3>
|
23 |
+
<table>
|
24 |
+
<tr>
|
25 |
+
<td><p class="form-row notes"><label for=""><?php _e( 'Account Name', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_account_name" id="wcv_bank_account_name" value="<?php echo get_user_meta( $user_id, 'wcv_bank_account_name', true ); ?>" /></p></td>
|
26 |
+
<td><p class="form-row notes"><label for="wcv_bank_account_number"><?php _e( 'Account Number', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_account_number" id="wcv_bank_account_number" value="<?php echo get_user_meta( $user_id, 'wcv_bank_account_number', true ); ?>" /></p></td>
|
27 |
+
<td><p class="form-row notes"><label for="wcv_bank_name"><?php _e( 'Bank Name', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_name" id="wcv_bank_name" value="<?php echo get_user_meta( $user_id, 'wcv_bank_name', true ); ?>"/></p></td>
|
28 |
+
</tr>
|
29 |
+
<tr>
|
30 |
+
<td><p class="form-row notes"><label for="wcv_bank_routing_number"><?php _e( 'Routing Number', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_routing_number" id="wcv_bank_routing_number" value="<?php echo get_user_meta( $user_id, 'wcv_bank_routing_number', true ); ?>" /></p></td>
|
31 |
+
<td><p class="form-row notes"><label for="wcv_bank_iban"><?php _e( 'IBAN', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_iban" id="wcv_bank_iban" value="<?php echo get_user_meta( $user_id, 'wcv_bank_iban', true ); ?>" /></p></td>
|
32 |
+
<td><p class="form-row notes"><label for="wcv_bank_bic_swift"><?php _e( 'BIC / Swift', 'wc-vendors' ); ?></label><input type="text" name="wcv_bank_bic_swift" id="wcv_bank_bic_swift" value="<?php echo get_user_meta( $user_id, 'wcv_bank_bic_swift', true ); ?>"/></p></td>
|
33 |
+
</tr>
|
34 |
+
</table>
|
35 |
+
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
|
40 |
wc_get_template( 'shop-name.php', array(
|
41 |
'user_id' => $user_id,
|
42 |
), 'wc-vendors/dashboard/settings/', wcv_plugin_dir . 'templates/dashboard/settings/' );
|
66 |
|
67 |
<?php wp_nonce_field( 'save-shop-settings', 'wc-product-vendor-nonce' ); ?>
|
68 |
<input type="submit" class="btn btn-inverse btn-small" style="float:none;" name="vendor_application_submit"
|
69 |
+
value="<?php _e( 'Save', 'wc-vendors' ); ?>"/>
|
70 |
</form>
|
templates/dashboard/settings/shop-description.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div id="pv_shop_description_container">
|
2 |
-
<p><b><?php _e( 'Shop Description', '
|
3 |
-
<?php printf( __( 'This is displayed on your <a href="%s">shop page</a>.', '
|
4 |
</p>
|
5 |
|
6 |
<p>
|
1 |
<div id="pv_shop_description_container">
|
2 |
+
<p><b><?php _e( 'Shop Description', 'wc-vendors' ); ?></b><br/>
|
3 |
+
<?php printf( __( 'This is displayed on your <a href="%s">shop page</a>.', 'wc-vendors' ), $shop_page ); ?>
|
4 |
</p>
|
5 |
|
6 |
<p>
|
templates/dashboard/settings/shop-name.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="pv_shop_name_container">
|
2 |
-
<p><b><?php _e( 'Shop Name', '
|
3 |
-
<?php _e( 'Your shop name is public and must be unique.', '
|
4 |
|
5 |
<input type="text" name="pv_shop_name" id="pv_shop_name" placeholder="Your shop name"
|
6 |
value="<?php echo get_user_meta( $user_id, 'pv_shop_name', true ); ?>"/>
|
1 |
<div class="pv_shop_name_container">
|
2 |
+
<p><b><?php _e( 'Shop Name', 'wc-vendors' ); ?></b><br/>
|
3 |
+
<?php _e( 'Your shop name is public and must be unique.', 'wc-vendors' ); ?><br/>
|
4 |
|
5 |
<input type="text" name="pv_shop_name" id="pv_shop_name" placeholder="Your shop name"
|
6 |
value="<?php echo get_user_meta( $user_id, 'pv_shop_name', true ); ?>"/>
|
templates/emails/admin-notify-application.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin New Vendor Application
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-notify-application.php.
|
6 |
+
*
|
7 |
+
* @author Jamie Madden, WC Vendors
|
8 |
+
* @package WCVendors/Templates/Emails/HTML
|
9 |
+
* @version 2.0.0
|
10 |
+
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
18 |
+
|
19 |
+
<p><?php printf( __( 'Hi there. This is a notification about a vendor application on %s.', 'wc-vendors' ), get_option( 'blogname' ) ); ?></p>
|
20 |
+
|
21 |
+
<p><?php printf( __( 'The application is currently: %s', 'wc-vendors' ), $status ); ?></p>
|
22 |
+
<p><?php printf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ); ?></p>
|
23 |
+
|
24 |
+
<?php if ( 'pending' === $status ) : ?>
|
25 |
+
<p>
|
26 |
+
<?php printf( __('You can approve or deny the application at the following link %s', 'wc-vendors' ), admin_url( 'users.php?role=pending_vendor' ) ); ?>
|
27 |
+
</p>
|
28 |
+
<?php endif; ?>
|
29 |
+
|
30 |
+
<?php
|
31 |
+
|
32 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/admin-notify-product.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin New Vendor Product
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-notify-product.php.
|
6 |
+
*
|
7 |
+
* @author Jamie Madden, WC Vendors
|
8 |
+
* @package WCVendors/Templates/Emails/HTML
|
9 |
+
* @version 2.0.0
|
10 |
+
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
18 |
+
|
19 |
+
<p><?php printf( __( 'This is a notification about a new product on %s.', 'wc-vendors' ), get_option( 'blogname' ) ); ?></p>
|
20 |
+
|
21 |
+
<p>
|
22 |
+
<?php printf( __( 'Product title: %s', 'wc-vendors' ), $product->get_title() ); ?><br/>
|
23 |
+
<?php printf( __( 'Submitted by: %s', 'wc-vendors' ), $vendor_name ); ?><br/>
|
24 |
+
<?php printf( __( 'Edit product: %s', 'wc-vendors' ), admin_url( 'post.php?post=' . $post_id . '&action=edit' ) ); ?>
|
25 |
+
</p>
|
26 |
+
|
27 |
+
<?php
|
28 |
+
|
29 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/admin-notify-shipped.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Vendor Shipped
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-notify-shipped.php.
|
6 |
+
*
|
7 |
+
* @author Jamie Madden, WC Vendors
|
8 |
+
* @package WCVendors/Templates/Emails/HTML
|
9 |
+
* @version 2.0.0
|
10 |
+
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
18 |
+
|
19 |
+
?><p><?php printf( __('%s has marked order #%s as shipped.' ), WCV_Vendors::get_vendor_shop_name( $vendor_id ), $order->get_id() ) ?></p><?php
|
20 |
+
|
21 |
+
|
22 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/application-status.php
CHANGED
@@ -1,12 +1,15 @@
|
|
|
|
|
|
|
|
1 |
<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
|
2 |
|
3 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
4 |
|
5 |
-
<p><?php printf( __( "Hi there. This is a notification about a vendor application on %s.", '
|
6 |
|
7 |
<p>
|
8 |
-
<?php printf( __( "Application status: %s", '
|
9 |
-
<?php printf( __( "Applicant username: %s", '
|
10 |
</p>
|
11 |
|
12 |
-
<?php do_action( 'woocommerce_email_footer' ); ?>
|
1 |
+
|
2 |
+
<!-- DEPRECAITED -->
|
3 |
+
|
4 |
<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
|
5 |
|
6 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
7 |
|
8 |
+
<p><?php printf( __( "Hi there. This is a notification about a vendor application on %s.", 'wc-vendors' ), get_option( 'blogname' ) ); ?></p>
|
9 |
|
10 |
<p>
|
11 |
+
<?php printf( __( "Application status: %s", 'wc-vendors' ), $status ); ?><br/>
|
12 |
+
<?php printf( __( "Applicant username: %s", 'wc-vendors' ), $user->user_login ); ?>
|
13 |
</p>
|
14 |
|
15 |
+
<?php do_action( 'woocommerce_email_footer' ); ?>
|
templates/emails/customer-notify-shipped.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer Vendor Shipped
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-order.php.
|
6 |
+
*
|
7 |
+
* @author Jamie Madden, WC Vendors
|
8 |
+
* @package WCVendors/Templates/Emails/HTML
|
9 |
+
* @version 2.0.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @hooked WC_Emails::email_header() Output the email header
|
18 |
+
*/
|
19 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
20 |
+
|
21 |
+
?><p><?php printf( __('%s has marked your order #%s as shipped. The items that are shipped are as follows' ), WCV_Vendors::get_vendor_shop_name( $vendor_id ), $order->get_id() ) ?></p><?php
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @hooked WC_Emails::order_details() Shows the order details table.
|
25 |
+
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
|
26 |
+
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
|
27 |
+
* @since 2.5.0
|
28 |
+
*/
|
29 |
+
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @hooked WC_Emails::order_meta() Shows order meta data.
|
33 |
+
*/
|
34 |
+
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @hooked WC_Emails::customer_details() Shows customer details
|
38 |
+
* @hooked WC_Emails::email_address() Shows email address
|
39 |
+
*/
|
40 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @hooked WC_Emails::email_footer() Output the email footer
|
44 |
+
*/
|
45 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/new-product.php
CHANGED
@@ -1,14 +1,17 @@
|
|
|
|
|
|
|
|
1 |
<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
|
2 |
|
3 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
4 |
|
5 |
-
<p><?php printf( __( "Hi there. This is a notification about a new product on %s.", '
|
6 |
|
7 |
<p>
|
8 |
-
<?php printf( __( "Product title: %s", '
|
9 |
-
<?php printf( __( "Submitted by: %s", '
|
10 |
-
<?php printf( __( "Edit product: %s", '
|
11 |
<br/>
|
12 |
</p>
|
13 |
|
14 |
-
<?php do_action( 'woocommerce_email_footer' ); ?>
|
1 |
+
|
2 |
+
<!-- DEPRECAITED - -->
|
3 |
+
|
4 |
<?php if ( !defined( 'ABSPATH' ) ) exit; ?>
|
5 |
|
6 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
7 |
|
8 |
+
<p><?php printf( __( "Hi there. This is a notification about a new product on %s.", 'wc-vendors' ), get_option( 'blogname' ) ); ?></p>
|
9 |
|
10 |
<p>
|
11 |
+
<?php printf( __( "Product title: %s", 'wc-vendors' ), $product_name ); ?><br/>
|
12 |
+
<?php printf( __( "Submitted by: %s", 'wc-vendors' ), $vendor_name ); ?><br/>
|
13 |
+
<?php printf( __( "Edit product: %s", 'wc-vendors' ), admin_url( 'post.php?post=' . $post_id . '&action=edit' ) ); ?>
|
14 |
<br/>
|
15 |
</p>
|
16 |
|
17 |
+
<?php do_action( 'woocommerce_email_footer' ); ?>
|
templates/emails/notify-vendor-shipped.php
CHANGED
@@ -1,31 +1,32 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Admin new order email
|
|
|
4 |
*
|
5 |
* @author WooThemes
|
6 |
* @package WooCommerce/Templates/Emails/HTML
|
7 |
* @version 2.0.0
|
8 |
*/
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
10 |
|
11 |
-
$order_date =
|
12 |
|
13 |
?>
|
14 |
|
15 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
16 |
|
17 |
-
<p><?php _e( 'A vendor has marked part of your order as shipped. The items that are shipped are as follows:', '
|
18 |
|
19 |
<?php do_action( 'woocommerce_email_before_order_table', $order, true ); ?>
|
20 |
|
21 |
-
<h2><?php printf( __( 'Order: %s', '
|
22 |
|
23 |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
24 |
<thead>
|
25 |
<tr>
|
26 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', '
|
27 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', '
|
28 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', '
|
29 |
</tr>
|
30 |
</thead>
|
31 |
<tbody>
|
@@ -57,15 +58,15 @@ $order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date
|
|
57 |
|
58 |
<?php do_action( 'woocommerce_email_order_meta', $order, true ); ?>
|
59 |
|
60 |
-
<h2><?php _e( 'Customer details', '
|
61 |
|
62 |
<?php if ( $order->get_billing_email() ) : ?>
|
63 |
-
<p><strong><?php _e( 'Email:', '
|
64 |
<?php endif; ?>
|
65 |
<?php if ( $order->get_billing_phone() ) : ?>
|
66 |
-
<p><strong><?php _e( 'Tel:', '
|
67 |
<?php endif; ?>
|
68 |
|
69 |
<?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?>
|
70 |
|
71 |
-
<?php do_action( 'woocommerce_email_footer' ); ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* DEPRECAITED - Admin new order email
|
4 |
+
*
|
5 |
*
|
6 |
* @author WooThemes
|
7 |
* @package WooCommerce/Templates/Emails/HTML
|
8 |
* @version 2.0.0
|
9 |
*/
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
+
$order_date = $order->get_date_created();
|
13 |
|
14 |
?>
|
15 |
|
16 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
17 |
|
18 |
+
<p><?php _e( 'A vendor has marked part of your order as shipped. The items that are shipped are as follows:', 'wc-vendors' ); ?></p>
|
19 |
|
20 |
<?php do_action( 'woocommerce_email_before_order_table', $order, true ); ?>
|
21 |
|
22 |
+
<h2><?php printf( __( 'Order: %s', 'wc-vendors'), $order->get_order_number() ); ?> (<?php printf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $order_date ) ), date_i18n( wc_date_format(), strtotime( $order_date ) ) ); ?>)</h2>
|
23 |
|
24 |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
25 |
<thead>
|
26 |
<tr>
|
27 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', 'wc-vendors' ); ?></th>
|
28 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'wc-vendors' ); ?></th>
|
29 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', 'wc-vendors' ); ?></th>
|
30 |
</tr>
|
31 |
</thead>
|
32 |
<tbody>
|
58 |
|
59 |
<?php do_action( 'woocommerce_email_order_meta', $order, true ); ?>
|
60 |
|
61 |
+
<h2><?php _e( 'Customer details', 'wc-vendors' ); ?></h2>
|
62 |
|
63 |
<?php if ( $order->get_billing_email() ) : ?>
|
64 |
+
<p><strong><?php _e( 'Email:', 'wc-vendors' ); ?></strong> <?php echo $order->get_billing_email(); ?></p>
|
65 |
<?php endif; ?>
|
66 |
<?php if ( $order->get_billing_phone() ) : ?>
|
67 |
+
<p><strong><?php _e( 'Tel:', 'wc-vendors' ); ?></strong> <?php echo $order->get_billing_phone(); ?></p>
|
68 |
<?php endif; ?>
|
69 |
|
70 |
<?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?>
|
71 |
|
72 |
+
<?php do_action( 'woocommerce_email_footer' ); ?>
|
templates/emails/plain/admin-notify-application.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin new notify vendor application (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-notify-application.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo sprintf( __( 'Hi there. This is a notification about a vendor application on %s.', 'wc-vendors' ), get_option( 'blogname' ) ) . "\n\n";
|
20 |
+
echo sprintf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ). "\n\n";
|
21 |
+
|
22 |
+
if ( 'pending' === $status ){
|
23 |
+
echo sprintf( __( 'You can approve or deny the application at the following link %s', 'wc-vendors' ), admin_url( 'users.php?role=pending_vendor' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/admin-notify-product.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin new notify new vendor product (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-notify-product.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
do_action( 'woocommerce_email_header', $email_heading, $email );
|
20 |
+
|
21 |
+
echo printf( __( 'This is a notification about a new product on %s.', 'wc-vendors' ), get_option( 'blogname' ) ) . "\n\n";
|
22 |
+
|
23 |
+
echo sprintf( __( 'Product title: %s', 'wc-vendors' ), $product->get_title() ) . "\n\n";
|
24 |
+
echo sprintf( __( 'Submitted by: %s', 'wc-vendors' ), $vendor_name ) . "\n\n";
|
25 |
+
echo sprintf( __( 'Edit product: %s', 'wc-vendors' ), admin_url( 'post.php?post=' . $post_id . '&action=edit' ) ) . "\n\n";
|
26 |
+
|
27 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/admin-notify-shipped.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin new notify vendor shipped (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-notify-shipped.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo sprintf( __('%s has marked order #%s as shipped.' ), WCV_Vendors::get_vendor_shop_name( $vendor_id ), $order->get_id() ) . "\n\n";
|
20 |
+
|
21 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/customer-notify-shipped.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer Vendor Shipped (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-notify-shipped.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo sprintf( __('%s has marked order #%s as shipped.' ), WCV_Vendors::get_vendor_shop_name( $vendor_id ), $order->get_id() ) . "\n\n";
|
20 |
+
|
21 |
+
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
22 |
+
|
23 |
+
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
24 |
+
|
25 |
+
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
26 |
+
|
27 |
+
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
|
28 |
+
|
29 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/vendor-notify-application.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor notify denied (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-notify-denied.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo sprintf( __( 'Hi there. This is a notification about a vendor application on %s.', 'wc-vendors' ), get_option( 'blogname' ) ) . "\n\n";
|
20 |
+
echo sprintf( __( 'Your application is currently: %s', 'wc-vendors', $status ) ). "\n\n";
|
21 |
+
echo sprintf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ). "\n\n";
|
22 |
+
|
23 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/vendor-notify-approved.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor notify approved (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-notify-approved.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo $content . "\n\n";
|
20 |
+
|
21 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/vendor-notify-denied.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor notify denied (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-notify-denied.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo $content . "\n\n";
|
20 |
+
|
21 |
+
echo $reason . "\n\n";
|
22 |
+
|
23 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/vendor-notify-order.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor new order email (plain text)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-notify-order.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCvendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
echo "= " . $email_heading . " =\n\n";
|
18 |
+
|
19 |
+
echo sprintf( __( 'You have received an order from %s.', 'wc-vendors' ), $order->get_formatted_billing_full_name() ) . "\n\n";
|
20 |
+
|
21 |
+
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
22 |
+
|
23 |
+
// Change the order details to reflect the vendor order details
|
24 |
+
do_action( 'wcvendors_email_order_details', $order, $sent_to_admin, $plain_text, $email );
|
25 |
+
|
26 |
+
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
27 |
+
|
28 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
29 |
+
|
30 |
+
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
31 |
+
|
32 |
+
echo apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) );
|
templates/emails/plain/vendor-order-details.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Order details table shown in emails.
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-order-details.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCvendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
|
18 |
+
|
19 |
+
/* translators: %s: Order ID. */
|
20 |
+
echo wp_kses_post( wc_strtoupper( sprintf( __( 'Order number: %s', 'wc-vendors' ), $order->get_order_number() ) ) ) . "\n";
|
21 |
+
echo wc_format_datetime( $order->get_date_created() ) . "\n"; // WPCS: XSS ok.
|
22 |
+
echo "\n" . wcv_get_vendor_order_items( $order, array( // WPCS: XSS ok.
|
23 |
+
'show_sku' => $sent_to_vendor,
|
24 |
+
'vendor_id' => $vendor_id,
|
25 |
+
'vendor_items' => $vendor_items,
|
26 |
+
'totals_display' => $totals_display,
|
27 |
+
'show_image' => false,
|
28 |
+
'image_size' => array( 32, 32 ),
|
29 |
+
'plain_text' => true,
|
30 |
+
'sent_to_admin' => $sent_to_admin,
|
31 |
+
'sent_to_vendor' => $sent_to_vendor,
|
32 |
+
) );
|
33 |
+
|
34 |
+
echo "==========\n\n";
|
35 |
+
|
36 |
+
$totals = wcv_get_vendor_item_totals( $order, $vendor_items, $vendor_id, $email, $totals_display );
|
37 |
+
|
38 |
+
if ( $totals ) {
|
39 |
+
foreach ( $totals as $total ) {
|
40 |
+
echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n";
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( $order->get_customer_note() ) {
|
45 |
+
echo esc_html__( 'Note:', 'wc-vendors' ) . "\t " . wp_kses_post( wptexturize( $order->get_customer_note() ) ) . "\n";
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
|
templates/emails/plain/vendor-order-items.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Order Items (plain)
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/vendor-order-items.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCvendors/Templates/Emails/Plain
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit; // Exit if accessed directly
|
15 |
+
}
|
16 |
+
|
17 |
+
foreach ( $items as $item_id => $item ) :
|
18 |
+
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
19 |
+
$product = $item->get_product();
|
20 |
+
echo apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false );
|
21 |
+
if ( $show_sku && $product->get_sku() ) {
|
22 |
+
echo ' (#' . $product->get_sku() . ')';
|
23 |
+
}
|
24 |
+
echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
|
25 |
+
echo ' = ' . $order->get_formatted_line_subtotal( $item ) . "\n";
|
26 |
+
|
27 |
+
// allow other plugins to add additional product information here
|
28 |
+
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
29 |
+
echo strip_tags( wc_display_item_meta( $item, array(
|
30 |
+
'before' => "\n- ",
|
31 |
+
'separator' => "\n- ",
|
32 |
+
'after' => "",
|
33 |
+
'echo' => false,
|
34 |
+
'autop' => false,
|
35 |
+
) ) );
|
36 |
+
|
37 |
+
// allow other plugins to add additional product information here
|
38 |
+
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
39 |
+
}
|
40 |
+
echo "\n\n";
|
41 |
+
endforeach;
|
templates/emails/vendor-new-order.php
CHANGED
@@ -1,41 +1,42 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
3 |
* Vendor new order email
|
4 |
*
|
5 |
* @author WC Vendors
|
6 |
* @package WooCommerce/Templates/Emails/HTML
|
7 |
* @version 1.9.9
|
8 |
*/
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
10 |
|
11 |
-
$billing_first_name = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_first_name : $order->get_billing_first_name();
|
12 |
-
$billing_last_name = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_last_name : $order->get_billing_last_name();
|
13 |
-
$billing_email = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_email : $order->get_billing_email();
|
14 |
-
$billing_phone = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_phone : $order->get_billing_phone();
|
15 |
-
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
16 |
|
17 |
?>
|
18 |
|
19 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
20 |
|
21 |
-
<p><?php printf( __( 'You have received an order from %s. Their order is as follows:', '
|
22 |
|
23 |
<?php do_action( 'woocommerce_email_before_order_table', $order, true ); ?>
|
24 |
|
25 |
-
<h2><?php printf( __( 'Order: %s', '
|
26 |
|
27 |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
28 |
<thead>
|
29 |
<tr>
|
30 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', '
|
31 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', '
|
32 |
-
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', '
|
33 |
</tr>
|
34 |
</thead>
|
35 |
<tbody>
|
36 |
-
<?php
|
37 |
|
38 |
-
if ( version_compare( WC_VERSION, '2.7', '<' ) ){
|
39 |
|
40 |
echo $order->email_order_items_table( array(
|
41 |
'show_sku' => true,
|
@@ -43,9 +44,9 @@ $order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_da
|
|
43 |
'image_size' => array( 32, 32 ),
|
44 |
'plain_text' => false,
|
45 |
'sent_to_admin' => false
|
46 |
-
) );
|
47 |
|
48 |
-
} else {
|
49 |
echo wc_get_email_order_items( $order, array(
|
50 |
'show_sku' => true,
|
51 |
'show_image' => false,
|
@@ -77,15 +78,15 @@ $order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_da
|
|
77 |
|
78 |
<?php do_action( 'woocommerce_email_order_meta', $order, true ); ?>
|
79 |
|
80 |
-
<h2><?php _e( 'Customer details', '
|
81 |
|
82 |
<?php if ( $billing_email ) : ?>
|
83 |
-
<p><strong><?php _e( 'Email:', '
|
84 |
<?php endif; ?>
|
85 |
<?php if ( $billing_phone ) : ?>
|
86 |
-
<p><strong><?php _e( 'Tel:', '
|
87 |
<?php endif; ?>
|
88 |
|
89 |
<?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?>
|
90 |
|
91 |
-
<?php do_action( 'woocommerce_email_footer' ); ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* DEPRECATED
|
4 |
* Vendor new order email
|
5 |
*
|
6 |
* @author WC Vendors
|
7 |
* @package WooCommerce/Templates/Emails/HTML
|
8 |
* @version 1.9.9
|
9 |
*/
|
10 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
11 |
|
12 |
+
$billing_first_name = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_first_name : $order->get_billing_first_name();
|
13 |
+
$billing_last_name = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_last_name : $order->get_billing_last_name();
|
14 |
+
$billing_email = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_email : $order->get_billing_email();
|
15 |
+
$billing_phone = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->billing_phone : $order->get_billing_phone();
|
16 |
+
$order_date = ( version_compare( WC_VERSION, '2.7', '<' ) ) ? $order->order_date : $order->get_date_created();
|
17 |
|
18 |
?>
|
19 |
|
20 |
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
|
21 |
|
22 |
+
<p><?php printf( __( 'You have received an order from %s. Their order is as follows:', 'wc-vendors' ), $billing_first_name . ' ' . $billing_last_name ); ?></p>
|
23 |
|
24 |
<?php do_action( 'woocommerce_email_before_order_table', $order, true ); ?>
|
25 |
|
26 |
+
<h2><?php printf( __( 'Order: %s', 'wc-vendors'), $order->get_order_number() ); ?> (<?php printf( '<time datetime="%s">%s</time>', date_i18n( 'c', strtotime( $order_date ) ), date_i18n( wc_date_format(), strtotime( $order_date ) ) ); ?>)</h2>
|
27 |
|
28 |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
|
29 |
<thead>
|
30 |
<tr>
|
31 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', 'wc-vendors' ); ?></th>
|
32 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'wc-vendors' ); ?></th>
|
33 |
+
<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', 'wc-vendors' ); ?></th>
|
34 |
</tr>
|
35 |
</thead>
|
36 |
<tbody>
|
37 |
+
<?php
|
38 |
|
39 |
+
if ( version_compare( WC_VERSION, '2.7', '<' ) ){
|
40 |
|
41 |
echo $order->email_order_items_table( array(
|
42 |
'show_sku' => true,
|
44 |
'image_size' => array( 32, 32 ),
|
45 |
'plain_text' => false,
|
46 |
'sent_to_admin' => false
|
47 |
+
) );
|
48 |
|
49 |
+
} else {
|
50 |
echo wc_get_email_order_items( $order, array(
|
51 |
'show_sku' => true,
|
52 |
'show_image' => false,
|
78 |
|
79 |
<?php do_action( 'woocommerce_email_order_meta', $order, true ); ?>
|
80 |
|
81 |
+
<h2><?php _e( 'Customer details', 'wc-vendors' ); ?></h2>
|
82 |
|
83 |
<?php if ( $billing_email ) : ?>
|
84 |
+
<p><strong><?php _e( 'Email:', 'wc-vendors' ); ?></strong> <?php echo $billing_email; ?></p>
|
85 |
<?php endif; ?>
|
86 |
<?php if ( $billing_phone ) : ?>
|
87 |
+
<p><strong><?php _e( 'Tel:', 'wc-vendors' ); ?></strong> <?php echo $billing_phone; ?></p>
|
88 |
<?php endif; ?>
|
89 |
|
90 |
<?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?>
|
91 |
|
92 |
+
<?php do_action( 'woocommerce_email_footer' ); ?>
|
templates/emails/vendor-notify-application.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Notify Application
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-notify-application.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @hooked WC_Emails::email_header() Output the email header
|
19 |
+
*/
|
20 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
21 |
+
|
22 |
+
<p><?php printf( __( 'Hi there. This is a notification about a vendor application on %s.', 'wc-vendors' ), get_option( 'blogname' ) ); ?></p>
|
23 |
+
<p><?php printf( __( 'Your application is currently: %s', 'wc-vendors' ), $status ); ?></p>
|
24 |
+
<p><?php printf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ); ?></p>
|
25 |
+
|
26 |
+
<?php
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @hooked WC_Emails::email_footer() Output the email footer
|
30 |
+
*/
|
31 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/vendor-notify-approved.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Notify Application Approved
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-notify-approved.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @hooked WC_Emails::email_header() Output the email header
|
19 |
+
*/
|
20 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
21 |
+
|
22 |
+
<p><?php echo $content; ?></p>
|
23 |
+
|
24 |
+
<p><?php printf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ); ?></p>
|
25 |
+
<?php
|
26 |
+
|
27 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/vendor-notify-denied.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Notify Application Denied
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-notify-denied.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
19 |
+
|
20 |
+
<p><?php echo $content; ?></p>
|
21 |
+
|
22 |
+
<p><?php echo $reason; ?></p>
|
23 |
+
|
24 |
+
<p><?php printf( __( 'Applicant username: %s', 'wc-vendors' ), $user->user_login ); ?></p>
|
25 |
+
|
26 |
+
<?php
|
27 |
+
|
28 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/vendor-notify-order.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor new order email
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-notify-order.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @hooked WC_Emails::email_header() Output the email header
|
19 |
+
*/
|
20 |
+
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
|
21 |
+
|
22 |
+
<p><?php printf( __( 'You have received an order from %s. The order is as follows:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); ?></p>
|
23 |
+
|
24 |
+
<?php
|
25 |
+
|
26 |
+
do_action( 'wcvendors_email_order_details', $order, $vendor_items, $totals_display, $vendor_id, $sent_to_vendor, $sent_to_admin, $plain_text, $email );
|
27 |
+
|
28 |
+
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
|
29 |
+
|
30 |
+
do_action( 'woocommerce_email_footer', $email );
|
templates/emails/vendor-order-details.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Order details table shown in emails.
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-order-details.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
18 |
+
|
19 |
+
$colspan = ( 'both' === $totals_display ) ? 3 : 2;
|
20 |
+
|
21 |
+
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
|
22 |
+
|
23 |
+
<h2>
|
24 |
+
<?php
|
25 |
+
$before = '';
|
26 |
+
$after = '';
|
27 |
+
/* translators: %s: Order ID. */
|
28 |
+
echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'wc-vendors' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
|
29 |
+
?>
|
30 |
+
</h2>
|
31 |
+
|
32 |
+
<div style="margin-bottom: 40px;">
|
33 |
+
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
|
34 |
+
<thead>
|
35 |
+
<tr>
|
36 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'wc-vendors' ); ?></th>
|
37 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'wc-vendors' ); ?></th>
|
38 |
+
<?php if ( 'both' === $totals_display || 'commission' === $totals_display ) : ?>
|
39 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Commission', 'wc-vendors' ); ?></th>
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php if ( 'both' === $totals_display || 'product' === $totals_display ) : ?>
|
42 |
+
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'wc-vendors' ); ?></th>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
</tr>
|
46 |
+
</thead>
|
47 |
+
<tbody>
|
48 |
+
<?php
|
49 |
+
echo wcv_get_vendor_order_items( $order, array( // WPCS: XSS ok.
|
50 |
+
'show_sku' => $sent_to_vendor,
|
51 |
+
'vendor_id' => $vendor_id,
|
52 |
+
'vendor_items' => $vendor_items,
|
53 |
+
'totals_display' => $totals_display,
|
54 |
+
'show_image' => false,
|
55 |
+
'image_size' => array( 32, 32 ),
|
56 |
+
'plain_text' => $plain_text,
|
57 |
+
'sent_to_admin' => $sent_to_admin,
|
58 |
+
'sent_to_vendor' => $sent_to_vendor,
|
59 |
+
) );
|
60 |
+
?>
|
61 |
+
</tbody>
|
62 |
+
<tfoot>
|
63 |
+
<?php
|
64 |
+
$totals = wcv_get_vendor_item_totals( $order, $vendor_items, $vendor_id, $email, $totals_display );
|
65 |
+
|
66 |
+
if ( $totals ) {
|
67 |
+
$i = 0;
|
68 |
+
foreach ( $totals as $total ) {
|
69 |
+
$i++;
|
70 |
+
?>
|
71 |
+
<tr>
|
72 |
+
<th class="td" scope="row" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['label'] ); ?></th>
|
73 |
+
<td class="td" colspan="<?php echo $colspan; ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td>
|
74 |
+
</tr>
|
75 |
+
<?php
|
76 |
+
}
|
77 |
+
}
|
78 |
+
if ( $order->get_customer_note() ) {
|
79 |
+
?>
|
80 |
+
<tr>
|
81 |
+
<th class="td" scope="row" colspan="<?php echo $colspan; ?>" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'wc-vendors' ); ?></th>
|
82 |
+
<td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( wptexturize( $order->get_customer_note() ) ); ?></td>
|
83 |
+
</tr>
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
?>
|
87 |
+
</tfoot>
|
88 |
+
</table>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
|
templates/emails/vendor-order-items.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor Order Items
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/woocommerce/emails/vendor-order-items.php.
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author Jamie Madden, WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
$text_align = is_rtl() ? 'right' : 'left';
|
18 |
+
|
19 |
+
foreach ( $items as $item_id => $item ) :
|
20 |
+
|
21 |
+
$product = $item->get_product();
|
22 |
+
|
23 |
+
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
24 |
+
?>
|
25 |
+
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
|
26 |
+
<td class="td" style="text-align:<?php echo $text_align; ?>; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; word-wrap:break-word;"><?php
|
27 |
+
|
28 |
+
// Show title/image etc
|
29 |
+
if ( $show_image ) {
|
30 |
+
echo apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $product->get_image_id() ? current( wp_get_attachment_image_src( $product->get_image_id(), 'thumbnail' ) ) : wc_placeholder_img_src() ) . '" alt="' . esc_attr__( 'Product image', 'wc-vendors' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-' . ( is_rtl() ? 'left' : 'right' ) . ': 10px;" /></div>', $item );
|
31 |
+
}
|
32 |
+
|
33 |
+
// Product name
|
34 |
+
echo apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false );
|
35 |
+
|
36 |
+
// SKU
|
37 |
+
if ( $show_sku && is_object( $product ) && $product->get_sku() ) {
|
38 |
+
echo ' (#' . $product->get_sku() . ')';
|
39 |
+
}
|
40 |
+
|
41 |
+
// allow other plugins to add additional product information here
|
42 |
+
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
|
43 |
+
|
44 |
+
wc_display_item_meta( $item );
|
45 |
+
|
46 |
+
// // allow other plugins to add additional product information here
|
47 |
+
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
|
48 |
+
|
49 |
+
?></td>
|
50 |
+
<td class="td" style="text-align:<?php echo $text_align; ?>; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ); ?></td>
|
51 |
+
|
52 |
+
<?php if ( 'both' === $totals_display || 'commission' === $totals_display ) : ?>
|
53 |
+
<td class="td" style="text-align:<?php echo $text_align; ?>; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo wc_price( WCV_Commission::get_commission_due( $order->get_id(), $product->get_id(), $vendor_id ) ); ?></td>
|
54 |
+
<?php endif; ?>
|
55 |
+
|
56 |
+
<?php if ( 'both' === $totals_display || 'product' === $totals_display ) : ?>
|
57 |
+
<td class="td" style="text-align:<?php echo $text_align; ?>; vertical-align:middle; border: 1px solid #eee; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
</tr>
|
61 |
+
|
62 |
+
<?php
|
63 |
+
}
|
64 |
+
|
65 |
+
?>
|
66 |
+
|
67 |
+
<?php endforeach; ?>
|
templates/orders/comments/add-new-comment.php
CHANGED
@@ -8,6 +8,6 @@
|
|
8 |
<input type="hidden" name="order_id" value="<?php echo $order_id; ?>">
|
9 |
|
10 |
<input class="btn btn-large btn-block" type="submit" name="submit_comment"
|
11 |
-
value="<?php _e( 'Add comment', '
|
12 |
|
13 |
-
</form>
|
8 |
<input type="hidden" name="order_id" value="<?php echo $order_id; ?>">
|
9 |
|
10 |
<input class="btn btn-large btn-block" type="submit" name="submit_comment"
|
11 |
+
value="<?php _e( 'Add comment', 'wc-vendors' ); ?>">
|
12 |
|
13 |
+
</form>
|
templates/orders/comments/existing-comments.php
CHANGED
@@ -6,7 +6,7 @@ foreach ( $comments as $comment ) :
|
|
6 |
?>
|
7 |
|
8 |
<p>
|
9 |
-
<?php printf( __( 'added %s ago', '
|
10 |
</br>
|
11 |
<?php echo $comment->comment_content; ?>
|
12 |
</p>
|
6 |
?>
|
7 |
|
8 |
<p>
|
9 |
+
<?php printf( __( 'added %s ago', 'wc-vendors' ), $last_added ); ?>
|
10 |
</br>
|
11 |
<?php echo $comment->comment_content; ?>
|
12 |
</p>
|
templates/orders/csv-export.php
CHANGED
@@ -3,6 +3,6 @@
|
|
3 |
class="btn btn-primary btn-small"
|
4 |
style="float:right;margin-bottom:10px;"
|
5 |
name="export_orders"
|
6 |
-
value="<?php _e( 'Export orders', '
|
7 |
>
|
8 |
-
</form>
|
3 |
class="btn btn-primary btn-small"
|
4 |
style="float:right;margin-bottom:10px;"
|
5 |
name="export_orders"
|
6 |
+
value="<?php _e( 'Export orders', 'wc-vendors' ); ?>"
|
7 |
>
|
8 |
+
</form>
|
templates/orders/customer-note/customer-note.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<tr>
|
2 |
<td colspan="100%">
|
3 |
<h2>
|
4 |
-
<?php _e( 'Customer note', '
|
5 |
</h2>
|
6 |
|
7 |
<p>
|
8 |
-
<?php echo $customer_note ? $customer_note : __( 'No customer note.', '
|
9 |
</p>
|
10 |
</td>
|
11 |
-
</tr>
|
1 |
<tr>
|
2 |
<td colspan="100%">
|
3 |
<h2>
|
4 |
+
<?php _e( 'Customer note', 'wc-vendors' ); ?>
|
5 |
</h2>
|
6 |
|
7 |
<p>
|
8 |
+
<?php echo $customer_note ? $customer_note : __( 'No customer note.', 'wc-vendors' ); ?>
|
9 |
</p>
|
10 |
</td>
|
11 |
+
</tr>
|
templates/orders/orders.php
CHANGED
@@ -65,8 +65,8 @@
|
|
65 |
<td colspan="100%">
|
66 |
|
67 |
<?php
|
68 |
-
$can_view_comments =
|
69 |
-
$can_add_comments =
|
70 |
|
71 |
if ($can_view_comments || $can_add_comments) :
|
72 |
|
@@ -79,7 +79,7 @@
|
|
79 |
?>
|
80 |
<a href="#" class="order-comments-link">
|
81 |
<p>
|
82 |
-
<?php printf( __( 'Comments (%s)', '
|
83 |
</p>
|
84 |
</a>
|
85 |
|
@@ -110,26 +110,26 @@
|
|
110 |
|
111 |
<a href="#" class="order-tracking-link">
|
112 |
<p>
|
113 |
-
<?php _e( 'Shipping', '
|
114 |
</p>
|
115 |
</a>
|
116 |
|
117 |
<div class="order-tracking">
|
118 |
-
<?php
|
119 |
-
|
120 |
wc_enqueue_js( WCV_Vendor_dashboard::wc_st_js( $provider_array ) );
|
121 |
-
|
122 |
wc_get_template( 'shipping-form.php', array(
|
123 |
'order_id' => $order_id,
|
124 |
'product_id' => $product_id,
|
125 |
'providers' => $providers,
|
126 |
-
'provider_array' => $provider_array,
|
127 |
), 'wc-vendors/orders/shipping/', wcv_plugin_dir . 'templates/orders/shipping/' );
|
128 |
?>
|
129 |
</div>
|
130 |
|
131 |
<?php endif; ?>
|
132 |
-
|
133 |
<?php endif; ?>
|
134 |
|
135 |
</td>
|
65 |
<td colspan="100%">
|
66 |
|
67 |
<?php
|
68 |
+
$can_view_comments = get_option( 'wcvendors_capability_order_read_notes' );
|
69 |
+
$can_add_comments = get_option( 'wcvendors_capability_order_update_notes' );
|
70 |
|
71 |
if ($can_view_comments || $can_add_comments) :
|
72 |
|
79 |
?>
|
80 |
<a href="#" class="order-comments-link">
|
81 |
<p>
|
82 |
+
<?php printf( __( 'Comments (%s)', 'wc-vendors' ), count( $comments ) ); ?>
|
83 |
</p>
|
84 |
</a>
|
85 |
|
110 |
|
111 |
<a href="#" class="order-tracking-link">
|
112 |
<p>
|
113 |
+
<?php _e( 'Shipping', 'wc-vendors' ); ?>
|
114 |
</p>
|
115 |
</a>
|
116 |
|
117 |
<div class="order-tracking">
|
118 |
+
<?php
|
119 |
+
|
120 |
wc_enqueue_js( WCV_Vendor_dashboard::wc_st_js( $provider_array ) );
|
121 |
+
|
122 |
wc_get_template( 'shipping-form.php', array(
|
123 |
'order_id' => $order_id,
|
124 |
'product_id' => $product_id,
|
125 |
'providers' => $providers,
|
126 |
+
'provider_array' => $provider_array,
|
127 |
), 'wc-vendors/orders/shipping/', wcv_plugin_dir . 'templates/orders/shipping/' );
|
128 |
?>
|
129 |
</div>
|
130 |
|
131 |
<?php endif; ?>
|
132 |
+
|
133 |
<?php endif; ?>
|
134 |
|
135 |
</td>
|
templates/orders/shipping/shipping-form.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
|
10 |
$selected_provider = get_post_meta( $order_id, '_tracking_provider', true );
|
11 |
|
12 |
-
$class = '';
|
13 |
|
14 |
foreach ( $providers as $provider_group => $providerss ) {
|
15 |
|
@@ -17,7 +17,7 @@
|
|
17 |
|
18 |
foreach ( $providerss as $provider => $url ) {
|
19 |
echo '<option value="' . sanitize_title( $provider ) . '" ' . selected( sanitize_title( $provider ), $selected_provider, true ) . '>' . $provider . '</option>';
|
20 |
-
if ( selected( sanitize_title( $provider ), $selected_provider ) ) $class = 'hidden';
|
21 |
}
|
22 |
|
23 |
echo '</optgroup>';
|
@@ -29,7 +29,7 @@
|
|
29 |
woocommerce_wp_text_input( array(
|
30 |
'id' => 'custom_tracking_provider_name',
|
31 |
'label' => __( 'Provider Name:', 'wc_shipment_tracking' ),
|
32 |
-
'wrapper_class' => $class,
|
33 |
'placeholder' => '',
|
34 |
'description' => '',
|
35 |
'value' => get_post_meta( $order_id, '_custom_tracking_provider', true )
|
@@ -47,7 +47,7 @@
|
|
47 |
'id' => 'custom_tracking_url',
|
48 |
'label' => __( 'Tracking link:', 'wc_shipment_tracking' ),
|
49 |
'placeholder' => 'http://',
|
50 |
-
'wrapper_class' => $class,
|
51 |
'description' => '',
|
52 |
'value' => get_post_meta( $order_id, '_custom_tracking_link', true )
|
53 |
) );
|
@@ -72,9 +72,8 @@
|
|
72 |
<input type="hidden" name="order_id" value="<?php echo $order_id; ?>">
|
73 |
|
74 |
<input class="button" type="submit" name="update_tracking"
|
75 |
-
value="<?php _e( 'Update tracking number', '
|
76 |
<input class="button" type="submit" name="mark_shipped"
|
77 |
-
value="<?php _e( 'Mark as shipped', '
|
78 |
|
79 |
</form>
|
80 |
-
|
9 |
|
10 |
$selected_provider = get_post_meta( $order_id, '_tracking_provider', true );
|
11 |
|
12 |
+
$class = '';
|
13 |
|
14 |
foreach ( $providers as $provider_group => $providerss ) {
|
15 |
|
17 |
|
18 |
foreach ( $providerss as $provider => $url ) {
|
19 |
echo '<option value="' . sanitize_title( $provider ) . '" ' . selected( sanitize_title( $provider ), $selected_provider, true ) . '>' . $provider . '</option>';
|
20 |
+
if ( selected( sanitize_title( $provider ), $selected_provider ) ) $class = 'hidden';
|
21 |
}
|
22 |
|
23 |
echo '</optgroup>';
|
29 |
woocommerce_wp_text_input( array(
|
30 |
'id' => 'custom_tracking_provider_name',
|
31 |
'label' => __( 'Provider Name:', 'wc_shipment_tracking' ),
|
32 |
+
'wrapper_class' => $class,
|
33 |
'placeholder' => '',
|
34 |
'description' => '',
|
35 |
'value' => get_post_meta( $order_id, '_custom_tracking_provider', true )
|
47 |
'id' => 'custom_tracking_url',
|
48 |
'label' => __( 'Tracking link:', 'wc_shipment_tracking' ),
|
49 |
'placeholder' => 'http://',
|
50 |
+
'wrapper_class' => $class,
|
51 |
'description' => '',
|
52 |
'value' => get_post_meta( $order_id, '_custom_tracking_link', true )
|
53 |
) );
|
72 |
<input type="hidden" name="order_id" value="<?php echo $order_id; ?>">
|
73 |
|
74 |
<input class="button" type="submit" name="update_tracking"
|
75 |
+
value="<?php _e( 'Update tracking number', 'wc-vendors' ); ?>">
|
76 |
<input class="button" type="submit" name="mark_shipped"
|
77 |
+
value="<?php _e( 'Mark as shipped', 'wc-vendors' ); ?>">
|
78 |
|
79 |
</form>
|
|
templates/orders/table-body.php
CHANGED
@@ -1,17 +1,29 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
<tr>
|
8 |
|
9 |
<?php endif; ?>
|
10 |
|
11 |
-
<?php if (
|
12 |
|
13 |
<td colspan="5">
|
14 |
-
<?php echo $
|
15 |
</td>
|
16 |
|
17 |
<td colspan="3">
|
@@ -22,11 +34,11 @@ if ($count > 1) : ?>
|
|
22 |
|
23 |
<?php endif; ?>
|
24 |
|
25 |
-
<?php printf( __( 'Quantity: %d', '
|
26 |
</td>
|
27 |
|
28 |
<?php if ($count > 1) : ?>
|
29 |
|
30 |
</tr>
|
31 |
|
32 |
-
<?php endif; ?>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Orders table-body
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/table-body.php
|
6 |
+
*
|
7 |
+
*
|
8 |
+
* @author WC Vendors
|
9 |
+
* @package WCVendors/Templates/Emails
|
10 |
+
* @version 2.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( $count > 1) : ?>
|
18 |
|
19 |
<tr>
|
20 |
|
21 |
<?php endif; ?>
|
22 |
|
23 |
+
<?php if ( $item->get_formatted_meta_data() ) : ?>
|
24 |
|
25 |
<td colspan="5">
|
26 |
+
<?php echo wc_display_item_meta( $item ); ?>
|
27 |
</td>
|
28 |
|
29 |
<td colspan="3">
|
34 |
|
35 |
<?php endif; ?>
|
36 |
|
37 |
+
<?php printf( __( 'Quantity: %d', 'wc-vendors' ), $item[ 'qty' ] ); ?>
|
38 |
</td>
|
39 |
|
40 |
<?php if ($count > 1) : ?>
|
41 |
|
42 |
</tr>
|
43 |
|
44 |
+
<?php endif; ?>
|
wpml-config.xml
CHANGED
@@ -16,7 +16,6 @@
|
|
16 |
<key name="can_submit_order_comments"/>
|
17 |
<key name="can_view_order_emails"/>
|
18 |
<key name="can_export_csv"/>
|
19 |
-
<key name="can_view_backend_reports"/>
|
20 |
<key name="can_view_frontend_reports"/>
|
21 |
<key name="can_submit_products"/>
|
22 |
<key name="can_edit_published_products"/>
|
@@ -71,4 +70,4 @@
|
|
71 |
<key name="sold_by"/>
|
72 |
</key>
|
73 |
</admin-texts>
|
74 |
-
</wpml-config>
|
16 |
<key name="can_submit_order_comments"/>
|
17 |
<key name="can_view_order_emails"/>
|
18 |
<key name="can_export_csv"/>
|
|
|
19 |
<key name="can_view_frontend_reports"/>
|
20 |
<key name="can_submit_products"/>
|
21 |
<key name="can_edit_published_products"/>
|
70 |
<key name="sold_by"/>
|
71 |
</key>
|
72 |
</admin-texts>
|
73 |
+
</wpml-config>
|