Fix hidden metadata
This commit is contained in:
@@ -306,30 +306,16 @@ class Wiaas_Order_Fields {
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_value_from_order_field($entry, $field) {
|
||||
|
||||
switch ($field->type) {
|
||||
|
||||
case 'wiaas_order_bundle':
|
||||
$value = $entry[$field->id];
|
||||
list ($order_id, $item_id) = explode('|', $value);
|
||||
|
||||
if ( ! empty($order_id) && ! empty($item_id)) {
|
||||
|
||||
return array(
|
||||
'id' => $item_id,
|
||||
'name' => $field->get_selected_bundle_display_name($value)
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
case '':
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create new entry for order delivery process action form
|
||||
*
|
||||
* @param int $order_id
|
||||
* @param array $form
|
||||
* @param int|null $bundle_item_id
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
public static function map_order_to_entry($order_id, $form, $bundle_item_id = null) {
|
||||
|
||||
if (empty($form['fields']) ||
|
||||
@@ -461,6 +447,7 @@ class Wiaas_Order_Fields {
|
||||
$installation_item = $installation_items[0];
|
||||
|
||||
$entry[(string) $field->id] = 'wiaas_installation_' . $order->get_id() . '|' . $installation_item->get_id();
|
||||
|
||||
} else if (count($installation_items) > 1) {
|
||||
|
||||
// force admin to select installation
|
||||
|
||||
Reference in New Issue
Block a user