ActionScheduler_wpPostStore::get_date_gmt()
Get Date GMT.
Method of the class: ActionScheduler_wpPostStore{}
No Hooks.
Return
ActionScheduler_DateTime
. The date the action is schedule to run, or the date that it ran.
Usage
$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore(); $ActionScheduler_wpPostStore->get_date_gmt( $action_id );
- $action_id(int) (required)
- Action ID.
ActionScheduler_wpPostStore::get_date_gmt() ActionScheduler wpPostStore::get date gmt code WC 9.3.3
public function get_date_gmt( $action_id ) { $post = get_post( $action_id ); if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) { /* translators: %s is the action ID */ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to determine the date of this action. It may may have been deleted by another process.', 'woocommerce' ), $action_id ) ); } if ( 'publish' === $post->post_status ) { return as_get_datetime_object( $post->post_modified_gmt ); } else { return as_get_datetime_object( $post->post_date_gmt ); } }