Add Custom Settings Tab to Vendor Dashboard

// Add the tab to the tab nav add_filter( ‘wcv_store_tabs’, ‘add_custom_tab_nav’ ); function add_custom_tab_nav( $tabs ){ // Target is the custom css id for the content tab in the code below this $tabs[‘custom_tab’] = array( ‘label’ => __( ‘Custom’, ‘wcvendors-pro’…Continue reading

Add the fields to the user edit screen

// Add the fields to user edit screen. add_action( ‘show_user_profile’, ‘add_extra_user_fields’ ); add_action( ‘edit_user_profile’, ‘add_extra_user_fields’ ); function add_extra_user_fields( $user ){ // Document file URL. $document_file_url = ( $user->_wcv_custom_settings_doc_example ) ? wp_get_attachment_url( $user->_wcv_custom_settings_doc_example ) : ”; // Image file URL. $image_file_url…Continue reading

Add a video field to the sign-up form

// Add the video field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_video_uploader’); function wcv_video_uploader( ){ // Remove this check to have it show on sign up and settings pages. if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ Video Uploader ‘; $value…Continue reading

Add an audio field to the sign up form

// Add the audio field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_audio_uploader’); function wcv_audio_uploader( ){ // Remove this check to have it show on sign up and settings pages. if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ Audio Uploader ‘; $value…Continue reading

Add an image filed to the sign up form

// Add the image field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_image_uploader’); function wcv_image_uploader( ){ if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ Image Uploader ‘; $value = get_user_meta( get_current_user_id(), ‘_wcv_custom_settings_image_example’, true ); WCVendors_Pro_Form_Helper::file_uploader( array( ‘id’ => ‘_wcv_custom_settings_image_example’, ‘header_text’ => __(‘Image…Continue reading

Add a document file upload

// Add the document field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_doc_uploader’); function wcv_doc_uploader( ){ if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ ‘; echo ‘ Document Uploader ‘; $value = get_user_meta( get_current_user_id(), ‘_wcv_custom_settings_doc_example’, true ); WCVendors_Pro_Form_Helper::file_uploader( array( ‘id’ => ‘_wcv_custom_settings_doc_example’,…Continue reading

Allow HTML in the product description

function wcv_wpkses_post_html_tags( $tags, $context ) { if ( ‘post’ === $context ) { $tags[‘iframe’] = array( ‘src’ => true, ‘height’ => true, ‘width’ => true, ‘frameborder’ => true, ‘allowfullscreen’ => true, ); } return $tags; } add_filter( ‘wp_kses_allowed_html’, ‘wcv_wpkses_post_html_tags’, 10,…Continue reading

Paid Memberships Pro with WC Vendors

// PAID MEMBERSHIPS PRO — UPGRADE TO VENDOR, DOWNGRADE TO SUBSCRIBER /* Members signing up for membership level #1 get “Vendor” role. Members signing up for membership level #2 get “Vendor” role. Members cancelling are given the customer role. Admin…Continue reading

Get Blog Info

/** * Function that returns a value from the get_bloginfo() function with a prefix, suffix, and separator. * * @param string $blog_info The blog info to be retrieved. Example: ‘name’, ‘description’, etc. * @param string $prefix The prefix to add…Continue reading