PluginProbe
School Management System – WPSchoolPress / trunk
School Management System – WPSchoolPress vtrunk
2.2.48 2.2.47 2.2.46 2.2.45 2.2.44 2.2.43 2.2.42 2.2.41 2.2.40 2.2.39 2.2.38 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 All 103 releases
← All changes | includes/wpsp-classForm.php +8 -2 2.2.43trunk View file →
@@ -25,9 +25,15 @@
25 25 }
26 26 }
27 27 $formname = isset($_GET['id']) ? 'ClassEditForm' : 'ClassAddForm';
28 28 $buttonname = isset($_GET['id']) ? 'Update' : 'Submit';
29 -$propayment = wpsp_check_pro_version('pay_WooCommerce');
29 +/**
30 + * Which class must exist for the "Paid" fee-type option to be shown.
31 + * Hooked so any payment add-on (not just the legacy WooCommerce one)
32 + * can unlock it by returning its own main class name here.
33 + */
34 +$propayment_gate_class = apply_filters('wpsp_payment_addon_gate_class', 'pay_WooCommerce');
35 +$propayment = wpsp_check_pro_version($propayment_gate_class);
30 36 $propayment = !$propayment['status'] ? 'notinstalled' : 'installed';
31 37 ?>
32 38 <!-- This form is used for Add/Update Class -->
33 39 <div id="formresponse"></div>
@@ -197,9 +203,9 @@
197 203 <option value="free" <?php if ($c_fee_type == "free") echo esc_html("selected", "wpschoolpress"); ?>><?php echo esc_html("Free", "wpschoolpress"); ?></option>
198 204 </select>
199 205 </div>
200 206 </div>
201 - <?php do_action('wpsp_after_class_detail_fields'); ?>
207 + <?php do_action('wpsp_after_class_detail_fields', $c_fee_type, isset($classid) ? $classid : 0); ?>
202 208 </div>
203 209 <div class="wpsp-row">
204 210 <div class="wpsp-col-xs-12 wpsp-btnsubmit-section">
205 211 <button type="submit" class="wpsp-btn wpsp-btn-success" id="c_submit"><?php echo esc_html($buttonname); ?></button>