Plugin Directory

Changeset 3287562


Ignore:
Timestamp:
05/05/2025 08:49:43 AM (11 months ago)
Author:
RemitaNet
Message:

Added functionality to accepts both naira and dollar

Location:
remita-payment-gateway/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • remita-payment-gateway/trunk/readme.txt

    r3284711 r3287562  
    4545= Note =
    4646
    47 Implementing this plugin accepts payments into Nigerian Naira (NGN) accounts only.
     47Implementing this plugin accepts payments into Nigerian Naira (NGN) and United State Dollars (USD) accounts only.
    4848
    4949= Plugin Features =
  • remita-payment-gateway/trunk/woocommerce_remita.php

    r3284698 r3287562  
    88  * Author URI:  https://remita.net/
    99  * Version:     5.8.2
    10   * WC requires at least: 8.0
    11   * WC tested up to: 9.1
     10  * WC requires at least: 6.0
     11  * WC tested up to: 6.5.2
    1212  * Text Domain: woo-remita
    13   * Requires Plugins: woocommerce
    1413 
    1514 */
     
    110109            add_filter('woocommerce_currencies', array(
    111110                $this,
    112                 'add_ngn_currency'
     111                'add_supported_currency'
    113112            ));
    114113            add_filter('woocommerce_currency_symbol', array(
    115114                $this,
    116                 'add_ngn_currency_symbol'
     115                'add_supported_currency_symbol'
    117116            ), 10, 2);
    118117
     
    127126
    128127
    129         function add_ngn_currency($currencies)
     128        function add_supported_currency($currencies)
    130129        {
    131130            $currencies['NGN'] = __('Nigerian Naira (NGN)', 'woocommerce');
     131            $currencies['USD'] = __('United States Dollar (USD)', 'woocommerce');
    132132            return $currencies;
    133133        }
    134134
    135         function add_ngn_currency_symbol($currency_symbol, $currency)
     135        function add_supported_currency_symbol($currency_symbol, $currency)
    136136        {
    137137            switch ($currency) {
     
    139139                    $currency_symbol = '₦';
    140140                    break;
     141                case 'USD':
     142                        $currency_symbol = '$';
     143                    break;
     144           
    141145            }
    142146
     
    149153
    150154            if (!in_array(get_option('woocommerce_currency'), array(
    151                 'NGN'
     155                'NGN', 'USD'
    152156            ))) {
    153157                $return = false;
Note: See TracChangeset for help on using the changeset viewer.