How could i add custom fields and read only at simple and variable product?

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 – Ultimate How could i add custom fields and read only at simple and variable product?

Viewing 1 reply thread
  • Author
    Posts
    • #28153
      MOHO
      Participant

      We create some meta field at simple and variable product.

      I want to show these fields for the vendor, but limit they can’t edit them (read only).

      simple product by product custom field of seeting

      variable product by custom code at function.php

      Could you tell me how to make it?

      By moho

    • #28161
      WCFM Forum
      Member

      Hi,

      If you are trying to add custom field for variable product then WCFM custom field or any other custom field plugin will not work.

      You have only option to add those using custom code (already provided you in some other thread), or you may override template and add new fields, but still you have to write field save code.

      For make any field “readonly” add this parameter for fields – "attributes" => array( "readonly" => true )

      Yesterday, I show you a example of this to make a field required.

      Thank You

Viewing 1 reply thread
  • The topic ‘How could i add custom fields and read only at simple and variable product?’ is closed to new replies.