Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
291 stars 206 forks source link

Handle WP_Error on failed guest author creation for method create_guest_author() #879

Closed oscarssanchez closed 2 years ago

oscarssanchez commented 2 years ago

Hi there,

This PR checks if create() returns a WP_Error and displays a warning with the error message https://github.com/Automattic/Co-Authors-Plus/compare/master...oscarssanchez:fix/error-handling-create-guest-author-cli?expand=1#diff-a52979a3ff3a75e65a5166f5fc4a259ef7e243368b5953e587054bbfbada9865R887

Fixes #878

It also changes a couple things I think could make the command more readable (both in code and output in the terminal)

This could also help with development for #875

Thanks for your feedback!