| 1 |
<?php |
| 2 |
/** |
| 3 |
* Option keys for ecommerce |
| 4 |
* |
| 5 |
* @package Tutor\Ecommerce |
| 6 |
* @author Themeum |
| 7 |
* @link https://themeum.com |
| 8 |
* @since 3.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
namespace Tutor\Ecommerce; |
| 12 |
|
| 13 |
/** |
| 14 |
* Option key names |
| 15 |
*/ |
| 16 |
class OptionKeys { |
| 17 |
|
| 18 |
// Currency Settings. |
| 19 |
const CURRENCY_CODE = 'currency_code'; |
| 20 |
const CURRENCY_POSITION = 'currency_position'; |
| 21 |
const THOUSAND_SEPARATOR = 'thousand_separator'; |
| 22 |
const DECIMAL_SEPARATOR = 'decimal_separator'; |
| 23 |
const NUMBER_OF_DECIMALS = 'number_of_decimals'; |
| 24 |
|
| 25 |
// Payment Methods. |
| 26 |
const IS_ENABLE_PAYPAL_PAYMENT = 'is_enable_paypal_payment'; |
| 27 |
const IS_ENABLE_STRIPE_PAYMENT = 'is_enable_stripe_payment'; |
| 28 |
|
| 29 |
// Tax and Coupon Settings. |
| 30 |
const IS_TAX_APPLICABLE = 'is_tax_applicable'; |
| 31 |
const IS_COUPON_APPLICABLE = 'is_coupon_applicable'; |
| 32 |
|
| 33 |
// Billing Information Settings. |
| 34 |
const BILLING_ADDRESS = 'billing_address'; |
| 35 |
const BILLING_PHONE_NUMBER = 'billing_phone_number'; |
| 36 |
const BILLING_EMAIL = 'billing_email'; |
| 37 |
|
| 38 |
// Ecommerce Policies. |
| 39 |
const PRIVACY_POLICY = 'ecommerce_privacy_policy'; |
| 40 |
|
| 41 |
// Payment settings. |
| 42 |
const MANUAL_PAYMENT_KEY = 'tutor_manual_payments'; |
| 43 |
const PAYMENT_SETTINGS = 'payment_settings'; |
| 44 |
|
| 45 |
const BUY_NOW = 'is_enable_buy_now'; |
| 46 |
|
| 47 |
/** |
| 48 |
* Get billing field options |
| 49 |
* |
| 50 |
* @since 3.0.0 |
| 51 |
* |
| 52 |
* @return array |
| 53 |
*/ |
| 54 |
public static function get_billing_field_options() { |
| 55 |
$options = array( |
| 56 |
'optional' => __( 'Optional', 'tutor' ), |
| 57 |
'required' => __( 'Required', 'tutor' ), |
| 58 |
'omit' => __( 'Don\'t Include', 'tutor' ), |
| 59 |
); |
| 60 |
|
| 61 |
return apply_filters( 'tutor_ecommerce_billing_field_options', $options ); |
| 62 |
} |
| 63 |
|
| 64 |
/** |
| 65 |
* Get tax configuration page url |
| 66 |
* |
| 67 |
* @since 3.0.0 |
| 68 |
* |
| 69 |
* @return array |
| 70 |
*/ |
| 71 |
public static function get_tax_config_page_url() { |
| 72 |
$url = admin_url( 'admin.php?page=tutor_settings&tab=tax_configuration' ); |
| 73 |
return apply_filters( 'tutor_tax_config_page_url', $url ); |
| 74 |
} |
| 75 |
} |
| 76 |
|