plugins – Setting Links From Dev To Test Environment

Question

hopefully a fairly easy issue here….In my testing I’ve got the url set-up like this

await fetch('Api2.php?customer=" + intCustomer)

when I push it to production it tries to locate the page

http://localhost/wordpress/index.php/sample-page/Api2.php?customer=1

which is not correct. The file Api2.php exists in the directory

/var/www/html/wordpress/wp-content/plugins/testplugin/

How do I update the code so it knows to check the correct directory?

0
user2676140 1 month 2022-07-09T14:09:47-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse