Skip to content

Commit ce5e8a4

Browse files
committed
fix variable typo
1 parent fccb0fa commit ce5e8a4

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tawkto/tawkto.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -749,62 +749,62 @@ private function get_current_url() {
749749
* @return void
750750
*/
751751
public function print_embed_code() {
752-
$vsibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS );
753-
$display = false;
752+
$visibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS );
753+
$display = false;
754754

755-
if ( 1 === $vsibility['always_display'] ) {
755+
if ( 1 === $visibility['always_display'] ) {
756756
$display = true;
757757
}
758758

759-
if ( ( 1 === $vsibility['show_onfrontpage'] ) && ( is_home() || is_front_page() ) ) {
759+
if ( ( 1 === $visibility['show_onfrontpage'] ) && ( is_home() || is_front_page() ) ) {
760760
$display = true;
761761
}
762762

763-
if ( ( 1 === $vsibility['show_oncategory'] ) && is_category() ) {
763+
if ( ( 1 === $visibility['show_oncategory'] ) && is_category() ) {
764764
$display = true;
765765
}
766766

767-
if ( ( 1 === $vsibility['show_ontagpage'] ) && is_tag() ) {
767+
if ( ( 1 === $visibility['show_ontagpage'] ) && is_tag() ) {
768768
$display = true;
769769
}
770770

771-
if ( ( 1 === $vsibility['show_onarticlepages'] ) && is_single() ) {
771+
if ( ( 1 === $visibility['show_onarticlepages'] ) && is_single() ) {
772772
$display = true;
773773
}
774774

775775
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
776-
if ( ( 1 === $vsibility['display_on_shop'] ) && is_shop() ) {
776+
if ( ( 1 === $visibility['display_on_shop'] ) && is_shop() ) {
777777
$display = true;
778778
}
779779

780-
if ( ( 1 === $vsibility['display_on_productcategory'] ) && is_product_category() ) {
780+
if ( ( 1 === $visibility['display_on_productcategory'] ) && is_product_category() ) {
781781
$display = true;
782782
}
783783

784-
if ( ( 1 === $vsibility['display_on_productpage'] ) && is_product() ) {
784+
if ( ( 1 === $visibility['display_on_productpage'] ) && is_product() ) {
785785
$display = true;
786786
}
787787

788-
if ( ( 1 === $vsibility['display_on_producttag'] ) && is_product_tag() ) {
788+
if ( ( 1 === $visibility['display_on_producttag'] ) && is_product_tag() ) {
789789
$display = true;
790790
}
791791
}
792792

793-
if ( isset( $vsibility['include_url'] ) && 1 === $vsibility['include_url'] ) {
793+
if ( isset( $visibility['include_url'] ) && 1 === $visibility['include_url'] ) {
794794
$current_url = $this->get_current_url();
795795

796-
$included_url_list = $vsibility['included_url_list'];
796+
$included_url_list = $visibility['included_url_list'];
797797
$included_url_list = array_map( 'trim', preg_split( '/,/', $included_url_list ) );
798798

799799
if ( UrlPatternMatcher::match( $current_url, $included_url_list ) ) {
800800
$display = true;
801801
}
802802
}
803803

804-
if ( isset( $vsibility['exclude_url'] ) && ( 1 === $vsibility['exclude_url'] ) ) {
804+
if ( isset( $visibility['exclude_url'] ) && ( 1 === $visibility['exclude_url'] ) ) {
805805
$current_url = $this->get_current_url();
806806

807-
$excluded_url_list = $vsibility['excluded_url_list'];
807+
$excluded_url_list = $visibility['excluded_url_list'];
808808
$excluded_url_list = array_map( 'trim', preg_split( '/,/', $excluded_url_list ) );
809809

810810
if ( UrlPatternMatcher::match( $current_url, $excluded_url_list ) ) {

tawkto/upgrades/version.090.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TawkToUpgradeVersion090 extends TawkToUpgradeBase {
1616
* Move the visitor recognition setting from visibility to privacy.
1717
*/
1818
public static function upgrade() {
19-
$visibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS );
19+
$visibility = get_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS, array() );
2020

2121
if ( isset( $visibility['enable_visitor_recognition'] ) ) {
2222
update_option( TawkTo_Settings::TAWK_PRIVACY_OPTIONS, array( 'enable_visitor_recognition' => $visibility['enable_visitor_recognition'] ) );

0 commit comments

Comments
 (0)