Skip to content

Instantly share code, notes, and snippets.

@simonlk
Created March 26, 2014 03:12
Show Gist options
  • Select an option

  • Save simonlk/9776315 to your computer and use it in GitHub Desktop.

Select an option

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
@thomaswaern

Copy link
Copy Markdown

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
Copy Markdown

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

alanzoo commented Oct 17, 2017

Copy link
Copy Markdown

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

Amount = 15

@captainhook

captainhook commented Mar 29, 2021

Copy link
Copy Markdown

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