# orderable/1.14.0/inc/modules/tip/class-tip.php

Orderable – Restaurant &amp; Food Ordering System, version 1.14.0. 55 lines.

- Page: https://pluginprobe.com/plugins/orderable/1.14.0/code/inc/modules/tip/class-tip.php
- Raw: https://pluginprobe.com/plugins/orderable/1.14.0/raw/inc/modules/tip/class-tip.php
- Modified: 2022-06-20T12:34:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/orderable/1.14.0/code/inc/modules/tip/class-tip.php#L10-L20`.

```php
<?php
/**
 * Module: Tip.
 *
 * @package Orderable/Classes
 */

defined( 'ABSPATH' ) || exit;

/**
 * Tip module class.
 */
class Orderable_Tip {
	/**
	 * Init.
	 */
	public static function run() {
		add_filter( 'wpsf_register_settings_orderable', array( __CLASS__, 'register_settings' ) );
	}

	/**
	 * Register settings.
	 *
	 * @param array $settings Settings.
	 *
	 * @return array
	 */
	public static function register_settings( $settings = array() ) {
		$settings['tabs'][] = array(
			'id'       => 'tip',
			'title'    => __( 'Tip Settings', 'orderable' ),
			'priority' => 20,
		);

		$settings['sections'][] = array(
			'tab_id'              => 'tip',
			'section_id'          => 'general',
			'section_title'       => __( 'Tip Settings', 'orderable' ),
			'section_description' => '',
			'section_order'       => 0,
			'fields'              => array(
				array(
					'id'       => 'pro',
					'title'    => __( 'Enable Tipping', 'orderable' ),
					'subtitle' => __( 'Show tipping options at checkout.', 'orderable' ),
					'type'     => 'custom',
					'output'   => Orderable_Helpers::get_pro_button( 'tip' ),
				),
			),
		);

		return $settings;
	}
}

```
