WOOT - WooCommerce-Tabellen für aktive Produkte

woot_ext_column_fields_options

Dieser Hook richtet sich an Erweiterungsentwickler und ermöglicht das Hinzufügen benutzerdefinierter Einstellungen zu den Tabellenspalten.

Beispiel:

//Optionen für Feldtypanhänge hinzufügen 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__('Welche Gruppe von Anhängen wird angezeigt.  Nicht ausgewählt bedeutet, dass alle Anhänge aus der Produktmetabox WOOT-Anhänge angezeigt werden.', 'woot-attachments'), ]; brechen; case 'attachment_in_popup': $is_checked = woot()->columns->options->field_options->extract_from($col['options'], $option_key); $res = [ 'pid' => $table_id, 'title' => esc_html__('In popup', 'woot-attachments'), 'value' => WOOT_HELPER::draw_switcher($option_key, $is_checked, $table_id .  '_' .