• Resolved davidcom

    (@davidcom)


    Hello. Could someone explain to me how to change the field labels? I need to change the field title “Product”. I’d like to find a solution that would not be reverted back when the plugin is updated. I use a child theme, so I can add to the functions.php file and the info won’t get overwritten when my theme is updated.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    Unfortunately there is no good way to do this right now. You’d have to get in to the core code and make the change there.

    Usually we’d tell you to create a translation file and do it that way. But the current version (3.3.4) of AS has a bug where the titles for department and product fields aren’t run through the usual translation functions. (This is fixed in the latest beta and scheduled for release in 4-6 weeks).

    There is also a filter that is designed to be used by add-ons and inside the child theme functions.php file where you can make changes to the attributes of custom fields (product is simply a custom field internally). BUT, this filter does not allow you to change the title of the field.

    All in all, for what you’re looking to do the best thing is to make the change in awesome-support/includes/custom-fields/functions-custom-fields.php (scroll to the bottom of the file – the declaration for the field is close to the bottom). When the next version is released you can create a translation file instead and use that.

    What I ended up doing, which worked pretty well since I had the same request, was to create a brand new custom post type by copying the code for products into a new plugin, and changing the names there, and then disabling Products in the plugin settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change the label titles (ex: “Product”)’ is closed to new replies.