Skip to content

Commit 740763d

Browse files
committed
use option constants
1 parent eb6e06a commit 740763d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tawkto/tawkto.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function tawk_settings_assets( $hook ) {
106106
* @return void
107107
*/
108108
public function admin_init() {
109-
register_setting( 'tawk_options', 'tawkto-visibility-options', array( &$this, 'validate_options' ) );
109+
register_setting( 'tawk_options', self::TAWK_VISIBILITY_OPTIONS, array( &$this, 'validate_options' ) );
110110
}
111111

112112
/**
@@ -472,9 +472,9 @@ public function get_current_customer_details() {
472472
* Creates the embed code
473473
*/
474474
public function embed_code() {
475-
$page_id = get_option( 'tawkto-embed-widget-page-id' );
476-
$widget_id = get_option( 'tawkto-embed-widget-widget-id' );
477-
$visibility = get_option( 'tawkto-visibility-options' );
475+
$page_id = get_option( TawkTo_Settings::TAWK_PAGE_ID_VARIABLE );
476+
$widget_id = get_option( TawkTo_Settings::TAWK_WIDGET_ID_VARIABLE );
477+
$visibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS );
478478

479479
// default value.
480480
$enable_visitor_recognition = true;
@@ -523,7 +523,7 @@ private function get_current_url() {
523523
* @return void
524524
*/
525525
public function print_embed_code() {
526-
$vsibility = get_option( 'tawkto-visibility-options' );
526+
$vsibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS );
527527
$display = false;
528528

529529
if ( 1 === $vsibility['always_display'] ) {

0 commit comments

Comments
 (0)