Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Commit 69a81e6

Browse files
committed
version 1.3.5, dynamisk lang-parameter
1 parent 2694cfb commit 69a81e6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

GFDibsHook.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ public static function dibsTransition($confirmation, $form, $lead, $ajax){
304304
$_POST['orderid'] = $order_id;
305305

306306
$_POST['currency'] = get_option('rg_gforms_currency');
307-
$_POST['language'] = 'nb_NO';
307+
$_POST['language'] = _get_language();
308+
$_POST['lang'] = _get_language();
308309
$_POST['merchant'] = trim(get_option(MERCHANT));
309310

310311
if ( $custom_merchant_id = self::checkIfCustomMerchantId($feed) ){

gravityformsdibs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Gravity Forms DIBS
44
Plugin URI: http://nettbutikk.mediebruket.no
55
Description: DIBS add-on for Gravity Forms. Supports D2 and DX platform.
6-
Version: 1.3.4
6+
Version: 1.3.5
77
Author: Mediebruket
88
Author URI: http://mediebruket.no
99
*/

utils/utils.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@ function _is($object, $attribute, $fallback = null ){
2727
}
2828

2929
}
30+
}
31+
32+
33+
if( !function_exists('_get_language') ){
34+
function _get_language(){
35+
$wplang = strtolower(get_option( 'WPLANG', $default = 'nb_NO' ));
36+
return preg_replace('/.*_/', null, $wplang );
37+
}
3038
}

0 commit comments

Comments
 (0)