You should be able to use wp_update_post()
–https://codex.wordpress.org/Function_Reference/wp_update_post
Eg.
$my_post = array(
'ID' => $post_id,
);
wp_update_post( $my_post );
The ‘save_post’ action should run when this function is called.
Related Posts:
- add_action reference a class
- Remove parent theme action in child
- How to do_action and get a return value?
- Remove an action from an external Class
- Can my “add_action” function know the name of the hook calling it?
- Does the event ‘wp_version_check’ even exist? What is it doing?
- remove_action in a theme
- add_action ‘manage_posts_custom_column’ in a class [closed]
- Unable to prevent function using save_post firing twice
- Difference between do_action(‘admin_enqueue_scripts’, $hook_suffix) and do_action(“admin_print_styles-$hook_suffix”) syntax
- Cron jobs in a class
- Why, Where, and When to use reference pointers in filters/hooks?
- Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button
- enqueuing React script and hooking its target div fails to load script
- wp_logout action not working
- Using auth_redirect returns cannot modify header information
- add action which returns modified value
- What would cause the ‘wp’ action to fire twice per page (but only once per post) in Firefox only?
- I don’t understand why I need a lower priority to remove an action with a higher priority to make it work
- wp_get_attachment_metadata returns false with add_action() ‘add_attachment’ hook
- Manually add admin bar
- Is there a way to expose additional fields to the Bulk Action > Edit functionality?
- do_action pass array argument as reference not copy [duplicate]
- Why Should We Use wp_clear_scheduled_hook and What it Does?
- add_action and wp_head not display content in head section
- Scheduled event won’t fire
- When should I call add_settings_section and add_settings_field?
- Unable to show error message using wp_login action
- Usage of do_action and add_adction
- WP action is not triggering a do_action() call within?
- Mustn’t do_action be accompanied with a function?
- where is the documentation for add_action() parameters?
- How to set a different value in the generator meta tag?
- Call add_action() in function wordpress
- Validate form in functions.php, send errors back to template
- What is the callback sent to add_submenu_page() invoked by WordPress?
- remove_action returns FALSE
- Remove action from shortcode
- Write automatic title at save_post (infinite loop)
- How to get $tag to fill into add_action() or add_filter()?
- Add meta field after post has been published
- Using several add_action with parameters inside a class
- remove_action returns false regardless of priority
- Is there way to run a code every time when any cron is run?
- How to make an action run in the background?
- Remove Action from Plugin within extended class and no assigned variable
- Action when sidebars updated
- Payment before publishing post
- How to access author data from header action
- Content won’t load when using action the_content
- How can I unhook this action that was added via $this?
- add_action on a specific page
- Update media library image shown in “attachment details” when using wp_insert_attachment to add item to the media library
- How to find where an action is triggered? [closed]
- Create post revision on slug change
- Form action unfamiliar
- Why is my css and js not enqueued until footer?
- Why does my delete_post hook get called twice
- Which hook to add action on specific page?
- Action Scheduler not running
- W3TC manual cache flush does not work
- Adding php to form action breaks code [closed]
- add_action.. will work if function is empty?
- call custom action after delete account
- Dynamic name of cron event
- Trying to write a function in an external php file to manage admin menu visibility
- remove_action: Initial attempt failed while a later attempt worked
- Action inside another action not working
- register_post_type not working in wordpress 3.6
- Activity feed on admin dashboard
- action wp_set_comment_status never gets fired when i change the comment status [closed]
- How to use add_action inside files included by theme’s functions.php
- What do I put in the form action attr on top of form wordpress
- WordPress sent multiple requests on update
- do_action in API call
- Better use two dedicated methods hooked with add_action() to different actions, or can it be twice the same method?
- Custom query_var to get URL paramater not working
- do_action doesn’t trigger if it’s in a template that gets loaded via REST endpoint
- add_action where function has arguments
- Load actions and filters only for the admin CPT list
- How to override parent theme actions
- Add Action wp_update_post not Updating WYSWIAG editor
- Remove action from plugin
- remove action from woocommerce file
- Font Awesome not loaded on first page of website only – divi theme
- WP_LIST_TABLE bulk action
- Understanding and using did_action() in a conditional statement
- Adding a conditional to work on certain pages/page templates to an add_action()
- Adapting functions from Genesis theme
- Dealing with html forms [closed]
- Cannot Schedule Sending An Email
- Invoke a function before the action hook
- using media_handle_sideload() to add mp4 files to Media Library
- OOP – add_action
- do_action in header, add action later?
- Passing arguments in add_action inside search template
- save post running twice and creating two database entries – how do I disable this?
- Plugin that generates a page of post content
- remove an action hook function on a plugin from a theme
- A way to see real changes of posts inside an action?