WOOT - Tabeller för aktiva produkter från WooCommerce

woot_ext_column_fields_options

Denna krok är för utvecklare av tillägg och gör det möjligt att lägga till anpassade inställningar i tabellkolumnerna.

Exempelvis:

//lägg till alternativ för bilagor av fälttyp add_action('woot_ext_column_fields_options', function($option_key, $args) { $table_id = intval($args['table_id']); $field_id = intval($args['field_id']) ; $res = ''; $col = woot()->columns->get($field_id, ['field_key', 'options']); if ($col) { switch ($option_key) { case 'attachment_group' : $selected = woot()->columns->options->field_options->extract_from($col['options'], $option_key); $res = [ 'pid' => $table_id, 'title' => esc_html__ ('Group', 'woot-attachments'), 'value' => WOOT_HELPER::draw_select([ 'class' => 'woot-columns-field-option', 'data-table-id' => $table_id, 'data-field-id' => $field_id, 'data-key' => $option_key ], $this->get_groups_set(), $selected), 'notes' => esc_html__('Vilken grupp av bilagor visar.  Ej valt betyder att alla bilagor från produktens metabox WOOT Bilagor kommer att visas.', 'woot-attachments'), ]; ha sönder; case 'attachment_in_popup': $is_checked = woot()->kolumner->options->field_options->extract_from($col['options'], $option_key); $res = [ 'pid' => $table_id, 'title' => esc_html__('I popup', 'woot-attachments'), 'value' => WOOT_HELPER::draw_switcher($option_key, $is_checked, $table_id .  '_'.