PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.2.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.2.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
← All changes | includes/Admin/ProSettingsFields.php +43 -0 2.0.0 → 2.2.0 View file →
@@ -45,8 +45,9 @@
45 45 */
46 46 public function add_pro_preview_fields( $settings_fields ) {
47 47 $pro_fields = array_merge(
48 48 $this->pro_core_fields(),
49 + $this->license_fields(),
49 50 $this->grace_period_fields(),
50 51 $this->payment_failure_fields(),
51 52 $this->api_fields(),
52 53 $this->health_queue_fields(),
@@ -102,8 +103,50 @@
102 103 'label' => __( 'Accept Early Renewal Payments', 'subscription' ),
103 104 'description' => __( 'With early renewals enabled, customers can renew their subscriptions before the next payment date.', 'subscription' ),
104 105 'value' => '1',
105 106 'checked' => '1' === get_option( 'subscrpt_early_renew', '1' ),
107 + ],
108 + ],
109 + ];
110 + }
111 +
112 + /**
113 + * Module: License integrations (Integrations/LicenseManagerWoo.php).
114 + *
115 + * @return array
116 + */
117 + private function license_fields() {
118 + return [
119 + [
120 + 'type' => 'heading',
121 + 'group' => 'license_settings',
122 + 'priority' => 4,
123 + 'field_data' => [
124 + 'title' => __( 'License Settings', 'subscription' ),
125 + ],
126 + ],
127 + [
128 + 'type' => 'toggle',
129 + 'group' => 'license_settings',
130 + 'priority' => 1,
131 + 'field_data' => [
132 + 'id' => 'subscrpt_regenerate_license_on_renewal',
133 + 'title' => __( 'Regenerate License on Renewal', 'subscription' ),
134 + 'description' => __( 'Enable this option if you want to invalidate the old key and issue a fresh license key whenever a subscription renews.', 'subscription' ),
135 + 'value' => '1',
136 + 'checked' => '1' === get_option( 'subscrpt_regenerate_license_on_renewal', '0' ),
137 + ],
138 + ],
139 + [
140 + 'type' => 'toggle',
141 + 'group' => 'license_settings',
142 + 'priority' => 2,
143 + 'field_data' => [
144 + 'id' => 'subscrpt_deactivate_old_license_on_renewal',
145 + 'title' => __( 'Deactivate Previous License', 'subscription' ),
146 + 'description' => __( 'When a fresh license key is issued on renewal, deactivate the previous key. Turn off to let the previous key keep working until it expires.', 'subscription' ),
147 + 'value' => '1',
148 + 'checked' => '1' === get_option( 'subscrpt_deactivate_old_license_on_renewal', '1' ),
106 149 ],
107 150 ],
108 151 ];
109 152 }