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

Add item to cart automatically #6

Open
ByteMark84 opened this issue Apr 29, 2022 · 1 comment
Open

Add item to cart automatically #6

ByteMark84 opened this issue Apr 29, 2022 · 1 comment

Comments

@ByteMark84
Copy link

I'm not sure if this is the correct place to ask about hooks for this plugin or not. Please let me know where I should if it's not. I found this repository link from the plugin's readme file.

I have a page with several items on it and it starts with the empty cart. Is it possible to automatically add a specific item to the cart when I visit this page with a hook or something similar? I have a registration fee item and I want to make sure that it's in the cart automatically so a member doesn't accidentally forget to add it before checking out.

Thank you!

@Arsenal21
Copy link
Owner

This plugin won't be able to add the item automatically to the cart on page load. The user needs to click the add to cart button to add the item.

I am happy to add any action hook for filter hook in the code if you tell me which file and which line code the hook should go into. But as far as I understand, the simple structure of this plugin doesn't have the capability to handle auto addition on page load.

You can perhaps add the registration free to your normal product (instead of making the registration fee a separate product). That way the users just have to buy the main product.

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