Skip to content

Commit 8054923

Browse files
committed
disable custom transaction type
1 parent a6f4655 commit 8054923

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

class-gf-paystack.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -442,24 +442,24 @@ public function feed_settings_fields()
442442
$default_settings = parent::add_field_after('feedName', $fields, $default_settings);
443443

444444
// Add donation to transaction type drop down
445-
$transaction_type = parent::get_field('transactionType', $default_settings);
446-
$choices = $transaction_type['choices'];
447-
$add_donation = true;
448-
449-
foreach ($choices as $choice) {
450-
// Add donation option if it does not already exist
451-
if ($choice['value'] == 'donation') {
452-
$add_donation = false;
453-
}
454-
}
455-
456-
if ($add_donation) {
457-
// Add donation transaction type
458-
$choices[] = array('label' => __('Donations', 'gravityformspaystack'), 'value' => 'donation');
459-
}
460-
461-
$transaction_type['choices'] = $choices;
462-
$default_settings = $this->replace_field('transactionType', $transaction_type, $default_settings);
445+
// $transaction_type = parent::get_field('transactionType', $default_settings);
446+
// $choices = $transaction_type['choices'];
447+
// $add_donation = true;
448+
449+
// foreach ($choices as $choice) {
450+
// // Add donation option if it does not already exist
451+
// if ($choice['value'] == 'donation') {
452+
// $add_donation = false;
453+
// }
454+
// }
455+
456+
// if ($add_donation) {
457+
// // Add donation transaction type
458+
// $choices[] = array('label' => __('Donations', 'gravityformspaystack'), 'value' => 'donation');
459+
// }
460+
461+
// $transaction_type['choices'] = $choices;
462+
// $default_settings = $this->replace_field('transactionType', $transaction_type, $default_settings);
463463

464464
// Add send invoice field if the feed transaction type is a subscription.
465465
if ($this->get_setting('transactionType') === 'subscription') {

0 commit comments

Comments
 (0)