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

Trigger `$payment->add_subscription( $subscription );` in `$payment->add_period( $subscription->new_period() );` #248

Closed remcotolsma closed 2 years ago

remcotolsma commented 2 years ago

Change:

$payment->add_period( $subscription->new_period() );

$payment->add_subscription( $subscription );

to just:

$payment->add_period( $subscription->new_period() );

Also don't allow the same $subscription more then once in $payment->subscriptions.

remcotolsma commented 2 years ago

https://github.com/pronamic/wp-pay-core/commit/02a2b60afc652c2879bb2406a166d0675d38a57f