Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Plugins by
I need to pass data between two plugins. Anyone have any ideas?
Q2A version: 1.6

1 Answer

+1 vote
Very good question.

I would try to save the data (if it is just a small text or so) using qa_opt("data_storage_name") by plugin n°1.

And then read the data from plugin n°2.



Note: The executions of the plugins is determined by the folder names (in q2a 1.6.3-), as far as I know. So plugin 1 should appear alphabetically before plugin 2.
edited by
Thanks for your answer but I should probably have been a bit more specific. The data will be specific to each user. I've written a custom category nav plugin and a custom search plugin. It would be nice if I could pass the 'last category' selected in the nav plugin to the search plugin and only return results in that category. I may have to store the userid and their last category selected in a custom table if theres no other way.
Correct, custom table is the way to go.