JQuery calling a Custom PHP function (Works in Dev but not in WordPress)

My code is working fine on my localhost in my development environment which is outside of the WordPress press environment. I know the PHP function is working. I am able to send test votes to my server from my localhost on my PC.

Problem: I cannot get this to work in WordPress.

My Thoughts
I think it’s a path issue, but I’ve tried putting the PHP script in the root and using a full path.
I am not getting any errors in the web browser console (f12).

WordPress Version: 5.4.1
I put my custom php code into “/wp-contents/custom-php/votifier.php”
My JQuery script is in the header. (yes, I know I should put it in the footer.)

The Button

Localhost Version

WordPress Version

My Custom PHP Script

Network Info