Skip to content

Commit

Permalink
Align variables
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Mar 31, 2016
1 parent ab449a6 commit 5091b36
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions includes/abstracts/abstract-wc-rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function create_item( $request ) {
}

$post->post_type = $this->post_type;
$post_id = wp_insert_post( $post, true );
$post_id = wp_insert_post( $post, true );

if ( is_wp_error( $post_id ) ) {

Expand All @@ -171,10 +171,9 @@ public function create_item( $request ) {
return $post_id;
}
$post->ID = $post_id;
$schema = $this->get_item_schema();
$post = get_post( $post_id );

$schema = $this->get_item_schema();

$post = get_post( $post_id );
$this->update_additional_fields_for_object( $post, $request );

// Add meta fields.
Expand Down

0 comments on commit 5091b36

Please sign in to comment.