Merge pull request #15456 from woocommerce/fix/15288

Fixed unicode characters when saving webhook delivery logs
This commit is contained in:
Mike Jolley 2017-06-06 10:26:26 +01:00 committed by GitHub
commit 513bca9fa5
1 changed files with 1 additions and 1 deletions

View File

@ -421,7 +421,7 @@ class WC_Webhook {
// save request data // save request data
add_comment_meta( $delivery_id, '_request_method', $request['method'] ); add_comment_meta( $delivery_id, '_request_method', $request['method'] );
add_comment_meta( $delivery_id, '_request_headers', array_merge( array( 'User-Agent' => $request['user-agent'] ), $request['headers'] ) ); add_comment_meta( $delivery_id, '_request_headers', array_merge( array( 'User-Agent' => $request['user-agent'] ), $request['headers'] ) );
add_comment_meta( $delivery_id, '_request_body', $request['body'] ); add_comment_meta( $delivery_id, '_request_body', wp_slash( $request['body'] ) );
// parse response // parse response
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {