impress-org / givewp-snippet-library

A collection of code snippets to enhance or expand on the free Give WordPress Donation Plugin.
https://givewp.com
140 stars 90 forks source link

create snippet to check for active suscription #46

Closed Benunc closed 6 years ago

Benunc commented 6 years ago

Customers sometimes want to find only users who have an active subscription. (to display certain content, or perform other tasks)

I see Give_Recurring_Subscriber->has_active_subscription() in the code, so I assume there is a way to create that.

ravinderk commented 6 years ago

@raftaar1191 please check if we have a helper function to get an active subscription or not if not then I will move this to recurring addon because it will be a good addition to API.

emgk commented 6 years ago

@ravinderk I've checked in Give / Give-Recurring-Donations add-on and didn't find any helper function which returns all the users who have an active subscription.

ravinderk commented 6 years ago

Close in favor of https://github.com/WordImpress/Give-Recurring-Donations/issues/513