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
/*Remove International Shipping Charge Field */ | |
add_filter( 'wcv_shipping_international_fee', 'hide_wcv_shipping_international_fee' ); | |
function hide_wcv_shipping_international_fee( $field ) { | |
$field['label'] = __( '' ); | |
$field['description'] = __( '' ); | |
$field['type'] = 'hidden'; | |
$field['value'] = 'no'; | |
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
/* WC Vendors Pro Rename Product Types */ | |
/* Simple change to Classified */ | |
add_filter('wcv_product_type_selector', 'wcv_product_type_selector_rename'); | |
function wcv_product_type_selector_rename( $product_type_selector ){ | |
if ( array_key_exists('simple', $product_type_selector ) ) $product_type_selector[ 'simple' ]= 'Classified'; | |
return $product_type_selector; | |
} | |
/* External Change to My Website */ | |
add_filter('wcv_product_type_selector', 'wcv_product_type_selector_rename_external'); |
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
/* store and stores to table and tables */ | |
add_filter( 'gettext', 'wcv_translate_store', 999 ); | |
function wcv_translate_store( $translated ) { | |
$translated = str_ireplace( 'Store', 'Table', $translated ); | |
return $translated; | |
} | |
add_filter( 'gettext', 'wcv_translate_stores', 999 ); | |
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
/* Rename Return Policy Label - put this in the child theme functions.php file */ | |
add_filter('wcv_vendor_shipping_return_policy', 'custom_wcv_vendor_shipping_return_policy'); | |
function custom_wcv_vendor_shipping_return_policy( $args ){ | |
$args['label'] = 'Return Policy & Terms'; | |
return $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
/* sold by product page - seller info tab */ | |
add_action('wcv_before_seller_info_tab', 'sold_by_seller_tab'); | |
function sold_by_seller_tab() { | |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); | |
$vendor_id = get_the_author_meta('ID'); | |
$store_url = WCVendors_Pro_Vendor_Controller::get_vendor_store_url( $vendor_id ); | |
$shop_name = get_user_meta( $vendor_id, 'pv_shop_name', true ); | |
$sold_by = '<a href="'.$store_url.'">'.$shop_name.'</a>'; | |
echo '<p>Sold By: '.$sold_by.'</p>'; | |
} |
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
WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_simple_auctions_start_date', array( | |
'post_id' => $post_id, | |
'id' => '_auction_dates_from', | |
'label' => __( 'From', 'wcvendors-pro-simple-auctions' ), | |
'class' => 'wcv-datetimepicker', | |
'placeholder' => __( 'From…', 'placeholder', 'wcvendors-pro-simple-auctions' ). ' YYYY-MM-DD HH:MM', | |
'wrapper_start' => '<div class="wcv-cols-group wcv-horizontal-gutters"><div class="all-50 small-100 ">', | |
'wrapper_end' => '</div>', | |
'custom_attributes' => array( |
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
/* WEBSITE REQUIRED */ | |
function wcv_vendor_company_url_required( $args ) { | |
$args[ 'custom_attributes' ] = array( | |
'data-rules' => 'required', | |
'data-error' => __( 'This field is required.', 'wcvendors-pro' ) | |
); | |
return $args; | |
} | |
add_filter( 'wcv_vendor_company_url', 'wcv_vendor_company_url_required' ); |
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
/* WC Vendors Pro - My Custom Field */ | |
add_action( 'wcvendors_settings_after_shop_description', 'store_bank_details', 9,2 ); | |
function store_bank_details( ){ | |
if ( class_exists( 'WCVendors_Pro' ) ){ | |
$key = '_wcv_custom_settings_bankname'; | |
$value = get_user_meta( get_current_user_id(), $key, true ); | |
// Bank Name | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => $key, | |
'label' => __( 'Total Staff Members', 'wcvendors-pro' ), |
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
/* remove from product meta start */ | |
remove_action ( 'woocommerce_product_meta_start', array($wcvendors_pro->wcvendors_pro_vendor_controller, 'product_ships_from'), 9 ); | |
/* Add elsewhere (use the hook you wish) */ | |
add_action ( 'woocommerce_before_add_to_cart_form', array($wcvendors_pro->wcvendors_pro_vendor_controller, 'product_ships_from')); |
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
/* this would go in your child theme functions.php: */ | |
function custom_shipping_message () { | |
$message = 'your message here'; | |
echo '<p>'.$message.'</p>'; | |
} | |
/* this would go where you wish the message to show up in your product-edit.php | |
template which you have copied and moved to your child theme | |
(wp-content/themes/your-child-theme/wc-vendors/dashbaord/product-edit.php): */ |