Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
avoid logging when not on language page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon007 committed Jun 23, 2019
1 parent ab0a192 commit 09cbf1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Hyyan/WPI/Utilities.php
Expand Up @@ -574,7 +574,8 @@ public static function switchLocale( $languageLocale ) {
$polylang->preflang->locale = $languageLocale;
} else {
//if in admin mode, if there is no polylang filter set and not view a language specific page, curlang will not be set
error_log( 'woo-poly-integration: switchLocale was called when polylang was not initialised, please check usage' );
return;
//error_log( 'woo-poly-integration: switchLocale was called when not needed, please check usage' );
}
// Cache miss
if ( false === $mo = $cache->get( $languageLocale ) ) {
Expand Down

0 comments on commit 09cbf1f

Please sign in to comment.