User submitted posts that expire when payment lapses

Hello!

We’re looking to build a “Business Directory” using Gravity Forms - but - are not sure the best way go about it from a billing and management perspective.

Ideally the way the system would work is a user would sign up for an account and use Gravity Forms to submit and manage their business listing (I plan to use GravityView for this!) but we would also like it so when the users payment lapses or they cancel their account any entries they had submitted would be removed from the front end listing.

Does anyone have guidance or tips on how to handle this? I was thinking of using WooCommerce Subscriptions or Gravity Plus to handle the subscriptions / payment management I am just not sure how to connect it with the automatic listing removal.

Thank you so much!

I think you can use the Post Expirator plugin for that, to actually handle the expiration.

The trick will be to get the expiration date associated with the post when it is created (if it was a one-year directory listing or something) or, to actually expire it when some action happens (subscription payment fails or account is cancelled.) Whatever plugin you are using the manage the subscription will need to have a hook which runs after the payment fails, or their membership is voided or cancelled. Once you decide on a plugin, you can check for that hook which runs after the subscription ends, then you can expire the post in whatever method the Post Expirator plugin uses.

It can certainly be done but will require tying some systems together with PHP and some built in hooks. None of that actually happens in Gravity Forms (other than the initial post creation.)

Hi Elizabeth,
You can use GravityView’s Advanced Filters (included in the Core + Extensions license) to do this—you will set up a filter on the payment status to check whether the subscription is active. If it isn’t active, it will be hidden from the View—no extra plugins needed!

Thanks for your question :slight_smile:

Zack

3 Likes

Elizabeth,

I’m working on something very similar and I wondered if I could pick your brain about a few aspects of this setup? Let me know…

Thank you!

– Rachel

Hey Rachel –

We ended up going with Zack’s suggestion:

We’ve built quite a few things in the past using Gravity View - so - this was a pretty easy thing for us to do and required just a basic filter.

I’d strongly recommend it - it’s a little pricey - but a great plugin that I’ve found to be worth it over the years. :blush:

Hope that helps!

Hi Elizabeth,

Oh, yes, I’m using GravityView – because it’s the best thing ever. :slight_smile:

A couple of years ago, I built some business directories using GravityView for one of my clients.

Now my client wants to add a couple of fairly obvious functions that we didn’t get to before: (1) automated emails to him and to the directory listing owners when the listings are about to expire; (2) a renewal form to pay for another year (he doesn’t want to have automatic subscription payments).

So currently I’m working on doing that by integrating the Gravity Forms directory listing submission form with Wishlist Member.Yesterday I added Gravity Wishlist to hook that up.

I think I’ve got most of the details sorted out yesterday, but if not, would it be okay if I asked you a couple of questions?

Sure! Ask away!

We personally set it up with WooCommerce + WooCommerce Subscriptions - but - I might be able to help.

1 Like

Hello,

@liztheresa and @katzwebservices, I’m trying to do the same thing, but I’m having difficulties, can you tell me a bit more about how to do this?

At my end, people:

  1. buy a subscription (Woo Subscription)
  2. are redirected to a Gravity Form to fill out
  3. once approved, their entry shows up in the directory (GravityView).

In the GravityView Advanced filters, I do see the option to select payment status = active. But how is that connected to the purchase that was made with Woo Subscriptions? How does it know who’s subscription status to check? Do I have to use the Gravity Forms Product Add-ons instead of a two-step process (Purchase subscription + redirection for GravityForm)?

Thanks so much!

Hi @maryse ,

Unfortunately, the entry meta field payment_status is only useful when you use a Gravity Forms payment add-on. Since you are using Woo Subscription, that won’t work. I would suggest you in this case to use this other trick: Making entries expire after a certain amount of time - GravityView Support, Knowledge Base, How-To & Docs which can be based on a date field used for the “entry expiration”.

I hope that helps.

1 Like

Thanks @rafaehlers!

The trick you mention with the end date, I’m guessing, will not make the entry reappear when the person renews they subscription, correct?

When you say “Gravity Forms payment add-on”, do you mean:

If b), it would simply be Gravity Form + Gravity Form Payment Addon (Stripe or other) + Gravity View without ever going through WooCommerce? If so, I like the simplicity of this, but I’m wondering if it is a good idea since all the other products will be in WooCommerce. Also, if I want people to edit their entry, I would need to go with Gravity Form Elite so they can Register, correct? And if they already have an account because they made another purchase before, could they still login during the purchase process ?

Could it also work with WooCommerce + WooCommerce Gravity Forms Product Add-on + Stripe for WooCommerce + Gravity View? Or will the payment_status not work in that case? If this option does work, I’m guessing registration would be managed by WooCommerce and not Gravity Forms (Elite)? And would I still need Subscriptions?

Thanks!

Hi @maryse ,

The trick you mention with the end date, I’m guessing, will not make the entry reappear when the person renews they subscription, correct?

  • Yes, that’s correct, unfortunately.

When you say “Gravity Forms payment add-on”, do you mean:

  • Yes, a payment add-on like PayPal or Stripe.

If b), it would simply be Gravity Form + Gravity Form Payment Addon (Stripe or other) + Gravity View without ever going through WooCommerce?

  • Correct!

Also, if I want people to edit their entry, I would need to go with Gravity Form Elite so they can Register, correct?

  • Users can edit their entries directly on a View.

And if they already have an account because they made another purchase before, could they still login during the purchase process ?

  • The login part is not related to Gravity Forms or GravityView.

Could it also work with WooCommerce + WooCommerce Gravity Forms Product Add-on + Stripe for WooCommerce + Gravity View?

  • GravityView doesn’t yet support these add-ons.

I’m guessing registration would be managed by WooCommerce and not Gravity Forms (Elite)?

  • We usually recommend using the Gravity Forms User Registration add-on to register new WordPress Users. It’s easier and fully supported by GravityView.
1 Like

Thanks so much for taking the time to answer all my questions.

Does that mean that if someone buys a product using WooCommerce + WooCommerce Gravity Forms Product Add-on, GravityView won’t be able to connect to the entry made with the Gravity Forms Product Addon-on to present it in a directory?

I tried this option, but I don’t see End date in the Advanced field options. Am I missing a step?