Addition of usage of WP_Error class