当前位置: 首页>>代码示例>>PHP>>正文


PHP WPSC_Country::set方法代码示例

本文整理汇总了PHP中WPSC_Country::set方法的典型用法代码示例。如果您正苦于以下问题:PHP WPSC_Country::set方法的具体用法?PHP WPSC_Country::set怎么用?PHP WPSC_Country::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPSC_Country的用法示例。


在下文中一共展示了WPSC_Country::set方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _wpsc_add_region_name_meta

/**
 * 3.8.14 supports country meta and a feature that let's a countries regions be called by the
 * proper name.  Here we initialize the values.
 *
 * @access private
 * @since 3.8.14
 *
 */
function _wpsc_add_region_name_meta()
{
    $wpsc_country = new WPSC_Country('US');
    $wpsc_country->set('region_label', __('State', 'wp-e-commerce'));
    $wpsc_country = new WPSC_Country('CA');
    $wpsc_country->set('region_label', __('Province', 'wp-e-commerce'));
}
开发者ID:ashik968,项目名称:digiplot,代码行数:15,代码来源:10.php

示例2: _wpsc_maybe_create_UK

function _wpsc_maybe_create_UK()
{
    $country = new WPSC_Country('GB', 'isocode');
    if (!$country->exists()) {
        $country->set(array('id' => 138, 'country' => __('United Kingdom', 'wpsc'), 'currency' => __('Pound Sterling', 'wpsc'), 'symbol' => __('£', 'wpsc'), 'symbol_html' => __('£', 'wpsc'), 'code' => __('GBP', 'wpsc'), 'continent' => 'europe'));
        $country->save();
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:8,代码来源:3.php

示例3: _wpsc_fix_united_kingdom

/**
 * Reset United Kingdom country data to default, hide ISO code 'UK'
 *
 * @access private
 * @since 3.8.14
 */
function _wpsc_fix_united_kingdom()
{
    if ($wpsc_country = WPSC_Countries::get_country('UK')) {
        $legacy_ok_country_was_visible = $wpsc_country->is_visible();
        $wpsc_country = new WPSC_Country(array('visible' => '0', 'isocode' => 'UK'));
        $wpsc_country->set('_is_country_legacy', true);
    }
    $wpsc_country = new WPSC_Country(array('country' => __('United Kingdom', 'wpsc'), 'isocode' => 'GB', 'currency' => __('Pound Sterling', 'wpsc'), 'symbol' => __('£', 'wpsc'), 'symbol_html' => __('£', 'wpsc'), 'code' => __('GBP', 'wpsc'), 'continent' => 'europe', 'visible' => $legacy_ok_country_was_visible ? '0' : '1', 'has_regions' => '0', 'tax' => '0'));
    //make sure base country is ok after the UK/GB fix
    $base_country = get_option('base_country', '');
    if (!empty($base_country) && is_numeric($base_country)) {
        $wpsc_country = new WPSC_Country($base_country);
        if ('UK' == $wpsc_country->get_isocode()) {
            $wpsc_country = new WPSC_Country('GB');
            update_option('base_country', $wpsc_country->get_id());
        }
    }
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:24,代码来源:11.php

示例4:

 function test_set()
 {
     $country = new WPSC_Country(self::COUNTRY_ID_WITHOUT_REGIONS);
     $country->set('name', 'XXX');
     // This should not set the property.
     $name = $country->get('name');
     $this->assertEquals(self::COUNTRY_NAME_WITHOUT_REGIONS, $name);
     $country->set('isocode', 'XX');
     // This should not set the property.
     $isocode = $country->get('isocode');
     $this->assertEquals(self::COUNTRY_ISOCODE_WITHOUT_REGIONS, $isocode);
     $country->set('omgwtfbbq_new', 'OMG');
     // This SHOULD set the property.
     $omg = $country->get('omgwtfbbq_new');
     $this->assertEquals('OMG', $omg);
     $country->set('omgwtfbbq_new', '');
     // Clear it out.
     $omg = $country->get('omgwtfbbq_new');
     $this->assertEquals('', $omg);
 }
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:20,代码来源:test-wpsc-country.class.php

示例5: _wpsc_add_region_label_to_uk

/**
 * Add the county region label to the uk
 *
 * @access private
 * @since 3.8.14.1
 */
function _wpsc_add_region_label_to_uk()
{
    $wpsc_country = new WPSC_Country('GB');
    $wpsc_country->set('region_label', __('County', 'wpsc'));
}
开发者ID:RJHanson292,项目名称:WP-e-Commerce,代码行数:11,代码来源:13.php

示例6: _wpsc_fix_sudan_currency

function _wpsc_fix_sudan_currency()
{
    $country = new WPSC_Country('SD', 'isocode');
    $country->set(array('currency' => __('Sudanese Pound', 'wpsc'), 'code' => __('SDG', 'wpsc')));
    $country->save();
}
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:6,代码来源:1.php

示例7: _wpsc_fix_zimbabwe_currency

function _wpsc_fix_zimbabwe_currency()
{
    $country = new WPSC_Country('ZW', 'isocode');
    $country->set(array('currency' => __('US Dollar', 'wpsc'), 'symbol' => __('$', 'wpsc'), 'symbol_html' => __('&#036', 'wpsc'), 'code' => 'USD', 'continent' => 'asiapacific'));
    $country->save();
}
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:6,代码来源:2.php


注:本文中的WPSC_Country::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。