PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 1.9.1
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v1.9.1
2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 All 96 releases
sureforms / inc / onboarding.php
onboarding.php
54 lines 1017 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Onboarding Class
4 *
5 * Handles the onboarding process for the SureForms plugin.
6 *
7 * @package sureforms
8 */
9
10 namespace SRFM\Inc;
11
12 use SRFM\Inc\Traits\Get_Instance;
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 /**
19 * Onboarding Class
20 *
21 * Handles the onboarding process for the SureForms plugin.
22 */
23 class Onboarding {
24 use Get_Instance;
25
26 /**
27 * Onboarding completion setting key.
28 *
29 * @var string
30 */
31 private $onboarding_status_key = 'onboarding_completed';
32
33 /**
34 * Set onboarding completion status.
35 *
36 * @since 1.9.1
37 * @param string $completed Whether the onboarding is completed.
38 * @return void
39 */
40 public function set_onboarding_status( $completed = 'no' ) {
41 Helper::update_srfm_option( $this->onboarding_status_key, $completed );
42 }
43
44 /**
45 * Get onboarding completion status.
46 *
47 * @since 1.9.1
48 * @return bool
49 */
50 public function get_onboarding_status() {
51 return Helper::get_srfm_option( $this->onboarding_status_key, 'no' ) === 'yes';
52 }
53 }
54