Show countries for delivery process forms. Refactor countries.
This commit is contained in:
@@ -11,9 +11,9 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension {
|
||||
|
||||
protected $_slug = 'wiaas_delivery_process';
|
||||
|
||||
protected $_title = 'Delivery Process';
|
||||
protected $_title = 'Delivery Settings';
|
||||
|
||||
protected $_short_title = 'Delivery Process';
|
||||
protected $_short_title = 'Delivery Settings';
|
||||
|
||||
|
||||
public static function get_instance() {
|
||||
@@ -125,7 +125,7 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension {
|
||||
|
||||
$tabs[] = array(
|
||||
'name' => $this->_slug,
|
||||
'label' => esc_html__( 'Delivery Process', 'wiaas' ),
|
||||
'label' => esc_html__( 'Delivery Settings', 'wiaas' ),
|
||||
'query' => array( 'fid' => null )
|
||||
);
|
||||
|
||||
@@ -218,14 +218,16 @@ class Wiaas_Delivery_Process_Addon extends Gravity_Flow_Extension {
|
||||
return;
|
||||
}
|
||||
|
||||
$countries = Wiaas_Countries::get_available_countries();
|
||||
|
||||
$countries_choices = array();
|
||||
foreach ($countries as $country) {
|
||||
$countries_choices[] = array( 'value' => $country['code'] , 'label' => $country['name'] );
|
||||
}
|
||||
|
||||
$this->settings_select(array(
|
||||
'name' => 'delivery_country',
|
||||
'choices' => array(
|
||||
array( 'value' => 'se', 'label' => 'Sweden' ),
|
||||
array( 'value' => 'dk', 'label' => 'Denmark' ),
|
||||
array( 'value' => 'fi', 'label' => 'Finland' )
|
||||
),
|
||||
'choices' => $countries_choices,
|
||||
'after_select' => '<p class="description"> Choose country for which this process is defined.</p>'
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user