Power_Automate_Provider::add_updated_to_queue( int $post_id, WP_Post $post_after, WP_Post $post_before )
Add a custom post id of an event that has been updated to a trigger queue.
Contents
Parameters
- $post_id
-
(int) (Required) A WordPress custom post id.
- $post_after
-
(WP_Post) (Required) Post object following the update.
- $post_before
-
(WP_Post) (Required) Post object before the update.
Source
File: src/Common/Event_Automator/Power_Automate/Power_Automate_Provider.php
public function add_updated_to_queue( $post_id, $post_after, $post_before ) {
// TEC is not available return to prevent errors.
if ( ! class_exists('Tribe__Events__Main', false ) ) {
return;
}
$data = [
'post' => $post_after,
'post_before' => $post_before,
];
$this->container->make( Updated_Events::class )->add_to_queue( $post_id, $data );
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |