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

Consider exposing formatters and utilities to a global variable #470

Open
martincpt opened this issue Oct 12, 2024 · 0 comments
Open

Consider exposing formatters and utilities to a global variable #470

martincpt opened this issue Oct 12, 2024 · 0 comments
Labels
type: enhancement The issue is a request for an enhancement.

Comments

@martincpt
Copy link

User Story

As a developer, I want to listen for my theme's events—such as 'add to cart' and 'remove from cart'—and send them to Google Analytics.

From what I can tell, your plugin provides solutions for most of this, but they are unavailable inside an anonymous function.

More specifically, by making data formatters and utilities available under the global scope, developers like me could easily integrate these functions into our themes without having to redefine them.

Desired Solution

Expose the formatters and utilities as global variables or have the anonymous function return these objects, making them accessible.

Unknowns

As far as I can see, the source code uses React. I’m not sure if or how this affects the feasibility of the proposed solution.

@martincpt martincpt added the type: enhancement The issue is a request for an enhancement. label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant