Skip to content

Commit ca01e1e

Browse files
authored
Merge pull request #58 from BenjaminMedia/GDS-376/dont-send-drafts-to-scaphold
creating new content results in an error 500, because of WP trying to…
2 parents 54f10c4 + 647fbaa commit ca01e1e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Models/WpComposite.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ private static function register_permalink() {
193193
}
194194

195195
public static function on_save($postId, WP_Post $post) {
196+
if (wp_is_post_revision($post->ID) || wp_is_post_autosave($post->ID)) {
197+
return;
198+
}
196199
if($post->post_type === static::POST_TYPE) {
197200

198201
$contentHubId = get_post_meta($postId, static::POST_META_CONTENTHUB_ID, true);

0 commit comments

Comments
 (0)