Getting downloads to start from WHMCS Integration

Download links not being encoded they link directly to the WHMCS default install where after logging in download will start.

This is after already being logged in through WHMCS WP Integration.

If I go back to the WHMCS WP Integration page with the download links and click on a download,

the download will start without being redirected to the default WHMCS install.

If I logout of the WHMCS WP Integration, I am still login with the default WHMCS install.

If I set the download not to require login then all is fine, however I require login to download file.

Example unencoded links is: