Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Running a function on post update with new post meta

Please try using acf/save_post action that will hook in after ACF data has been saved.

add_action('acf/save_post', 'check_values');

function check_values($post_id){
    if(get_field('status', $post_id ) == "closed") {
        sendSMS();
    }
}

Related Posts:

  1. WooCommerce shop page to use my custom template [closed]
  2. How to sanitize select box values in post meta?
  3. Strategy to get post meta for use outside the loop
  4. Set Expiration Date of a Post from the Frontend with wp_insert_post
  5. Is there a need for nonce with Post Metabox?
  6. Same ACF on two different pages
  7. Metadata Query when storing data as array possible?
  8. WordPress get_template_part() function not working
  9. Dropdown filter by custom field
  10. Wp Super Cache stops the update of a Post Meta
  11. How can I optimize this code? [closed]
  12. ACF Pro make URL Linked in Custom Template [closed]
  13. How to show specific post meta?
  14. Is it possible to set a variable for get_post_meta?
  15. Get attachment meta (I need attachment ID, unsure how to find it)
  16. How can I sort my loop based on meta data, using a form?
  17. Related Post Category Filter
  18. ACF get_sub_field ALT TAG in the repeater doesn’t show
  19. wanted to sort the wp_query array by two ACF field (Year and month)
  20. Custom themes that won’t work when theme is changed
  21. Make a custom field in admin post.php read only
  22. Change default options on attachment page
  23. DIV containing iframe disappears below break point of 992 in Oxygen Builder
  24. After a while attachment meta data is missing “sizes” data
  25. Why is my Toggle field not showing in Gutenberg?
  26. How do I access the current post object within a block theme template or pattern?
  27. Menu items description? Custom Walker for wp_nav_menu()
  28. How to define and link full path to css located at a random folder on header.php
  29. Sizing screenshot.png without losing aspect ratio
  30. Software for WordPress Theme and Plugin Development? [closed]
  31. When to use is_home() vs is_front_page()?
  32. What is the preferred way to add custom javascript files to the site?
  33. Get the blog page URL set in Options
  34. How to create .pot files with POedit?
  35. How do I get the theme URL in PHP?
  36. Why when I submit a form in wordpress it loads a 404 page though URL is correct
  37. What is the constant WP_USE_THEMES for?
  38. Worthwhile to restrict direct access of theme files?
  39. How Do I Protect My Premium WordPress App Theme from Copying?
  40. How to detect mobile devices and present them a specific theme?
  41. Using wp_add_inline_style without a stylesheet
  42. How to add posts to custom menus?
  43. WordPress Theme Preview Image
  44. How To extend WP_Customize_Control
  45. What is the difference between front-page.php and home.php? [duplicate]
  46. How can I get page slug
  47. Does the functions.php file ever get called during an AJAX call? Debug AJAX
  48. When to use _e and __ for the translation?
  49. What is a Theme textdomain?
  50. How to show a custom meta box on the “Quick Edit” screen?
  51. How to add CSS class to custom logo?
  52. How to add custom css file in theme?
  53. How important is it to enqueue a theme’s stylesheet?
  54. CSS not updating in browser when I change it
  55. Display Search Result Count
  56. wp_nav_menu(), how to change class?
  57. theme path in javascript file
  58. Is wp_is_mobile() effective?
  59. Display Menu Name using wp_nav_menu
  60. Making update notification functionality for my themes
  61. What questions do you ask when asked to give an estimate on theme development?
  62. How to remove dashicons.min.css from frontend?
  63. How do I remove a pre-existing customizer setting?
  64. Minimum Template Files for Theme Development
  65. What’s the difference between home.php and index.php?
  66. pass object/JSON to wp_localize_script
  67. get_template_part vs action hooks in themes
  68. Theme Activate Hook
  69. Solutions for generating dynamic javascript / CSS
  70. wp_redirect() – headers already sent
  71. Can I create my own “Recent Posts” widget or customize the existing one?
  72. Custom single template for a specific category
  73. how can I add an icon/image for a child theme?
  74. How can I add a URL field to the attachments window?
  75. The the_post_thumbnail without srcset?
  76. The proper way to include/require PHP files in WordPress
  77. Get the first image from post content (eg.: hotlinked images)
  78. after_setup_theme always runs
  79. When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
  80. Getting failure when using filemtime() with wp_enqueue_style
  81. Do I actually need to link my theme’s style.css in the theme files
  82. Why is wp_head() creating a top margin at the top of my theme header?
  83. How to store widget fields data as an array?
  84. How do I add version control to my workflow?
  85. Using classes instead of global functions in functions.php
  86. WordPress API Menu/Submenu Order
  87. How can I display a menu on certain pages only?
  88. Enqueue a stylesheet for login page and make it appear in head element
  89. Adding a div to wrap widget content after the widget title
  90. How to insert a logo in the header?
  91. How to set permalink structure via functions.php
  92. What is $post_id? is it a global variable in WordPress?
  93. How to override pluggable function in theme?
  94. How to move page template files like page-{slug}.php to a sub-directory?
  95. Theme customizer – settings order
  96. What is the difference between wp_register_sidebar_widget and register_widget?
  97. Should we use get_template_part() in functions files instead of include_once?
  98. Reset positions of metaboxes in admin
  99. CSS classes for theme
  100. “Quick Edit” > update clears out my custom meta values
Categories theme-development Tags advanced-custom-fields, post-meta, theme-development
How to access all array values from do_action_ref_array()?
Looping inside block return

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress