Delete fields from add product section

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 Product Vendors Delete fields from add product section

Viewing 1 reply thread
  • Author
    Posts
    • #33208
      ing.acrd
      Participant

      Hello,

      We dont want to allow vendor control the catalog visibility and in the Inventory section dont want vendors can allow product reservation (when the stock is 0), and either the opcion of individually sold.

    • #33251
      WCFM Forum
      Keymaster

      Hi,

      Please add these code to your site –

      1. Disable Product Catalog visibility setting –

      add_filter( 'wcfm_is_allow_products_manage_visibility', '__return_false' );

      2. Back order and individually sold –

      function wcfm_0410_product_fields_stock( $stock_fields, $product_id, $product_type ) {
      	if( isset( $stock_fields['backorders'] ) ) {
      		$stock_fields['backorders']['class'] = 'wcfm_custom_hide';
      		$stock_fields['backorders']['label_class'] = 'wcfm_custom_hide';
      	}
      	if( isset( $stock_fields['sold_individually'] ) ) {
      		$stock_fields['sold_individually']['class'] = 'wcfm_custom_hide';
      		$stock_fields['sold_individually']['label_class'] = 'wcfm_custom_hide';
      	}
      	return $stock_fields;
      }
      add_filter( 'wcfm_product_fields_stock', 'wcfm_0410_product_fields_stock', 50, 3 );

      Thank You

Viewing 1 reply thread
  • The topic ‘Delete fields from add product section’ is closed to new replies.