pronamic / wp-pronamic-pay

The Pronamic Pay plugin allows you to easily accept payments with payment methods like credit card, iDEAL, Bancontact and Sofort through a variety of payment providers on your WordPress website.
https://pronamicpay.com
34 stars 14 forks source link

Completing subscriptions needs update #284

Closed rvdsteege closed 2 years ago

rvdsteege commented 2 years ago

The scheduled action to complete subscriptions uses the _pronamic_subscription_end_date post meta to find subscriptions:

As we've currently removed this post meta (in development), subscriptions won't be completed anymore.

Possible solutions I can think of:

  1. re-add the end date post meta;
  2. schedule action to complete a single subscription.
remcotolsma commented 2 years ago

I'm leaning towards re-adding the end date in the post meta in _pronamic_subscription_end_date. Subscriptions will not always have an end date, so that is probably not too bad in terms of post meta pollution.

@rvdsteege Do you agree or do you have any new insights?

rvdsteege commented 2 years ago

Re-adding _pronamic_subscription_end_date post meta is fine with me.

The alternative, scheduling a completion action whenever the end date changes, is also a bit tricky and could result in a lot of scheduled actions for a long time — which is also not really desired.

remcotolsma commented 2 years ago

Re-added in https://github.com/pronamic/wp-pay-core/commit/1e19edc75fd5f5d9fa0cfe62b644017307455c13.