Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: API endpoint is hard-coded in JS #1

Closed
anatolinicolae opened this issue Mar 30, 2023 · 0 comments · Fixed by #4
Closed

Bug: API endpoint is hard-coded in JS #1

anatolinicolae opened this issue Mar 30, 2023 · 0 comments · Fixed by #4

Comments

@anatolinicolae
Copy link
Collaborator

anatolinicolae commented Mar 30, 2023

While the nature of the bug has low impact, in an extendability and self-deployment perspective the plugin will partially fail to work as WordPress core can be configured to target custom domains while login endpoint is hard-coded in frontend admin JS.

apiUrl: 'https://api.tiledesk.com/v2/',

To potentially fix this issue wp_localize_script has to be used to defer API endpoint configuration after all plugin hooks have been applied.

@anatolinicolae anatolinicolae linked a pull request Mar 30, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant