Passer la navigation

[Résolu] Update CPT Custom Fields via Rest API

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

I am attempting to update a Custom Post Type's custom fields using the WP Rest API with the toolset-meta object, but I cannot find documentation on how to perform a PUT operation.

Solution:

The Toolset wrapper for custom fields does not support editing via the Rest API. Use native WordPress functions to access and update the custom fields, just like any other native WordPress field.

Relevant Documentation:

https://developer.wordpress.org/rest-api/

This support ticket is created Il y a 1 year, 9 months. 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.

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Christopher Amirian Il y a 1 year, 9 months.

Assisté par: Christopher Amirian.

Auteur
Publications
#2720099

I am attempting to update a CPT's custom fields using the WP Rest API and the toolset-meta object. I have not been able to find documentation on how to perform a PUT operation. Please advise.

#2720701

Christopher Amirian
Supporter

Les langues: Anglais (English )

Hi there,

The Toolset wrapper for the custom fields does not support the edit functionality via Rest API.

You will need to use the native WordPress functions to access the fields and update them like any other native custom WordPress field.

Thanks.