| @@ -216,33 +216,8 @@ | ||
| 216 | 216 | </div> |
| 217 | 217 | </div> |
| 218 | 218 | <?php |
| 219 | 219 | }; |
| 220 | - | |
| 221 | - /** | |
| 222 | - * Render a simple product's "Allow User Cancellation" card. The switch | |
| 223 | - * saves itself (plans.js), as the one-time switch does. Variable products | |
| 224 | - * set it per variation in the product editor. | |
| 225 | - * | |
| 226 | - * @param array $product Product entry (PlanPresenter shape). | |
| 227 | - */ | |
| 228 | - $subscrpt_render_user_cancel = function ( $product ) { | |
| 229 | - ?> | |
| 230 | - <div data-subscrpt-user-cancel-card data-product-id="<?php echo esc_attr( $product['id'] ); ?>" style="border:1px solid var(--wpsubs-border,#e5e7eb);border-radius:8px;background:var(--wpsubs-surface,#fff);margin-top:14px;"> | |
| 231 | - <div style="display:flex;align-items:center;gap:10px;padding:11px 14px;"> | |
| 232 | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="16" height="16" fill="currentColor" aria-hidden="true" focusable="false" style="flex:0 0 auto;color:var(--wpsubs-text-subtle);"><path d="M431.2 476.5L163.5 208.8C141.1 240.2 128 278.6 128 320C128 426 214 512 320 512C361.5 512 399.9 498.9 431.2 476.5zM476.5 431.2C498.9 399.8 512 361.4 512 320C512 214 426 128 320 128C278.5 128 240.1 141.1 208.8 163.5L476.5 431.2zM64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320z"/></svg> | |
| 233 | - <strong style="font-size:13px;color:var(--wpsubs-text);"><?php esc_html_e( 'User cancellation', 'subscription' ); ?></strong> | |
| 234 | - <?php echo wp_kses_post( wpsubs_render_hint( __( 'Allow subscribers to cancel their subscription manually from their account dashboard. Applies to subscriptions bought after the change.', 'subscription' ) ) ); ?> | |
| 235 | - <span class="wpsubs-toolbar__spacer"></span> | |
| 236 | - <label class="wpsubs-settings-toggle-label" style="display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--wpsubs-text-muted);cursor:pointer;"> | |
| 237 | - <input type="checkbox" class="wpsubs-toggle" data-subscrpt-user-cancel-enable <?php checked( ! empty( $product['user_cancel'] ) ); ?> /> | |
| 238 | - <span class="wpsubs-toggle-ui" aria-hidden="true"></span> | |
| 239 | - <span><?php esc_html_e( 'Allow User Cancellation', 'subscription' ); ?></span> | |
| 240 | - </label> | |
| 241 | - </div> | |
| 242 | - </div> | |
| 243 | - <?php | |
| 244 | - }; | |
| 245 | 220 | ?> |
| 246 | 221 | |
| 247 | 222 | <div data-subscrpt-browse data-per-page="10"> |
| 248 | 223 | <div class="wpsubs-toolbar" style="margin-bottom:14px;"> |
| @@ -366,9 +341,8 @@ | ||
| 366 | 341 | </div> |
| 367 | 342 | <?php $subscrpt_render_rows( $product['rows'] ); ?> |
| 368 | 343 | </div> |
| 369 | 344 | <?php $subscrpt_render_onetime( $product ); ?> |
| 370 | - <?php $subscrpt_render_user_cancel( $product ); ?> | |
| 371 | 345 | <?php endif; ?> |
| 372 | 346 | </div> |
| 373 | 347 | </div> |
| 374 | 348 | <?php $subscrpt_is_first = false; ?> |