Service Provider

Service Providers e.g `airtime_providers` (and similarly `data_providers`, `cable_providers`)

Modify the list of **Network Brands** (e.g., MTN, Glo, Smile) that provide Airtime for the current country. Note: This filter modifies the available _brands/networks_, not the underlying API gateway.

**Before:** `[‘mtn’, ‘glo’, ‘9mobile’, ‘airtel’]` (Pulled from `country.json` based on the active country)

**Hook Example:**

```php

add_filter('airtime_providers', function($providers) {

    // $providers is a simple array of network string IDs

    if (!in_array('smile', $providers)) {

        $providers[] = 'smile'; // Adding a new network brand to airtime

    }

    return $providers;

});

```

**After:** `[‘mtn’, ‘glo’, ‘9mobile’, ‘airtel’, ‘smile’]`

Was this page helpful?