| 1 |
<div id="sdevs_subscription_options" |
| 2 |
class="panel woocommerce_options_panel option_group sdevs-form sdevs_panel show_if_simple" style="padding: 10px;"> |
| 3 |
<div class="show_if_subscription"> |
| 4 |
<input name="_subscript_nonce" type="hidden" |
| 5 |
value="<?php echo esc_attr( wp_create_nonce( '_subscript_edit_product_nonce' ) ); ?>"/> |
| 6 |
<strong style="margin: 10px;"><?php esc_html_e( 'Subscription Settings', 'sdevs_subscrpt' ); ?></strong> |
| 7 |
<?php |
| 8 |
|
| 9 |
woocommerce_wp_select( |
| 10 |
array( |
| 11 |
'id' => 'subscrpt_timing', |
| 12 |
'label' => __( 'Users will pay', 'sdevs_subscrpt' ), |
| 13 |
'value' => $subscrpt_timing, |
| 14 |
'options' => $timing_types, |
| 15 |
'description' => __( 'Set the length of each recurring subscription period to daily, weekly, monthly or annually.', 'sdevs_subscrpt' ), |
| 16 |
'desc_tip' => true, |
| 17 |
) |
| 18 |
); |
| 19 |
?> |
| 20 |
<p class="form-field subscrpt_field"> |
| 21 |
<label for="subscrpt_trial_time"><?php esc_html_e( 'Offer a free trial of', 'sdevs_subscrpt' ); ?></label> |
| 22 |
<input type="number" class="short" name="subscrpt_trial_time" id="subscrpt_trial_time" |
| 23 |
value="<?php echo esc_attr( $subscrpt_trial_time ); ?>"/> |
| 24 |
<select name="subscrpt_trial_timing" id="subscrpt_trial_timing"> |
| 25 |
<?php foreach ( $trial_timing_types as $timing_type ) : ?> |
| 26 |
<option value="<?php echo esc_attr( $timing_type['value'] ); ?>" |
| 27 |
<?php |
| 28 |
if ( $subscrpt_trial_timing === $timing_type['value'] ) { |
| 29 |
echo 'selected'; |
| 30 |
} |
| 31 |
?> |
| 32 |
><?php echo esc_html( $timing_type['label'] ); ?></option> |
| 33 |
<?php endforeach; ?> |
| 34 |
</select> |
| 35 |
<small |
| 36 |
class="description"><?php esc_html_e( 'You can offer a free trial of this subscription. In this way the user can purchase the subscription and will pay when the trial period expires.', 'sdevs_subscrpt' ); ?></small> |
| 37 |
</p> |
| 38 |
|
| 39 |
<?php |
| 40 |
|
| 41 |
woocommerce_wp_text_input( |
| 42 |
array( |
| 43 |
'id' => 'subscrpt_cart_txt', |
| 44 |
'label' => __( 'Add to Cart Text', 'sdevs_subscrpt' ), |
| 45 |
'type' => 'text', |
| 46 |
'value' => $subscrpt_cart_txt, |
| 47 |
'description' => __( 'change Add to Cart Text default is "subscribe"', 'sdevs_subscrpt' ), |
| 48 |
'desc_tip' => true, |
| 49 |
) |
| 50 |
); |
| 51 |
|
| 52 |
woocommerce_wp_select( |
| 53 |
array( |
| 54 |
'id' => 'subscrpt_user_cancel', |
| 55 |
'label' => __( 'Can User Cancel', 'sdevs_subscrpt' ), |
| 56 |
'value' => $subscrpt_user_cancell, |
| 57 |
'options' => array( |
| 58 |
'yes' => __( 'Yes', 'sdevs_subscrpt' ), |
| 59 |
'no' => __( 'No', 'sdevs_subscrpt' ), |
| 60 |
), |
| 61 |
'description' => __( 'if "Yes",then user can be cancelled."No" means cannot do this !!', 'sdevs_subscrpt' ), |
| 62 |
'desc_tip' => true, |
| 63 |
) |
| 64 |
); |
| 65 |
|
| 66 |
woocommerce_wp_select( |
| 67 |
array( |
| 68 |
'id' => 'subscrpt_limit', |
| 69 |
'label' => __( 'Limit subscription', 'sdevs_subscrpt' ), |
| 70 |
'options' => array( |
| 71 |
'unlimited' => __( 'Do not limit', 'sdevs_subscrpt' ), |
| 72 |
'one' => __( 'allow only one active subscription', 'sdevs_subscrpt' ), |
| 73 |
'only_one' => __( 'allow only one subscription of any status', 'sdevs_subscrpt' ), |
| 74 |
), |
| 75 |
'value' => $subscrpt_limit, |
| 76 |
'description' => __( 'Set optional limits for this product subscription.', 'sdevs_subscrpt' ), |
| 77 |
'desc_tip' => true, |
| 78 |
) |
| 79 |
); |
| 80 |
?> |
| 81 |
</div> |
| 82 |
</div> |
| 83 |
|