PluginProbe
Orderable – Restaurant & Food Ordering System / 1.10.0
Orderable – Restaurant & Food Ordering System v1.10.0
0.1.4 0.1.5 0.2.0 1.0.0 1.1.0 1.1.1 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.19.1 1.19.2 1.2.0 1.20.0 1.20.1 All 44 releases
orderable / inc / modules / tip / class-tip.php

class-tip.php in Orderable – Restaurant & Food Ordering System 1.10.0, at inc/modules/tip/class-tip.php

55 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Module: Tip.
4 *
5 * @package Orderable/Classes
6 */
7
8 defined( 'ABSPATH' ) || exit;
9
10 /**
11 * Tip module class.
12 */
13 class Orderable_Tip {
14 /**
15 * Init.
16 */
17 public static function run() {
18 add_filter( 'wpsf_register_settings_orderable', array( __CLASS__, 'register_settings' ) );
19 }
20
21 /**
22 * Register settings.
23 *
24 * @param array $settings Settings.
25 *
26 * @return array
27 */
28 public static function register_settings( $settings = array() ) {
29 $settings['tabs'][] = array(
30 'id' => 'tip',
31 'title' => __( 'Tip Settings', 'orderable' ),
32 'priority' => 20,
33 );
34
35 $settings['sections'][] = array(
36 'tab_id' => 'tip',
37 'section_id' => 'general',
38 'section_title' => __( 'Tip Settings', 'orderable' ),
39 'section_description' => '',
40 'section_order' => 0,
41 'fields' => array(
42 array(
43 'id' => 'pro',
44 'title' => __( 'Enable Tipping', 'orderable' ),
45 'subtitle' => __( 'Show tipping options at checkout.', 'orderable' ),
46 'type' => 'custom',
47 'output' => Orderable_Helpers::get_pro_button( 'tip' ),
48 ),
49 ),
50 );
51
52 return $settings;
53 }
54 }
55