| @@ -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> |