PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.0.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.0.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 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
← All changes | includes/Admin/ProSettingsFields.php +33 -45 1.11.22.0.0 View file →
@@ -78,9 +78,9 @@
78 78 private function pro_core_fields() {
79 79 return [
80 80 [
81 81 'type' => 'select',
82 - 'group' => 'main',
82 + 'group' => 'renewals',
83 83 'priority' => 7,
84 84 'field_data' => [
85 85 'id' => 'subscrpt_renewal_price',
86 86 'title' => __( 'Renewal Price', 'subscription' ),
@@ -93,9 +93,9 @@
93 93 ],
94 94 ],
95 95 [
96 96 'type' => 'toggle',
97 - 'group' => 'main',
97 + 'group' => 'renewals',
98 98 'priority' => 8,
99 99 'field_data' => [
100 100 'id' => 'subscrpt_early_renew',
101 101 'title' => __( 'Early Renewal', 'subscription' ),
@@ -104,41 +104,8 @@
104 104 'value' => '1',
105 105 'checked' => '1' === get_option( 'subscrpt_early_renew', '1' ),
106 106 ],
107 107 ],
108 - [
109 - 'type' => 'select',
110 - 'group' => 'main',
111 - 'priority' => 9,
112 - 'field_data' => [
113 - 'id' => 'subscrpt_cancellation_delay',
114 - 'title' => __( 'Cancellation Timing', 'subscription' ),
115 - 'description' => __( 'When a subscription is cancelled, choose when it actually ends.', 'subscription' ),
116 - 'options' => [
117 - '24h' => __( 'After 24 hours', 'subscription' ),
118 - 'instant' => __( 'Immediately', 'subscription' ),
119 - 'period' => __( 'At end of billing period (before next renewal)', 'subscription' ),
120 - ],
121 - 'selected' => esc_attr( \SpringDevs\Subscription\Illuminate\Cancellation::get_settings( 'subscrpt_cancellation_delay' ) ),
122 - ],
123 - ],
124 - [
125 - 'type' => 'editlist',
126 - 'group' => 'main',
127 - 'priority' => 9.6,
128 - 'field_data' => [
129 - 'id' => 'subscrpt_cancellation_reasons',
130 - 'title' => __( 'Cancellation Reasons', 'subscription' ),
131 - 'description' => __( 'Reasons offered in the cancellation survey form. Shown when Cancellation Survey is enabled.', 'subscription' ),
132 - 'value' => \SpringDevs\Subscription\Illuminate\Cancellation::get_reasons(),
133 - 'modal' => true,
134 - 'button_label' => __( 'Manage reasons', 'subscription' ),
135 - 'modal_title' => __( 'Cancellation Reasons', 'subscription' ),
136 - 'add_placeholder' => __( 'Add a reason…', 'subscription' ),
137 - 'add_label' => __( 'Add reason', 'subscription' ),
138 - 'empty_text' => __( 'No reasons yet. Add one below.', 'subscription' ),
139 - ],
140 - ],
141 108 ];
142 109 }
143 110
144 111 /**
@@ -150,9 +117,9 @@
150 117 return [
151 118 [
152 119 'type' => 'heading',
153 120 'group' => 'grace_period',
154 - 'priority' => 3,
121 + 'priority' => 5,
155 122 'field_data' => [
156 123 'title' => __( 'Grace Period Settings', 'subscription' ),
157 124 ],
158 125 ],
@@ -213,9 +180,9 @@
213 180 return [
214 181 [
215 182 'type' => 'heading',
216 183 'group' => 'payment_failure',
217 - 'priority' => 4,
184 + 'priority' => 6,
218 185 'field_data' => [
219 186 'title' => __( 'Payment Failure Handling', 'subscription' ),
220 187 ],
221 188 ],
@@ -349,9 +316,9 @@
349 316 return [
350 317 [
351 318 'type' => 'heading',
352 319 'group' => 'health_queue',
353 - 'priority' => 8,
320 + 'priority' => 9,
354 321 'field_data' => [
355 322 'title' => __( 'Subscription Health', 'subscription' ),
356 323 ],
357 324 ],
@@ -393,8 +360,21 @@
393 360 'value' => '1',
394 361 'checked' => '1' === get_option( 'wp_subscription_auto_complete_order', '1' ),
395 362 ],
396 363 ],
364 + [
365 + 'type' => 'toggle',
366 + 'group' => 'payment_gateways',
367 + 'priority' => 2,
368 + 'field_data' => [
369 + 'id' => 'subscrpt_require_payment_on_trial',
370 + 'title' => __( 'Require Payment for Free Trials', 'subscription' ),
371 + 'label' => __( 'Collect payment details at checkout for trial subscriptions', 'subscription' ),
372 + 'description' => __( 'Collect payment details up front on free trials so renewals charge automatically.', 'subscription' ),
373 + 'value' => '1',
374 + 'checked' => '1' === get_option( 'subscrpt_require_payment_on_trial', '1' ),
375 + ],
376 + ],
397 377 ];
398 378 }
399 379
400 380 /**
@@ -404,10 +384,18 @@
404 384 */
405 385 private function switch_fields() {
406 386 return [
407 387 [
388 + 'type' => 'heading',
389 + 'group' => 'switching',
390 + 'priority' => 3,
391 + 'field_data' => [
392 + 'title' => __( 'Switching & Upgrades', 'subscription' ),
393 + ],
394 + ],
395 + [
408 396 'type' => 'toggle',
409 - 'group' => 'general',
397 + 'group' => 'switching',
410 398 'priority' => 9,
411 399 'field_data' => [
412 400 'id' => 'subscrpt_switch_enabled',
413 401 'title' => __( 'Switch Subscription', 'subscription' ),
@@ -418,9 +406,9 @@
418 406 ],
419 407 ],
420 408 [
421 409 'type' => 'toggle',
422 - 'group' => 'general',
410 + 'group' => 'switching',
423 411 'priority' => 10,
424 412 'field_data' => [
425 413 'id' => 'subscrpt_downgrade_allowed',
426 414 'title' => __( 'Downgrade Subscription', 'subscription' ),
@@ -431,9 +419,9 @@
431 419 ],
432 420 ],
433 421 [
434 422 'type' => 'join',
435 - 'group' => 'general',
423 + 'group' => 'switching',
436 424 'priority' => 11,
437 425 'field_data' => [
438 426 'title' => __( 'Switch Fee', 'subscription' ),
439 427 'description' => __( 'Optional fee charged when a customer switches plans. Use a flat amount or a percentage of the new plan price. (0 = no fee)', 'subscription' ),
@@ -471,9 +459,9 @@
471 459 ],
472 460 ],
473 461 [
474 462 'type' => 'select',
475 - 'group' => 'general',
463 + 'group' => 'switching',
476 464 'priority' => 12,
477 465 'field_data' => [
478 466 'id' => 'subscrpt_switch_fee_apply_to',
479 467 'title' => __( 'Apply Fee To', 'subscription' ),
@@ -498,9 +486,9 @@
498 486 return [
499 487 [
500 488 'type' => 'heading',
501 489 'group' => 'role_based_settings',
502 - 'priority' => 6,
490 + 'priority' => 7,
503 491 'field_data' => [
504 492 'title' => __( 'Role-Based Settings', 'subscription' ),
505 493 ],
506 494 ],
@@ -528,9 +516,9 @@
528 516 return [
529 517 [
530 518 'type' => 'heading',
531 519 'group' => 'live_qr_settings',
532 - 'priority' => 5,
520 + 'priority' => 8,
533 521 'field_data' => [
534 522 'title' => __( 'Quick Details QR Settings', 'subscription' ),
535 523 ],
536 524 ],
@@ -601,9 +589,9 @@
601 589 return [
602 590 [
603 591 'type' => 'heading',
604 592 'group' => 'payment_gateways',
605 - 'priority' => 0.1,
593 + 'priority' => 1,
606 594 'field_data' => [
607 595 'title' => __( 'Payment Gateway Settings', 'subscription' ),
608 596 ],
609 597 ],