Support » Requests and Feedback » Code Reference example error

  • Function reference for update_post_meta

    In the section on Character Escaping, the first example incorrectly double-escapes the JSON on line 2 thus:

    $escaped_json = ‘{“key”:”value with \\”escaped quotes\\””}’;

    It should read:

    $escaped_json = ‘{“key”:”value with \”escaped quotes\””}’;

    The second example (Workaround) is correct.

    • This topic was modified 2 months, 3 weeks ago by crawford4.
  • You must be logged in to reply to this topic.