You are here: Home
Support site for Tips and Tricks HQ premium products
Thanks!
It was indeed incorrect.
Just in case anyone here needs it in the future, in order to use WordPress variables inside the API, first you need to call the wp-load.php file.
A method to do it is to place
$parse_uri = explode( ‘wp-content’, $_SERVER );
require_once( $parse_uri[0] . ‘wp-load.php’ );
on top of the API. Please note that wp-content is the default installation folder, and may not be the one in use.