This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_product_length ', function( $field ) { | |
$field['custom_attributes'] = array( 'required' => '' ); | |
return $field; | |
}); | |
add_filter( 'wcv_product_width', function( $field ) { | |
$field['custom_attributes'] = array( 'required' => '' ); | |
return $field; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_product_max_charge', function( $field ) { | |
$field['type'] = 'hidden'; | |
$field['description'] = ''; | |
return $field; | |
}); | |
add_filter( 'wcv_product_free_shipping_product', function( $field ) { | |
$field['type'] = 'hidden'; | |
$field['description'] = ''; return $field; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_format_store_address_args', 'my_wcv_format_store_address', 11, 2 ); | |
function my_wcv_format_store_address( $address_args, $vendor_id ) { | |
$address_args = array( | |
'state' => get_user_meta( $vendor_id, '_wcv_store_state', true ), | |
'city' => get_user_meta( $vendor_id, '_wcv_store_city', true ), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_format_store_address_args', 'my_wcv_format_store_address', 11, 2 ); | |
function my_wcv_format_store_address( $address_args, $vendor_id ) { | |
$address_args = array( | |
'country' => WC()->countries->countries[ get_user_meta( $vendor_id, '_wcv_store_country', true ) ], | |
'city' => get_user_meta( $vendor_id, '_wcv_store_city', true ), | |
); | |
return $address_args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wcv_product_row_status', 'product_row_status', 10, 6 ); | |
function product_row_status( $string, $product_status, $product_type, $date, $stock_status_label, $product ){ | |
$new_string = | |
sprintf( | |
'<span class="status %s">%s</span><br /> | |
<span class="product_type %s">%s</span><br /> | |
<span class="product_date">%s</span><br />', | |
lcfirst( $product_status ), | |
$product_status, | |
sanitize_title_with_dashes( lcfirst( $product_type ) ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_single_product_summary','vendor_feedback_product_page'); | |
function vendor_feedback_product_page() { | |
$vendor_id = get_the_author_meta('ID'); | |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); | |
if ( ! WCVendors_Pro::get_option( 'ratings_management_cap' ) ) | |
echo WCVendors_Pro_Ratings_Controller::ratings_link( $vendor_id, true ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Before the table | |
add_action( 'wcvendors_settings_before_form', 'output_before_settings_form', 0 ); | |
function output_before_settings_form(){ | |
echo '<h1>Before the table</h1>'; | |
} | |
// After the table | |
add_action( 'wcvendors_settings_after_form', 'output_after_settings_form', 99 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_product_manage_stock', function( $field ) { | |
$field['type'] = 'hidden'; return $field; | |
}); | |
add_filter( 'wcv_product_sold_individually', function( $field ) { | |
$field['type'] = 'hidden'; return $field; | |
}); | |
add_filter( 'wcv_shipping_national_min_charge', function( $field ) { $field['description'] = ''; return $field; } ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_shipping_national_min_charge', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_national_max_charge', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_national_free_shipping_order', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_international_fee', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_international_max_charge', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_international_free_shipping_order', function( $field ) { $field['description'] = ''; return $field; } ); | |
add_filter( 'wcv_shipping_international_min_charge', function( $field ) { $field['description'] = ''; return $field; } ); |