Thank you for writing in, the code you showed above works fine on my end, it added the attribute
data-pin-nopin="true" which disable the pinning of image.
Can you confirm that you pasted that code on the child theme's functions.php file? and you have the child theme activated? If not, please setup a child theme and paste that code on functions.php file.
Regretfully, we can not provide any support for 3rd party plugins.
If you just want to hide the image, maybe we can apply a custom CSS to that, please provide us the page URL where we can see the image.