Making WordPress.org


Ignore:
Timestamp:
03/07/2016 11:34:12 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Budgets: Remove redundant country fields.

ISO 3166-compliant country fields were added in r2420, and these old ones should have been removed then.

We don't need to worry about back-compat because there aren't any current requests that are missing the new fields, and the data for the old fields is still in the database if we ever need it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php

    r2682 r2701  
    441441
    442442    /**
     443     * Get a country name from an alpha-2 or alpha-3 code
     444     *
     445     * @param string $country_code
     446     *
     447     * @return string
     448     */
     449    public static function get_country_name( $country_code ) {
     450        $countries = self::get_valid_countries_iso3166();
     451        $name      = '';
     452
     453        foreach ( $countries as $country ) {
     454            if ( $country_code === $country['alpha2'] || $country_code === $country['alpha3'] ) {
     455                $name = $country['name'];
     456            }
     457        }
     458
     459        return $name;
     460    }
     461
     462    /**
    443463     * Get a list of valid payment methods
    444464     *
     
    473493                case 'bank_state':
    474494                case 'bank_zip_code':
    475                 case 'bank_country':
    476495                case 'bank_bic':
    477496
     
    490509                case 'beneficiary_state':
    491510                case 'beneficiary_zip_code':
    492                 case 'beneficiary_country':
    493511
    494512                case 'payable_to':
     
    575593            'beneficiary_state',
    576594            'beneficiary_zip_code',
    577             'beneficiary_country',
    578595            'beneficiary_country_iso3166',
    579596            'ach_bank_name',
Note: See TracChangeset for help on using the changeset viewer.