projects/packages/licensing/src/class-licensing.php 1 location
|
@@ 165-169 (lines=5) @@
|
| 162 |
|
|
| 163 |
|
$xml = $this->attach_licenses_request( $licenses ); |
| 164 |
|
|
| 165 |
|
if ( $xml->isError() ) { |
| 166 |
|
$error = new WP_Error( 'request_failed', __( 'License attach request failed.', 'jetpack' ) ); |
| 167 |
|
$error->add( $xml->getErrorCode(), $xml->getErrorMessage() ); |
| 168 |
|
return $error; |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
$results = array_map( |
| 172 |
|
function ( $response ) { |
projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php 1 location
|
@@ 1157-1161 (lines=5) @@
|
| 1154 |
|
|
| 1155 |
|
$xml->query( 'jetpack.isSiteVerified', $args ); |
| 1156 |
|
|
| 1157 |
|
if ( $xml->isError() ) { |
| 1158 |
|
return new WP_Error( 'error_checking_if_site_verified_google', sprintf( '%s: %s', $xml->getErrorCode(), $xml->getErrorMessage() ) ); |
| 1159 |
|
} else { |
| 1160 |
|
return $xml->getResponse(); |
| 1161 |
|
} |
| 1162 |
|
} |
| 1163 |
|
|
| 1164 |
|
public static function verify_site( $request ) { |
projects/plugins/jetpack/modules/monitor.php 1 location
|
@@ 79-85 (lines=7) @@
|
| 76 |
|
) ); |
| 77 |
|
$xml->query( 'jetpack.monitor.isUserInNotifications' ); |
| 78 |
|
|
| 79 |
|
if ( $xml->isError() ) { |
| 80 |
|
if ( $die_on_error ) { |
| 81 |
|
wp_die( sprintf( '%s: %s', $xml->getErrorCode(), $xml->getErrorMessage() ) ); |
| 82 |
|
} else { |
| 83 |
|
return new WP_Error( $xml->getErrorCode(), $xml->getErrorMessage(), array( 'status' => 400 ) ); |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
return $xml->getResponse(); |
| 87 |
|
} |
| 88 |
|
|