This file contains hidden or 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( 'wcv_after_product_simple_after', 'wcv_add_inventory_fields' ); | |
| function wcv_add_inventory_fields( $object_id ){ | |
| ?> | |
| <!-- Inventory --> | |
| <div class="wcv-product-inventory inventory_product_data tabs-content" id="inventory"> | |
| <?php WCVendors_Pro_Product_Form::manage_stock( $object_id ); ?> | |
| <?php do_action( 'wcv_product_options_stock', $object_id ); ?> |
This file contains hidden or 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 | |
| // Sourced from https://docs.wcvendors.com/knowledge-base/add-menu-item-to-dashboard/ | |
| // Add this to your themes functions.php. | |
| function wcv_add_menu_item( $pages ){ | |
| $pages[] = array( | |
| 'label' => 'First Page', | |
| 'slug' => 'http://wcvendors.com/support', | |
| 'actions' => array() | |
| ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 ); |