Skip to content

Commit 718bc42

Browse files
committed
Bail on renewal if already processing
1 parent 97fdd93 commit 718bc42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

includes/addons/trait-wc-monei-subscriptions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ public function add_extra_info_to_subscriptions_payment_method_title( $payment_m
7676
public function scheduled_subscription_payment( $amount_to_charge, $renewal_order ) {
7777
$sequence_id = $this->get_sequence_id_from_renewal_order( $renewal_order );
7878
$description = $this->shop_name . ' - #' . (string) $renewal_order->get_id() . ' - Subscription Renewal';
79-
79+
if($renewal_order->get_status() === 'processing') {
80+
return;
81+
}
8082
$payload = array(
8183
'orderId' => (string) $renewal_order->get_id(),
8284
'amount' => monei_price_format( $amount_to_charge ),

0 commit comments

Comments
 (0)