Hide HTML element (by class or ID) with PHP

As per our discussion in the comments, all you really need to do is .remove() the element. The following is the approach I’d take. First I’d check to make sure the element exists before attempting to remove it. If it’s there, then run jQuery’s .remove().

if( $( '#elementID' ).length > 0 ) {
    $( '#elementID' ).remove();
}

This can’t be reversed via developer tools because it will comprehensively remove the element from the DOM. Now, if someone wants to open the developer tools and add something back into the DOM manually they can do that, but that’s kinda what developer tools are for right. To be able to identify this element, copy it and re-add it though, they’d have to be pretty quick.

I know you don’t want to add to a child theme or whatever so you’ll have to get this script into the flow somehow, not sure how you want to go about doing that.