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

Change wpsc_add_to_cart() to check $_REQUEST, rather than $_POST #1852

Closed
JustinSainton opened this Issue Apr 24, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@JustinSainton
Copy link
Member

commented Apr 24, 2015

This allows GET requests, which will be required for an cart URL API.

The imagination is an API, something like wpsc_get_add_to_cart_url( $args = array() ). One could simply pass a WPSC_Product object, a product id, or an array of product ids and parameters to the function. It would return a URL containing either the query args, or a hash, or something. Haven't fully thought through the implications there for nginx configs, entity-too-large errors, etc. The idea, though, is that an abstracted layer allows us to sort that out at a lower level. Will file a separate ticket on that

@JustinSainton JustinSainton self-assigned this Apr 24, 2015

@JustinSainton JustinSainton added this to the 4.0 milestone Apr 24, 2015

@JustinSainton

This comment has been minimized.

Copy link
Member Author

commented Jun 23, 2015

Worth noting, this change will break for anyone doing hacky things like forcing POST variables and expecting them to also be set as REQUEST variables.

We should document this change

Related: #1891.

@leewillis77

This comment has been minimized.

Copy link
Member

commented Jun 23, 2015

Thank you for your notes. Hacky things updated :)

@JustinSainton

This comment has been minimized.

Copy link
Member Author

commented Jun 23, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.