shopp_countries

filters the countries lookup table.

add_filter( 'shopp_countries', [callback] )

@param array $countries the countries lookup array.

Description

filters the countries lookup table.

Note! re-save the base of operations setting in Shopp → Setup for the system to load the updated base of operations profile.

Example

// register filter callback
add_filter('shopp_countries', 'shopp_countries_filter');

// create filter function
function shopp_countries_filter( $countries ) {
    // Example country entry
    // See ISO-3166 for 2-letter country standard
    // See ISO-4217 for currency codes
    $countries['US'] =
        array(
            'name' => 'USA',
            'currency' => array(
                    'code' => 'USD', // iso4217 US dollar
                    'format' => '$#,###.##'
                    ),
            'units' => 'imperial', // imperial or metric
            'region' => 0 // worldwide regions
            );
    return $countries;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar