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

If ajax request, the plug-in cannot initialize #13

Closed
bnldev opened this issue Jan 8, 2019 · 5 comments
Closed

If ajax request, the plug-in cannot initialize #13

bnldev opened this issue Jan 8, 2019 · 5 comments

Comments

@bnldev
Copy link

bnldev commented Jan 8, 2019

if ( is_admin() ) {
// if use admin-ajax.php, run this
// Admin stuff
Admin::get_instance()->setup();
} else {
// Front-end stuff.
Core::get_instance()->setup();
Frontend::get_instance()->setup();
}

@junaidbhura
Copy link
Owner

Hey @baronleung thanks for the issue. Can you provide more details about what kind of AJAX call are you trying to make? Is it an authenticated or unauthenticated AJAX call?

What are you trying to achieve? Can you add some code samples so I can better understand this issue?

@bnldev
Copy link
Author

bnldev commented Jan 11, 2019 via email

@junaidbhura
Copy link
Owner

@baronleung Okay I understand the problem now, thank you. Let me see if I can find an elegant solution for this.

@junaidbhura
Copy link
Owner

@baronleung I've created a fix on another branch: better-ajax.

Could you please download the plugin from this branch to see if it fixes your issue?

If it does, I can merge it into master and release an update to the plugin.

@bnldev
Copy link
Author

bnldev commented Jan 31, 2019 via email

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

No branches or pull requests

2 participants