Skip to content

Commit 8a81ae0

Browse files
ECPINT-2798: handle save card in case subscription plugin is not present
1 parent e87b1aa commit 8a81ae0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

woocommerce-gateway-checkout-com/includes/class-wc-gateway-checkout-com-cards.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ public function process_payment( $order_id )
368368
}
369369

370370
// save source id for subscription
371-
WC_Checkoutcom_Subscription::save_source_id($order_id, $order, $result['source']['id']);
371+
if (class_exists(WC_Subscriptions_Order)) {
372+
WC_Checkoutcom_Subscription::save_source_id($order_id, $order, $result['source']['id']);
373+
}
372374

373375
// Set action id as woo transaction id
374376
update_post_meta($order_id, '_transaction_id', $result['action_id']);

0 commit comments

Comments
 (0)