Skip to content

Instantly share code, notes, and snippets.

@simonlk
Created March 26, 2014 03:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonlk/9776315 to your computer and use it in GitHub Desktop.
Save simonlk/9776315 to your computer and use it in GitHub Desktop.
WooCommerce Name Your Price Plugin add to cart by URL
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
@melaniedunford
Copy link

Have you tried this with variations?

@thomaswaern
Copy link

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?

@quietcitydesign
Copy link

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?

@alanzoo
Copy link

alanzoo commented Oct 17, 2017

www.yourdomain.com/?add-to-cart=1818&nyp=15
Product id = 1818
Set as a NYP product

Amount = 15

@captainhook
Copy link

captainhook commented Mar 29, 2021

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

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