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 | |
/** | |
* Remove fixed product discounts from the vendor coupon edit screen | |
*/ | |
add_filter( 'wcv_coupon_discount_type', 'wcv_use_percentage_discount_type' ); | |
function wcv_use_percentage_discount_type( $select_args ){ | |
unset( $select_args['options']['fixed_product']); | |
return $select_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
<?php | |
// Update the label if you're using the wp_editor setting | |
add_filter( 'wcv_vendor_seller_info_editor', 'wcv_update_editor_seller_info_label' ); | |
function wcv_update_editor_seller_info_label( $label ){ | |
return __( 'Driver Bio', 'wcvendors-pro' ); | |
} | |
// Update the label if you are using the standard text area setting | |
add_filter( 'wcv_vendor_seller_info', 'wcv_update_seller_info_label' ); | |
function wcv_update_seller_info_label( $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
<?php | |
/** | |
*GOOGLE ANALYTICS POUR VENDEURS | |
Add the Google Analytics Tracking ID field to the settings page for vendors | |
*/ | |
add_action( 'wcvendors_settings_after_vendor_store_notice', 'wcv_add_ga_code' ); | |
function wcv_add_ga_code(){ | |
$value = get_user_meta( get_current_user_id(), '_wcv_custom_settings_ga_tracking_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 | |
// Add the menu item | |
add_filter( 'wcv_pro_dashboard_urls', 'add_test_page_nav', 9 ); | |
function add_test_page_nav( $pages ){ | |
$pages[ 'help_page' ] = array( | |
'slug' => 'help_page', | |
'id' => 'help_page', | |
'label' => __( 'Help', '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
<?php | |
// Add this to your themes functions.php | |
// Here are two different ways you can sort the product tabs | |
// Use ksort to alphabetically sort the tabs | |
add_filter( 'wcv_product_meta_tabs', 'wcv_change_product_tab_order_alphabetical' ); | |
function wcv_change_product_tab_order_alphabetical( $tabs ){ | |
ksort( $tabs ); | |
return $tabs; |
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 | |
// Add this to your themes functions.php | |
// Use the filter in the first argument found in the class-wcvendors-pro-store-form.php | |
add_filter( 'wcv_vendor_seller_info', 'custom_wcv_vendor_seller_info' ); | |
function custom_wcv_vendor_seller_info( $args ){ | |
$args['label'] = 'About Us'; | |
$args['desc_tip'] = true; | |
$args['description'] = 'Helper text under 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
<?php | |
// WC Vendors Pro 1.7.10 or above required. | |
/** | |
* Taxonomy: location. | |
*/ | |
function wcv_register_my_location_taxonomy() { | |
$labels = [ |
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 | |
// Author: Jamie Madden | |
// Link: https://wcvendors.com | |
// Remove product price from the loop | |
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); | |
// New overrides | |
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); |
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 | |
// This will assume you have created a directory in your theme called wc-vendors/partials/ | |
// Then added the override file here. | |
add_filter( 'wcvendors_pro_dashboard_open_path', 'wcv_override_dashboard_open_path' ); | |
function wcv_override_dashboard_open_path( $path ){ | |
$path = get_stylesheet_directory(). '/wc-vendors/partials/wcvendors-pro-dashboard-open.php'; | |
return $path; | |
} |
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 | |
/** | |
* Disable All In One SEO on the vendor dashboard. | |
*/ | |
add_filter( 'aioseo_disable', 'wcv_aioseo_disable_term_output' ); | |
function wcv_aioseo_disable_term_output( $disabled ) { | |
$current_page_id = get_the_ID(); | |
if ( wcv_is_dashboard_page( $current_page_id ) ){ |