Created
March 26, 2014 03:12
-
-
Save simonlk/9776315 to your computer and use it in GitHub Desktop.
WooCommerce Name Your Price Plugin add to cart by URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This isn't code, just a tip that will hopefully get picked up by search engines for anyone that needs it (me when I have this problem next). | |
domain.com/cart/?add-to-cart=15998&credit_called[15998]=44 | |
Where 15998 is the product ID |
It sure got picked up, but this doesn't seem to be working. Does the example try to add the product to cart with 44 as the nyp-value?
I've been looking everywhere for a solution to this. Unfortunately, this method isn't working for me either. I've got Woo 3.0.7 with NYP 2.3.4. Any revisions or ideas to get this working?
www.yourdomain.com/?add-to-cart=1818&nyp=15
Product id = 1818
Set as a NYP product
Amount = 15
This is documented in the changelogs at https://dzv365zjfbd8v.cloudfront.net/changelogs/woocommerce-name-your-price/changelog.txt:
2015.08.22 - version 2.3.2
- Tweak: Switch add to cart $_POST to $_REQUEST globals to support defining price in URL: http://example.com?add-to-cart=99&nyp=25
It really should be in the actual documentation!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried this with variations?