PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.4.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.4.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/Product/Plans.php +20 -0 2.2.0 → 2.4.0 View file →
@@ -16,8 +16,9 @@
16 16 */
17 17
18 18 namespace SpringDevs\Subscription\Admin\Product;
19 19
20 +use SpringDevs\Subscription\Illuminate\Helper;
20 21 use SpringDevs\Subscription\Illuminate\Plans\PlanRepository;
21 22
22 23 /**
23 24 * Product-editor plan view.
@@ -658,8 +659,27 @@
658 659 <?php endif; ?>
659 660 <?php endif; ?>
660 661 </div>
661 662 <?php endforeach; ?>
663 + </div>
664 + <?php endif; ?>
665 +
666 + <?php if ( ! $product->is_type( 'variable' ) ) : ?>
667 + <?php
668 + // No name: the classic `subscrpt_user_cancel` select is what the product
669 + // save reads. product-plans.js keeps the two in step, so there is one
670 + // value on the form whichever view is showing. Variable products set it
671 + // per variation instead.
672 + ?>
673 + <div class="wpsubs-table-card" style="padding:12px 14px;margin-top:18px;">
674 + <label class="wpsubs-settings-toggle-label" style="display:flex;align-items:center;gap:10px;cursor:pointer;">
675 + <input type="checkbox" class="wpsubs-toggle" data-subscrpt-plan-user-cancel <?php checked( Helper::can_user_cancel( $product->get_meta( '_subscrpt_user_cancel' ) ) ); ?> />
676 + <span class="wpsubs-toggle-ui" aria-hidden="true"></span>
677 + <span style="display:flex;flex-direction:column;gap:2px;">
678 + <strong style="font-size:13px;color:var(--wpsubs-text);"><?php esc_html_e( 'Allow User Cancellation', 'subscription' ); ?></strong>
679 + <span style="font-size:12px;color:var(--wpsubs-text-muted);"><?php esc_html_e( 'Allow subscribers to cancel their subscription manually from their account dashboard.', 'subscription' ); ?></span>
680 + </span>
681 + </label>
662 682 </div>
663 683 <?php endif; ?>
664 684
665 685 <?php