Skip to content

Commit

Permalink
Check if subscription is available, fixes #35.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 25, 2023
1 parent 0be7f4a commit 9682673
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1204,9 +1204,9 @@ public function replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html

$subscription_id = gform_get_meta( rgar( $entry, 'id' ), 'pronamic_subscription_id' );

if ( ! empty( $subscription_id ) ) {
$subscription = get_pronamic_subscription( $subscription_id );
$subscription = empty( $subscription_id ) ? null : \get_pronamic_subscription( $subscription_id );

if ( null !== $subscription ) {
$next_payment_date = $subscription->get_next_payment_date();

if ( $next_payment_date ) {
Expand Down

0 comments on commit 9682673

Please sign in to comment.