latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

One Time Coupon Code

Home Forums Community Forum One Time Coupon Code

This topic contains 8 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 5 months ago.

Topic Author Topic
Posted: Friday Jul 12th, 2013 at 10:01 am #53349

I know it’s not supported. I am just investigating how I could implement it. My idea is, to modify EXPIRATION date or remove the coupon from the list once it is used.

I would like to ask, if there is a hook which I could use at the time when EXPIRATION time of a coupon is checked or when a coupon is validated/used during checkout.

Thank you very much for your help.
– Robert

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Tuesday Jul 16th, 2013 at 8:00 am #53510

Please, any ideas?

Here is how I would like to use it:
I would like to reward some people with this one time coupons. For example, if John recommends my website to a friend, who will make a purchase, I will send to John a $10 one time discount coupon which he can use during next order or he can give this coupon as a gift to someone else. This kind of reward can not be done through the current coupons.

Thank you for your help.
– Robert

Posted: Wednesday Jul 17th, 2013 at 6:49 am #53557

I’m sorry, I’ve never tried this so I’m not sure which hook you’d use. Have you searched the s2member-pro files? Look for [hilite mono]$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_coupon_codes"][/hilite] for starters. You would need to find where these are stored in the database, so you can add new ones and remove them after they are used.

Posted: Wednesday Jul 17th, 2013 at 2:21 pm #53580

Thank you Cristian. I will have a look.

Have a nice day,
– Robert

Posted: Thursday Jul 18th, 2013 at 7:37 am #53613

No problem. :)

There are editors that let you search all the files in a directory. I use EditPlus, but know there are others that can too. They save a lot of time to find something in the source files.

Posted: Thursday Jul 18th, 2013 at 8:26 am #53623

Thank you Cristian. I had a look at it, but I will need more time to spend on it (it will require some debugging). For now, I will just add an information to my email notification (which comes with every order) about what coupon was used and I will remove it manually. I actually think, s2member API Payment Notification (send email) could be used for this purpose – I am just not sure what information this email includes (I have set the notification, but have not received any order yet :).

BTW: Your plugin is very good, I am very happy I found it and implemented it. It’s exactly what I needed for my website: Payments, subscriptions, individually controlled page and content access, streaming from Amazon servers, download links which can expire, capabilities – I used all these features. Some plugins I have bought before (for similar prices as yours) are rubbish, not finished with a lot of errors – s2Member works perfectly, even its very complicated systems. Looks like you test it a lot. Well done! I am very happy with your product.

Posted: Friday Jul 19th, 2013 at 7:18 am #53682

Thank you very much for the kudos, Robert! That’s very appreciated, it really makes us very happy to keep working when someone like you takes the time to leave such a nice compliment. :)

About the notification email to get the coupon, yes, you could try using that. Most likely the signup one, rather than the payment one, since the latter will be sent for every recurring one in the subscription, while the signup one will only be sent on the first payment, when registering. I’m not sure if the coupon code used is mentioned in the notification, though. You can test with 1 cent, live transactions, to see what you get and fine tune your setup.

Posted: Sunday Jul 21st, 2013 at 10:42 am #53780

Yes, the “Signup notification” may be a better option. I have tested the “Payment notification” and the email includes information about Coupon – that’s a great temporary solution!

Posted: Monday Jul 22nd, 2013 at 6:28 am #53804

Great. :)

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.