| 1 |
<?php |
| 2 |
/** |
| 3 |
* Fields settings Refund |
| 4 |
*/ |
| 5 |
|
| 6 |
defined( 'ABSPATH' ) || exit; |
| 7 |
|
| 8 |
return apply_filters( |
| 9 |
'learn-press/payment-settings/refund', |
| 10 |
array( |
| 11 |
array( |
| 12 |
'type' => 'title', |
| 13 |
), |
| 14 |
array( |
| 15 |
'title' => esc_html__( 'Enable Refund Requests', 'learnpress' ), |
| 16 |
'id' => 'enable_refund_requests', |
| 17 |
'default' => 'no', |
| 18 |
'type' => 'checkbox', |
| 19 |
'desc' => esc_html__( 'Allow users to submit refund requests.', 'learnpress' ), |
| 20 |
), |
| 21 |
array( |
| 22 |
'title' => esc_html__( 'Auto Refund', 'learnpress' ), |
| 23 |
'id' => 'auto_refund', |
| 24 |
'default' => 'no', |
| 25 |
'type' => 'checkbox', |
| 26 |
'desc' => esc_html__( 'Enable auto refund, skip admin review.', 'learnpress' ), |
| 27 |
'show_if_checked' => 'enable_refund_requests', |
| 28 |
), |
| 29 |
array( |
| 30 |
'title' => esc_html__( 'Refund Time Limit (days)', 'learnpress' ), |
| 31 |
'id' => 'refund_time_limit', |
| 32 |
'default' => 30, |
| 33 |
'type' => 'number', |
| 34 |
'min' => 0, |
| 35 |
'desc' => esc_html__( 'Maximum days after purchase that users can request a refund. 0 means unlimited.', 'learnpress' ), |
| 36 |
'show_if_checked' => 'enable_refund_requests', |
| 37 |
), |
| 38 |
array( |
| 39 |
'title' => esc_html__( 'Require Refund Reason', 'learnpress' ), |
| 40 |
'id' => 'require_refund_reason', |
| 41 |
'default' => 'no', |
| 42 |
'type' => 'checkbox', |
| 43 |
'desc' => esc_html__( 'Require users to enter a reason when requesting a refund.', 'learnpress' ), |
| 44 |
'show_if_checked' => 'enable_refund_requests', |
| 45 |
), |
| 46 |
array( |
| 47 |
'title' => esc_html__( 'Allow Re-Request After Rejection', 'learnpress' ), |
| 48 |
'id' => 'allow_resend_after_rejected', |
| 49 |
'default' => 'no', |
| 50 |
'type' => 'checkbox', |
| 51 |
'desc' => esc_html__( 'Allow users to submit a new request after a denied refund request.', 'learnpress' ), |
| 52 |
'show_if_checked' => 'enable_refund_requests', |
| 53 |
), |
| 54 |
array( |
| 55 |
'type' => 'sectionend', |
| 56 |
), |
| 57 |
) |
| 58 |
); |
| 59 |
|