File tree 1 file changed +1
-23
lines changed
1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -86,36 +86,14 @@ private static function get_refined_site_description( $site_description ) {
86
86
array (
87
87
'hiivetoken ' => HiiveConnection::get_auth_token (),
88
88
'prompt ' => $ site_description ,
89
- 'identifier ' => $ identifier ,
90
89
)
91
90
),
92
91
)
93
92
);
94
93
95
94
$ response_code = wp_remote_retrieve_response_code ( $ response );
96
95
if ( 200 !== $ response_code ) {
97
- if ( 400 === $ response_code ) {
98
- $ error = json_decode ( wp_remote_retrieve_body ( $ response ), true );
99
- return array (
100
- 'error ' => $ error ['payload ' ]['reason ' ],
101
- );
102
- }
103
- try {
104
- $ error = json_decode ( wp_remote_retrieve_body ( $ response ), true );
105
- if ( array_key_exists ( 'payload ' , $ error ) ) {
106
- return array (
107
- 'error ' => $ error ['payload ' ],
108
- );
109
- } else {
110
- return array (
111
- 'error ' => __ ( 'We are unable to process the request at this moment ' ),
112
- );
113
- }
114
- } catch ( \Exception $ exception ) {
115
- return array (
116
- 'error ' => __ ( 'We are unable to process the request at this moment ' ),
117
- );
118
- }
96
+ return $ site_description ;
119
97
}
120
98
121
99
$ refined_description = json_decode ( wp_remote_retrieve_body ( $ response ), true );
You can’t perform that action at this time.
0 commit comments