Support » Plugin: Category Custom Fields » Migrating from Category Custom Fields 0.1 to 1.x

  • peterjanes


    When you upgrade Custom Category Fields from 0.1 to 1.0, 1.0.1 or 1.2 (current) any custom data you added in 0.1 will disappear. You can recover it by running these two SQL commands:

    insert into wp_ccf_Fields(field_name,field_type,category_type) select distinct kkeys,'text','Category' from wp_cat_fields;
    insert into wp_ccf_Value(field_name,field_value,term_id) select kkeys,kval,cat_id from wp_cat_fields;

    Note that this doesn’t take advantage of any of the new field types.

    Also, you’ll have to replace all calls to get_cat_fields() with their 1.x analogues, e.g. get_cat_fields($cat, $field) is replaced with categoryCustomFields_GetCustomFieldByTaxonomyIdAndFieldName($cat, $field).

  • The topic ‘Migrating from Category Custom Fields 0.1 to 1.x’ is closed to new replies.