Skip Navigation

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

This support ticket is created hace 2 años, 5 meses. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 1 respuesta, has 2 mensajes.

Last updated by Shane hace 2 años, 5 meses.

Assisted by: 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

Languages: Inglés (English )

Timezone: 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.