Skip to content

Commit ac7eb08

Browse files
Merge pull request #6 from andrewlimaza/main
Fixed some PHP warnings
2 parents 694c8f2 + 8079ea3 commit ac7eb08

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

class-gf-paystack.php

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,8 @@ public function add_paystack_currencies($currencies)
19261926
'symbol_padding' => ' ',
19271927
'thousand_separator' => ',',
19281928
'decimal_separator' => '.',
1929-
'decimals' => 2
1929+
'decimals' => 2,
1930+
'code' => 'NGN'
19301931
);
19311932
}
19321933

@@ -1940,7 +1941,8 @@ public function add_paystack_currencies($currencies)
19401941
'symbol_padding' => ' ',
19411942
'thousand_separator' => ',',
19421943
'decimal_separator' => '.',
1943-
'decimals' => 2
1944+
'decimals' => 2,
1945+
'code' => 'GHS'
19441946
);
19451947
}
19461948

@@ -1954,24 +1956,12 @@ public function add_paystack_currencies($currencies)
19541956
'symbol_padding' => ' ',
19551957
'thousand_separator' => ',',
19561958
'decimal_separator' => '.',
1957-
'decimals' => 2
1958-
);
1959-
}
1960-
1961-
// Check if the currency is already registered.
1962-
if (!array_key_exists('USD', $currencies)) {
1963-
// Add USD to the list of supported currencies.
1964-
$currencies['USD'] = array(
1965-
'name' => 'United States Dollar',
1966-
'symbol_left' => '$',
1967-
'symbol_right' => '',
1968-
'symbol_padding' => ' ',
1969-
'thousand_separator' => ',',
1970-
'decimal_separator' => '.',
1971-
'decimals' => 2
1959+
'decimals' => 2,
1960+
'code' => 'ZAR'
19721961
);
19731962
}
19741963

1964+
19751965
// Check if the currency is already registered.
19761966
if (!array_key_exists('KES', $currencies)) {
19771967
// Add KES to the list of supported currencies.
@@ -1982,7 +1972,8 @@ public function add_paystack_currencies($currencies)
19821972
'symbol_padding' => ' ',
19831973
'thousand_separator' => ',',
19841974
'decimal_separator' => '.',
1985-
'decimals' => 2
1975+
'decimals' => 2,
1976+
'code' => 'KES'
19861977
);
19871978
}
19881979

0 commit comments

Comments
 (0)