Hide fields in edit page.

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 3 reply threads
  • Author
    Posts
    • #111277
      wpxpert
      Participant

      How to hide ‘product type’ and ‘product category’ field from product edit page.
      This request only for edit page.

      How can i hide wcfm left column menu only for vendor.

    • #111308

      Hello,

      You need to override the “wcfm-view-products-manage.php” in your activate theme <your theme folder>/wcfm/products-manager/wcfm-view-products-manage.php
      then the condition if(empty($product_id)) before if( apply_filters( 'wcfm_is_allow_category', true ) && apply_filters( 'wcfm_is_allow_pm_category', true ) ) and

      add_filter( 'wcfm_product_manage_fields_general', function( $fields, $product_id, $product_type, $wcfm_is_translated_product, $wcfm_wpml_edit_disable_element ) {		
      	if($product_id != 0) {
      		$fields['product_type']['class']='wcfm_block_hide';
      	}		
      	return $fields;
      }, 50, 5 );

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      How can i hide wcfm left column menu only for vendor.
      >>Can you explain with screenshot which section do you want to remove from vendor

      Thanks.

    • #111387
      wpxpert
      Participant

      How can i hide wcfm left column menu only for vendor.
      >>Can you explain with screenshot which section do you want to remove from vendor

      pls check attachment.

      I need another help. how to remove sub categories and arrows from add product page? I want to display only main category.

      Thanks

      Attachments:
      You must be logged in to view attached files.
    • #111425

      Hi,

      .vendor-dashboard .wcfm_menu_toggler,.vendor-dashboard #wcfm_menu,.sub_checklist_toggler {
      	display: none;
      }

      Add this css to your child theme’s style.css

      add_filter('wcfm_wp_dropdown_categories_args','fn_wcfm_wp_dropdown_categories_args');
      function fn_wcfm_wp_dropdown_categories_args($args) {
      	$args['parent'] = 0;
      	return $args;
      }
      add_filter( 'body_class', function( $classes ) {
      	$userid = get_current_user_id();
      	if(wcfm_is_vendor($userid)) {
            $classes = array_merge( $classes, array( 'vendor-dashboard' ) );
      	}
      	return $classes;
      });

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      Thanks.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.