Virtual & Downloadable , checked and dissapear

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Virtual & Downloadable , checked and dissapear

Viewing 3 reply threads
  • Author
    Posts
    • #60611
      slipksizz
      Participant

      Hello everyone,

      How to make when upload an item automatically check virtual & downloadable and hide them so the vendor can’t edit.

      Thanks.

    • #60739
      WCFM Forum
      Keymaster

      Hi,

      Please add this to your child theme’s functions.php –

      add_filter( 'wcfm_product_manage_fields_general', function( $general_fields, $product_id, $product_type ) {
      	if( isset( $general_fields['is_virtual'] ) ) {
      		$general_fields['is_virtual']['dfvalue'] = 'enable';
      		$general_fields['is_virtual']['class'] = 'wcfm_custom_hide';
      		$general_fields['is_virtual']['desc_class'] = 'wcfm_custom_hide';
      	}
      	if( isset( $general_fields['is_downloadable'] ) ) {
      		$general_fields['is_downloadable']['dfvalue'] = 'enable';
      		$general_fields['is_downloadable']['class'] = 'wcfm_custom_hide';
      		$general_fields['is_downloadable']['desc_class'] = 'wcfm_custom_hide';
      	}
      	return $general_fields;
      }, 50, 3 );

      Thank You

    • #60758
      slipksizz
      Participant

      Thank you very much!

    • #60783
      WCFM Forum
      Keymaster

      You are welcome 🙂

Viewing 3 reply threads
  • The topic ‘Virtual & Downloadable , checked and dissapear’ is closed to new replies.