PluginProbe ʕ •ᴥ•ʔ
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress / 4.0.3
Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress v4.0.3
4.17.3 4.17.2 4.17.1 4.17.0 4.16.19 4.16.18 4.16.17 4.16.16 trunk 1.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5a 1.1.6 1.1.7 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.1.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.2 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.10.0 4.10.1 4.10.2 4.10.3 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.13.3 4.13.4 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.15.0 4.15.1 4.15.10 4.15.11 4.15.12 4.15.13 4.15.14 4.15.15 4.15.16 4.15.17 4.15.18 4.15.19 4.15.2 4.15.20 4.15.20.1 4.15.21 4.15.22 4.15.23 4.15.24 4.15.25 4.15.3 4.15.4 4.15.5 4.15.6 4.15.7 4.15.8 4.15.9 4.16.0 4.16.1 4.16.10 4.16.11 4.16.12 4.16.13 4.16.14 4.16.15 4.16.2 4.16.3 4.16.4 4.16.5 4.16.6 4.16.7 4.16.8 4.16.9 4.2.0 4.3.0 4.3.1 4.3.2 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.7.0 4.8.0 4.9.0
wp-user-avatar / src / Admin / SettingsPages / Membership / PaymentSettings.php
wp-user-avatar / src / Admin / SettingsPages / Membership Last commit date
CouponsPage 4 years ago CustomersPage 4 years ago DashboardPage 4 years ago OrdersPage 4 years ago PlansPage 4 years ago SubscriptionsPage 4 years ago TaxSettings 4 years ago views 4 years ago CheckListHeader.php 4 years ago CheckoutFieldsManager.php 4 years ago ContextualStateChangeHelper.php 4 years ago PaymentMethods.php 4 years ago PaymentSettings.php 4 years ago SettingsFieldsParser.php 4 years ago index.php 4 years ago
PaymentSettings.php
133 lines
1 <?php
2
3 namespace ProfilePress\Core\Admin\SettingsPages\Membership;
4
5 use ProfilePress\Core\Admin\SettingsPages\AbstractSettingsPage;
6 use ProfilePress\Core\Membership\CheckoutFields;
7 use ProfilePress\Custom_Settings_Page_Api;
8
9 class PaymentSettings extends AbstractSettingsPage
10 {
11 public $settingsPageInstance;
12
13 public function __construct()
14 {
15 add_filter('ppress_settings_page_tabs', [$this, 'header_menu_tab']);
16 add_filter('ppress_settings_page_submenus_tabs', [$this, 'header_sub_menu_tab']);
17 add_action('ppress_admin_settings_submenu_page_payments_settings', [$this, 'settings_page']);
18 }
19
20 public function header_menu_tab($tabs)
21 {
22 $tabs[35] = ['id' => 'payments', 'url' => add_query_arg('view', 'payments', PPRESS_SETTINGS_SETTING_PAGE), 'label' => esc_html__('Payments', 'wp-user-avatar')];
23
24 return $tabs;
25 }
26
27 public function header_sub_menu_tab($tabs)
28 {
29 $tabs[172] = ['parent' => 'payments', 'id' => 'settings', 'label' => esc_html__('Settings', 'wp-user-avatar')];
30
31 return $tabs;
32 }
33
34 public function settings_page()
35 {
36 $page_header = esc_html__('Payment Settings', 'wp-user-avatar');
37
38 $currency_code_options = ppress_get_currencies();
39
40 foreach ($currency_code_options as $code => $name) {
41 $currency_code_options[$code] = $name . ' (' . ppress_get_currency_symbol($code) . ')';
42 }
43
44 $settings = [
45 [
46 'section_title' => esc_html__('Currency Settings', 'wp-user-avatar'),
47 'payment_currency' => [
48 'label' => esc_html__('Currency', 'wp-user-avatar'),
49 'description' => esc_html__('Choose your currency. Note that some payment gateways have currency restrictions.', 'wp-user-avatar'),
50 'type' => 'select',
51 'options' => $currency_code_options
52 ],
53 'currency_position' => [
54 'label' => esc_html__('Currency Position', 'wp-user-avatar'),
55 'description' => esc_html__('The position of the currency symbol.', 'wp-user-avatar'),
56 'type' => 'select',
57 'options' => [
58 'left' => 'Left (' . sprintf('%1$s%2$s', ppress_get_currency_symbol(), 99.99) . ')',
59 'right' => 'Right (' . sprintf('%2$s%1$s', ppress_get_currency_symbol(), 99.99) . ')',
60 'left_space' => 'Left with Space (' . sprintf('%1$s&nbsp;%2$s', ppress_get_currency_symbol(), 99.99) . ')',
61 'right_space' => 'Right with Space (' . sprintf('%2$s&nbsp;%1$s', ppress_get_currency_symbol(), 99.99) . ')',
62 ]
63 ],
64 'currency_decimal_separator' => [
65 'label' => esc_html__('Decimal Separator', 'wp-user-avatar'),
66 'type' => 'select',
67 'options' => [
68 '.' => 'Period (12.50)',
69 ',' => 'Comma (12,50)'
70 ],
71 ],
72 'currency_thousand_separator' => [
73 'label' => esc_html__('Thousand Separator', 'wp-user-avatar'),
74 'type' => 'select',
75 'options' => [
76 ',' => __('Comma (10,000)', 'wp-user-avatar'),
77 '.' => __('Period (10.000)', 'wp-user-avatar'),
78 ' ' => __('Space (10 000)', 'wp-user-avatar'),
79 'none' => __('None', 'wp-user-avatar')
80 ],
81 ],
82 'currency_decimal_number' => [
83 'label' => esc_html__('Number of Decimals', 'wp-user-avatar'),
84 'type' => 'select',
85 'options' => [
86 '0' => '0',
87 '1' => '1',
88 '2' => '2',
89 '3' => '3',
90 '4' => '4',
91 '5' => '5',
92 '6' => '6',
93 '7' => '7',
94 '8' => '8',
95 ]
96 ]
97 ],
98 [
99 'section_title' => esc_html__('Checkout Settings', 'wp-user-avatar'),
100 'one_time_trial' => [
101 'label' => esc_html__('One Time Trials', 'wp-user-avatar'),
102 'description' => esc_html__('Check this if you will like customers to be prevented from using the free trial of a plan multiple times.', 'wp-user-avatar'),
103 'type' => 'checkbox'
104 ],
105 'terms_agreement_label' => [
106 'label' => esc_html__('Terms & Conditions Label', 'wp-user-avatar'),
107 'description' => sprintf(
108 esc_html__('Label for the "Agree to Terms" checkbox where "[terms]" is a link to the %sterms and condition page%s', 'wp-user-avatar'),
109 '<a href="' . PPRESS_SETTINGS_SETTING_PAGE . '#global_pages?terms_page_id_row" target="_blank">', '</a>'
110 ),
111 'type' => 'text'
112 ]
113 ]
114 ];
115
116 $settingsPageInstance = Custom_Settings_Page_Api::instance('', PPRESS_SETTINGS_DB_OPTION_NAME);
117 $settingsPageInstance->page_header($page_header);
118 $settingsPageInstance->main_content($settings);
119 $settingsPageInstance->sidebar(AbstractSettingsPage::sidebar_args());
120 $settingsPageInstance->build();
121 }
122
123 public static function get_instance()
124 {
125 static $instance = null;
126
127 if (is_null($instance)) {
128 $instance = new self();
129 }
130
131 return $instance;
132 }
133 }