wp-graphql-acf icon indicating copy to clipboard operation
wp-graphql-acf copied to clipboard

Added condition to relationships

Open matt-antone opened this issue 3 years ago • 0 comments

using get_posts can be dangerous, since it returns the post regardless of wether the post is published or not. This was causing an issue when a related post was in draft or other mode.

I added as status check to the condition that check for instance of WP_Post before the post is added to $relationship. This has fixed the issue for me.

matt-antone avatar Aug 17 '21 17:08 matt-antone