Skip Navigation

[Resolved] Split: Why i can’t add custom field with exist “field slug”?

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by MOHO 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1075204

When i save product, and i find out meta both add "wpcf" prefix

Could no add this? keep the original meta i set ?

Current: wpcf-_wc_cost_price

Change: _wc_cost_price ( what i want )

#1076010

Hello,

If you are using Toolset Types plugin to create the custom field, Types plugin will per-pend slug "wpcf-" before your field slug, for example, you have setup the field slug as "_wc_cost_price", then in your database table "wp_postmeta", the column "meta_key" value is "wpcf-_wc_cost_price" .

I assume the custom field "_wc_cost_price" is created by other plugins, you can follow our document to convert it under Types control:
https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/
section "Converting custom fields":
Go to Toolset->Post Fields and click the Control Post Fields button. On the Post Field Control page, find the fields you are interested in...

But in your case the field slug is "_wc_cost_price", it is start with "_", so it is a hidden post field, it can not be controlled by Types plugin, so there is no option available to control that fields using Types.

#1076101

OK i got it.

I will use other way, thanks a lot!