Version Description
Download this release
Release Info
Developer | digitalchild |
Plugin | WC Vendors |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- changelog.txt +11 -0
- class-wc-vendors.php +2 -2
- classes/admin/class-admin-users.php +49 -42
- classes/admin/class-vendor-admin-dashboard.php +3 -3
- classes/admin/class-wcv-admin-setup.php +6 -6
- classes/admin/emails/class-wc-notify-vendor.php +2 -2
- classes/class-install.php +1 -0
- classes/class-vendors.php +2 -2
- classes/front/class-vendor-cart.php +1 -1
- classes/front/class-vendor-shop.php +4 -4
- classes/front/dashboard/class-vendor-dashboard.php +3 -3
- classes/front/orders/class-orders.php +3 -3
- classes/front/signup/class-vendor-signup.php +2 -2
- readme.txt +12 -1
- templates/dashboard/date-picker.php +17 -0
- templates/dashboard/denied.php +18 -1
- templates/dashboard/links.php +19 -0
- templates/dashboard/orders.php +10 -4
- templates/dashboard/reports.php +18 -0
- templates/dashboard/settings/paypal-email-form.php +17 -0
- templates/dashboard/settings/seller-info.php +18 -0
- templates/dashboard/settings/settings.php +17 -0
- templates/dashboard/settings/shop-description.php +17 -0
- templates/dashboard/settings/shop-name.php +17 -0
- templates/front/vendor-list.php +22 -10
- templates/front/vendor-main-header.php +22 -19
- templates/front/vendor-mini-header.php +21 -17
- templates/front/vendor-sold-by.php +22 -13
- templates/orders/comments/add-new-comment.php +16 -0
- templates/orders/comments/existing-comments.php +16 -0
- templates/orders/csv-export.php +16 -0
- templates/orders/customer-note/customer-note.php +16 -0
- templates/orders/orders.php +18 -2
- templates/orders/shipping/shipping-form.php +16 -0
changelog.txt
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
Changelog for WC Vendors
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Version 2.0.1
|
4 |
|
5 |
* Fixed: Update notice won't complete
|
1 |
Changelog for WC Vendors
|
2 |
|
3 |
+
Version 2.0.2
|
4 |
+
|
5 |
+
* Fixed: Corrected settings conditional checks across classes
|
6 |
+
* Fixed: Vendor Capabilities
|
7 |
+
* Fixed: Reset vendor roles
|
8 |
+
* Fixed: Incorrect get_option calls
|
9 |
+
* Fixed: Permission check for product submit and order view
|
10 |
+
* Updated: Templates to make tracking changes possible
|
11 |
+
* Updated: Disable add new product completely if disabled
|
12 |
+
* Updated: Make denied product message translateable.
|
13 |
+
|
14 |
Version 2.0.1
|
15 |
|
16 |
* Fixed: Update notice won't complete
|
class-wc-vendors.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Author URI: https://www.wcvendors.com
|
8 |
* GitHub Plugin URI: https://github.com/wcvendors/wcvendors
|
9 |
*
|
10 |
-
* Version: 2.0.
|
11 |
* Requires at least: 4.4.0
|
12 |
* Tested up to: 4.9.5
|
13 |
* WC requires at least: 3.0.0
|
@@ -80,7 +80,7 @@ if ( wcv_is_woocommerce_activated() ) {
|
|
80 |
class WC_Vendors
|
81 |
{
|
82 |
|
83 |
-
public $version = '2.0.
|
84 |
|
85 |
/**
|
86 |
* @var
|
7 |
* Author URI: https://www.wcvendors.com
|
8 |
* GitHub Plugin URI: https://github.com/wcvendors/wcvendors
|
9 |
*
|
10 |
+
* Version: 2.0.2
|
11 |
* Requires at least: 4.4.0
|
12 |
* Tested up to: 4.9.5
|
13 |
* WC requires at least: 3.0.0
|
80 |
class WC_Vendors
|
81 |
{
|
82 |
|
83 |
+
public $version = '2.0.2';
|
84 |
|
85 |
/**
|
86 |
* @var
|
classes/admin/class-admin-users.php
CHANGED
@@ -50,16 +50,13 @@ class WCV_Admin_Users
|
|
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 |
-
}
|
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 |
}
|
64 |
|
65 |
}
|
@@ -70,9 +67,10 @@ class WCV_Admin_Users
|
|
70 |
return;
|
71 |
}
|
72 |
|
73 |
-
$can_submit = get_option( 'wcvendors_capability_products_enabled' );
|
74 |
-
|
75 |
-
|
|
|
76 |
}
|
77 |
}
|
78 |
|
@@ -88,9 +86,14 @@ class WCV_Admin_Users
|
|
88 |
return $args;
|
89 |
}
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
|
@@ -138,28 +141,26 @@ class WCV_Admin_Users
|
|
138 |
*
|
139 |
* @return unknown
|
140 |
*/
|
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' ] ) ) {
|
158 |
$css .= '.form-field._tax_status_field, .form-field._tax_class_field{display:none !important;}';
|
159 |
}
|
160 |
-
|
161 |
unset( $product_misc[ 'taxes' ] );
|
162 |
|
|
|
163 |
foreach ( $product_misc as $key => $value ) {
|
164 |
if ( $value ) $css .= sprintf( '._%s_field{display:none !important;}', $key );
|
165 |
}
|
@@ -168,8 +169,9 @@ class WCV_Admin_Users
|
|
168 |
echo $css;
|
169 |
echo '</style>';
|
170 |
|
|
|
171 |
foreach ( $types as $key => $value ) {
|
172 |
-
if (
|
173 |
unset( $types[ $key ] );
|
174 |
}
|
175 |
}
|
@@ -188,10 +190,9 @@ class WCV_Admin_Users
|
|
188 |
if ( !$product_panel ) return $tabs;
|
189 |
|
190 |
foreach ( $tabs as $key => $value ){
|
191 |
-
if (
|
192 |
unset( $tabs[ $key ] );
|
193 |
}
|
194 |
-
|
195 |
}
|
196 |
|
197 |
return $tabs;
|
@@ -318,14 +319,20 @@ class WCV_Admin_Users
|
|
318 |
/**
|
319 |
* Remove the media library menu
|
320 |
*/
|
321 |
-
public function remove_menu_page()
|
322 |
-
|
323 |
-
global $pagenow, $woocommerce;
|
324 |
|
325 |
remove_menu_page( 'index.php' ); /* Hides Dashboard menu */
|
326 |
remove_menu_page( 'separator1' ); /* Hides separator under Dashboard menu*/
|
327 |
remove_all_actions( 'admin_notices' );
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
if ( $pagenow == 'index.php' ) {
|
330 |
wp_redirect( admin_url( 'profile.php' ) );
|
331 |
}
|
@@ -397,22 +404,22 @@ class WCV_Admin_Users
|
|
397 |
}
|
398 |
|
399 |
/*
|
400 |
-
|
401 |
*/
|
402 |
public function manage_product_columns( $columns ){
|
403 |
-
global $woocommerce;
|
404 |
-
unset($columns['featured']);
|
405 |
-
return $columns;
|
406 |
-
}
|
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 |
|
418 |
}
|
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 |
+
// Vendor Capabilities
|
54 |
+
// Duplicate product
|
55 |
add_filter( 'woocommerce_duplicate_product_capability', array( $this, 'add_duplicate_capability' ) );
|
56 |
|
57 |
// WC > Product featured
|
58 |
+
add_filter( 'manage_product_posts_columns', array( $this, 'manage_product_columns'), 99);
|
59 |
+
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
}
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
+
$can_submit = 'yes' == get_option( 'wcvendors_capability_products_enabled', 'no' ) ? true : false;
|
71 |
+
|
72 |
+
if ( ! $can_submit ) {
|
73 |
+
wp_die( sprintf( __( 'You are not allowed to submit products. <a href="%s">Go Back</a>', 'wc-vendors' ), admin_url( 'edit.php?post_type=product' ) ) );
|
74 |
}
|
75 |
}
|
76 |
|
86 |
return $args;
|
87 |
}
|
88 |
|
89 |
+
/*
|
90 |
+
* Enable/disable duplicate product
|
91 |
+
*/
|
92 |
+
public function add_duplicate_capability( $capability ){
|
93 |
+
if ( 'yes' === get_option( 'wcvendors_capability_product_duplicate', 'no' ) ) {
|
94 |
+
return 'manage_product';
|
95 |
+
}
|
96 |
+
return $capability;
|
97 |
}
|
98 |
|
99 |
|
141 |
*
|
142 |
* @return unknown
|
143 |
*/
|
144 |
+
function filter_product_types( $types ) {
|
|
|
145 |
|
146 |
$product_types = get_option( 'wcvendors_capability_product_types' );
|
147 |
$product_misc = array(
|
148 |
+
'taxes' => 'yes' === get_option( 'wcvendors_capability_product_taxes', 'no' ) ? true: false,
|
149 |
+
'sku' => 'yes' === get_option( 'wcvendors_capability_product_sku', 'no' ) ? true: false,
|
150 |
+
'duplicate' => 'yes' === get_option( 'wcvendors_capability_product_duplicate', 'no' ) ? true: false,
|
151 |
+
'delete' => 'yes' === get_option( 'wcvendors_capability_product_delete', 'no' ) ? true: false,
|
152 |
+
'featured' => 'yes' === get_option( 'wcvendors_capability_product_featured', 'no' ? true: false)
|
153 |
);
|
154 |
|
155 |
+
// Add any custom css
|
156 |
$css = get_option( 'wcvendors_display_advanced_stylesheet' );
|
157 |
+
// Filter taxes
|
|
|
158 |
if ( !empty( $product_misc[ 'taxes' ] ) ) {
|
159 |
$css .= '.form-field._tax_status_field, .form-field._tax_class_field{display:none !important;}';
|
160 |
}
|
|
|
161 |
unset( $product_misc[ 'taxes' ] );
|
162 |
|
163 |
+
// Filter the rest of the fields
|
164 |
foreach ( $product_misc as $key => $value ) {
|
165 |
if ( $value ) $css .= sprintf( '._%s_field{display:none !important;}', $key );
|
166 |
}
|
169 |
echo $css;
|
170 |
echo '</style>';
|
171 |
|
172 |
+
// Filter product type drop down
|
173 |
foreach ( $types as $key => $value ) {
|
174 |
+
if ( in_array( $key, $product_types ) ){
|
175 |
unset( $types[ $key ] );
|
176 |
}
|
177 |
}
|
190 |
if ( !$product_panel ) return $tabs;
|
191 |
|
192 |
foreach ( $tabs as $key => $value ){
|
193 |
+
if ( in_array($key, $product_panel ) ){
|
194 |
unset( $tabs[ $key ] );
|
195 |
}
|
|
|
196 |
}
|
197 |
|
198 |
return $tabs;
|
319 |
/**
|
320 |
* Remove the media library menu
|
321 |
*/
|
322 |
+
public function remove_menu_page(){
|
323 |
+
global $pagenow;
|
|
|
324 |
|
325 |
remove_menu_page( 'index.php' ); /* Hides Dashboard menu */
|
326 |
remove_menu_page( 'separator1' ); /* Hides separator under Dashboard menu*/
|
327 |
remove_all_actions( 'admin_notices' );
|
328 |
|
329 |
+
$can_submit = 'yes' == get_option( 'wcvendors_capability_products_enabled' ) ? true : false;
|
330 |
+
|
331 |
+
if ( ! $can_submit ) {
|
332 |
+
global $submenu;
|
333 |
+
unset($submenu['edit.php?post_type=product'][10]);
|
334 |
+
}
|
335 |
+
|
336 |
if ( $pagenow == 'index.php' ) {
|
337 |
wp_redirect( admin_url( 'profile.php' ) );
|
338 |
}
|
404 |
}
|
405 |
|
406 |
/*
|
407 |
+
Manage product columns on product page
|
408 |
*/
|
409 |
public function manage_product_columns( $columns ){
|
|
|
|
|
|
|
|
|
410 |
|
411 |
+
// Featured Product
|
412 |
+
if ( 'yes' !== get_option( 'wcvendors_capability_product_featured', 'no' ) ) {
|
413 |
+
unset($columns['featured']);
|
414 |
+
}
|
415 |
+
|
416 |
+
// SKU
|
417 |
+
if ( 'yes' === get_option( 'wcvendors_capability_product_sku', 'no' ) ) {
|
418 |
+
unset($columns['sku']);
|
419 |
+
}
|
420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
|
422 |
+
return $columns;
|
423 |
+
}
|
424 |
|
425 |
}
|
classes/admin/class-vendor-admin-dashboard.php
CHANGED
@@ -32,7 +32,7 @@ Class WCV_Vendor_Admin_Dashboard {
|
|
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 |
|
@@ -274,8 +274,8 @@ class WCV_Vendor_Order_Page extends WP_List_Table
|
|
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 |
|
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 = 'yes' === get_option( 'wcvendors_display_shop_description_html', 'no' ) ? true : false;
|
36 |
include('views/html-vendor-settings-page.php');
|
37 |
}
|
38 |
|
274 |
'ajax' => false
|
275 |
) );
|
276 |
|
277 |
+
$this->can_view_comments = 'yes' === get_option( 'wcvendors_capability_order_read_notes', 'no' ) ? true : false;
|
278 |
+
$this->can_add_comments = 'yes' === get_option( 'wcvendors_capability_order_update_notes', 'no' ) ? true : false;
|
279 |
}
|
280 |
|
281 |
|
classes/admin/class-wcv-admin-setup.php
CHANGED
@@ -115,9 +115,9 @@ class WCV_Admin_Setup {
|
|
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,
|
@@ -246,9 +246,9 @@ class WCV_Admin_Setup {
|
|
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,
|
115 |
*/
|
116 |
public static function reset_vendor_roles(){
|
117 |
|
118 |
+
$can_add = 'yes' === get_option( 'wcvendors_capability_products_enabled', 'no' ) ? true : false;
|
119 |
+
$can_edit = 'yes' === get_option( 'wcvendors_capability_products_edit', 'no' ) ? true : false;
|
120 |
+
$can_submit_live = 'yes' === get_option( 'wcvendors_capability_products_live', 'no' ) ? true : false;
|
121 |
|
122 |
$args = array(
|
123 |
'assign_product_terms' => $can_add,
|
246 |
*/
|
247 |
public function update_vendor_role( ){
|
248 |
|
249 |
+
$can_add = 'yes' === get_option( 'wcvendors_capability_products_enabled', 'no' ) ? true : false;
|
250 |
+
$can_edit = 'yes' === get_option( 'wcvendors_capability_products_edit', 'no' ) ? true : false;
|
251 |
+
$can_submit_live = 'yes' === get_option( 'wcvendors_capability_products_live', 'no' ) ? true : false;
|
252 |
|
253 |
$args = array(
|
254 |
'assign_product_terms' => $can_add,
|
classes/admin/emails/class-wc-notify-vendor.php
CHANGED
@@ -108,7 +108,7 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
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 |
}
|
@@ -127,7 +127,7 @@ class WC_Email_Notify_Vendor extends WC_Email
|
|
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 |
|
108 |
$return[ 'cart_subtotal' ] = $total_rows[ 'cart_subtotal' ];
|
109 |
$return[ 'cart_subtotal' ][ 'label' ] = $commission_label;
|
110 |
|
111 |
+
if ( 'yes' === get_option( 'wcvendors_vendor_give_taxes', 'no' ) ) {
|
112 |
$return[ 'tax_subtotal'] = array( 'label' => '', 'value' => '');
|
113 |
$return[ 'tax_subtotal']['label'] = apply_filters('wcv_notify_vendor_tax_label', __( 'Tax Subtotal:', 'wc-vendors' ) ) ;
|
114 |
}
|
127 |
}
|
128 |
}
|
129 |
// Format tax price
|
130 |
+
if ( 'yes' === get_option( 'wcvendors_vendor_give_taxes', 'no' ) ) {
|
131 |
$return[ 'tax_subtotal']['value'] = wc_price( $return[ 'tax_subtotal'] ['value'] );
|
132 |
}
|
133 |
|
classes/class-install.php
CHANGED
@@ -153,6 +153,7 @@ class WCVendors_Install {
|
|
153 |
'publish_products' => false,
|
154 |
'delete_posts' => true,
|
155 |
'read' => true,
|
|
|
156 |
'upload_files' => true,
|
157 |
'view_woocommerce_reports' => false,
|
158 |
) );
|
153 |
'publish_products' => false,
|
154 |
'delete_posts' => true,
|
155 |
'read' => true,
|
156 |
+
'import' => true,
|
157 |
'upload_files' => true,
|
158 |
'view_woocommerce_reports' => false,
|
159 |
) );
|
classes/class-vendors.php
CHANGED
@@ -100,8 +100,8 @@ class WCV_Vendors
|
|
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;
|
100 |
{
|
101 |
global $woocommerce;
|
102 |
|
103 |
+
$give_tax = 'yes' == get_option( 'wcvendors_vendor_give_taxes', 'no' ) ? true : false;
|
104 |
+
$give_shipping = 'yes' == get_option( 'wcvendors_vendor_give_shipping', 'no' ) ? true : false;
|
105 |
$receiver = array();
|
106 |
$shipping_given = 0;
|
107 |
$tax_given = 0;
|
classes/front/class-vendor-cart.php
CHANGED
@@ -18,7 +18,7 @@ class WCV_Vendor_Cart
|
|
18 |
function __construct()
|
19 |
{
|
20 |
|
21 |
-
if ( 'yes' == 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 |
}
|
18 |
function __construct()
|
19 |
{
|
20 |
|
21 |
+
if ( 'yes' == get_option( 'wcvendors_display_label_sold_by_enable', 'no' ) ) {
|
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 |
}
|
classes/front/class-vendor-shop.php
CHANGED
@@ -29,7 +29,7 @@ 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 ( apply_filters( 'wcvendors_disable_sold_by_labels', 'yes' === 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 |
|
@@ -154,7 +154,7 @@ class WCV_Vendor_Shop
|
|
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">';
|
@@ -237,7 +237,7 @@ class WCV_Vendor_Shop
|
|
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 ) );
|
@@ -280,7 +280,7 @@ class WCV_Vendor_Shop
|
|
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 ) );
|
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', 'yes' === get_option( 'wcvendors_display_label_sold_by_enable', 'no' ) ) ) {
|
33 |
add_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 );
|
34 |
}
|
35 |
|
154 |
|
155 |
if ( $vendor_id ) {
|
156 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
157 |
+
$global_html = 'yes' == get_option( 'wcvendors_display_shop_description_html', 'no' ) ? true : false;
|
158 |
$description = do_shortcode( get_user_meta( $vendor_id, 'pv_shop_description', true ) );
|
159 |
|
160 |
echo '<div class="pv_shop_description">';
|
237 |
|
238 |
// Shop description
|
239 |
$has_html = get_user_meta( $vendor_id, 'pv_shop_html_enabled', true );
|
240 |
+
$global_html = 'yes' == get_option( 'wcvendors_display_shop_description_html', 'no' ) ? true : false;
|
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 ) );
|
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 = 'yes' === get_option( 'wcvendors_display_shop_description_html', 'no' ) ? true : false;
|
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 ) );
|
classes/front/dashboard/class-vendor-dashboard.php
CHANGED
@@ -204,9 +204,9 @@ class WCV_Vendor_Dashboard
|
|
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 |
|
@@ -318,7 +318,7 @@ class WCV_Vendor_Dashboard
|
|
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(
|
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 = 'yes' === get_option( 'wcvendors_capability_orders_enabled', 'no' ) ? true : false;
|
208 |
$settings_page = get_permalink(get_option( 'wcvendors_shop_settings_page_id' ) );
|
209 |
+
$can_submit = 'yes' == get_option( 'wcvendors_capability_products_enabled', 'no' ) ? true : false;
|
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 |
|
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 = 'yes' === get_option( 'wcvendors_display_shop_description_html', 'no' ) ? true : false;
|
322 |
|
323 |
ob_start();
|
324 |
wc_get_template( 'settings.php', array(
|
classes/front/orders/class-orders.php
CHANGED
@@ -17,9 +17,9 @@ class WCV_Orders
|
|
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' ) );
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
+
$this->can_view_orders = 'yes' === get_option( 'wcvendors_capability_orders_enabled', 'no' ) ? true : false;
|
21 |
+
$this->can_export_csv = 'yes' === get_option( 'wcvendors_capability_orders_export', 'no' ) ? true : false;
|
22 |
+
$this->can_view_emails = 'yes' === get_option( 'wcvendors_capability_order_customer_email', 'no' ) ? true : false;
|
23 |
|
24 |
add_action( 'template_redirect', array( $this, 'check_access' ) );
|
25 |
add_action( 'template_redirect', array( $this, 'process_export_orders' ) );
|
classes/front/signup/class-vendor-signup.php
CHANGED
@@ -17,7 +17,7 @@ class WCV_Vendor_Signup
|
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
-
if (
|
21 |
|
22 |
$this->terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
|
23 |
|
@@ -101,7 +101,7 @@ class WCV_Vendor_Signup
|
|
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 );
|
17 |
*/
|
18 |
function __construct()
|
19 |
{
|
20 |
+
if ( 'yes' !== get_option( 'wcvendors_vendor_allow_registration', 'no' ) ) return;
|
21 |
|
22 |
$this->terms_page = get_option( 'wcvendors_vendor_terms_page_id' );
|
23 |
|
101 |
} else {
|
102 |
wc_add_notice( apply_filters( 'wcvendors_application_submitted_msg', __( 'Your application has been submitted.', 'wc-vendors' ) ), 'notice' );
|
103 |
|
104 |
+
$manual = 'yes' === get_option( 'wcvendors_vendor_approve_registration', 'no' ) ? true : false;
|
105 |
$role = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
|
106 |
|
107 |
$wp_user_object = new WP_User( $user_id );
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Plugin URI: https://www.wcvendors.com/
|
|
7 |
Requires at least: 4.4.0
|
8 |
Requires PHP: 5.6
|
9 |
Tested up to: 4.9.5
|
10 |
-
Stable tag: 2.0.
|
11 |
License: GPLv2 or later
|
12 |
|
13 |
The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your WooCommerce site!
|
@@ -140,6 +140,17 @@ WC Vendors does not work with multisite WordPress. There are no plans to support
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
= Version 2.0.1 - 17th May 2018 =
|
144 |
|
145 |
* Fixed: Update notice won't complete
|
7 |
Requires at least: 4.4.0
|
8 |
Requires PHP: 5.6
|
9 |
Tested up to: 4.9.5
|
10 |
+
Stable tag: 2.0.2
|
11 |
License: GPLv2 or later
|
12 |
|
13 |
The free marketplace plugin for WooCommerce. Now you can allow anyone to open a store on your WooCommerce site!
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= Version 2.0.2 - 17th May 2018 =
|
144 |
+
|
145 |
+
* Fixed: Corrected settings conditional checks across classes
|
146 |
+
* Fixed: Vendor Capabilities
|
147 |
+
* Fixed: Reset vendor roles
|
148 |
+
* Fixed: Incorrect get_option calls
|
149 |
+
* Fixed: Permission check for product submit and order view
|
150 |
+
* Updated: Templates to make tracking changes possible
|
151 |
+
* Updated: Disable add new product completely if disabled
|
152 |
+
* Updated: Make denied product message translateable.
|
153 |
+
|
154 |
= Version 2.0.1 - 17th May 2018 =
|
155 |
|
156 |
* Fixed: Update notice won't complete
|
templates/dashboard/date-picker.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<form method="post">
|
2 |
<p>
|
3 |
<label style="display:inline;" for="from"><?php _e( 'From:', 'wc-vendors' ); ?></label>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Date picker Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/date-picker.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 |
+
|
18 |
<form method="post">
|
19 |
<p>
|
20 |
<label style="display:inline;" for="from"><?php _e( 'From:', 'wc-vendors' ); ?></label>
|
templates/dashboard/denied.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php wc_print_notices(); ?>
|
2 |
|
3 |
<?php if ( WCV_Vendors::is_pending( get_current_user_id() ) ) { ?>
|
@@ -8,7 +25,7 @@
|
|
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">
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Denied Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/denied.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 |
+
|
18 |
<?php wc_print_notices(); ?>
|
19 |
|
20 |
<?php if ( WCV_Vendors::is_pending( get_current_user_id() ) ) { ?>
|
25 |
|
26 |
<p><?php _e( 'Your account is not setup as a vendor.', 'wc-vendors' ); ?></p>
|
27 |
|
28 |
+
<?php if ( 'yes' === get_option( 'wcvendors_vendor_allow_registration', 'no' ) ) { ?>
|
29 |
<form method="POST" action="">
|
30 |
<div class="clear"></div>
|
31 |
<p class="form-row">
|
templates/dashboard/links.php
CHANGED
@@ -1,3 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<center>
|
2 |
<p>
|
3 |
<a href="<?php echo $shop_page; ?>" class="button"><?php echo _e( 'View Your Store', 'wc-vendors' ); ?></a>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Links Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/links.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 |
+
|
18 |
+
<?php wc_print_notices(); ?>
|
19 |
+
|
20 |
<center>
|
21 |
<p>
|
22 |
<a href="<?php echo $shop_page; ?>" class="button"><?php echo _e( 'View Your Store', 'wc-vendors' ); ?></a>
|
templates/dashboard/orders.php
CHANGED
@@ -1,12 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
*
|
6 |
*
|
7 |
-
* @
|
8 |
-
* @
|
|
|
|
|
9 |
*/
|
|
|
|
|
|
|
|
|
10 |
?>
|
11 |
|
12 |
<script type="text/javascript">
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Orders Template
|
4 |
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/orders.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 |
|
18 |
<script type="text/javascript">
|
templates/dashboard/reports.php
CHANGED
@@ -1,3 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<h2><?php _e( 'Sales Report', 'wc-vendors' ); ?></h2>
|
2 |
|
3 |
<?php
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Reports Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/reports.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 |
+
|
18 |
+
|
19 |
<h2><?php _e( 'Sales Report', 'wc-vendors' ); ?></h2>
|
20 |
|
21 |
<?php
|
templates/dashboard/settings/paypal-email-form.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shop Name Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/settings/paypal-email-form.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 |
+
|
18 |
<div class="pv_paypal_container">
|
19 |
<p><b><?php _e( 'PayPal Address', 'wc-vendors' ); ?></b><br/>
|
20 |
<?php _e( 'Your PayPal address can be used to manually send you your commission.', 'wc-vendors' ); ?><br/>
|
templates/dashboard/settings/seller-info.php
CHANGED
@@ -1,3 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Seller Info Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/settings/seller-info.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 |
+
|
18 |
+
|
19 |
<div id="pv_seller_info_container">
|
20 |
<p>
|
21 |
<b><?php echo apply_filters( 'wcvendors_seller_info_label', __( 'Seller info', 'wc-vendors' ) ); ?></b><br/>
|
templates/dashboard/settings/settings.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<h2><?php _e( 'Settings', 'wc-vendors' ); ?></h2>
|
2 |
|
3 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/settings/settings.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 |
+
|
18 |
<h2><?php _e( 'Settings', 'wc-vendors' ); ?></h2>
|
19 |
|
20 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
templates/dashboard/settings/shop-description.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 ); ?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shop Description Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/settings/shop-description.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 |
+
|
18 |
<div id="pv_shop_description_container">
|
19 |
<p><b><?php _e( 'Shop Description', 'wc-vendors' ); ?></b><br/>
|
20 |
<?php printf( __( 'This is displayed on your <a href="%s">shop page</a>.', 'wc-vendors' ), $shop_page ); ?>
|
templates/dashboard/settings/shop-name.php
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shop Name Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/dashboard/settings/shop-name.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 |
+
|
18 |
<div class="pv_shop_name_container">
|
19 |
<p><b><?php _e( 'Shop Name', 'wc-vendors' ); ?></b><br/>
|
20 |
<?php _e( 'Your shop name is public and must be unique.', 'wc-vendors' ); ?><br/>
|
templates/front/vendor-list.php
CHANGED
@@ -1,17 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*
|
7 |
-
*
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
|
|
|
|
|
|
11 |
<div class="vendor_list" style="display:inline-block; margin-right:10%;">
|
12 |
<center>
|
13 |
<a href="<?php echo $shop_link; ?>"><?php echo get_avatar($vendor_id, 200); ?></a><br />
|
14 |
<a href="<?php echo $shop_link; ?>" class="button"><?php echo $shop_name; ?></a>
|
15 |
<br /><br />
|
16 |
</center>
|
17 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor List Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/front/vendors-list.php
|
6 |
+
*
|
7 |
+
* @author Jamie Madden, WC Vendors
|
8 |
+
* @package WCVendors/Templates/Emails/HTML
|
9 |
+
* @version 2.0.0
|
10 |
+
*
|
11 |
+
* Template Variables available
|
12 |
+
* $shop_name : pv_shop_name
|
13 |
+
* $shop_description : pv_shop_description (completely sanitized)
|
14 |
+
* $shop_link : the vendor shop link
|
15 |
+
* $vendor_id : current vendor id for customization
|
16 |
+
|
17 |
+
*/
|
18 |
|
19 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
?>
|
23 |
<div class="vendor_list" style="display:inline-block; margin-right:10%;">
|
24 |
<center>
|
25 |
<a href="<?php echo $shop_link; ?>"><?php echo get_avatar($vendor_id, 200); ?></a><br />
|
26 |
<a href="<?php echo $shop_link; ?>" class="button"><?php echo $shop_name; ?></a>
|
27 |
<br /><br />
|
28 |
</center>
|
29 |
+
</div>
|
templates/front/vendor-main-header.php
CHANGED
@@ -1,27 +1,30 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
-
*
|
5 |
-
* THIS FILE WILL LOAD ON VENDORS STORE URLs (such as yourdomain.com/vendors/bobs-store/)
|
6 |
*
|
7 |
-
*
|
8 |
-
*
|
9 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
*/
|
11 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
-
|
13 |
-
/*
|
14 |
-
* Template Variables available
|
15 |
-
* $vendor : For pulling additional user details from vendor account. This is an array.
|
16 |
-
* $vendor_id : current vendor user id number
|
17 |
-
* $shop_name : Store/Shop Name (From Vendor Dashboard Shop Settings)
|
18 |
-
* $shop_description : Shop Description (completely sanitized) (From Vendor Dashboard Shop Settings)
|
19 |
-
* $seller_info : Seller Info(From Vendor Dashboard Shop Settings)
|
20 |
-
* $vendor_email : Vendors email address
|
21 |
-
* $vendor_login : Vendors user_login name
|
22 |
-
* $vendor_shop_link : URL to the vendors store
|
23 |
-
*/
|
24 |
|
|
|
|
|
|
|
25 |
?>
|
26 |
|
27 |
<h1><?php echo $shop_name; ?></h1>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Vendor Main Header Template
|
|
|
|
|
4 |
*
|
5 |
+
* THIS FILE WILL LOAD ON VENDORS STORE URLs (such as yourdomain.com/vendors/bobs-store/)
|
6 |
+
*
|
7 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/front/vendor-main-header.php
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @package WCVendors/Templates/Emails/HTML
|
11 |
+
* @version 2.0.0
|
12 |
+
*
|
13 |
+
*
|
14 |
+
* Template Variables available
|
15 |
+
* $vendor : For pulling additional user details from vendor account. This is an array.
|
16 |
+
* $vendor_id : current vendor user id number
|
17 |
+
* $shop_name : Store/Shop Name (From Vendor Dashboard Shop Settings)
|
18 |
+
* $shop_description : Shop Description (completely sanitized) (From Vendor Dashboard Shop Settings)
|
19 |
+
* $seller_info : Seller Info(From Vendor Dashboard Shop Settings)
|
20 |
+
* $vendor_email : Vendors email address
|
21 |
+
* $vendor_login : Vendors user_login name
|
22 |
+
* $vendor_shop_link : URL to the vendors store
|
23 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
+
exit;
|
27 |
+
}
|
28 |
?>
|
29 |
|
30 |
<h1><?php echo $shop_name; ?></h1>
|
templates/front/vendor-mini-header.php
CHANGED
@@ -1,26 +1,30 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
*
|
6 |
*
|
7 |
-
*
|
8 |
-
*
|
9 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
*/
|
11 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
-
|
13 |
-
/*
|
14 |
-
* Template Variables available
|
15 |
-
* $vendor : For pulling additional user details from vendor account. This is an array.
|
16 |
-
* $vendor_id : current vendor user id number
|
17 |
-
* $shop_name : Store/Shop Name (From Vendor Dashboard Shop Settings)
|
18 |
-
* $shop_description : Shop Description (completely sanitized) (From Vendor Dashboard Shop Settings)
|
19 |
-
* $seller_info : Seller Info(From Vendor Dashboard Shop Settings)
|
20 |
-
* $vendor_email : Vendors email address
|
21 |
-
* $vendor_login : Vendors user_login name
|
22 |
-
*/
|
23 |
|
|
|
|
|
|
|
24 |
?>
|
25 |
|
26 |
<h1><?php echo $shop_name; ?></h1>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Vendor Mini Header Template
|
4 |
*
|
5 |
+
* THIS FILE WILL LOAD ON VENDORS INDIVIDUAL PRODUCT URLs (such as yourdomain.com/shop/product-name/)
|
6 |
*
|
7 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/front/vendor-mini-header.php
|
8 |
+
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @package WCVendors/Templates/Emails/HTML
|
11 |
+
* @version 2.0.0
|
12 |
+
*
|
13 |
+
*
|
14 |
+
* Template Variables available
|
15 |
+
* $vendor : For pulling additional user details from vendor account. This is an array.
|
16 |
+
* $vendor_id : current vendor user id number
|
17 |
+
* $shop_name : Store/Shop Name (From Vendor Dashboard Shop Settings)
|
18 |
+
* $shop_description : Shop Description (completely sanitized) (From Vendor Dashboard Shop Settings)
|
19 |
+
* $seller_info : Seller Info(From Vendor Dashboard Shop Settings)
|
20 |
+
* $vendor_email : Vendors email address
|
21 |
+
* $vendor_login : Vendors user_login name
|
22 |
+
* $vendor_shop_link : URL to the vendors store
|
23 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
+
exit;
|
27 |
+
}
|
28 |
?>
|
29 |
|
30 |
<h1><?php echo $shop_name; ?></h1>
|
templates/front/vendor-sold-by.php
CHANGED
@@ -1,20 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
|
|
|
|
|
3 |
* The template for displaying the vendor sold by on the shop loop
|
4 |
*
|
5 |
-
*
|
6 |
*
|
7 |
-
* @
|
8 |
-
* @
|
9 |
-
*
|
10 |
-
* Template Variables available
|
11 |
-
*
|
12 |
-
* $vendor_id : current vendor id for customization
|
13 |
-
* $sold_by_label : sold by label
|
14 |
-
* $sold_by : sold by
|
15 |
*
|
16 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
*/
|
18 |
-
?>
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Vendor sold by Template
|
4 |
+
*
|
5 |
* The template for displaying the vendor sold by on the shop loop
|
6 |
*
|
7 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/front/vendor-sold-by.php
|
8 |
*
|
9 |
+
* @author Jamie Madden, WC Vendors
|
10 |
+
* @package WCVendors/Templates/Emails/HTML
|
11 |
+
* @version 2.0.0
|
|
|
|
|
|
|
|
|
|
|
12 |
*
|
13 |
*
|
14 |
+
* Template Variables available
|
15 |
+
* $vendor : For pulling additional user details from vendor account. This is an array.
|
16 |
+
* $vendor_id : current vendor user id number
|
17 |
+
* $shop_name : Store/Shop Name (From Vendor Dashboard Shop Settings)
|
18 |
+
* $shop_description : Shop Description (completely sanitized) (From Vendor Dashboard Shop Settings)
|
19 |
+
* $seller_info : Seller Info(From Vendor Dashboard Shop Settings)
|
20 |
+
* $vendor_email : Vendors email address
|
21 |
+
* $vendor_login : Vendors user_login name
|
22 |
+
* $vendor_shop_link : URL to the vendors store
|
23 |
*/
|
|
|
24 |
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
26 |
+
exit;
|
27 |
+
}
|
28 |
+
?>
|
29 |
+
<small class="wcvendors_sold_by_in_loop"><?php echo apply_filters('wcvendors_sold_by_in_loop', $sold_by_label ); ?> <?php echo $sold_by; ?></small><br />
|
templates/orders/comments/add-new-comment.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<form method="post" name="add_comment" id="add-comment_<?php echo $order_id; ?>">
|
2 |
|
3 |
<?php wp_nonce_field( 'add-comment' ); ?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Add New Comment Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/comments/add-new-comment.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 |
<form method="post" name="add_comment" id="add-comment_<?php echo $order_id; ?>">
|
18 |
|
19 |
<?php wp_nonce_field( 'add-comment' ); ?>
|
templates/orders/comments/existing-comments.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
foreach ( $comments as $comment ) :
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Existing Comments Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/comments/existing-comments.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 |
<?php
|
18 |
|
19 |
foreach ( $comments as $comment ) :
|
templates/orders/csv-export.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<form method="post" name="export_orders">
|
2 |
<input type="submit"
|
3 |
class="btn btn-primary btn-small"
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Export Orders Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/csv-export.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 |
<form method="post" name="export_orders">
|
18 |
<input type="submit"
|
19 |
class="btn btn-primary btn-small"
|
templates/orders/customer-note/customer-note.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<tr>
|
2 |
<td colspan="100%">
|
3 |
<h2>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customer Note Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/customer-note/customer-note.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 |
<tr>
|
18 |
<td colspan="100%">
|
19 |
<h2>
|
templates/orders/orders.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
2 |
|
3 |
<h2><?php printf( 'Orders for %s', wc_get_product( $product_id )->get_title() ); ?></h2>
|
@@ -65,8 +81,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 |
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Orders Table Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/orders.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 |
<?php if ( function_exists( 'wc_print_notices' ) ) { wc_print_notices(); } ?>
|
18 |
|
19 |
<h2><?php printf( 'Orders for %s', wc_get_product( $product_id )->get_title() ); ?></h2>
|
81 |
<td colspan="100%">
|
82 |
|
83 |
<?php
|
84 |
+
$can_view_comments = 'yes' === get_option( 'wcvendors_capability_order_read_notes', 'no' ) ? true : false;
|
85 |
+
$can_add_comments = 'yes' === get_option( 'wcvendors_capability_order_update_notes', 'no' ) ? true : false;
|
86 |
|
87 |
if ($can_view_comments || $can_add_comments) :
|
88 |
|
templates/orders/shipping/shipping-form.php
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<form method="post" name="track_shipment" id="track-shipment_<?php echo $order_id; ?>">
|
2 |
|
3 |
<?php wp_nonce_field( 'track-shipment' );
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shipping Form Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to yourtheme/wc-vendors/orders/shipping/shipping-form.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 |
<form method="post" name="track_shipment" id="track-shipment_<?php echo $order_id; ?>">
|
18 |
|
19 |
<?php wp_nonce_field( 'track-shipment' );
|