diff --git a/sal/class.json-api-site-base.php b/sal/class.json-api-site-base.php index 848ee90cea44..104fb8743bc4 100644 --- a/sal/class.json-api-site-base.php +++ b/sal/class.json-api-site-base.php @@ -175,7 +175,7 @@ private function validate_access( $post ) { switch ( $context ) { case 'edit' : - if ( ! current_user_can( 'edit_post', $post ) ) { + if ( ! current_user_can( 'edit_post', $post->ID ) ) { return new WP_Error( 'unauthorized', 'User cannot edit post', 403 ); } break;