I see that some people are having troubles using shortcodes in Ajax callbacks as apparently the Ajax instance is run in a different environment than usual.
Advices are more than one, many of them contradictory. You may be warned to declare wp.load.php to allow proper environment in the callback along with other includes.
Can someone clarify the legends and the truths about this argument?
- Is it a bad habit calling a shortcode from an Ajax callback, and if so why
- What are the requirements to gain a fully qualified wordpress environment inside an ajax callback. What are the bare minimum includes required to achieve this.
- What are the pitfalls to avoid and possible performance impacts
If someone may clarify these aspects the whole community may benefit from this :-)