Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delayed actions feeds not processed during fulfilment of free payments #6

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ public function entry_post_save( $lead, $form ) {
// First payment and subscription amount are free.
( $payment->get_lines()->get_amount()->get_number()->is_zero() && $subscription_lines->get_amount()->get_number()->is_zero() )
) {
// Allow delayed feeds to be processed during fulfilment for free payments (e.g. user registration for entry with discount).
\remove_filter( 'gform_is_delayed_pre_process_feed_' . $this->form_id, array( $this, 'maybe_delay_feed' ), 10 );

$payment->set_status( PaymentStatus::SUCCESS );
$payment->save();

Expand Down