Saltar navegación

[Cerrado] there any way to execute code on update on back end?

This support ticket is created hace 3 años, 1 mes. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Shane hace 3 años, 1 mes.

Asistido por: Shane.

Autor
Mensajes
#2218343

There is a any way to autocalculate values when do a change of values on the back end? with a snipet or something.

#2218613

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Rafael,

Thank you for getting in touch. There are hooks available for wordpress that will allow you to run any code when you've performed an update action on your posts.

The hooks below can be used in such a scenario:

- Can be used if you want to run your code only on existing posts
https://developer.wordpress.org/reference/hooks/post_updated/

- Can be used if you want to run your code for new and existing posts.
https://developer.wordpress.org/reference/hooks/save_post/

There is a any way to autocalculate values when do a change of values on the back end?

Given that the hooks above will allow you to run your code under these scenarios, however it should be noted that a save post or update action needs to be performed for the code to run.

Also when you refer to auto calculating values are you referring to your custom fields ? For e.g adding 2 custom field values together?

Please let me know.

Thanks,
Shane

El debate ‘[Cerrado] there any way to execute code on update on back end?’ está cerrado y no admite más respuestas.