I have a textarea in admin which looks like this

                woocommerce_wp_textarea_input(
                    array(
                        'id'        => 'json',
                        'label'     => __( 'json', 'tpwcp' ),
                        'desc_tip'  => __( 'blabla', 'jsm' )
                    )
                );

Since the value I'm getting is JSON and it has backslashes in the database i want to parse it as normal json for displaying it. Is there anyway to parse the result or use any callback function before returning it ?

put on hold as off-topic by Michael, shanebp, Jacob Peattie, kero, rudtek yesterday

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • stripslashes() can strip the back-slashes.. – Sally CJ Dec 6 at 14:13
  • 1
    How are you retrieving the data? WordPress typically handles unescaping the data for you when you use functions like get_option(). – Jacob Peattie Dec 7 at 8:34

Browse other questions tagged or ask your own question.