I have a situation here where I need to access the $_POST data to send a sensitive string to a javascript without using localize script and also not letting the sensitive string be available in the console or source ( html ) of the page.
I researched that AJAX can prevent the sensitive string coming from the PHP to be displayed on the source of the page (html) since this will pose a security issue on our side, but then when I tried this approach the global $_POST is not available on the ajax function on that is hooked on the wp_ajax_{action}.
Is there any other way to do this? Any help will be appreciated, Thanks!
UPDATE Oh and by the way, saving the data in the db is not an option since this will feature on the site will accumulate large number of requests.