| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\BetaFeatures\Actions; |
| 4 |
|
| 5 |
use Give\BetaFeatures\Facades\FeatureFlag; |
| 6 |
|
| 7 |
/** |
| 8 |
* @since 3.6.0 |
| 9 |
*/ |
| 10 |
class RegisterSettings |
| 11 |
{ |
| 12 |
public function __invoke($settings) |
| 13 |
{ |
| 14 |
if('beta' !== give_get_current_setting_section()) { |
| 15 |
return $settings; |
| 16 |
} |
| 17 |
|
| 18 |
FeatureFlag::resetNotificationCount(); |
| 19 |
|
| 20 |
return $this->getSettings(); |
| 21 |
} |
| 22 |
|
| 23 |
protected function getSettings() |
| 24 |
{ |
| 25 |
return [ |
| 26 |
['id' => 'give_title_beta_features_1', 'type' => 'title'], |
| 27 |
['id' => 'give_beta_features_banner', 'type' => 'beta_features'], |
| 28 |
[ |
| 29 |
'name' => __('Event Tickets', 'give'), |
| 30 |
'desc' => __( |
| 31 |
'If enabled, you’ll be get access to the event tickets feature where you can create events and sell tickets on your donation forms. Since this is in a beta, your feedback is crucial to help us improve and make the experience better before making it public.', |
| 32 |
'give' |
| 33 |
), |
| 34 |
'id' => 'enable_event_tickets', |
| 35 |
'type' => 'radio_inline', |
| 36 |
'default' => 'disabled', |
| 37 |
'options' => [ |
| 38 |
'enabled' => __('Enabled', 'give'), |
| 39 |
'disabled' => __('Disabled', 'give'), |
| 40 |
], |
| 41 |
], |
| 42 |
['id' => 'give_title_beta_features_2', 'type' => 'sectionend'], |
| 43 |
['id' => 'give_beta_features_feedback_link', 'type' => 'beta_features_feedback_link'], |
| 44 |
]; |
| 45 |
} |
| 46 |
} |
| 47 |
|