diff --git a/classes/class-pmpromc-mailchimp-api.php b/classes/class-pmpromc-mailchimp-api.php index ea47224..7204521 100644 --- a/classes/class-pmpromc-mailchimp-api.php +++ b/classes/class-pmpromc-mailchimp-api.php @@ -190,7 +190,7 @@ public function update_audience_members( $audience = '', $updates = [] ) { 'user-agent' => self::$user_agent, 'headers' => $this->url_args['headers'], 'timeout' => $this->url_args['timeout'], - 'body' => json_encode($data), + 'body' => wp_json_encode($data), ); $resp = wp_remote_post($url, $args); @@ -441,7 +441,7 @@ private function decode_response($response) */ private function encode($data) { - if (false !== ($json = json_encode($data))) { + if (false !== ($json = wp_json_encode($data))) { return $json; }