Describe the bug
I am writing a Wordpress plugin for a client that adds some elementor widgets, pulling data from Firestore and displaying charts.
When editing the widget on elementor, there are no issues, I can pull data from firestore. However, when I preview the same page or access it directly on the front-end, I recieve the error "Uncaught ReferenceError: firebase is not defined".
To Reproduce
Steps to reproduce the behavior:
Create a plug-in adding custom elementor widgets.
Make the widgets use firestore to retrieve data.
Add the widget to a page (and verify that the data is recieved successfully).
Access the same page from the front-end or as a preview (and recieve the error "Uncaught ReferenceError: firebase is not defined").
Expected behavior
The firebase instance should behave the same, whether on the elementor "edit" page, or the preview and front-end page.
Describe the bug I am writing a Wordpress plugin for a client that adds some elementor widgets, pulling data from Firestore and displaying charts. When editing the widget on elementor, there are no issues, I can pull data from firestore. However, when I preview the same page or access it directly on the front-end, I recieve the error "Uncaught ReferenceError: firebase is not defined".
To Reproduce Steps to reproduce the behavior:
Expected behavior The firebase instance should behave the same, whether on the elementor "edit" page, or the preview and front-end page.
Screenshots Behavior on the Elementor editor.![image](https://user-images.githubusercontent.com/18103996/211176950-e9625f5e-2da5-433a-9a2d-3787b0fb14a0.png)
Behavior on preview.
![image](https://user-images.githubusercontent.com/18103996/211176839-655fd5c9-e398-470e-909f-15f25749079d.png)
Behavior on the front-end.
![image](https://user-images.githubusercontent.com/18103996/211176996-57131f9c-9736-4366-ac5c-38e4dacb45dc.png)