WOOT - WooCommerce-Tabellen für aktive Produkte

woot_extend_options

Mit diesem Hook können Tabelleneinstellungen erweitert werden.

Beispiel:

add_filter('woot_extend_options', 'my_woot_extend_options', 10, 2); öffentliche Funktion my_woot_extend_options($rows, $table_id) { if ($table_id > 0) { if (WOOT::get_table_action($table_id) === self::$action) { $rows[] = [ 'id' => $table_id, 'title' => esc_html__('Sorting Dropdown anzeigen', 'woot-products-tables'), 'value' => WOOT_HELPER::draw_switcher('is_sort_droptdown_shown', woot()->Spalten->Optionen-> get($table_id, 'is_sort_droptdown_shown', 0), $table_id, 'woot_save_table_option'), 'value_custom_field_key' => 'is_sort_droptdown_shown', 'notes' => esc_html__('Displays Sorting listproducts', 'woot'- ) ]; $rows[] = [ 'id' => $table_id, 'title' => esc_html__('Dropdown-Felder sortieren', 'woot-products-tables'), 'value' => WOOT_HELPER::draw_select([ 'class' => 'woot-multiple-select', 'multiple' => '', 'data-action' => 'woot_save_table_option', 'data-values' => woot()->columns->options->get($ table_id, 'orderby_select_fields', ''), 'data-use-drag' => 1, ], apply_filters('woot_table_orderby_select_args', self::$orderby_select_fields, $table_id),explod(',', woot()-> column->options->get($table_id, 'orderby_select_fields', ''))), 'value_custom_field_key' => 'orderby_select_fields', 'notes' => esc_html__('Felder, die Sie in Sortier-Dropdown-Feldern sehen möchten.  Drücken Sie und warten Sie mit der Neubestellung.', 'woot-products-tables') ]; $rows[] = [ 'id' => $table_id, 'title' => esc_html__('Warenkorb anzeigen', 'woot-products-tables'), 'value' => WOOT_HELPER::draw_switcher('is_cart_shown', woot()->Spalten->Optionen->get($table_id, 'is_cart_shown', 0), $table_id, 'woot_save_table_option'), 'value_custom_field_key' => 'is_cart_shown', 'notes' => esc_html__('Warenkorb anzeigen als Schaltfläche mit Informationen, bei Klick erscheint Popup mit ausgewählten Produkten', 'woot-products-tables') ]; $rows[] = [ 'id' => $table_id, 'title' => esc_html__('Warenkorb/Sortierpositionen', 'woot-products-tables'), 'value' => WOOT_HELPER::draw_select([ 'data -action' => 'woot_save_table_option', ], [ 0 => esc_html__('Warenkorb rechts, Sortierung Dropdown links', 'woot-products-tables'), 1 => esc_html__('Warenkorb links, Sortierung Dropdown rechts', ' woot-products-tables'), ], woot()->Spalten->Optionen->get($table_id, 'cart_position', 0)), 'value_custom_field_key' => 'cart_position', 'notes' => esc_html__( 'Auf welcher Seite sollte der Warenkorb sein: links oder rechts sein. 

 

Siehe auch Datei: \classes\tables-options.php