PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.10.2
Subscriptions for WooCommerce with Stripe Recurring Payments v1.10.2
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
subscription / includes / Admin / views / product-form.php

product-form.php in Subscriptions for WooCommerce with Stripe Recurring Payments 1.10.2, at includes/Admin/views/product-form.php

94 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Subscription product edit form view.
4 */
5
6 // Exit if accessed directly.
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit;
9 }
10
11 ?>
12 <div id="sdevs_subscription_options"
13 class="panel woocommerce_options_panel option_group sdevs-form sdevs_panel show_if_simple" style="padding: 10px;">
14 <div class="show_if_subscription">
15 <input name="_subscript_nonce" type="hidden"
16 value="<?php echo esc_attr( wp_create_nonce( '_subscript_edit_product_nonce' ) ); ?>"/>
17 <strong style="margin: 10px;"><?php esc_html_e( 'Subscription Settings', 'subscription' ); ?></strong>
18 <?php
19
20 woocommerce_wp_select(
21 array(
22 'id' => 'subscrpt_timing',
23 'label' => __( 'Users will pay', 'subscription' ),
24 'value' => $subscrpt_timing,
25 'options' => $timing_types,
26 'description' => __( 'Set the length of each recurring subscription period to daily, weekly, monthly or annually.', 'subscription' ),
27 'desc_tip' => true,
28 )
29 );
30 ?>
31 <p class="form-field subscrpt_field">
32 <label for="subscrpt_trial_time"><?php esc_html_e( ' Free Trial Duration', 'subscription' ); ?></label>
33 <input type="number" class="short" name="subscrpt_trial_time" id="subscrpt_trial_time"
34 value="<?php echo esc_attr( $subscrpt_trial_time ); ?>"/>
35 <select name="subscrpt_trial_timing" id="subscrpt_trial_timing">
36 <?php foreach ( $trial_timing_types as $timing_type ) : ?>
37 <option value="<?php echo esc_attr( $timing_type['value'] ); ?>"
38 <?php
39 if ( $subscrpt_trial_timing === $timing_type['value'] ) {
40 echo 'selected';
41 }
42 ?>
43 ><?php echo esc_html( $timing_type['label'] ); ?></option>
44 <?php endforeach; ?>
45 </select>
46 <small
47 class="description"><?php esc_html_e( 'Let users try the subscription for free before the first payment is collected.', 'subscription' ); ?></small>
48 </p>
49
50 <?php
51
52 woocommerce_wp_text_input(
53 array(
54 'id' => 'subscrpt_cart_txt',
55 'label' => __( 'Button Text (Custom)', 'subscription' ),
56 'type' => 'text',
57 'value' => $subscrpt_cart_txt,
58 'description' => __( 'Customize the button label shown on the product or shop page. Default is "Subscribe"', 'subscription' ),
59 'desc_tip' => true,
60 )
61 );
62
63 woocommerce_wp_select(
64 array(
65 'id' => 'subscrpt_user_cancel',
66 'label' => __( 'Allow User Cancellation?', 'subscription' ),
67 'value' => $subscrpt_user_cancell,
68 'options' => array(
69 'yes' => __( 'Yes', 'subscription' ),
70 'no' => __( 'No', 'subscription' ),
71 ),
72 'description' => __( 'Allow subscribers to cancel their subscription manually from their account dashboard.', 'subscription' ),
73 'desc_tip' => true,
74 )
75 );
76
77 woocommerce_wp_select(
78 array(
79 'id' => 'subscrpt_limit',
80 'label' => __( 'Limit subscription', 'subscription' ),
81 'options' => array(
82 'unlimited' => __( 'Do not limit', 'subscription' ),
83 'one' => __( 'allow only one active subscription', 'subscription' ),
84 'only_one' => __( 'allow only one subscription of any status', 'subscription' ),
85 ),
86 'value' => $subscrpt_limit,
87 'description' => __( 'Set optional limits for this product subscription.', 'subscription' ),
88 'desc_tip' => true,
89 )
90 );
91 ?>
92 </div>
93 </div>
94