This hook allows to add custom settings to the tables
Code Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | add_action('tableon_extend_settings', function($rows) { $rows[] = [ 'id' => 0, 'title' => esc_html__('Hide checkout button'), 'value' => TABLEON_HELPER::draw_switcher('hide_checkout_btn', TABLEON_Settings::get('hide_checkout_btn'), 0, 'tableon_save_settings_field'), 'notes' => esc_html__('Hide checkout button on TABLEON Cart panel') ]; //+++ $selected = explode(',', TABLEON_Settings::get($this->setting_key)); $options = []; foreach (apply_filters(TABLEON_Default::$action, 0, []) as $key => $value) { if (isset($value['title'])) { $options[$key] = $value['title']; } } $rows[] = [ 'id' => 0, 'title' => esc_html__('Shop cart columns'), 'value' => [ 'value' => TABLEON_HELPER::draw_select([ 'class' => 'tableon-multiple-select', 'multiple' => '', 'data-action' => 'tableon_save_settings_field', 'data-values' => TABLEON_Settings::get($this->setting_key) ], $options, $selected), 'custom_field_key' => $this->setting_key ], 'notes' => sprintf(esc_html__('Columns of TABLEON shop cart. Press and wait to reorder.'), $this->default_columns) ]; return $rows; }, 10, 1); |
Also read: tableon_extend_settings_default