Navigation überspringen

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

This support ticket is created vor 3 Jahren, 2 Monaten. 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)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 3 Jahren, 2 Monaten.

Assistiert von: Shane.

Author
Artikel
#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

Sprachen: Englisch (English )

Zeitzone: 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

Das Thema „[Geschlossen] there any way to execute code on update on back end?“ ist für neue Antworten geschlossen.