ActionScheduler_wpPostStore::filter_insert_post_data()publicWC 1.0

Filter insert post data.

Method of the class: ActionScheduler_wpPostStore{}

No Hooks.

Return

Array.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->filter_insert_post_data( $postdata );
$postdata(array) (required)
Post data to filter.

ActionScheduler_wpPostStore::filter_insert_post_data() code WC 8.7.0

public function filter_insert_post_data( $postdata ) {
	if ( self::POST_TYPE === $postdata['post_type'] ) {
		$postdata['post_author'] = 0;
		if ( 'future' === $postdata['post_status'] ) {
			$postdata['post_status'] = 'publish';
		}
	}
	return $postdata;
}