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

Commit

Permalink
version 1.3.5, dynamisk lang-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dmattke committed Jan 22, 2018
1 parent 2694cfb commit 69a81e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion GFDibsHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ public static function dibsTransition($confirmation, $form, $lead, $ajax){
$_POST['orderid'] = $order_id;

$_POST['currency'] = get_option('rg_gforms_currency');
$_POST['language'] = 'nb_NO';
$_POST['language'] = _get_language();
$_POST['lang'] = _get_language();
$_POST['merchant'] = trim(get_option(MERCHANT));

if ( $custom_merchant_id = self::checkIfCustomMerchantId($feed) ){
Expand Down
2 changes: 1 addition & 1 deletion gravityformsdibs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Gravity Forms DIBS
Plugin URI: http://nettbutikk.mediebruket.no
Description: DIBS add-on for Gravity Forms. Supports D2 and DX platform.
Version: 1.3.4
Version: 1.3.5
Author: Mediebruket
Author URI: http://mediebruket.no
*/
Expand Down
8 changes: 8 additions & 0 deletions utils/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@ function _is($object, $attribute, $fallback = null ){
}

}
}


if( !function_exists('_get_language') ){
function _get_language(){
$wplang = strtolower(get_option( 'WPLANG', $default = 'nb_NO' ));
return preg_replace('/.*_/', null, $wplang );
}
}

0 comments on commit 69a81e6

Please sign in to comment.