ActionScheduler_wpPostStore::filter_insert_post_data()
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() ActionScheduler wpPostStore::filter insert post data code WC 9.3.3
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; }