We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0efafcf + 910a4b6 commit 2934b66Copy full SHA for 2934b66
1 file changed
classes/class-wplf-polylang.php
@@ -87,7 +87,11 @@ public function save_success_message( $message ) {
87
}
88
89
public function ajax_object( $array ) {
90
- $array['lang'] = pll_current_language();
+ if ( function_exists( 'pll_current_language' ) ) {
91
+ $array['lang'] = pll_current_language();
92
+ } else {
93
+ $array['lang'] = null;
94
+ }
95
return $array;
96
97
0 commit comments