diff --git a/classes/Visualizer/Source/Json.php b/classes/Visualizer/Source/Json.php index f06bd348..2945c49e 100644 --- a/classes/Visualizer/Source/Json.php +++ b/classes/Visualizer/Source/Json.php @@ -389,7 +389,9 @@ private function getJSON( $url = null ) { return null; } - $array = json_decode( wp_remote_retrieve_body( $response ), true ); + // this filter can be used to rearrange columns e.g. in candlestick charts + // or to add additional data to the root. + $array = apply_filters( 'visualizer_json_massage_data', json_decode( wp_remote_retrieve_body( $response ), true ), $url ); do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'JSON array for the endpoint is %s = ', print_r( $array, true ) ), 'debug', __FILE__, __LINE__ );