if ( ! function_exists( ‘wcv_hide_everywhere_else’ ) ) { /** * Hide the “Everywhere else” option in the countries dropdown. * * @param array $regions Array of countries. */ function wcv_hide_everywhere_else( $regions ) { unset( $regions[‘EWE’] ); return $regions; } add_filter(…Continue reading
/** * Add CSS class to apply for vendor label in a registration * * @param string $class CSS classes. * @return string */ function wcv_add_apply_vendor_label_css_class( $class ) { $class .= ‘example_css_class’; return $class; } add_filter( ‘wcvendors_vendor_registration_apply_label_css_classes’, ‘wcv_add_apply_vendor_label_css_class’, 10, 1…Continue reading
// Disable the product type drop down. add_filter(‘wcv_disable_product_type’, function() { return true; } ); /** * Hook into the form and output a hidden field that sets the product type. */ add_action( ‘wcv_after_product_type’, ‘wcv_set_product_type’ ); function wcv_set_product_type( $object_id ){ WCVendors_Pro_Product_Form::product_type_hidden(…Continue reading
// Unhook WC Vendors method remove_action( ‘woocommerce_after_shop_loop_item’, array(‘WCV_Vendor_Shop’, ‘template_loop_sold_by’), 9 ); // Define new sold by method function wcv_new_template_loop_sold_by( $product_id ) { $vendor_id = WCV_Vendors::get_vendor_from_product( $product_id ); // Get the products categories. $categories = get_the_terms( $product_id, ‘product_cat’ ); // Reset…Continue reading
/** * Disable the sold by link on the checkout page */ add_filter(‘wcvendors_sold_by_link’, ‘wcv_disable_checkout_sold_by_link’, 10, 2); function wcv_disable_checkout_sold_by_link( $sold_by, $vendor_id ){ if ( is_checkout() ) { $sold_by = WCV_Vendors::get_vendor_sold_by( $vendor_id ); } return $sold_by; }Continue reading
add_filter( ‘wcvendors_vendor_order_items_args’, ‘wcv_enable_product_image_vendor_order_email’ ); function wcv_enable_product_image_vendor_order_email( $order_item_args ){ $order_item_args[‘show_image’] = true; return $order_item_args; }Continue reading
add_filter( ‘wcv_pro_dashboard_urls’, ‘custom_menu_link’ ); function custom_menu_link( $pages ) { $pages[ ‘custom_link’ ] = array( ‘slug’ => ‘http://yoursite.com/customlink/here’, ‘label’ => __(‘Custom Link’, ‘wcvendors-pro’ ), ‘actions’ => array() ); return $pages; }Continue reading
// Hook into the navigation add_filter( ‘wcv_pro_dashboard_urls’, ‘add_test_page_nav’, 9 ); function add_test_page_nav( $pages ){ $pages[ ‘test_page’ ] = array( ‘slug’ => ‘test_page’, ‘id’ => ‘test_page’, ‘label’ => __( ‘Test Page’, ‘wcvendors-pro’ ), ‘actions’ => array( ‘edit’ => __( ‘New’, ‘wcvendors-pro’…Continue reading