wp_send_json function does not work for non-block themes
-
Hello,
I have a function in a plugin that uses
wp_send_json
to send JSON content to the browser.That function works perfecctly in 2022 theme, but any others. 2022 theme is a block theme, so when calling
wp_send_json
, it can send the headerContent-Type: application/json;
. whe using non-block theme, header is already sent sowp_send_json
does not send that content type header.Anyone knows how to do this in a non-block template?
Jaime
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_send_json function does not work for non-block themes’ is closed to new replies.